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

yuqi1129 pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new 7b6f22794c [Cherry-pick to branch-1.3] [#11513] fix(catalog-mysql): 
Fix MySQL catalog incompatible with MariaDB due to case-sensitive 
CURRENT_TIMESTAMP check (#11510) (#11561)
7b6f22794c is described below

commit 7b6f22794c39bd8b4b83e34710696cfbaf7dca32
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jun 10 22:49:37 2026 +0800

    [Cherry-pick to branch-1.3] [#11513] fix(catalog-mysql): Fix MySQL catalog 
incompatible with MariaDB due to case-sensitive CURRENT_TIMESTAMP check 
(#11510) (#11561)
    
    **Cherry-pick Information:**
    - Original commit: 26dfd9b2d203a92e2147b5829b87e8bc1edbd868
    - Target branch: `branch-1.3`
    - Status: ✅ Clean cherry-pick (no conflicts)
    
    Co-authored-by: a19920714liou <[email protected]>
---
 .../catalog/mysql/converter/MysqlColumnDefaultValueConverter.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java
 
b/catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java
index ad7defff30..3ea3476fd9 100644
--- 
a/catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java
+++ 
b/catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java
@@ -25,6 +25,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeParseException;
+import org.apache.commons.lang3.StringUtils;
 import 
org.apache.gravitino.catalog.jdbc.converter.JdbcColumnDefaultValueConverter;
 import org.apache.gravitino.catalog.jdbc.converter.JdbcTypeConverter;
 import org.apache.gravitino.rel.expressions.Expression;
@@ -50,7 +51,7 @@ public class MysqlColumnDefaultValueConverter extends 
JdbcColumnDefaultValueConv
     }
 
     if (isExpression) {
-      if (columnDefaultValue.startsWith(CURRENT_TIMESTAMP)) {
+      if (StringUtils.startsWithIgnoreCase(columnDefaultValue, 
CURRENT_TIMESTAMP)) {
         return DEFAULT_VALUE_OF_CURRENT_TIMESTAMP;
       }
       // The parsing of MySQL expressions is complex, so we are not currently 
undertaking the
@@ -89,7 +90,7 @@ public class MysqlColumnDefaultValueConverter extends 
JdbcColumnDefaultValueConv
         return Literals.timeLiteral(LocalTime.parse(columnDefaultValue, 
TIME_FORMATTER));
       case JdbcTypeConverter.TIMESTAMP:
       case MysqlTypeConverter.DATETIME:
-        if (columnDefaultValue.startsWith(CURRENT_TIMESTAMP)) {
+        if (StringUtils.startsWithIgnoreCase(columnDefaultValue, 
CURRENT_TIMESTAMP)) {
           return DEFAULT_VALUE_OF_CURRENT_TIMESTAMP;
         }
         try {

Reply via email to