[ https://issues.apache.org/jira/browse/HIVE-28567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897122#comment-17897122 ]
Ratnesh Mishra commented on HIVE-28567: --------------------------------------- Hi [~hazeljiang] thanks for checking this issue. Actually I was *also not able* to repro this with the latest Hive master or the version *4.0.0* and on debugging this further I realised that the issue was caused as a side effect of one of my local changes to [this block|https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java#L314] of code where I had modified {code:java} SET @@session.sql_mode=ANSI_QUOTES; {code} to {code:java} "SET @@session.sql_mode=CONCAT(@@sql_mode, ',ANSI_QUOTES')" {code} in order to preserver other Sql modes from being overridden. Due to this *NO_BACKSLASH_ESCAPES* which is the cause of this error is getting overridden to ANSI_QUOTES in OSS Hive but not in my local branch and thus causing this issue. Thanks again for looking into this. > Hive4 compatibility issues with lower versions of MariaDb > ---------------------------------------------------------- > > Key: HIVE-28567 > URL: https://issues.apache.org/jira/browse/HIVE-28567 > Project: Hive > Issue Type: Bug > Security Level: Public(Viewable by anyone) > Components: Metastore, Standalone Metastore > Affects Versions: 4.0.0 > Reporter: Ratnesh Mishra > Assignee: Jintong Jiang > Priority: Major > > {{Trying to run Hive4 with Mariadb version 10.5.25 as metastore but getting > below error }} > {{ }} > {code:java} > hive> show tables ;{code} > {code:java} > FAILED: Execution Error, return code 40000 from > org.apache.hadoop.hive.ql.ddl.DDLTask. MetaException(message:Got exception: > org.apache.hadoop.hive.metastore.api.MetaException JDOException: Exception > thrown when executing query : SELECT > B0.`NAME`,A0.TBL_NAME,A0.OWNER,A0.OWNER_TYPE FROM TBLS A0 LEFT OUTER JOIN DBS > B0 ON A0.DB_ID = B0.DB_ID WHERE LOWER(B0.`NAME`) LIKE 'default' ESCAPE '\\' > AND B0.CTLG_NAME = ? AND LOWER(A0.TBL_NAME) LIKE '_%' ESCAPE '\\' > Root cause: java.sql.SQLException: Incorrect arguments to ESCAPE){code} > However the same query runs fine with MariaDb version {*}10.11.8{*}. > Same behaviour is observed when we run the query directly on MariaDb. > This seems to be somehow related to the datanucleus upgrade in Hive4 as the > same query runs fine with Hive 3.1.3. -- This message was sent by Atlassian Jira (v8.20.10#820010)