You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by wu...@apache.org on 2022/02/10 06:47:05 UTC
[shardingsphere] branch master updated: Complete SQL type in integration test (#15325)
This is an automated email from the ASF dual-hosted git repository.
wuweijie 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 4b3499a Complete SQL type in integration test (#15325)
4b3499a is described below
commit 4b3499ae44f3b704dbef7a9f44e6e0b8b4eabdf9
Author: gin <ja...@163.com>
AuthorDate: Thu Feb 10 14:46:10 2022 +0800
Complete SQL type in integration test (#15325)
* Complete SQL type in integration test
* Fix date time timestamp types for PostgreSQL
* Fix date time timestamp types for PostgreSQL
---
.../test/integration/engine/dml/BatchDMLIT.java | 8 ++-
.../test/integration/engine/dml/GeneralDMLIT.java | 2 -
.../{ => mysql}/pro_insert_order_batch_value.xml | 21 +++----
.../shadow/{ => mysql}/pro_insert_order_value.xml | 18 +++---
.../pro_update_order_by_user_id.xml} | 18 +++---
.../shadow_insert_order_batch_value.xml | 21 +++----
.../{ => mysql}/shadow_insert_order_value.xml | 18 +++---
.../shadow_update_order_by_user_id.xml} | 19 +++---
.../pro_insert_order_batch_value.xml} | 21 ++++---
.../{ => postgresql}/pro_insert_order_value.xml | 18 +++---
.../pro_update_order_by_user_id.xml} | 18 +++---
.../shadow_insert_order_batch_value.xml | 21 +++----
.../{ => postgresql}/shadow_insert_order_value.xml | 18 +++---
.../shadow_update_order_by_user_id.xml} | 19 +++---
.../dataset/shadow/pro_delete_order_by_user_id.xml | 16 +++--
.../dataset/shadow/pro_update_order_by_user_id.xml | 40 ------------
.../shadow/shadow_delete_order_by_user_id.xml | 18 +++---
.../shadow/shadow_update_order_by_user_id.xml | 40 ------------
.../cases/dml/dml-integration-test-cases.xml | 71 ++++++++++++++++------
.../dataset/shadow/pro_select_order_by_user_id.xml | 16 ++---
.../shadow/shadow_select_order_by_user_id.xml | 16 ++---
.../cases/dql/dql-integration-test-cases.xml | 3 +-
.../src/test/resources/env/shadow/dataset.xml | 26 ++++----
.../resources/env/shadow/init-sql/mysql/init.sql | 12 ++--
.../env/shadow/init-sql/postgresql/init.sql | 8 +--
25 files changed, 229 insertions(+), 277 deletions(-)
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
index 493d71c..357805e 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
@@ -59,9 +59,11 @@ public final class BatchDMLIT extends BatchITCase {
@Test
public void assertExecuteBatch() throws SQLException, ParseException {
+ if ("shadow".equals(getScenario()) && "PostgreSQL".equals(getDatabaseType().getName())) {
+ return;
+ }
switch (getScenario()) {
case "replica_query":
- case "shadow":
case "encrypt":
return;
default:
@@ -92,9 +94,11 @@ public final class BatchDMLIT extends BatchITCase {
@Test
public void assertClearBatch() throws SQLException, ParseException {
// TODO fix replica_query
+ if ("shadow".equals(getScenario()) && "PostgreSQL".equals(getDatabaseType().getName())) {
+ return;
+ }
switch (getScenario()) {
case "replica_query":
- case "shadow":
case "encrypt":
return;
default:
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/GeneralDMLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/GeneralDMLIT.java
index f4357ec..85b7f2d 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/GeneralDMLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/GeneralDMLIT.java
@@ -59,7 +59,6 @@ public final class GeneralDMLIT extends BaseDMLIT {
public void assertExecuteUpdate() throws SQLException, ParseException {
switch (getScenario()) {
case "replica_query":
- case "shadow":
case "encrypt":
return;
default:
@@ -90,7 +89,6 @@ public final class GeneralDMLIT extends BaseDMLIT {
public void assertExecute() throws SQLException, ParseException {
switch (getScenario()) {
case "replica_query":
- case "shadow":
case "encrypt":
return;
default:
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_batch_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_batch_value.xml
similarity index 59%
rename from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_batch_value.xml
rename to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_batch_value.xml
index e0f6ae8..a672be2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_batch_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_batch_value.xml
@@ -20,21 +20,20 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="db.t_order" values="7, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="db.t_order" values="8, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="7, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="8, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_value.xml
similarity index 65%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_value.xml
index ad3d18e..8617cf8 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_insert_order_value.xml
@@ -20,19 +20,19 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="6, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_update_order_by_user_id.xml
similarity index 67%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_update_order_by_user_id.xml
index d2bca8b..44dd575 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/pro_update_order_by_user_id.xml
@@ -15,23 +15,23 @@
~ limitations under the License.
-->
-<dataset update-count="3" >
+<dataset update-count="2">
<metadata data-nodes="db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order_update, F, false, 60, spring, 120.00, 2021-01-02, 13:30:30, 2021-01-02 13:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order_update, F, false, 60, spring, 120.00, 2021-01-02, 13:30:30, 2021-01-02 13:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_batch_value.xml
similarity index 76%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_batch_value.xml
index 0079cdd..9fa27e7 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_batch_value.xml
@@ -20,21 +20,20 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="shadow_db.t_order" values="7, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="shadow_db.t_order" values="8, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="7, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="8, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_value.xml
similarity index 82%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_value.xml
index 81953b9..248c76c 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_insert_order_value.xml
@@ -20,19 +20,19 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="6, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_update_order_by_user_id.xml
similarity index 77%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_update_order_by_user_id.xml
index 81953b9..c00f288 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/mysql/shadow_update_order_by_user_id.xml
@@ -15,24 +15,23 @@
~ limitations under the License.
-->
-<dataset update-count="1">
+<dataset update-count="2">
<metadata data-nodes="shadow_db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order_update, F, false, 60, spring, 120.00, 2021-01-02, 13:30:30, 2021-01-02 13:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order_update, F, false, 60, spring, 120.00, 2021-01-02, 13:30:30, 2021-01-02 13:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_batch_value.xml
similarity index 61%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_batch_value.xml
index ad3d18e..a672be2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_batch_value.xml
@@ -15,24 +15,25 @@
~ limitations under the License.
-->
-<dataset update-count="1">
+<dataset update-count="2">
<metadata data-nodes="db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="7, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="8, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_value.xml
similarity index 65%
rename from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
rename to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_value.xml
index ad3d18e..668e724 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_insert_order_value.xml
@@ -20,19 +20,19 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, pro_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0 " />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="6, 1, pro_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_update_order_by_user_id.xml
similarity index 67%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_update_order_by_user_id.xml
index d2bca8b..477b8ac 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/pro_update_order_by_user_id.xml
@@ -15,23 +15,23 @@
~ limitations under the License.
-->
-<dataset update-count="3" >
+<dataset update-count="2">
<metadata data-nodes="db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order_update, F, false, 60, spring, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order_update, F, false, 60, spring, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_batch_value.xml
similarity index 76%
rename from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml
rename to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_batch_value.xml
index 0079cdd..9fa27e7 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_batch_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_batch_value.xml
@@ -20,21 +20,20 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="shadow_db.t_order" values="7, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
- <row data-node="shadow_db.t_order" values="8, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 7, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="7, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="8, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_value.xml
similarity index 82%
copy from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
copy to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_value.xml
index 81953b9..248c76c 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_insert_order_value.xml
@@ -20,19 +20,19 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="6, 0, shadow_order, S, true, 50, summer, 100.00, 2021-01-01, 12:30:30, 2021-01-01 12:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_update_order_by_user_id.xml
similarity index 77%
rename from shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
rename to shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_update_order_by_user_id.xml
index 81953b9..e5f8ff5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_insert_order_value.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/postgresql/shadow_update_order_by_user_id.xml
@@ -15,24 +15,23 @@
~ limitations under the License.
-->
-<dataset update-count="1">
+<dataset update-count="2">
<metadata data-nodes="shadow_db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="shadow_db.t_order" values="6, 0, shadow_order, 100.00, S, 2021-01-01, summer, true, 6, 12:30:30, 2021-01-01 12:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order_update, F, false, 60, spring, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order_update, F, false, 60, spring, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
index d2bca8b..53fb161 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_delete_order_by_user_id.xml
@@ -15,23 +15,21 @@
~ limitations under the License.
-->
-<dataset update-count="3" >
+<dataset update-count="2" >
<metadata data-nodes="db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_update_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_update_order_by_user_id.xml
deleted file mode 100644
index 81121ab..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/pro_update_order_by_user_id.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset update-count="3">
- <metadata data-nodes="db.t_order">
- <column name="order_id" type="long" />
- <column name="user_id" type="int" />
- <column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
- <column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
- <column name="type_boolean" type="boolean" />
- <column name="type_smallint" type="smallint" />
- <column name="type_time" type="time" />
- <column name="type_timestamp" type="timestamp"/>
- </metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, pro_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
- <row data-node="db.t_order" values="7, 1, pro_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
- <row data-node="db.t_order" values="8, 1, pro_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_delete_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_delete_order_by_user_id.xml
index e6d9dbf..2e729b4 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_delete_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_delete_order_by_user_id.xml
@@ -15,23 +15,21 @@
~ limitations under the License.
-->
-<dataset update-count="3">
- <metadata data-nodes="db.t_order">
+<dataset update-count="2">
+ <metadata data-nodes="shadow_db.t_order">
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, shadow_order, 10.00, S, 2017-08-08, summer, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, shadow_order, 10.00, S, 2017-08-08, summer, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, shadow_order, 10.00, S, 2017-08-08, summer, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, shadow_order, 10.00, S, 2017-08-08, summer, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, shadow_order, 10.00, S, 2017-08-08, summer, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_update_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_update_order_by_user_id.xml
deleted file mode 100644
index a13acde..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dataset/shadow/shadow_update_order_by_user_id.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset update-count="3">
- <metadata data-nodes="db.t_order">
- <column name="order_id" type="long" />
- <column name="user_id" type="int" />
- <column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
- <column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
- <column name="type_boolean" type="boolean" />
- <column name="type_smallint" type="smallint" />
- <column name="type_time" type="time" />
- <column name="type_timestamp" type="timestamp"/>
- </metadata>
- <row data-node="db.t_order" values="1, 1, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="2, 1, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="3, 1, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="4, 1, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="5, 1, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row data-node="db.t_order" values="6, 1, shadow_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
- <row data-node="db.t_order" values="7, 1, shadow_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
- <row data-node="db.t_order" values="8, 1, shadow_order, 110.00, S, 2021-01-02, spring, false, 8, 13:30:30, 2021-01-02 13:30:30.0" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dml-integration-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dml-integration-test-cases.xml
index d93352c..9180d08 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dml-integration-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dml/dml-integration-test-cases.xml
@@ -209,33 +209,70 @@
<!--<assertion parameters="init:String" expected-data-file="delete_with_alias.xml" />-->
<!--</test-case>-->
- <!-- TODO complete test type -->
- <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_decimal, type_char, type_date, type_enum, type_boolean, type_smallint, type_time, type_timestamp)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="MySQL,PostgreSQL" scenario-types="shadow">
- <assertion parameters="6:long, 1:int, pro_order:String, 100.00:decimal, S:char, 2021-01-01:Date, summer:enum#season, true:boolean, 6:smallint, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_enum, type_decimal, type_date, type_time, type_timestamp)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="6:long, 1:int, pro_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
expected-data-file="pro_insert_order_value.xml" />
- <assertion parameters="6:long, 0:int, shadow_order:String, 100.00:decimal, S:char, 2021-01-01:Date, summer:enum#season, true:boolean, 6:smallint, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ </test-case>
+
+ <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_enum, type_decimal, type_date, type_time, type_timestamp)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="6:long, 0:int, shadow_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
expected-data-file="shadow_insert_order_value.xml" />
</test-case>
- <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_decimal, type_char, type_date, type_enum, type_boolean, type_smallint, type_time, type_timestamp) VALUES
- (7, 1, 'pro_order', 100.00, 'S', '2021-01-01', 'summer', true, 7, '12:30:30', '2021-01-01 12:30:30'), (8, 1, 'pro_order', 100.00, 'S', '2021-01-01', 'summer', true, 7, '12:30:30', '2021-01-01 12:30:30');"
- db-types="MySQL,PostgreSQL" scenario-types="shadow">
- <assertion expected-data-file="pro_insert_order_batch_value.xml" />
- <assertion expected-data-file="shadow_insert_order_batch_value.xml" />
+ <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_enum, type_decimal, type_date, type_time, type_timestamp)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="7:long, 1:int, pro_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp, 8:long, 1:int, pro_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ expected-data-file="pro_insert_order_batch_value.xml" />
+ </test-case>
+
+ <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_enum, type_decimal, type_date, type_time, type_timestamp)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="7:long, 0:int, shadow_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp, 8:long, 0:int, shadow_order:String, S:char, true:boolean, 50:smallint, summer:enum#season, 100.00:decimal, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ expected-data-file="shadow_insert_order_batch_value.xml" />
+ </test-case>
+
+ <test-case sql="UPDATE t_order SET order_name = ?, type_char = ?, type_boolean = ?, type_smallint = ?, type_enum = ?, type_decimal = ?, type_date = ?, type_time = ?, type_timestamp = ?
+ WHERE user_id = ? and order_id in (?, ?)" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="pro_order_update:String, F:char, false:boolean, 60:smallint, spring:enum#season, 120.00:decimal, 2021-01-02:Date, 13:30:30:time, 2021-01-02 13:30:30:timestamp, 1:int, 1:long, 2:long"
+ expected-data-file="pro_update_order_by_user_id.xml" />
+ </test-case>
+
+ <test-case sql="UPDATE t_order SET order_name = ?, type_char = ?, type_boolean = ?, type_smallint = ?, type_enum = ?, type_decimal = ?, type_date = ?, type_time = ?, type_timestamp = ?
+ WHERE user_id = ? and order_id in (?, ?)" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="shadow_order_update:String, F:char, false:boolean, 60:smallint, spring:enum#season, 120.00:decimal, 2021-01-02:Date, 13:30:30:time, 2021-01-02 13:30:30:timestamp, 0:int, 1:long, 2:long"
+ expected-data-file="shadow_update_order_by_user_id.xml" />
+ </test-case>
+
+ <test-case sql="DELETE FROM t_order WHERE user_id = ? and order_id in (?, ?)" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="1:int, 4:long, 5:long" expected-data-file="pro_delete_order_by_user_id.xml" />
+ </test-case>
+
+ <test-case sql="DELETE FROM t_order WHERE user_id = ? and order_id in (?, ?)" db-types="MySQL" scenario-types="shadow">
+ <assertion parameters="0:int, 4:long, 5:long" expected-data-file="shadow_delete_order_by_user_id.xml" />
+ </test-case>
+
+ <!-- FIXME Support decimal, enum types for PostgreSQL -->
+ <test-case sql="INSERT INTO t_order (order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_date, type_time, type_timestamp)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);" db-types="PostgreSQL" scenario-types="shadow">
+ <assertion parameters="6:long, 1:int, pro_order:String, S:char, true:boolean, 50:smallint, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ expected-data-file="pro_insert_order_value.xml" />
+ <assertion parameters="6:long, 0:int, shadow_order:String, S:char, true:boolean, 50:smallint, 2021-01-01:Date, 12:30:30:time, 2021-01-01 12:30:30:timestamp"
+ expected-data-file="shadow_insert_order_value.xml" />
</test-case>
- <test-case sql="UPDATE t_order SET order_name = ?, type_decimal = ?, type_char = ?, type_date = ?, type_enum = ?, type_boolean = ?, type_smallint = ?, type_time = ?, type_timestamp = ?
- WHERE user_id = ? and order_id in (?, ?, ?)" db-types="MySQL,PostgreSQL" scenario-types="shadow">
- <assertion parameters="pro_order:String, 110.00:decimal, S:char, 2021-01-02:Date, spring:enum#season, false:boolean, 8:smallint, 13:30:30:time, '2021-01-02 13:30:30':timestamp, 1:int, 6:long, 7:long, 8:long"
+ <test-case sql="UPDATE t_order SET order_name = ?, type_char = ?, type_boolean = ?, type_smallint = ?, type_enum = ?::season
+ WHERE user_id = ? and order_id in (?, ?)" db-types="PostgreSQL" scenario-types="shadow">
+ <assertion parameters="pro_order_update:String, F:char, false:boolean, 60:smallint, spring:enum#season, 1:int, 1:long, 2:long"
expected-data-file="pro_update_order_by_user_id.xml" />
- <assertion parameters="pro_order:String, 110.00:decimal, S:char, 2021-01-02:Date, spring:enum#season, false:boolean, 8:smallint, 13:30:30:time, '2021-01-02 13:30:30':timestamp, 0:int, 6:long, 7:long, 8:long"
+ <assertion parameters="shadow_order_update:String, F:char, false:boolean, 60:smallint, spring:enum#season, 0:int, 1:long, 2:long"
expected-data-file="shadow_update_order_by_user_id.xml" />
</test-case>
- <test-case sql="DELETE FROM t_order WHERE user_id = ? and order_id in (?, ?, ?)" db-types="MySQL,PostgreSQL" scenario-types="shadow">
- <assertion parameters="1:int, 6:long, 7:long, 8:long" expected-data-file="pro_delete_order_by_user_id.xml" />
- <assertion parameters="0:int, 6:long, 7:long, 8:long" expected-data-file="shadow_delete_order_by_user_id.xml" />
+ <test-case sql="DELETE FROM t_order WHERE user_id = ? and order_id in (?, ?)" db-types="PostgreSQL" scenario-types="shadow">
+ <assertion parameters="1:int, 4:long, 5:long" expected-data-file="pro_delete_order_by_user_id.xml" />
+ <assertion parameters="0:int, 4:long, 5:long" expected-data-file="shadow_delete_order_by_user_id.xml" />
</test-case>
</integration-test-cases>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/pro_select_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/pro_select_order_by_user_id.xml
index 4b27b8e..e8e05cf 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/pro_select_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/pro_select_order_by_user_id.xml
@@ -20,18 +20,18 @@
<column name="order_id" />
<column name="user_id" />
<column name="order_name" />
- <column name="type_decimal" />
<column name="type_char" />
- <column name="type_date" />
- <column name="type_enum" />
<column name="type_boolean" />
<column name="type_smallint" />
+ <column name="type_enum" />
+ <column name="type_decimal" />
+ <column name="type_date" />
<column name="type_time" />
<column name="type_timestamp" />
</metadata>
- <row values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/shadow_select_order_by_user_id.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/shadow_select_order_by_user_id.xml
index cb94819..2ee3020 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/shadow_select_order_by_user_id.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/shadow/shadow_select_order_by_user_id.xml
@@ -20,18 +20,18 @@
<column name="order_id" />
<column name="user_id" />
<column name="order_name" />
- <column name="type_decimal" />
<column name="type_char" />
- <column name="type_date" />
- <column name="type_enum" />
<column name="type_boolean" />
<column name="type_smallint" />
+ <column name="type_enum" />
+ <column name="type_decimal" />
+ <column name="type_date" />
<column name="type_time" />
<column name="type_timestamp" />
</metadata>
- <row values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
- <row values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
index 87131f6..32c0e40 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
@@ -627,7 +627,8 @@
</test-case>
<!-- TODO complete test type -->
- <test-case sql="SELECT order_id, user_id, order_name, type_decimal, type_char, type_date, type_enum, type_boolean, type_smallint, type_time, type_timestamp FROM t_order WHERE user_id = ?"
+ <test-case
+ sql="SELECT order_id, user_id, order_name, type_char, type_boolean, type_smallint, type_enum, type_decimal, type_date, type_time, type_timestamp FROM t_order WHERE user_id = ?"
db-types="MySQL,PostgreSQL" scenario-types="shadow">
<assertion parameters="1:int" expected-data-file="pro_select_order_by_user_id.xml"/>
<assertion parameters="0:int" expected-data-file="shadow_select_order_by_user_id.xml"/>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/dataset.xml
index 8d6f1de..740f83d 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/dataset.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/dataset.xml
@@ -20,23 +20,23 @@
<column name="order_id" type="long" />
<column name="user_id" type="int" />
<column name="order_name" type="varchar" />
- <column name="type_decimal" type="decimal" />
<column name="type_char" type="char" />
- <column name="type_date" type="Date" />
- <column name="type_enum" type="enum#season" />
<column name="type_boolean" type="boolean" />
<column name="type_smallint" type="smallint" />
+ <column name="type_enum" type="enum#season" />
+ <column name="type_decimal" type="decimal" />
+ <column name="type_date" type="Date" />
<column name="type_time" type="time" />
<column name="type_timestamp" type="timestamp"/>
</metadata>
- <row data-node="db.t_order" values="1, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="db.t_order" values="2, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="db.t_order" values="3, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="db.t_order" values="4, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="db.t_order" values="5, 1, pro_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="shadow_db.t_order" values="1, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="shadow_db.t_order" values="2, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="shadow_db.t_order" values="3, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="shadow_db.t_order" values="4, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
- <row data-node="shadow_db.t_order" values="5, 0, shadow_order, 10.00, S, 2017-08-08, summer, true, 5, 18:30:30, 2017-08-08 18:30:30" />
+ <row data-node="db.t_order" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="db.t_order" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
+ <row data-node="shadow_db.t_order" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/mysql/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/mysql/init.sql
index 5e5620a..6341d13 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/mysql/init.sql
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/mysql/init.sql
@@ -25,14 +25,14 @@ DROP DATABASE IF EXISTS db;
CREATE DATABASE db;
-CREATE TABLE db.t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_decimal DECIMAL(18,2) NOT NULL, type_char char(1) NOT NULL, type_date DATE NOT NULL,
- type_enum ENUM('spring', 'summer', 'autumn', 'winter'), type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL, type_time time NOT NULL,
- type_timestamp timestamp NOT NULL, PRIMARY KEY (order_id));
+CREATE TABLE db.t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_char CHAR(1) NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL,
+ type_enum ENUM('spring', 'summer', 'autumn', 'winter'), type_decimal DECIMAL(18,2) NOT NULL, type_date DATE NOT NULL, type_time TIME NOT NULL, type_timestamp TIMESTAMP NOT NULL,
+ PRIMARY KEY (order_id));
DROP DATABASE IF EXISTS shadow_db;
CREATE DATABASE shadow_db;
-CREATE TABLE shadow_db.t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_decimal DECIMAL(18,2) NOT NULL, type_char char(1) NOT NULL, type_date DATE NOT NULL,
- type_enum ENUM('spring', 'summer', 'autumn', 'winter'), type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL, type_time time NOT NULL,
- type_timestamp timestamp NOT NULL, PRIMARY KEY (order_id));
+CREATE TABLE shadow_db.t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_char CHAR(1) NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL,
+ type_enum ENUM('spring', 'summer', 'autumn', 'winter'), type_decimal DECIMAL(18,2) NOT NULL, type_date DATE NOT NULL, type_time TIME NOT NULL, type_timestamp TIMESTAMP NOT NULL,
+ PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/postgresql/init.sql b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/postgresql/init.sql
index ddd11f4..0fc7eec 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/postgresql/init.sql
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/shadow/init-sql/postgresql/init.sql
@@ -27,8 +27,8 @@ DROP TABLE IF EXISTS t_order;
CREATE TYPE season AS ENUM ('spring', 'summer', 'autumn', 'winter');
-CREATE TABLE t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_decimal DECIMAL(18,2) NOT NULL, type_char char(1) NOT NULL, type_date DATE NOT NULL,
- type_enum season NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL, type_time time(0) NOT NULL, type_timestamp timestamp(0) without time zone,
+CREATE TABLE t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_char CHAR(1) NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL,
+ type_enum season DEFAULT 'summer', type_decimal NUMERIC(18,2) DEFAULT '100.00', type_date DATE DEFAULT NULL, type_time TIME DEFAULT NULL, type_timestamp TIMESTAMP DEFAULT NULL,
PRIMARY KEY (order_id));
\c shadow_db
@@ -37,6 +37,6 @@ DROP TABLE IF EXISTS t_order;
CREATE TYPE season AS ENUM ('spring', 'summer', 'autumn', 'winter');
-CREATE TABLE t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_decimal DECIMAL(18,2) NOT NULL, type_char char(1) NOT NULL, type_date DATE NOT NULL,
- type_enum season NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL, type_time time(0) NOT NULL, type_timestamp timestamp(0) without time zone,
+CREATE TABLE t_order (order_id BIGINT NOT NULL, user_id INT NOT NULL, order_name VARCHAR(32) NOT NULL, type_char CHAR(1) NOT NULL, type_boolean BOOLEAN NOT NULL, type_smallint SMALLINT NOT NULL,
+ type_enum season DEFAULT 'summer', type_decimal NUMERIC(18,2) DEFAULT '100.00', type_date DATE DEFAULT NULL, type_time TIME DEFAULT NULL, type_timestamp TIMESTAMP DEFAULT NULL,
PRIMARY KEY (order_id));