diff options
author | Bill King <bill.king@nokia.com> | 2009-07-30 01:18:59 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-07-30 01:18:59 (GMT) |
commit | 15ccaa0995da2061009d269fa875e8601da1a3c8 (patch) | |
tree | 25c3fb8c50b9e5aa5b8dd2de142195c41db812b5 /src | |
parent | d63f08018b0952eb917e090f214a1dbe24e2a767 (diff) | |
download | Qt-15ccaa0995da2061009d269fa875e8601da1a3c8.zip Qt-15ccaa0995da2061009d269fa875e8601da1a3c8.tar.gz Qt-15ccaa0995da2061009d269fa875e8601da1a3c8.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/sql/drivers/mysql/qsql_mysql.cpp | 6 |
1 files 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; } |