View Issue Details

IDProjectCategoryView StatusLast Update
0004508SymmetricDSBugpublic2023-09-13 17:25
Reportertimh52280 Assigned To 
Prioritynormal 
Status closedResolutionopen 
Product Version3.12.2 
Summary0004508: User-defined blob subtypes are handled wrong by SymmetricDS on Firebird Databases
DescriptionFirebird defines the BLOB Subtypes as following:

Subtype Meaning
0 Standard blob, non-specified binary data (image, video, audio, whatever)
1 Text blob, e.g. memo fields (basic character functions work)
2 BLR (used for definitions of Firebird procedures, triggers, etc.)
Text Alternative for defining subtype 1
Positive value Reserved for Firebird
Negative value User-defined blob subtypes

But when Symmetric generates the xml schema of the database, the negative subtypes are represented incorrectly, since instead of taking their value as-1,-2,-3, etc. it only places "<0" in the subtype, causing a token error when Symmectricds want to execute that query.

I will show you the problem with the scheme:

<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="dataextractor">
        <table name="REGISTRY">
                <column name="ELEMENTO_ID" primaryKey="true" primaryKeySeq="1" required="true" type="INTEGER" size="10">
                        <platform-column name="firebird" type="INTEGER" size="10"/>
                </column>
                <column name="NOMBRE" required="true" type="VARCHAR" size="50">
                        <platform-column name="firebird" type="VARCHAR" size="50"/>
                </column>
                <column name="TIPO" required="true" type="CHAR" size="1">
                        <platform-column name="firebird" type="CHAR" size="1"/>
                </column>
                <column name="PADRE_ID" required="true" type="INTEGER" size="10">
                        <platform-column name="firebird" type="INTEGER" size="10"/>
                </column>
                <column name="VALOR" type="VARCHAR" size="100">
                        <platform-column name="firebird" type="VARCHAR" size="100"/>
                </column>
                <column name="VALOR_BLOB" type="BLOB">
                        <platform-column name="firebird" type="BLOB SUB_TYPE <0"/> **// THAT SUB_TYPE MUST BE -1 NOT <0, IF IT HAS <0 THE QUERY CAUSES A TOKEN ERROR**
                </column>
                <column name="VALOR_MEMO" type="LONGVARCHAR" size="254">
                        <platform-column name="firebird" type="BLOB SUB_TYPE 1"/>
                </column>
        </table>
</database>
Tagsddl/schema, dialect: firebird, large objects

Activities

emiller

2022-09-08 20:45

developer   ~0002187

I attempted to reproduce this issue using SymmetricDS 3.14.1 and Firebird 3.0. I ran dbexport for my test table and SymmetricDS generated the following XML, including the correct SUB_TYPE:

<database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="dbexport" encoding="UTF-8">
    <table name="TEST">
        <column name="ID" primaryKey="true" primaryKeySeq="1" required="true" type="INTEGER" size="10">
            <platform-column name="firebird" type="INTEGER" size="10"/>
        </column>
        <column name="TEST" type="BLOB">
            <platform-column name="firebird" type="BLOB SUB_TYPE -1"/>
        </column>
    </table>
</database>

I then ran dbimport on a different Firebird node and SymmetricDS successfully imported the XML.

What Firebird version and dialect are you using?

Issue History

Date Modified Username Field Change
2020-08-24 20:31 timh52280 New Issue
2020-08-24 20:33 timh52280 Tag Attached: blob
2020-08-24 20:33 timh52280 Tag Attached: firebird
2020-08-24 20:33 timh52280 Tag Attached: negative
2020-08-24 20:33 timh52280 Tag Attached: subtype
2020-09-03 12:51 elong Tag Detached: subtype
2020-09-03 12:51 elong Tag Detached: negative
2020-09-03 12:51 elong Tag Detached: firebird
2020-09-03 12:51 elong Tag Detached: blob
2020-09-03 12:52 elong Tag Attached: ddl/schema
2020-09-03 12:52 elong Tag Attached: dialect: firebird
2020-09-03 12:52 elong Tag Attached: large objects
2022-09-08 20:45 emiller Note Added: 0002187
2022-09-08 20:46 emiller Status new => feedback
2023-09-13 17:25 emiller Status feedback => closed