From fbda0000313d32e7e6008bbaec6c976fe2862ca0 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Tue, 12 Oct 2010 19:55:55 +0000 Subject: [PATCH] fix for checking the system to make changes to the table --- .../accounting_storage/mysql/accounting_storage_mysql.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c index 2f639074d5f..6d309356ddf 100644 --- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c +++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c @@ -1017,9 +1017,11 @@ extern int create_cluster_tables(MYSQL *db_conn, char *cluster_name) cluster_name, assoc_table); /* See if the tables exist (if not new cluster, so no altering - has to take place. + has to take place.) table_name can't be used here since it + has the "'s in it which don't work in this query. */ - query = xstrdup_printf("show tables like '%s';", table_name); + query = xstrdup_printf("show tables like '%s_%s';", + cluster_name, assoc_table); debug4("(%s:%d) query\n%s", THIS_FILE, __LINE__, query); if(!(result = mysql_db_query_ret(db_conn, query, 0))) { -- GitLab