[
https://issues.apache.org/jira/browse/OPENJPA-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18142828#comment-18142828
]
ASF subversion and git services commented on OPENJPA-3074:
----------------------------------------------------------
Commit 044e7ba63af7beb48e3f7f4f03d729e425c4bcc0 in openjpa's branch
refs/heads/OPENJPA-3074 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=044e7ba63 ]
[OPENJPA-3074] Delimit reserved words on MariaDB as on MySQL
MariaDBDictionary appended a 0 to a table or column name that is a reserved
word, so that an entity named Linear or Order got a table LINEAR0 or ORDER0,
and a name given explicitly in @Column was changed as well, while
MySQLDictionary delimits such a name and keeps it. The rule that delimits the
reserved words moves to AbstractMySQLDictionary, and MariaDBDictionary uses
it too. UpdatedMySQLAndMariaDBReservedWords=false restores the earlier names
on MariaDB.
> 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)