From 15ccaa0995da2061009d269fa875e8601da1a3c8 Mon Sep 17 00:00:00 2001 From: Bill King Date: Thu, 30 Jul 2009 11:18:59 +1000 Subject: Fixes hack around show queries not allowed to be prepared. Mysql queries other than select can't be prepared, otherwise they fail to return the necessary meta-information to enable them to be seen as returning data under certain versions of mysql. This fixes the hack to work correctly until we stop preparing queries automagically. --- src/sql/drivers/mysql/qsql_mysql.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index 8f377bd..3295a41 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -1336,8 +1336,8 @@ QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const if (!isOpen()) return idx; - prepQ = d->preparedQuerys; - d->preparedQuerys = false; + prepQ = d->preparedQuerysEnabled; + d->preparedQuerysEnabled = false; QSqlQuery i(createResult()); QString stmt(QLatin1String("show index from %1;")); @@ -1351,7 +1351,7 @@ QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const } } - d->preparedQuerys = prepQ; + d->preparedQuerysEnabled = prepQ; return idx; } -- cgit v0.12