View Issue Details

IDProjectCategoryView StatusLast Update
0003960SymmetricDSBugpublic2022-08-30 13:04
Reporterhanes Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.10.2 
Target Version3.14.1Fixed in Version3.14.1 
Summary0003960: NVARCHAR2() maps incorrectly to VARCHAR() when mapping from Oracle to MariaDB
DescriptionSource table:

create table test22 (mynvarchar25 nvarchar2(5),
    mynvarchar2255 nvarchar2(255),
    mynvarchar2256 nvarchar2(256),
     myId varchar(256), primary key (myId));

on Oracle is mapped to the following SQL for MariaDB (and likely MySQL too):

CREATE TABLE `test22`(
    `myid` VARCHAR(256) NOT NULL,
    `mynvarchar25` VARCHAR(5) NULL,
    `mynvarchar2255` VARCHAR(255) NULL,
    `mynvarchar2256` VARCHAR(256) NULL,
    PRIMARY KEY (`myid`)
);

The "N" is lost in the mapping.
Tagsddl/schema, dialect: mysql/mariadb

Activities

hanes

2019-05-15 18:35

developer   ~0001489

[store-001] - DefaultDatabaseWriter - About to create table using the following definition: <?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="dataextractor">
    <table name="TEST22">
        <column name="MYID" primaryKey="true" required="true" type="VARCHAR" size="256">
            <platform-column name="oracle" type="VARCHAR2" size="256"/>
        </column>
        <column name="MYNVARCHAR25" type="VARCHAR" size="5">
            <platform-column name="oracle" type="NVARCHAR2" size="5"/>
        </column>
        <column name="MYNVARCHAR2255" type="VARCHAR" size="255">
            <platform-column name="oracle" type="NVARCHAR2" size="255"/>
        </column>
        <column name="MYNVARCHAR2256" type="VARCHAR" size="256">
            <platform-column name="oracle" type="NVARCHAR2" size="256"/>
        </column>
    </table>
</database>
[store-001] - MariaDBDatabasePlatform - Running alter sql:
CREATE TABLE `test22`(
    `myid` VARCHAR(256) NOT NULL,
    `mynvarchar25` VARCHAR(5) NULL,
    `mynvarchar2255` VARCHAR(255) NULL,
    `mynvarchar2256` VARCHAR(256) NULL,
    PRIMARY KEY (`myid`)
);

[store-001] - PullService - Pull data received from corp:000:000 on queue default. 4 rows and 2 batches were processed. (sym_table_reload_request, test22)
[store-001] - RouterService - Routed 3 data events in 18 ms
[store-001] - PullService - Pull data received from corp:000:000 on queue default. 0 rows and 1 batches were processed. ()
[store-001] - DefaultDatabaseWriter - About to create table using the following definition: <?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="dataextractor">
    <table name="TEST22">
        <column name="MYID" primaryKey="true" required="true" type="VARCHAR" size="256">
            <platform-column name="oracle" type="VARCHAR2" size="256"/>
        </column>
        <column name="MYNVARCHAR25" type="VARCHAR" size="5">
            <platform-column name="oracle" type="NVARCHAR2" size="5"/>
        </column>
        <column name="MYNVARCHAR2255" type="VARCHAR" size="255">
            <platform-column name="oracle" type="NVARCHAR2" size="255"/>
        </column>
        <column name="MYNVARCHAR2256" type="VARCHAR" size="256">
            <platform-column name="oracle" type="NVARCHAR2" size="256"/>
        </column>
    </table>
</database>
[store-001] - MariaDBDatabasePlatform - Tables up to date. No alters found for test22

Related Changesets

SymmetricDS: 3.14 80d4152b

2022-08-16 17:23:39

evan-miller-jumpmind

Details Diff
0003960: Mapped Oracle NVARCHAR2 type to MariaDB NVARCHAR type Affected Issues
0003960
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java Diff File

Issue History

Date Modified Username Field Change
2019-05-15 18:35 hanes New Issue
2019-05-15 18:35 hanes Status new => confirmed
2019-05-15 18:35 hanes Note Added: 0001489
2019-05-17 23:52 elong Tag Attached: ddl/schema
2019-05-17 23:52 elong Tag Attached: dialect: mysql/mariadb
2022-08-16 17:25 emiller Assigned To => emiller
2022-08-16 17:25 emiller Status confirmed => resolved
2022-08-16 17:25 emiller Resolution open => fixed
2022-08-16 17:25 emiller Fixed in Version => 3.14.1
2022-08-16 18:00 Changeset attached => SymmetricDS 3.14 80d4152b
2022-08-30 13:04 admin Status resolved => closed