[Libreoffice-bugs] [Bug 121553] Editing: Firebird: Table editor erroneously prompts to change CLOB field to a BLOB field during alter table

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Oct 30 06:04:50 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=121553

--- Comment #7 from Lionel Elie Mamane <lionel at mamane.lu> ---
Try:

        // Clob (SQL_BLOB SUBTYPE TEXT)
-       aRow[1] = new ORowSetValueDecorator(OUString("BLOB")); // BLOB, with
subtype 1
+       aRow[1] = new ORowSetValueDecorator(OUString("BLOB SUBTYPE TEXT")); //
BLOB, with subtype 1
        aRow[2] = new ORowSetValueDecorator(DataType::CLOB);
        aRow[3] = new ORowSetValueDecorator(sal_Int32(2147483647)); //
Precision = max length
        aRow[6] = new ORowSetValueDecorator(); // Create Params
        aRow[9] = new ORowSetValueDecorator(
                sal_Int16(ColumnSearch::FULL)); // Searchable
        aRow[12] = new ORowSetValueDecorator(false); // Autoincrement
        aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale
        aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale
        tmp.push_back(aRow);

        // Longvarbinary (SQL_BLOB SUBTYPE BINARY)
        // Distinguished from simple blob with a user-defined subtype.
+       aRow[1] =         aRow[2] = new
ORowSetValueDecorator(DataType::LONGVARBINARY);
        aRow[2] = new ORowSetValueDecorator(DataType::LONGVARBINARY);
        tmp.push_back(aRow);

and

In firebird::ColumnTypeInfo::getColumnTypeName()
Replace:
         case DataType::CLOB:
            return "CLOB";
by
         case DataType::CLOB:
            return "BLOB SUBTYPE TEXT";
and replace
         case DataType::BLOB:
            return "BLOB";
by
         case DataType::CLOB:
            return "BLOB SUBTYPE BINARY";

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201030/bcc61f99/attachment.htm>


More information about the Libreoffice-bugs mailing list