[Maria-developers] Why reserved keywords: UTC_TIME, UTC_DATE, UTC_DATETIME
Hello, I noticed that UTC_TIME, UTC_DATE, UTC_DATETIME are reserved keywords: MariaDB [test]> SELECT * FROM utc_time; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_time' at line 1 I think they should not. - These keywords are not mentioned in the SQL standard - They are not involved in any complex grammar that would prevent them from being non-reserved keywords Looks like a bug... Any objections to make them non-reserved keywords in 10.2?
They are listed as reserved words in MySQL documentation for any version from 5.0 and up (at least): https://dev.mysql.com/doc/refman/5.0/en/keywords.html. I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance. This is actually a minor issue with standards in MySQL ( + derivates ) as compared to lots of other non-compliances IMO. If standards should decide there would never have been MySQL! Anyway it is not a big deal whether ON or OFF, I think. But maybe the parser require them as reserved for some casesdue to imperfections in the parser itself? This could be why they were made reserved. That sould at least be checked carefully before changing anything. -- Peter -- Webyog On Sun, Apr 24, 2016 at 1:13 PM, Alexander Barkov <bar@mariadb.org> wrote:
Hello,
I noticed that UTC_TIME, UTC_DATE, UTC_DATETIME are reserved keywords:
MariaDB [test]> SELECT * FROM utc_time; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_time' at line 1
I think they should not.
- These keywords are not mentioned in the SQL standard - They are not involved in any complex grammar that would prevent them from being non-reserved keywords
Looks like a bug...
Any objections to make them non-reserved keywords in 10.2?
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
On 24 Apr 2016, at 19:43, Peter Laursen <peter_laursen@webyog.com> wrote:
They are listed as reserved words in MySQL documentation for any version from 5.0 and up (at least): https://dev.mysql.com/doc/refman/5.0/en/keywords.html.
I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance. This is actually a minor issue with standards in MySQL ( + derivates ) as compared to lots of other non-compliances IMO. If standards should decide there would never have been MySQL!
I’m with Peter here - maybe one should also file a bug with MySQL to find out why they have done so before it is removed in MariaDB Server 10.2 ? -- Colin Charles, http://bytebot.net/blog/ twitter: @bytebot | skype: colincharles "First they ignore you, then they laugh at you, then they fight you, then you win." -- Mohandas Gandhi
Hi, Colin! On Apr 25, Colin Charles wrote:
On 24 Apr 2016, at 19:43, Peter Laursen <peter_laursen@webyog.com> wrote:
They are listed as reserved words in MySQL documentation for any version from 5.0 and up (at least): https://dev.mysql.com/doc/refman/5.0/en/keywords.html.
I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance. This is actually a minor issue with standards in MySQL ( + derivates ) as compared to lots of other non-compliances IMO.
This change should not cause any compatibility issues.
I’m with Peter here - maybe one should also file a bug with MySQL to find out why they have done so before it is removed in MariaDB Server 10.2 ?
Nah, not this time. It was done by Dmitry Lenev in 2003 on his second month in MySQL AB. You can as well ask me or Bar :) (MySQL AB back then was probably smaller than MariaDB Corporation now, and everyone knew what everyone else is doing, so we should know) And as far as I an concerned, I'm pretty sure it was implemented that way unintentionally. An omission, an easy mistake. Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Sergei,
On 25 Apr 2016, at 02:54, Sergei Golubchik <serg@mariadb.org> wrote:
I’m with Peter here - maybe one should also file a bug with MySQL to find out why they have done so before it is removed in MariaDB Server 10.2 ?
Nah, not this time. It was done by Dmitry Lenev in 2003 on his second month in MySQL AB. You can as well ask me or Bar :) (MySQL AB back then was probably smaller than MariaDB Corporation now, and everyone knew what everyone else is doing, so we should know)
And as far as I an concerned, I'm pretty sure it was implemented that way unintentionally. An omission, an easy mistake.
I knew you would know :-) In that case, +1 from me to get rid of it, and also file a bug upstream to say we are removing it and they should probably consider similarly for 5.8 (er, 8.0) cheers, -colin -- Colin Charles, http://bytebot.net/blog/ twitter: @bytebot | skype: colincharles "First they ignore you, then they laugh at you, then they fight you, then you win." -- Mohandas Gandhi
On 2016-04-24 20:31, Colin Charles wrote:
On 24 Apr 2016, at 19:43, Peter Laursen <peter_laursen@webyog.com> wrote:
They are listed as reserved words in MySQL documentation for any version from 5.0 and up (at least): https://dev.mysql.com/doc/refman/5.0/en/keywords.html.
I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance. This is actually a minor issue with standards in MySQL ( + derivates ) as compared to lots of other non-compliances IMO. If standards should decide there would never have been MySQL! I’m with Peter here - maybe one should also file a bug with MySQL to find out why they have done so before it is removed in MariaDB Server 10.2 ?
I am also with Peter and with Colin's 1st opinion. I also saw Sergei mail which I interpret as a wish to go forward on removing the reserved words and Colin's reply about agreeing with this. This seems precipitated to me. Opening a bug upstream is the least of things to do to get a minimal amount of feedback. Blogging about it would be a good 2nd step to get opinion (and buy-in) from the community. Opening a low priority MDEV stating that this will be done in 10.3 is also another way to get feedback. I was at a BOF about MySQL 5.8 at Percona Live, we discussed about adding reserved words, not removing them (I cannot recall the motivation for it). What is the rush in doing that in 10.2 ? Is this an important thing to do now ? And more importantly, does MariaDB really want to go in the direction "locking" user in by opening the possibility of having application working with MariaDB but not with MySQL on such a trivial thing ? I personally have no strong objection about removing those reserved keywords (if they will also be removed from MySQL), but not without first widening the discussion. But please do not ask me to lead the effort on getting consensus, I have more important things to do. Best regards, Jean-François Gagné System Engineer Booking.com BV Rembrandt Square Office Herengracht 597, 1017 CE Amsterdam
Hi, Bar! I personally believe this bikeshed color issue has got an unreasonable amount of attention. But anyway, let's listen to our community and not fix this bug in 10.2. We can get back to it again later, e.g. in 10.3 Meanwhile, everyone who cares to comment on the synax, is welcome to have an opinion on https://jira.mariadb.org/browse/MDEV-7773 - that syntax is something we need to decide on fairly soon. And the better the syntax will be... well, the better :) So, please, do have an opinion and comment. Here or in Jira. Regards, Sergei Chief Architect MariaDB and security@mariadb.org On Apr 28, Jean-François Gagné wrote:
On 2016-04-24 20:31, Colin Charles wrote:
On 24 Apr 2016, at 19:43, Peter Laursen <peter_laursen@webyog.com> wrote:
They are listed as reserved words in MySQL documentation for any version from 5.0 and up (at least): https://dev.mysql.com/doc/refman/5.0/en/keywords.html.
I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance. This is actually a minor issue with standards in MySQL ( + derivates ) as compared to lots of other non-compliances IMO. If standards should decide there would never have been MySQL! I’m with Peter here - maybe one should also file a bug with MySQL to find out why they have done so before it is removed in MariaDB Server 10.2 ?
I am also with Peter and with Colin's 1st opinion.
I also saw Sergei mail which I interpret as a wish to go forward on removing the reserved words and Colin's reply about agreeing with this. This seems precipitated to me.
Opening a bug upstream is the least of things to do to get a minimal amount of feedback. Blogging about it would be a good 2nd step to get opinion (and buy-in) from the community. Opening a low priority MDEV stating that this will be done in 10.3 is also another way to get feedback.
I was at a BOF about MySQL 5.8 at Percona Live, we discussed about adding reserved words, not removing them (I cannot recall the motivation for it).
What is the rush in doing that in 10.2 ? Is this an important thing to do now ?
And more importantly, does MariaDB really want to go in the direction "locking" user in by opening the possibility of having application working with MariaDB but not with MySQL on such a trivial thing ?
I personally have no strong objection about removing those reserved keywords (if they will also be removed from MySQL), but not without first widening the discussion. But please do not ask me to lead the effort on getting consensus, I have more important things to do.
Best regards,
Jean-François Gagné System Engineer
Booking.com BV Rembrandt Square Office Herengracht 597, 1017 CE Amsterdam
Hi, On Sun, Apr 24, 2016 at 7:43 PM, Peter Laursen <peter_laursen@webyog.com> wrote:
I think compablity with MySQL here is an even or a more valid/important concern here than standards' compliance.
We have lots of customers switching from non-MySQL databases where this would be a blocking issue. They would have to change their existing working code to work with us. Having to quote seemingly "random" words would raise concerns. The closer we can get to the standards, the better. Thanks! -will -- Will Fong, Senior Support Engineer MariaDB Corporation
Hi, Alexander! On Apr 24, Alexander Barkov wrote:
Hello,
I noticed that UTC_TIME, UTC_DATE, UTC_DATETIME are reserved keywords:
MariaDB [test]> SELECT * FROM utc_time; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_time' at line 1
I think they should not.
agree
- These keywords are not mentioned in the SQL standard - They are not involved in any complex grammar that would prevent them from being non-reserved keywords
Looks like a bug...
Any objections to make them non-reserved keywords in 10.2?
Not from me :) Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (6)
-
Alexander Barkov
-
Colin Charles
-
Jean-François Gagné
-
Peter Laursen
-
Sergei Golubchik
-
Will Fong