View Issue Details

IDProjectCategoryView StatusLast Update
0002849SymmetricDSBugpublic2019-05-14 18:09
Reporteranouri Assigned Topmarzullo  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.8.5 
Target Version3.10.0Fixed in Version3.10.0 
Summary0002849: Create Table maps a column originally created as an ENUM('y','n') to a Enum(2)
Description021-data-loader-1] Running alter sql:
CREATE TABLE `data_dic`(
    `table_name` VARCHAR(40) NOT NULL,
    `field_name` VARCHAR(30) NOT NULL,
    `caption` VARCHAR(40) NULL,
    `min_size` INT DEFAULT 120,
    `field_order` SMALLINT,
    `field_type` ENUM(6) DEFAULT 'text' NULL,
    `popup_form` VARCHAR(25) NULL,
    `popup_field` VARCHAR(25) NULL,
    `check_values` VARCHAR(10) NULL,
    `combo_values` VARCHAR(150) NULL,
    `auto_inc` ENUM(2) DEFAULT 'n' NOT NULL,
    `enabled` ENUM(2) DEFAULT 'y' NULL,
    `only_select` ENUM(2) DEFAULT 'n' NOT NULL,
    `best_fit` ENUM(2) DEFAULT 'n' NOT NULL,
    `grid_sum` ENUM(5) DEFAULT 'na' NOT NULL,
    `required` ENUM(2) DEFAULT 'n' NOT NULL,
    `width` INT DEFAULT 0 NOT NULL,
    `add_date` CHAR(8) NULL,
    `visible` ENUM(2) DEFAULT 'y' NOT NULL,
    `in_table` ENUM(2) DEFAULT 'y' NOT NULL,
    `visible_pos` ENUM(2) DEFAULT 'y' NOT NULL,
    PRIMARY KEY (`table_name`, `field_name`)
);

Steps To Reproducecommand: symadmin reload node 021
mariadb 10.0
Additional InformationGetting ENUM(2) instead of enum('y','n')
TagsNo tags attached.

Relationships

has duplicate 0002095 closed Create table (ddl utils) does not handle MySQL Enum 

Activities

hanes

2018-10-17 20:13

developer   ~0001290

Recreated in 3.9.14

pmarzullo

2019-01-09 20:17

developer   ~0001373

Last edited: 2019-01-09 20:18

View 2 revisions

Databases with enum support:
NuoDb
Mysql/Mariadb

PostgreSQL implements enum with user defined data type.

elong

2019-01-09 20:28

developer   ~0001374

Postgres support enum types starting in 8.3:

https://www.postgresql.org/docs/8.3/datatype-enum.html

pmarzullo

2019-01-11 13:50

developer   ~0001375

MySql functionality updated.

Will work on NuoDb now.

pmarzullo

2019-01-14 20:03

developer   ~0001379

NuoDb now working.

Also, both MySql and NuoDb set the platform column information to enum for both of those types of databases, and sets the column information to varchar, so that when synchronizing from MySql or NuoDb to any other database, and create table is set on initial load, the table in the target database will be created as a varchar.

pmarzullo

2019-01-14 20:08

developer   ~0001380

See previous notes entry.

Related Changesets

SymmetricDS: 3.10 dc1ea201

2019-01-11 08:46:27

philipmarzullo

Details Diff
0002849: Create Table maps a column originally created as an
ENUM('y','n') to a Enum(2)
Affected Issues
0002849
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlReader.java Diff File

SymmetricDS: 3.10 e289a8c0

2019-01-14 15:01:22

philipmarzullo

Details Diff
0002849: Create Table maps a column originally created as an
ENUM('y','n') to a Enum(2)
Affected Issues
0002849
mod - symmetric-db/src/main/java/org/jumpmind/db/model/Column.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/model/PlatformColumn.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/nuodb/NuoDbDdlBuilder.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/DbFill.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlReader.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/nuodb/NuoDbDdlReader.java Diff File
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/DatabasePlatformTest.java Diff File
add - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/mysql/MySqlDdlTypesTest.java Diff File
add - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/nuodb/NuoDbDdlTypesTest.java Diff File

SymmetricDS: 3.10 764fbfdc

2019-01-15 10:56:51

philipmarzullo

Details Diff
0002849: Don't need the MySqlDdlTypesTest and NuoDbDdlTypesTest files to
test the enum specific functionality (these files caused other tests to
fail).
Affected Issues
0002849
rm - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/mysql/MySqlDdlTypesTest.java Diff File
rm - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/nuodb/NuoDbDdlTypesTest.java Diff File

Issue History

Date Modified Username Field Change
2016-10-06 12:37 anouri New Issue
2018-10-17 20:13 hanes Status new => confirmed
2018-10-17 20:13 hanes Target Version => 3.10.0
2018-10-17 20:13 hanes Summary Mysql Enum issue - Enum(2) --> enum('y','n') => Create Table maps a column originally created as an ENUM('y','n') to a Enum(2)
2018-10-17 20:13 hanes Additional Information Updated View Revisions
2018-10-17 20:13 hanes Note Added: 0001290
2018-10-29 16:52 hanes Priority high => low
2018-12-05 19:57 hanes Priority low => normal
2019-01-09 19:11 pmarzullo Assigned To => pmarzullo
2019-01-09 19:11 pmarzullo Status confirmed => assigned
2019-01-09 20:17 pmarzullo Note Added: 0001373
2019-01-09 20:18 pmarzullo Note Edited: 0001373 View Revisions
2019-01-09 20:28 elong Note Added: 0001374
2019-01-11 13:50 pmarzullo Note Added: 0001375
2019-01-11 14:00 Changeset attached => SymmetricDS 3.10 dc1ea201
2019-01-14 20:03 pmarzullo Note Added: 0001379
2019-01-14 20:08 pmarzullo Status assigned => resolved
2019-01-14 20:08 pmarzullo Resolution open => fixed
2019-01-14 20:08 pmarzullo Fixed in Version => 3.10.0
2019-01-14 20:08 pmarzullo Note Added: 0001380
2019-01-14 21:00 Changeset attached => SymmetricDS 3.10 e289a8c0
2019-01-15 16:00 Changeset attached => SymmetricDS 3.10 764fbfdc
2019-03-14 12:48 admin Status resolved => closed
2019-05-14 18:09 pmarzullo Relationship added has duplicate 0002095