diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-04-18 15:14:31 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-05-03 22:43:51 +0200 |
commit | d499cb3bd585e9fcc21bc586cad3d2ad2487a451 (patch) | |
tree | c014ff474ce433e081cb46b93201c697148c3753 /connectivity/source | |
parent | c31c338fa2a941e128d0dac251fb99f777ac7b00 (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
Reviewed-on: https://gerrit.libreoffice.org/36642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity/source')
-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 9f44363427a5..d456f5efcdaa 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1086,8 +1086,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->getShort(5) == 1 ) ? OUString("YES") : OUString("NO")); // 8. Grantable @@ -1531,17 +1531,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 @@ -1782,8 +1782,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(bool(xRow->getBoolean(5))); // 7. Is Grantable |