summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91f0e88)
raw | patch | inline | side by side (parent: 91f0e88)
author | Sebastian Harl <sh@teamix.net> | |
Wed, 1 Aug 2012 07:16:34 +0000 (09:16 +0200) | ||
committer | Sebastian Harl <sh@teamix.net> | |
Wed, 1 Aug 2012 07:16:34 +0000 (09:16 +0200) |
The database instance is specified as argument to the <Database> block.
Without this fix, we cannot specify two database blocks without the
(optional!) 'Database' option as this would result in registering two read
callbacks with the name 'mysql'.
Thanks to Johan Bergström for reporting this on IRC!
Without this fix, we cannot specify two database blocks without the
(optional!) 'Database' option as this would result in registering two read
callbacks with the name 'mysql'.
Thanks to Johan Bergström for reporting this on IRC!
src/mysql.c | patch | blob | history |
diff --git a/src/mysql.c b/src/mysql.c
index 6b636787555b7e177a09abf20b71cd7cbbb7f9a7..32b352bbdd15919631a60ba78ef6233230dd407f 100644 (file)
--- a/src/mysql.c
+++ b/src/mysql.c
ud.data = (void *) db;
ud.free_func = mysql_database_free;
- if (db->database != NULL)
+ if (db->instance != NULL)
ssnprintf (cb_name, sizeof (cb_name), "mysql-%s",
- db->database);
+ db->instance);
else
sstrncpy (cb_name, "mysql", sizeof (cb_name));