You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, first of all thanks for providing this extremely useful library.
Unfortunately I have noticed this weird behaviour.
If i want to get the primary key of this sql statement:
CREATETABLEIF NOT EXISTS `testabc` (
`from`INT UNSIGNED NOT NULL,
`to`INT UNSIGNED NOT NULL,
INDEX `index_cccrange_from` (`from`ASC),
INDEX `index_to` (`to`ASC),
PRIMARY KEY (`from`, `to`)
);
This will return 3 indexes, but no primary key.
If I change the order to this statement it all works fine:
CREATETABLEIF NOT EXISTS `testabc` (
`from`INT UNSIGNED NOT NULL,
`to`INT UNSIGNED NOT NULL,
PRIMARY KEY (`from`, `to`),
INDEX `index_cccrange_from` (`from`ASC),
INDEX `index_to` (`to`ASC)
);
I don't know exactly why but the difference seems to be that when it is not working $prevCategory is "INDEX_COL_LIST" in
Hey, first of all thanks for providing this extremely useful library.
Unfortunately I have noticed this weird behaviour.
If i want to get the primary key of this sql statement:
This will return 3 indexes, but no primary key.
If I change the order to this statement it all works fine:
I don't know exactly why but the difference seems to be that when it is not working $prevCategory is "INDEX_COL_LIST" in
PHP-SQL-Parser/src/PHPSQLParser/processors/CreateDefinitionProcessor.php
Line 148 in e38d6f0
In the second (working) case $prevCategory is just an empty string.
The text was updated successfully, but these errors were encountered: