dolt
dolt copied to clipboard
Dolt insists reserved words are always quoted
I encountered this with the reserved keyword 'rank'. The MySQL manual says
Exception: A word that follows a period in a qualified name must be an identifier, so it need not be quoted even if it is reserved:
mysql> CREATE TABLE mydb.interval (begin INT, end INT); Query OK, 0 rows affected (0.01 sec)
Dolt misinterprets this and errors if I use ORDER BY tblname.rank
. Dolt insists on ORDER BY tblname.`rank`
.
I suspect this and #3977 are linked.
Thanks for taking the time to report these @pbowyer! Much appreciated. I'll see if we can get someone to take a look at the parser code and smooth out these MySQL incompatibilities with backtick quoting once we wrap up some other issues.
Thanks @fulghum. This one is a biggie because I have to modify half the queries in the application to go any further as they use reserved words. Looking forward to when you can get this one ironed out!
@JCOR11599 is going to try and bang this one out this afternoon since it is blocking you from making progress on your project.
This should be fixed by @JCOR11599 's PR which is now released.
Thank you @timsehn and @JCOR11599 !