Kaydet (Commit) d499cb3b authored tarafından Julien Nabet's avatar Julien Nabet

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/36642Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Tested-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst c31c338f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment