From 992895b3f46ddaecbcf779cb2977de4c5cc420c7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 28 Mar 2009 09:42:23 +0100 Subject: [PATCH] mysql plugin: Make the `Database' option optional again. --- src/mysql.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mysql.c b/src/mysql.c index 0d3cb7f8..a129f40f 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -223,7 +223,6 @@ static int mysql_config (oconfig_item_t *ci) /* {{{ */ return (status); } assert (db->instance != NULL); - db->database = strdup (db->instance); } else { @@ -318,11 +317,6 @@ static int mysql_config (oconfig_item_t *ci) /* {{{ */ db->port); status = -1; } - if (db->database == NULL) - { - ERROR ("mysql plugin: No `Database' configured"); - status = -1; - } break; } /* while (status == 0) */ @@ -332,7 +326,8 @@ static int mysql_config (oconfig_item_t *ci) /* {{{ */ user_data_t ud; char cb_name[DATA_MAX_NAME_LEN]; - DEBUG ("mysql plugin: Registering new read callback: %s", db->database); + DEBUG ("mysql plugin: Registering new read callback: %s", + (db->database != NULL) ? db->database : ""); memset (&ud, 0, sizeof (ud)); ud.data = (void *) db; -- 2.11.0