xnuinside/simple-ddl-parser

auto_increment ordering breaks parse, no error returned

earonesty opened this issue · 3 comments

the following results in "None", no errors

create table "foo" ("auto" integer not null primary key auto_increment,"inty" integer not null default(4),"blob" blob,"blob3" binary(3),"blob4" varbinary(4),"tex" text not null,"siz3v" varchar(3),"siz3" character(3),"flt" float default(1.1),"dbl" double default(2.2));

if i knew a bit more about how the yacc module worked, i would fix it, looking at it now

looks like the mysql auto_increment breaks it, even though this executes correctly in mysql

@earonesty thanks for reporting it, honestly it is a second issue about increment & I already started work on fix for that but didn’t finished yet. I have some time on Sunday - will try to work on it

@earonesty in your ddl also one more interesting issue! my parser totally unsupport floats :) will fix it, thanks one more time!

@earonesty I just released version 0.28.0 https://pypi.org/project/simple-ddl-parser/, both issues was fixed, I also added test for your sample: https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/test_simple_ddl_parser.py#L2791

If will be needed anything else - feel free to open new issue. And thanks one more time!