[MDEV-13339] MDEV-11878 causes regression bug Created: 2017-07-18  Updated: 2017-07-18  Resolved: 2017-07-18

Status: Closed
Project: MariaDB Server
Component/s: Parser
Affects Version/s: 10.2.4, 10.2.5, 10.2.6, 10.2.7
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Leo Feyer Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

To fix MDEV-11878, "rows" has been added as reserved keyword. However, "rows" is not a reserved keyword in MySQL, so now MariaDB 10.2.4 is no longer compatible with popular DBALs such as Doctrine.

Doctrine automatically quotes reserved keywords, but since "rows" is not a reserved keyword in MySQL, we'll end up with:

Syntax error or access violation: 1064 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 'rows VARCHAR(8) ...'

Please revert the changes to fix this regression.



 Comments   
Comment by Vicențiu Ciorbaru [ 2017-07-18 ]

Hi Leo!

Thank you for the bug report. Here is where we stand on this matter.

MariaDB 10.2 supports window functions, a feature which is not supported by MySQL 5.7 and lower. For this feature, ROWS is required to be marked as a reserved keyword. The SQL standard also tags ROWS as reserved.

If you look at MySQL 8.0's implementation, their upcoming stable version, they have also marked ROWS as a reserved keyword. This is necessary, as they support window functions too. In this case, the problem should be resolved on the DBAL level and not within MariaDB/MySQL.

Drupal considers ROWS as a reserved keyword for example.
https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserved-words

615. ROWS

Comment by Leo Feyer [ 2017-07-18 ]

Thank you for the detailed explanation, Vicentiu.

Generated at Thu Feb 08 08:04:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.