summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-05-07 23:37:44 (GMT)
committerBill King <bill.king@nokia.com>2009-05-07 23:37:44 (GMT)
commit5a4b17a279aaa8a0196bd645fd9095639ccb7849 (patch)
treeee5cf2833be718319a855a0caf1ec270c0c4d294 /src/sql
parent90a65aa6611eb33229cdc00ffe6c22012944ba1a (diff)
downloadQt-5a4b17a279aaa8a0196bd645fd9095639ccb7849.zip
Qt-5a4b17a279aaa8a0196bd645fd9095639ccb7849.tar.gz
Qt-5a4b17a279aaa8a0196bd645fd9095639ccb7849.tar.bz2
Fixes QIBASE driver crashes on multiple execution of a prepared query
Task-number: 246808
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index 9eeb41d..6834d9a 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -871,7 +871,7 @@ QIBaseResult::~QIBaseResult()
bool QIBaseResult::prepare(const QString& query)
{
- //qDebug("prepare: %s\n", qPrintable(query));
+// qDebug("prepare: %s", qPrintable(query));
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
return false;
d->cleanup();
@@ -1025,7 +1025,7 @@ bool QIBaseResult::exec()
}
if (ok) {
- if (colCount()) {
+ if (colCount() && d->queryType != isc_info_sql_stmt_exec_procedure) {
isc_dsql_free_statement(d->status, &d->stmt, DSQL_close);
if (d->isError(QT_TRANSLATE_NOOP("QIBaseResult", "Unable to close statement")))
return false;
@@ -1039,7 +1039,7 @@ bool QIBaseResult::exec()
return false;
// Not all stored procedures necessarily return values.
- if (d->queryType == isc_info_sql_stmt_exec_procedure && d->sqlda->sqld == 0)
+ if (d->queryType == isc_info_sql_stmt_exec_procedure && d->sqlda && d->sqlda->sqld == 0)
delDA(d->sqlda);
if (d->sqlda)