[
https://issues.apache.org/jira/browse/OPENJPA-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18142446#comment-18142446
]
ASF subversion and git services commented on OPENJPA-3074:
----------------------------------------------------------
Commit dfb9505b1567b46211aa65d410146d522acb9d90 in openjpa's branch
refs/heads/OPENJPA-3074 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=dfb9505b1 ]
[OPENJPA-3074] Take the reserved words of MySQL and MariaDB from the servers
The words that the generated lists of invalid column words have, and that
MySQL 8.4 and 9.7 or MariaDB 10.11 and 12.3 reserve in a table name too, such
as NTILE, DUAL, KEYS or LIMIT, were missing from the reserved words, so that
a table named after one of them was neither delimited nor renamed and could
not be created. They are reserved words now, and an existing column such as
LIMIT0 becomes a delimited LIMIT. MariaDBDictionary also gets the words that
only MariaDB reserves, such as OFFSET, RETURNING or PORTION, and the names of
the built-in functions, such as NTILE, RANK or NOW, that MariaDB reserves in a
table name under the IGNORE_SPACE SQL mode, which MariaDB Connector/J sets.
All of them are removed again by UpdatedMySQLAndMariaDBReservedWords=false.
> Share the common code of MySQLDictionary and MariaDBDictionary in a
> superclass and add the MySQL 8 reserved words
> -----------------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-3074
> URL: https://issues.apache.org/jira/browse/OPENJPA-3074
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> MySQLDictionary and MariaDBDictionary both extend DBDictionary and duplicate
> most of their code, as noted in the review of #297 (OPENJPA-2943). Move the
> shared code into a common abstract superclass and keep the per-database
> differences and defaults in the two subclasses. All public configuration
> fields stay as they are.
> MySQLDictionary also lacks the reserved words MySQL 8.0 added, such as RANK,
> ROW_NUMBER, WINDOW and LATERAL. An entity attribute named rank therefore
> produces a CREATE TABLE statement that fails on MySQL 8.4 and 9.x.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)