This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e4df369ae18 Fix restart proxy throws IllegalStateException when use H2
or MySQL persistence type in Standalone (#28105)
e4df369ae18 is described below
commit e4df369ae18f399f56532640cea70259d5cc18e6
Author: zhaojinchao <[email protected]>
AuthorDate: Wed Aug 16 08:41:31 2023 +0800
Fix restart proxy throws IllegalStateException when use H2 or MySQL
persistence type in Standalone (#28105)
---
.../standalone/repository/provider/jdbc/src/main/resources/sql/H2.xml | 2 +-
.../repository/provider/jdbc/src/main/resources/sql/MySQL.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/H2.xml
b/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/H2.xml
index ea5f5a8ee28..752ed87ee60 100644
---
a/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/H2.xml
+++
b/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/H2.xml
@@ -19,7 +19,7 @@
<sql type="H2" driver-class-name="org.h2.Driver" default="true">
<create-table>CREATE TABLE IF NOT EXISTS `repository`(id varchar(36)
PRIMARY KEY, `key` TEXT, `value` TEXT, parent TEXT)</create-table>
<select-by-key>SELECT `value` FROM `repository` WHERE `key` =
?</select-by-key>
- <select-by-parent>SELECT `key` FROM `repository` WHERE parent =
?</select-by-parent>
+ <select-by-parent>SELECT DISTINCT(`key`) FROM `repository` WHERE parent =
?</select-by-parent>
<insert>INSERT INTO `repository` VALUES(?, ?, ?, ?)</insert>
<update>UPDATE `repository` SET `value` = ? WHERE `key` = ?</update>
<delete>DELETE FROM `repository` WHERE `key` = ?</delete>
diff --git
a/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/MySQL.xml
b/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/MySQL.xml
index 82151e20774..6a34707dc71 100644
---
a/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/MySQL.xml
+++
b/mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/MySQL.xml
@@ -19,7 +19,7 @@
<sql type="MySQL" driver-class-name="com.mysql.jdbc.Driver">
<create-table>CREATE TABLE IF NOT EXISTS `repository`(id varchar(36)
PRIMARY KEY, `key` TEXT, `value` TEXT, parent TEXT)</create-table>
<select-by-key>SELECT `value` FROM `repository` WHERE `key` =
?</select-by-key>
- <select-by-parent>SELECT `key` FROM `repository` WHERE parent = ? ORDER BY
`key` ASC</select-by-parent>
+ <select-by-parent>SELECT DISTINCT(`key`) FROM `repository` WHERE parent =
? ORDER BY `key` ASC</select-by-parent>
<insert>INSERT INTO `repository` VALUES(?, ?, ?, ?)</insert>
<update>UPDATE `repository` SET `value` = ? WHERE `key` = ?</update>
<delete>DELETE FROM `repository` WHERE `key` = ?</delete>