summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqlresult.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 24ca1ffeda..5b440d704b 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -112,6 +112,13 @@ QString QSqlResultPrivate::positionalToNamedBinding(const QString &query) const
QString QSqlResultPrivate::namedToPositionalBinding(const QString &query)
{
+ // In the Interbase case if it is an EXECUTE BLOCK then it is up to the
+ // caller to make sure that it is not using named bindings for the wrong
+ // parts of the query since Interbase uses them literally
+ if (sqldriver->dbmsType() == QSqlDriver::Interbase &&
+ query.trimmed().startsWith(QLatin1String("EXECUTE BLOCK"), Qt::CaseInsensitive))
+ return query;
+
int n = query.size();
QString result;