diff options
author | Bill King <bking@trolltech.com> | 2009-07-03 05:31:54 (GMT) |
---|---|---|
committer | Bill King <bking@trolltech.com> | 2009-07-03 05:31:54 (GMT) |
commit | e0912dad8095adb8da4bd27128a5baacfda59eb5 (patch) | |
tree | a3acb790dcfc2dee4fca20873d99dd63147b8233 /src/sql/drivers | |
parent | 5b701c1bbbbf4993117bd0311717b73fafae02fd (diff) | |
download | Qt-e0912dad8095adb8da4bd27128a5baacfda59eb5.zip Qt-e0912dad8095adb8da4bd27128a5baacfda59eb5.tar.gz Qt-e0912dad8095adb8da4bd27128a5baacfda59eb5.tar.bz2 |
Fixes ::record for dialect 3 named tables in interbase/firebird.
The comparison was mistakenly only uppercasing one side, so mixed case
table names were reporting back as if they weren't found for both
QSqlDatabase::record() and QSqlDatabase::primaryIndex()
Diffstat (limited to 'src/sql/drivers')
-rw-r--r-- | src/sql/drivers/ibase/qsql_ibase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp index 0033418..5e94c81 100644 --- a/src/sql/drivers/ibase/qsql_ibase.cpp +++ b/src/sql/drivers/ibase/qsql_ibase.cpp @@ -1583,7 +1583,7 @@ QSqlRecord QIBaseDriver::record(const QString& tablename) const "b.RDB$FIELD_SCALE, b.RDB$FIELD_PRECISION, 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 = '") + tablename.toUpper() + QLatin1String("' " + "AND UPPER(a.RDB$RELATION_NAME) = '") + tablename.toUpper() + QLatin1String("' " "ORDER BY a.RDB$FIELD_POSITION")); while (q.next()) { @@ -1616,7 +1616,7 @@ QSqlIndex QIBaseDriver::primaryIndex(const QString &table) const q.exec(QLatin1String("SELECT a.RDB$INDEX_NAME, b.RDB$FIELD_NAME, d.RDB$FIELD_TYPE, d.RDB$FIELD_SCALE " "FROM RDB$RELATION_CONSTRAINTS a, RDB$INDEX_SEGMENTS b, RDB$RELATION_FIELDS c, RDB$FIELDS d " "WHERE a.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY' " - "AND a.RDB$RELATION_NAME = '") + table.toUpper() + + "AND UPPER(a.RDB$RELATION_NAME) = '") + table.toUpper() + QLatin1String(" 'AND a.RDB$INDEX_NAME = b.RDB$INDEX_NAME " "AND c.RDB$RELATION_NAME = a.RDB$RELATION_NAME " "AND c.RDB$FIELD_NAME = b.RDB$FIELD_NAME " |