-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Describe the bug
when create table statement containts CHARACTER SET property,DDLParser(createsql).run() return empty list.
To Reproduce
Steps to reproduce the behavior:
python3 test code
from simple_ddl_parser import DDLParser
sql = '''
CREATE TABLE tab_space_station_common_info
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
col1
varchar(16) NULL DEFAULT NULL,
PRIMARY KEY (id
) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4;
'''
print(len(DDLParser(sql).run()))
it will return 0, parse failed
sql1 = '''
CREATE TABLE tab_space_station_common_info
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
col1
varchar(16) NULL DEFAULT NULL,
PRIMARY KEY (id
) USING BTREE
) ENGINE = InnoDB;
'''
print(len(DDLParser(sql1).run()))
it will return 1, parse sucess
Metadata
Metadata
Assignees
Labels
No labels