From: Gunnar Beutner Date: Thu, 1 Aug 2013 07:47:47 +0000 (+0200) Subject: Fix: Table prefix was missing in some queries. X-Git-Tag: v0.0.3~767 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ea75203ce5888c503a6bd299514819e103e8d16;p=icinga2 Fix: Table prefix was missing in some queries. --- diff --git a/components/ido_mysql/mysqldbconnection.cpp b/components/ido_mysql/mysqldbconnection.cpp index 637b52394..a5c84744e 100644 --- a/components/ido_mysql/mysqldbconnection.cpp +++ b/components/ido_mysql/mysqldbconnection.cpp @@ -336,13 +336,13 @@ void MysqlDbConnection::ExecuteQuery(const DbQuery& query) switch (query.Type) { case DbQueryInsert: - qbuf << "INSERT INTO " << query.Table; + qbuf << "INSERT INTO " << GetTablePrefix() << query.Table; break; case DbQueryUpdate: - qbuf << "UPDATE " << query.Table << "SET"; + qbuf << "UPDATE " << GetTablePrefix() << query.Table << "SET"; break; case DbQueryDelete: - qbuf << "DELETE FROM " << query.Table; + qbuf << "DELETE FROM " << GetTablePrefix() << query.Table; break; default: ASSERT(!"Invalid query type.");