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 <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Andy Shaw 2020-07-31 13:00:46 +02:00
parent 7406a8b45a
commit 6379b697a6

View File

@ -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 " 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 " "FROM RDB$RELATION_FIELDS a, RDB$FIELDS b "
"WHERE b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE " "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$RELATION_NAME = '") + QString::fromLatin1(v.relname, v.relname_length) + QLatin1String("' "
"AND a.RDB$FIELD_NAME = '") + QString::fromLatin1(v.sqlname, v.sqlname_length).toUpper() + QLatin1String("' ")); "AND a.RDB$FIELD_NAME = '") + QString::fromLatin1(v.sqlname, v.sqlname_length) + QLatin1String("' "));
if(q.first()) { if(q.first()) {
if(v.sqlscale < 0) { if(v.sqlscale < 0) {
f.setLength(q.value(0).toInt()); f.setLength(q.value(0).toInt());