diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-04-18 15:14:31 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-05-04 12:48:37 +0200 |
commit | a36677826a6057d4bbbb35149425c8dc4affb1e2 (patch) | |
tree | fd5fddbf586d6f1ac33646860828d8d3b32595da /connectivity | |
parent | faed284ef605c64269e41c2364a297367fb73c64 (diff) |
tdf#107196: fix firebird relationship
Let's spread string sanitizing
see https://bugs.documentfoundation.org/show_bug.cgi?id=107196#c3
Furthermore, in example file from the bugtracker,
relationship between f2 fields were present several times.
So I had to delete it several times to really remove it.
Change-Id: I4fbe10c479af3d4fa5ccfb290f128fdd2a6d49a9
(cherry picked from commit d499cb3bd585e9fcc21bc586cad3d2ad2487a451)
Reviewed-on: https://gerrit.libreoffice.org/37218
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
(cherry picked from commit dfb7ee83299606f7c46bc175bc47710ee887009c)
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 4c2e3934e735..9e6d095ab6ff 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1121,8 +1121,8 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( aCurrentRow[3] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(1))); // 4. COLUMN_NAME aCurrentRow[4] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(6))); - aCurrentRow[5] = new ORowSetValueDecorator(xRow->getString(2)); // 5. GRANTOR - aCurrentRow[6] = new ORowSetValueDecorator(xRow->getString(3)); // 6. GRANTEE + aCurrentRow[5] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(2))); // 5. GRANTOR + aCurrentRow[6] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(3))); // 6. GRANTEE aCurrentRow[7] = new ORowSetValueDecorator(xRow->getString(4)); // 7. Privilege aCurrentRow[7] = new ORowSetValueDecorator(xRow->getBoolean(5)); // 8. Grantable @@ -1565,17 +1565,17 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( while(rs->next()) { - aCurrentRow[3] = new ORowSetValueDecorator(xRow->getString(7)); // PK table - aCurrentRow[4] = new ORowSetValueDecorator(xRow->getString(8)); // PK column - aCurrentRow[7] = new ORowSetValueDecorator(xRow->getString(10)); // FK table - aCurrentRow[8] = new ORowSetValueDecorator(xRow->getString(11)); // FK column + aCurrentRow[3] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(7))); // PK table + aCurrentRow[4] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(8))); // PK column + aCurrentRow[7] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(10))); // FK table + aCurrentRow[8] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(11))); // FK column aCurrentRow[9] = new ORowSetValueDecorator(xRow->getShort(9)); // PK sequence number - aCurrentRow[10] = new ORowSetValueDecorator(aRuleMap[xRow->getString(1)]); // update role - aCurrentRow[11] = new ORowSetValueDecorator(aRuleMap[xRow->getString(2)]); // delete role + aCurrentRow[10] = new ORowSetValueDecorator(aRuleMap[sanitizeIdentifier(xRow->getString(1))]); // update role + aCurrentRow[11] = new ORowSetValueDecorator(aRuleMap[sanitizeIdentifier(xRow->getString(2))]); // delete role - aCurrentRow[12] = new ORowSetValueDecorator(xRow->getString(4)); // FK name - aCurrentRow[13] = new ORowSetValueDecorator(xRow->getString(3)); // PK name + aCurrentRow[12] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(4))); // FK name + aCurrentRow[13] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(3))); // PK name aCurrentRow[14] = new ORowSetValueDecorator(Deferrability::NONE); // deferrability @@ -1819,8 +1819,8 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( { // 3. TABLE_NAME aRow[3] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(1))); - aRow[4] = new ORowSetValueDecorator(xRow->getString(2)); // 4. GRANTOR - aRow[5] = new ORowSetValueDecorator(xRow->getString(3)); // 5. GRANTEE + aRow[4] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(2))); // 4. GRANTOR + aRow[5] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(3))); // 5. GRANTEE aRow[6] = new ORowSetValueDecorator(xRow->getString(4)); // 6. Privilege aRow[7] = new ORowSetValueDecorator(xRow->getBoolean(5)); // 7. Is Grantable |