-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to parse table name #335
Comments
I'm afraid of that this issue couldn't be easily fixed, because the sql-parser/src/Statements/CreateStatement.php Lines 55 to 70 in eab0f93
and it would be hard to fixed because of sql-parser/src/Components/OptionsArray.php Lines 148 to 160 in eab0f93
that's why it will always throw a conflict error, these are my findings, I couldn't think of a not-breaking fix for this. |
Thank you for the debug, maybe we can keep this one open for now |
I made some tests and some of the options are allowed while some others are not, and I can't really find any clear rule about how to distinguish them. CREATE TABLE DATABASE(ID INT(11)); -- Refused by MySQL
CREATE TABLE EVENT(ID INT(11)); -- OK by MySQL
CREATE TABLE FUNCTION(ID INT(11)); -- OK by MySQL
CREATE TABLE INDEX(ID INT(11)); -- Refused by MySQL
CREATE TABLE UNIQUE INDEX(ID INT(11)); -- Refused by MySQL
CREATE TABLE FULLTEXT INDEX(ID INT(11)); -- Refused by MySQL
CREATE TABLE SPATIAL INDEX(ID INT(11)); -- Refused by MySQL
CREATE TABLE PROCEDURE(ID INT(11)); -- Refused by MySQL
CREATE TABLE SERVER(ID INT(11)); -- OK by MySQL
CREATE TABLE TABLE(ID INT(11)); -- Refused by MySQL
CREATE TABLE TABLESPACE(ID INT(11)); -- OK by MySQL
CREATE TABLE TRIGGER(ID INT(11)); -- Refused by MySQL
CREATE TABLE USER(ID INT(11)); -- OK by MySQL
CREATE TABLE VIEW(ID INT(11)); -- OK by MySQL
CREATE TABLE SCHEMA(ID INT(11)); -- Refused by MySQL Would it be ok to create a whitelist of the allowed options and to not trigger an error if such whitelist exists + the option is part of it? |
I am not really sure we should do that in this project, but maybe if it integrates well with the existing code base? |
I don't know if I would be available to give it a try on a PR soon. I was just trying to find a workaround as even @iifawzi seemed to have no solution about it. If this solution is too hacky, then we need to find another one. |
It's been two years, the project has evolved a lot, my knowledge in the project evolved too. So, my conclusion above might be totally outdated. |
See: phpmyadmin/phpmyadmin#16837
is the table is named
event2
that will workThe text was updated successfully, but these errors were encountered: