Skip to content

Commit 12c24b1

Browse files
committed
do not use MYSQL deprecated VALUES(col)
1 parent becf9d1 commit 12c24b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JDBCMetadataStore.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ class JDBCMetadataStore(conf: KyuubiConf) extends MetadataStore with Logging {
436436
|create_time,
437437
|update_time
438438
|)
439-
|SELECT ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?
439+
|SELECT ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
440440
|WHERE NOT EXISTS (
441441
| SELECT 1 FROM $KUBERNETES_ENGINE_INFO_TABLE WHERE identifier = ?
442442
|)

kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/jdbc/JdbcDatabaseDialect.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ class MySQLDatabaseDialect extends GenericDatabaseDialect {
5454
Some(
5555
s"""
5656
|INSERT INTO $table (${colsToInsert.mkString(",")})
57-
|VALUES (${colsToInsert.map(_ => "?").mkString(",")})
57+
|VALUES (${colsToInsert.map(_ => "?").mkString(",")}) AS new
5858
|ON DUPLICATE KEY UPDATE
59-
|${colsToReplace.map(c => s"$c = VALUES($c)").mkString(",")}
59+
|${colsToReplace.map(c => s"$c = new.$c").mkString(",")}
6060
|""".stripMargin)
6161
}
6262
}

0 commit comments

Comments
 (0)