[openjpa] branch master updated: OPENJPA-2868 update invalidColumnNames for MariaDB

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[openjpa] branch master updated: OPENJPA-2868 update invalidColumnNames for MariaDB

This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git

The following commit(s) were added to refs/heads/master by this push:
     new 5dc56fa  OPENJPA-2868 update invalidColumnNames for MariaDB
5dc56fa is described below

commit 5dc56fa17b54cb9762f536e9ba42411c62baa9ed
Author: Mark Struberg <[hidden email]>
AuthorDate: Sun May 2 17:14:58 2021 +0200

    OPENJPA-2868 update invalidColumnNames for MariaDB
 .../apache/openjpa/jdbc/sql/MariaDBDictionary.java | 48 +++++++++++++---------
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
index 78d608f..ada65b3 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
@@ -136,26 +136,34 @@ public class MariaDBDictionary extends DBDictionary {
         // reservedWordSet subset that CANNOT be used as valid column names
         // (i.e., without surrounding them with double-quotes)
-        invalidColumnWordSet.addAll(Arrays.asList(new String[]{
-            "ADD", "ALL", "ALTER", "AND", "AS", "ASC", "BETWEEN", "BINARY",
-            "BLOB", "BOTH", "BY", "CASCADE", "CASE", "CHANGE", "CHAR",
-            "DOUBLE", "DROP", "ELSE", "END-EXEC", "EXISTS", "FALSE", "FETCH",
-            "FLOAT", "FLOAT4", "FOR", "FOREIGN", "FROM", "GRANT", "GROUP",
-            "HAVING", "IN", "INFILE", "INNER", "INSENSITIVE", "INSERT", "INT",
-            "INT1", "INT2", "INT4", "INTEGER", "INTERVAL", "INTO", "IS", "JOIN",
-            "KEY", "LEADING", "LEFT", "LIKE", "LOAD", "MATCH", "MEDIUMINT",
-            "NATURAL", "NOT", "NULL", "NUMERIC", "ON", "OPTION", "OR", "ORDER",
-            "SCHEMA", "SELECT", "SET", "SMALLINT", "SQL", "SQLSTATE",
-            "STARTING", "TABLE", "THEN", "TO", "TRAILING", "TRUE", "UNION",
-            "UNIQUE", "UNSIGNED", "UPDATE", "USAGE", "USING", "VALUES",
-            "VARCHAR", "VARYING", "WHEN", "WHERE", "WITH", "WRITE", "ZEROFILL",
-            "INDEX",
+        // generated at 2021-05-02T16:53:15.561 via org.apache.openjpa.reservedwords.ReservedWordsIT
+        invalidColumnWordSet.addAll(Arrays.asList(new String[] {
+            "IN", "INDEX", "INFILE", "INNER", "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2", "INT3", "INT4", "INT8",
+            "WRITE", "XOR", "YEAR_MONTH", "ZEROFILL",
+            // end generated.
+            // the following keywords used to be defined as reserved words in the past, but now seem to work
+            // we still add them for compat reasons
+            "OPTION", "SELECT",
         requiresSearchStringEscapeForLike = true;