summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-07-30 11:18:59 +1000
committerBill King <bill.king@nokia.com>2009-07-30 11:18:59 +1000
commit15ccaa0995da2061009d269fa875e8601da1a3c8 (patch)
tree25c3fb8c50b9e5aa5b8dd2de142195c41db812b5 /src/sql
parentd63f08018b0952eb917e090f214a1dbe24e2a767 (diff)
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/sql')
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp6
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 8f377bd370..3295a41d5b 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;
}