From 6379b697a6029e959994c8d7ea6478f363265a20 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 31 Jul 2020 13:00:46 +0200 Subject: Interbase: Don't call toUpper() on the names as they are escaped Interbase is case sensitive when tables/fields are escaped so we should ensure that we pass the value as is. Pick-to: 5.15 Change-Id: Ia6c4edc9c1e675bd95913c85d47bf22c418d2113 Reviewed-by: Volker Hilsheimer Reviewed-by: Edward Welbourne --- src/plugins/sqldrivers/ibase/qsql_ibase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp index eae72fff4f..dc4eb036d8 100644 --- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp +++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp @@ -1357,8 +1357,8 @@ QSqlRecord QIBaseResult::record() const q.exec(QLatin1String("select b.RDB$FIELD_PRECISION, b.RDB$FIELD_SCALE, b.RDB$FIELD_LENGTH, a.RDB$NULL_FLAG " "FROM RDB$RELATION_FIELDS a, RDB$FIELDS b " "WHERE b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE " - "AND a.RDB$RELATION_NAME = '") + QString::fromLatin1(v.relname, v.relname_length).toUpper() + QLatin1String("' " - "AND a.RDB$FIELD_NAME = '") + QString::fromLatin1(v.sqlname, v.sqlname_length).toUpper() + QLatin1String("' ")); + "AND a.RDB$RELATION_NAME = '") + QString::fromLatin1(v.relname, v.relname_length) + QLatin1String("' " + "AND a.RDB$FIELD_NAME = '") + QString::fromLatin1(v.sqlname, v.sqlname_length) + QLatin1String("' ")); if(q.first()) { if(v.sqlscale < 0) { f.setLength(q.value(0).toInt()); -- cgit v1.2.3