summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/ibase/qsql_ibase.cpp
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-06-15 00:28:47 (GMT)
committerBill King <bill.king@nokia.com>2009-06-15 03:09:19 (GMT)
commitb8430baeadd62b643ff07a2588c62141146c08fd (patch)
treedc2d7d5e0add68df3b60b67faeaa778617b76ced /src/sql/drivers/ibase/qsql_ibase.cpp
parent16fe846058aa0a89577660d18bdc0aceda7fecfd (diff)
downloadQt-b8430baeadd62b643ff07a2588c62141146c08fd.zip
Qt-b8430baeadd62b643ff07a2588c62141146c08fd.tar.gz
Qt-b8430baeadd62b643ff07a2588c62141146c08fd.tar.bz2
BT Revert "Fix the behaviour of sql classes regarding quoted identifiers"
This reverts commit bb7bddc47dd0748b45d22180d9e3c8e5209010b3 due to forward binary compatibility issues in a point release.
Diffstat (limited to 'src/sql/drivers/ibase/qsql_ibase.cpp')
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index 1645555..523ec4d 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -1558,16 +1558,12 @@ QSqlRecord QIBaseDriver::record(const QString& tablename) const
QSqlQuery q(createResult());
q.setForwardOnly(true);
- QString table = tablename;
- if (isIdentifierEscaped(table, QSqlDriver::TableName))
- table = stripDelimiters(table, QSqlDriver::TableName);
- else
- table = table.toUpper();
+
q.exec(QLatin1String("SELECT a.RDB$FIELD_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_LENGTH, "
"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 = '") + table + QLatin1String("' "
+ "AND a.RDB$RELATION_NAME = '") + tablename.toUpper() + QLatin1String("' "
"ORDER BY a.RDB$FIELD_POSITION"));
while (q.next()) {
@@ -1595,18 +1591,12 @@ QSqlIndex QIBaseDriver::primaryIndex(const QString &table) const
if (!isOpen())
return index;
- QString tablename = table;
- if (isIdentifierEscaped(tablename, QSqlDriver::TableName))
- tablename = stripDelimiters(tablename, QSqlDriver::TableName);
- else
- tablename = tablename.toUpper();
-
QSqlQuery q(createResult());
q.setForwardOnly(true);
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 = '") + tablename +
+ "AND 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 "