View Issue Details

IDProjectCategoryView StatusLast Update
0003960SymmetricDSBugpublic2019-05-17 19:52
ReporterhanesAssigned To 
Prioritynormal 
Status confirmedResolutionopen 
Product Version3.10.2 
Target VersionFixed in Version 
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 14: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

Issue History

Date Modified Username Field Change
2019-05-15 14:35 hanes New Issue
2019-05-15 14:35 hanes Status new => confirmed
2019-05-15 14:35 hanes Note Added: 0001489
2019-05-17 19:52 elong Tag Attached: ddl/schema
2019-05-17 19:52 elong Tag Attached: dialect: mysql/mariadb