You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2021/11/01 06:41:10 UTC
[shardingsphere] branch master updated: Refactor rewrite test logic
for one case supports multi database dialects (#13377)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 1e38a5e Refactor rewrite test logic for one case supports multi database dialects (#13377)
1e38a5e is described below
commit 1e38a5efbfe197935787b79032433edfae699ec0
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Mon Nov 1 14:40:27 2021 +0800
Refactor rewrite test logic for one case supports multi database dialects (#13377)
* support multi database in one rewrite test case
* support multi database in one rewrite test case
* support multi database in one rewrite test case
* fix checkstyle
---
.../AbstractSQLRewriterParameterizedTest.java | 6 +-
.../SQLRewriteEngineTestParametersBuilder.java | 16 +-
.../entity/RewriteAssertionEntity.java | 4 +-
.../EncryptSQLRewriterParameterizedTest.java | 5 -
.../scenario/MixSQLRewriterParameterizedTest.java | 5 -
.../ShardingSQLRewriterParameterizedTest.java | 7 +-
.../encrypt/case/alter_for_query_with_plain.xml | 12 +-
.../encrypt/case/create_for_query_with_plain.xml | 2 +-
.../encrypt/case/delete_for_query_with_cipher.xml | 8 +-
.../encrypt/case/delete_for_query_with_plain.xml | 4 +-
.../resources/scenario/encrypt/case/insert.xml | 68 +++----
.../encrypt/case/select_for_query_with_cipher.xml | 28 +--
.../encrypt/case/select_for_query_with_plain.xml | 14 +-
.../encrypt/case/update_for_query_with_cipher.xml | 8 +-
.../encrypt/case/update_for_query_with_plain.xml | 4 +-
.../test/resources/scenario/mix/case/create.xml | 8 +-
.../mix/case/delete_for_query_with_cipher.xml | 8 +-
.../mix/case/delete_for_query_with_plain.xml | 4 +-
.../test/resources/scenario/mix/case/insert.xml | 50 ++---
.../mix/case/select_for_query_with_cipher.xml | 28 +--
.../mix/case/select_for_query_with_plain.xml | 12 +-
.../mix/case/update_for_query_with_cipher.xml | 8 +-
.../mix/case/update_for_query_with_plain.xml | 4 +-
.../resources/scenario/sharding/case/alter.xml | 60 +++---
.../resources/scenario/sharding/case/analyze.xml | 74 ++++----
.../resources/scenario/sharding/case/create.xml | 56 +++---
.../resources/scenario/sharding/case/delete.xml | 16 +-
.../test/resources/scenario/sharding/case/drop.xml | 44 ++---
.../resources/scenario/sharding/case/index.xml | 12 +-
.../resources/scenario/sharding/case/insert.xml | 204 ++++++++++-----------
.../resources/scenario/sharding/case/select.xml | 182 +++++++++---------
.../test/resources/scenario/sharding/case/show.xml | 18 +-
.../resources/scenario/sharding/case/update.xml | 16 +-
33 files changed, 495 insertions(+), 500 deletions(-)
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
index 60105ae..87f03df 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/AbstractSQLRewriterParameterizedTest.java
@@ -38,8 +38,8 @@ import org.apache.shardingsphere.infra.rewrite.engine.result.SQLRewriteUnit;
import org.apache.shardingsphere.infra.route.context.RouteContext;
import org.apache.shardingsphere.infra.route.engine.SQLRouteEngine;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
-import org.apache.shardingsphere.infra.rule.builder.schema.SchemaRulesBuilderMaterials;
import org.apache.shardingsphere.infra.rule.builder.schema.SchemaRulesBuilder;
+import org.apache.shardingsphere.infra.rule.builder.schema.SchemaRulesBuilderMaterials;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
import org.apache.shardingsphere.infra.yaml.config.swapper.YamlDataSourceConfigurationSwapper;
import org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapperEngine;
@@ -83,7 +83,7 @@ public abstract class AbstractSQLRewriterParameterizedTest {
private Collection<SQLRewriteUnit> createSQLRewriteUnits() throws IOException {
YamlRootConfiguration rootConfig = createRootConfiguration();
- String databaseType = getDataBaseType();
+ String databaseType = getTestParameters().getDatabaseType();
Collection<ShardingSphereRule> rules = SchemaRulesBuilder.buildRules(new SchemaRulesBuilderMaterials("schema_name",
new YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(rootConfig.getRules()), DatabaseTypeRegistry.getTrunkDatabaseType(databaseType),
new YamlDataSourceConfigurationSwapper().swapToDataSources(rootConfig.getDataSources()), new ConfigurationProperties(new Properties())));
@@ -110,6 +110,4 @@ public abstract class AbstractSQLRewriterParameterizedTest {
protected abstract ShardingSphereSchema mockSchema();
protected abstract void mockRules(Collection<ShardingSphereRule> rules);
-
- protected abstract String getDataBaseType();
}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
index 1142284..9893185 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/engine/parameter/SQLRewriteEngineTestParametersBuilder.java
@@ -18,6 +18,7 @@
package org.apache.shardingsphere.sharding.rewrite.parameterized.engine.parameter;
import com.google.common.base.Splitter;
+import com.google.common.base.Strings;
import com.google.common.primitives.Ints;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@@ -28,6 +29,7 @@ import org.apache.shardingsphere.sharding.rewrite.parameterized.loader.RewriteAs
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -74,12 +76,22 @@ public final class SQLRewriteEngineTestParametersBuilder {
private static Collection<Object[]> createTestParameters(final String type, final String fileName, final RewriteAssertionsRootEntity rootAssertions) {
Collection<Object[]> result = new LinkedList<>();
for (RewriteAssertionEntity each : rootAssertions.getAssertions()) {
- result.add(new SQLRewriteEngineTestParameters(type, each.getId(), fileName, rootAssertions.getYamlRule(), each.getInput().getSql(),
- createInputParameters(each.getInput().getParameters()), createOutputSQLs(each.getOutputs()), createOutputGroupedParameters(each.getOutputs()), each.getDatabaseType()).toArray());
+ for (String databaseType : getDatabaseTypes(each.getDatabaseTypes())) {
+ result.add(new SQLRewriteEngineTestParameters(type, each.getId(), fileName, rootAssertions.getYamlRule(), each.getInput().getSql(),
+ createInputParameters(each.getInput().getParameters()), createOutputSQLs(each.getOutputs()), createOutputGroupedParameters(each.getOutputs()), databaseType).toArray());
+ }
}
return result;
}
+ private static Collection<String> getDatabaseTypes(final String databaseTypes) {
+ return Strings.isNullOrEmpty(databaseTypes) ? getAllDatabaseTypes() : Splitter.on(',').trimResults().splitToList(databaseTypes);
+ }
+
+ private static Collection<String> getAllDatabaseTypes() {
+ return Arrays.asList("MySQL", "PostgreSQL", "Oracle", "SQLServer", "SQL92", "openGauss");
+ }
+
private static List<Object> createInputParameters(final String inputParameters) {
if (null == inputParameters) {
return Collections.emptyList();
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/entity/RewriteAssertionEntity.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/entity/RewriteAssertionEntity.java
index dbd420b..849392a 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/entity/RewriteAssertionEntity.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/entity/RewriteAssertionEntity.java
@@ -43,6 +43,6 @@ public final class RewriteAssertionEntity {
@XmlElement(required = true, name = "output")
private List<RewriteOutputEntity> outputs;
- @XmlAttribute(name = "db-type")
- private String databaseType;
+ @XmlAttribute(name = "db-types")
+ private String databaseTypes;
}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/EncryptSQLRewriterParameterizedTest.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/EncryptSQLRewriterParameterizedTest.java
index d723e15..045e8cd 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/EncryptSQLRewriterParameterizedTest.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/EncryptSQLRewriterParameterizedTest.java
@@ -75,9 +75,4 @@ public final class EncryptSQLRewriterParameterizedTest extends AbstractSQLRewrit
singleTableRule.get().addDataNode("t_account_bak", "encrypt_ds");
}
}
-
- @Override
- protected String getDataBaseType() {
- return null == getTestParameters().getDatabaseType() ? "MySQL" : getTestParameters().getDatabaseType();
- }
}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/MixSQLRewriterParameterizedTest.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/MixSQLRewriterParameterizedTest.java
index 0cdbace..aafd7c9 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/MixSQLRewriterParameterizedTest.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/MixSQLRewriterParameterizedTest.java
@@ -87,11 +87,6 @@ public final class MixSQLRewriterParameterizedTest extends AbstractSQLRewriterPa
@Override
protected void mockRules(final Collection<ShardingSphereRule> rules) {
}
-
- @Override
- protected String getDataBaseType() {
- return null == getTestParameters().getDatabaseType() ? "MySQL" : getTestParameters().getDatabaseType();
- }
private Map<String, ColumnMetaData> createColumnMetaDataMap() {
Map<String, ColumnMetaData> result = new LinkedHashMap<>(4, 1);
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/ShardingSQLRewriterParameterizedTest.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/ShardingSQLRewriterParameterizedTest.java
index ba96087..f2c416f 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/ShardingSQLRewriterParameterizedTest.java
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/parameterized/scenario/ShardingSQLRewriterParameterizedTest.java
@@ -23,12 +23,12 @@ import org.apache.shardingsphere.infra.metadata.schema.model.ColumnMetaData;
import org.apache.shardingsphere.infra.metadata.schema.model.IndexMetaData;
import org.apache.shardingsphere.infra.metadata.schema.model.TableMetaData;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
-import org.apache.shardingsphere.singletable.rule.SingleTableRule;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
import org.apache.shardingsphere.sharding.rewrite.parameterized.engine.AbstractSQLRewriterParameterizedTest;
import org.apache.shardingsphere.sharding.rewrite.parameterized.engine.parameter.SQLRewriteEngineTestParameters;
import org.apache.shardingsphere.sharding.rewrite.parameterized.engine.parameter.SQLRewriteEngineTestParametersBuilder;
+import org.apache.shardingsphere.singletable.rule.SingleTableRule;
import org.junit.runners.Parameterized.Parameters;
import java.io.File;
@@ -74,11 +74,6 @@ public final class ShardingSQLRewriterParameterizedTest extends AbstractSQLRewri
singleTableRule.get().addDataNode("t_single_extend", "db");
}
}
-
- @Override
- protected String getDataBaseType() {
- return null == getTestParameters().getDatabaseType() ? "SQL92" : getTestParameters().getDatabaseType();
- }
@Override
protected ShardingSphereSchema mockSchema() {
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/alter_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/alter_for_query_with_plain.xml
index 9ef3893..2c30a93 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/alter_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/alter_for_query_with_plain.xml
@@ -17,32 +17,32 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml">
- <rewrite-assertion id="add_column_for_plain">
+ <rewrite-assertion id="add_column_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak ADD COLUMN id int not null , ADD COLUMN password varchar(255) not null default ''" />
<output sql="ALTER TABLE t_account_bak ADD COLUMN id int not null , ADD COLUMN cipher_password varchar(255) not null default '' , ADD COLUMN assisted_query_password varchar(255) not null default '' , ADD COLUMN plain_password varchar(255) not null default ''" />
</rewrite-assertion>
- <rewrite-assertion id="modify_column_for_plain">
+ <rewrite-assertion id="modify_column_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak MODIFY COLUMN password varchar(255) not null default ''" />
<output sql="ALTER TABLE t_account_bak MODIFY COLUMN cipher_password varchar(255) not null default '' , MODIFY COLUMN assisted_query_password varchar(255) not null default '' , MODIFY COLUMN plain_password varchar(255) not null default ''" />
</rewrite-assertion>
- <rewrite-assertion id="change_column_for_plain">
+ <rewrite-assertion id="change_column_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak CHANGE COLUMN password password_new varchar(255) not null default ''" />
<output sql="ALTER TABLE t_account_bak CHANGE COLUMN cipher_password password_new_cipher varchar(255) not null default '' , CHANGE COLUMN assisted_query_password password_new_assisted varchar(255) not null default '' , CHANGE COLUMN plain_password password_new_plain varchar(255) not null default ''" />
</rewrite-assertion>
- <rewrite-assertion id="drop_column_for_plain">
+ <rewrite-assertion id="drop_column_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak DROP COLUMN password" />
<output sql="ALTER TABLE t_account_bak DROP COLUMN cipher_password , DROP COLUMN assisted_query_password , DROP COLUMN plain_password " />
</rewrite-assertion>
- <rewrite-assertion id="drop_columns_for_plain">
+ <rewrite-assertion id="drop_columns_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak DROP COLUMN password , DROP COLUMN amount" />
<output sql="ALTER TABLE t_account_bak DROP COLUMN cipher_password , DROP COLUMN assisted_query_password , DROP COLUMN plain_password , DROP COLUMN cipher_amount , DROP COLUMN plain_amount " />
</rewrite-assertion>
- <rewrite-assertion id="drop_mix_columns_for_plain">
+ <rewrite-assertion id="drop_mix_columns_for_plain" db-types="MySQL">
<input sql="ALTER TABLE t_account_bak DROP COLUMN password , DROP COLUMN id" />
<output sql="ALTER TABLE t_account_bak DROP COLUMN cipher_password , DROP COLUMN assisted_query_password , DROP COLUMN plain_password , DROP COLUMN id " />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/create_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/create_for_query_with_plain.xml
index ffd33f5..db7a854 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/create_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/create_for_query_with_plain.xml
@@ -17,7 +17,7 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml">
- <rewrite-assertion id="create_table_for_plain">
+ <rewrite-assertion id="create_table_for_plain" db-types="MySQL">
<input sql="CREATE TABLE t_account_bak (id int not null, name varchar(100) not null default '', password varchar(255) not null default '', primary key (`id`))" />
<output sql="CREATE TABLE t_account_bak (id int not null, name varchar(100) not null default '', cipher_password varchar(255) not null default '', assisted_query_password varchar(255) not null default '', plain_password varchar(255) not null default '', primary key (`id`))" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_cipher.xml
index 1e0a599..d667183 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_cipher.xml
@@ -17,22 +17,22 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-cipher.yaml">
- <rewrite-assertion id="delete_for_parameters">
+ <rewrite-assertion id="delete_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="delete_plain_for_parameters">
+ <rewrite-assertion id="delete_plain_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account_bak WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account_bak WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_plain.xml
index 4375a74..acbf4e8 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/delete_for_query_with_plain.xml
@@ -17,12 +17,12 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml">
- <rewrite-assertion id="delete_plain_for_parameters">
+ <rewrite-assertion id="delete_plain_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account_bak WHERE account_id = ? AND plain_password = ? AND plain_amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account_bak WHERE account_id = 1 AND plain_password = 'aaa' AND plain_amount = 1000 AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/insert.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/insert.xml
index 5327449..0e98b70 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/insert.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/insert.xml
@@ -17,172 +17,172 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-cipher.yaml">
- <rewrite-assertion id="insert_values_with_columns_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, certificate_number, password, amount, status) VALUES (?, ?, ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, aaa, 1000, OK, 3, 333X, ccc, 3000, OK" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" parameters="1, encrypt_111X, assisted_query_111X, e [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, certificate_number, password, amount, status) VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', 'encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (3, 'encrypt_333X', 'assisted_query_333X', 'encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', ' [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_and_configuration_for_different_sequence_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_and_configuration_for_different_sequence_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(password, certificate_number, account_id, amount, status) VALUES (?, ?, ?, ?, ?), ('bbb', '222X', 2, 2000, 'OK'), (?, ?, ?, ?, ?), ('ddd', '444X', 4, 4000, 'OK')" parameters="aaa, 111X, 1, 1000, OK, ccc, 333X, 3, 3000, OK" />
<output sql="INSERT INTO t_account(cipher_password, assisted_query_password, cipher_certificate_number, assisted_query_certificate_number, account_id, cipher_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_222X', 'assisted_query_222X', 2, 'encrypt_2000', 'OK'), (?, ?, ?, ?, ?, ?, ?), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_444X', 'assisted_query_444X', 4, 'encrypt_4000', 'OK')" parameters="encrypt_aaa, assisted_query_aaa, encryp [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_and_configuration_for_different_sequence_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_and_configuration_for_different_sequence_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(password, certificate_number, account_id, amount, status) VALUES ('aaa', '111X', 1, 1000, 'OK'), ('bbb', '222X', 2, 2000, 'OK'), ('ccc', '333X', 3, 3000, 'OK'), ('ddd', '444X', 4, 4000, 'OK')" />
<output sql="INSERT INTO t_account(cipher_password, assisted_query_password, cipher_certificate_number, assisted_query_certificate_number, account_id, cipher_amount, status) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'encrypt_111X', 'assisted_query_111X', 1, 'encrypt_1000', 'OK'), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_222X', 'assisted_query_222X', 2, 'encrypt_2000', 'OK'), ('encrypt_ccc', 'assisted_query_ccc', 'encrypt_333X', 'assisted_query_333X', 3, 'encrypt_3000', ' [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (?, ?, ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, aaa, 1000, OK, 3, 333X, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', '444X', 'enc [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (?, ?, ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK') ON DUPLICATE KEY UPDATE password = ?" parameters="1, 111X, aaa, 1000, OK, 3, 333X, ccc, 3000, OK, ccc_update" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', '444X', 'enc [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK') ON DUPLICATE KEY UPDATE password = 'ccc_update'" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', '111X', 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'O [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_insert_value_literals_and_on_duplicate_parameterized" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_on_duplicate_key_update_with_insert_value_literals_and_on_duplicate_parameterized" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK') ON DUPLICATE KEY UPDATE password = ?" parameters="ccc_update" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', '111X', 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'O [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', '111X', 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'O [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (?, ?, ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, aaa, 1000, OK, 3, 333X, ccc, 3000, OK" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" parameters="1, encrypt_111X, assisted_query_111X, e [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_select_encrypt_rewrite">
+ <rewrite-assertion id="insert_select_encrypt_rewrite" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, certificate_number, password, amount) SELECT account_id, certificate_number, password, amount from t_account_bak where certificate_number = ?" parameters="111X"/>
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount) SELECT account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount from t_account_bak where assisted_query_certificate_number = ?" parameters="assisted_query_111X" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', 'encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (3, 'encrypt_333X', 'assisted_query_333X', 'encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', ' [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (?, ?, ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, aaa, 1000, OK, 3, 333X, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', '444X', 'enc [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (1, '111X', 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', '111X', 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'O [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_set_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = ?, certificate_number = ?, password = ?, amount = ?, status = ?" parameters="1, 111X, aaa, 1000, OK" />
<output sql="INSERT INTO t_account SET account_id = ?, cipher_certificate_number = ?, assisted_query_certificate_number = ?, cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ?" parameters="1, encrypt_111X, assisted_query_111X, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = 1, certificate_number = '111X', password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account SET account_id = 1, cipher_certificate_number = 'encrypt_111X', assisted_query_certificate_number = 'assisted_query_111X', cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_plain_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = ?, certificate_number = ?, password = ?, amount = ?, status = ?" parameters="1, 111X, aaa, 1000, OK" />
<output sql="INSERT INTO t_account_bak SET account_id = ?, cipher_certificate_number = ?, assisted_query_certificate_number = ?, plain_certificate_number = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ?" parameters="1, encrypt_111X, assisted_query_111X, 111X, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_plain_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = 1, certificate_number = '111X', password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_bak SET account_id = 1, cipher_certificate_number = 'encrypt_111X', assisted_query_certificate_number = 'assisted_query_111X', plain_certificate_number = '111X', cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_for_parameters">
+ <rewrite-assertion id="mixed_insert_values_with_columns_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, certificate_number, password, amount, status) VALUES (?, '111X', ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, '333X', ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, 'encrypt_111X', 'assisted_query_111X', ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (?, 'encrypt_333X', 'assisted_query_333X', ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd', 'assisted_query_ddd', 'encrypt [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_for_literals">
+ <rewrite-assertion id="mixed_insert_values_with_columns_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, certificate_number, password, amount, status) VALUES (1, ?, 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, ?, 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" parameters="111X, 333X"/>
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (3, ?, ?, 'encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', 'OK'), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd', 'a [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_and_configuration_for_different_sequence_for_parameters">
+ <rewrite-assertion id="mixed_insert_values_with_columns_and_configuration_for_different_sequence_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(password, certificate_number, account_id, amount, status) VALUES (?, ?, ?, 1000, ?), ('bbb', '222X', 2, 2000, 'OK'), (?, ?, ?, 3000, ?), ('ddd', '444X', 4, 4000, 'OK')" parameters="aaa, 111X, 1, OK, ccc, 333X, 3, OK" />
<output sql="INSERT INTO t_account(cipher_password, assisted_query_password, cipher_certificate_number, assisted_query_certificate_number, account_id, cipher_amount, status) VALUES (?, ?, ?, ?, ?, 'encrypt_1000', ?), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_222X', 'assisted_query_222X', 2, 'encrypt_2000', 'OK'), (?, ?, ?, ?, ?, 'encrypt_3000', ?), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_444X', 'assisted_query_444X', 4, 'encrypt_4000', 'OK')" parameters="encrypt_aaa, [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_and_configuration_for_different_sequence_for_literals">
+ <rewrite-assertion id="mixed_insert_values_with_columns_and_configuration_for_different_sequence_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(password, certificate_number, account_id, amount, status) VALUES ('aaa', ?, 1, 1000, 'OK'), ('bbb', '222X', 2, 2000, 'OK'), ('ccc', ?, 3, 3000, 'OK'), ('ddd', '444X', 4, 4000, 'OK')" parameters="111X, 333X"/>
<output sql="INSERT INTO t_account(cipher_password, assisted_query_password, cipher_certificate_number, assisted_query_certificate_number, account_id, cipher_amount, status) VALUES ('encrypt_aaa', 'assisted_query_aaa', ?, ?, 1, 'encrypt_1000', 'OK'), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_222X', 'assisted_query_222X', 2, 'encrypt_2000', 'OK'), ('encrypt_ccc', 'assisted_query_ccc', ?, ?, 3, 'encrypt_3000', 'OK'), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_444X', 'assis [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_with_plain_for_parameters">
+ <rewrite-assertion id="mixed_insert_values_with_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (?, ?, ?, ?, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, ?, ?, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, aaa, 1000, 3, 333X, ccc, 3000" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, ?, ?, ?, ?, ?, 'OK'), (4, 'encrypt_444X', 'assisted_query_444X', '444X' [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_values_with_on_duplicate_key_update_with_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (?, ?, 'aaa', ?, ?), (2, '222X', ?, 2000, 'OK'), (?, ?, ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK') ON DUPLICATE KEY UPDATE password = ?" parameters="1, 111X, 1000, OK, bbb, 3, 333X, ccc, 3000, OK, ccc_update" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', '222X', ?, ?, ?, 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', '444X', 'enc [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_on_duplicate_key_update_with_insert_value_literals_and_on_duplicate_parameterized" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_values_with_on_duplicate_key_update_with_insert_value_literals_and_on_duplicate_parameterized" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (1, ?, 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, ?, 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK') ON DUPLICATE KEY UPDATE password = ?" parameters="111X, 333X, ccc_update" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, ?, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (3, ?, ?, ?, 'encrypt_ccc', 'assi [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_with_columns_with_plain_for_literals">
+ <rewrite-assertion id="mixed_insert_values_with_columns_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, certificate_number, password, amount, status) VALUES (1, ?, 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, ?, 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" parameters="111X, 333X"/>
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, ?, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (3, ?, ?, ?, 'encrypt_ccc', 'assi [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_without_columns_for_parameters">
+ <rewrite-assertion id="mixed_insert_values_without_columns_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (?, '111X', ?, ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, '333X', ?, ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, 'encrypt_111X', 'assisted_query_111X', ?, ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (?, 'encrypt_333X', 'assisted_query_333X', ?, ?, ?, ?), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd', 'assisted_query_ddd', 'encrypt [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_without_columns_for_literals">
+ <rewrite-assertion id="mixed_insert_values_without_columns_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1, '111X', ?, 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, '333X', ?, 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" parameters="aaa, ccc"/>
<output sql="INSERT INTO t_account(account_id, cipher_certificate_number, assisted_query_certificate_number, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, 'encrypt_111X', 'assisted_query_111X', ?, ?, 'encrypt_1000', 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (3, 'encrypt_333X', 'assisted_query_333X', ?, ?, 'encrypt_3000', 'OK'), (4, 'encrypt_444X', 'assisted_query_444X', 'encrypt_ddd' [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_without_columns_with_plain_for_parameters">
+ <rewrite-assertion id="mixed_insert_values_without_columns_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (?, ?, 'aaa', ?, ?), (2, '222X', 'bbb', 2000, 'OK'), (?, ?, 'ccc', ?, ?), (4, '444X', 'ddd', 4000, 'OK')" parameters="1, 111X, 1000, OK, 3, 333X, 3000, OK" />
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', ?, ?, ?), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (?, ?, ?, ?, 'encrypt_ccc', 'assisted_query_ccc', 'c [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_values_without_columns_with_plain_for_literals">
+ <rewrite-assertion id="mixed_insert_values_without_columns_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (1, ?, 'aaa', 1000, 'OK'), (2, '222X', 'bbb', 2000, 'OK'), (3, ?, 'ccc', 3000, 'OK'), (4, '444X', 'ddd', 4000, 'OK')" parameters="111X, 333X"/>
<output sql="INSERT INTO t_account_bak(account_id, cipher_certificate_number, assisted_query_certificate_number, plain_certificate_number, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, ?, ?, ?, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (2, 'encrypt_222X', 'assisted_query_222X', '222X', 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (3, ?, ?, ?, 'encrypt_ccc', 'assi [...]
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_set_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_set_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = 1, certificate_number = ?, password = ?, amount = ?, status = ?" parameters="111X, aaa, 1000, OK" />
<output sql="INSERT INTO t_account SET account_id = 1, cipher_certificate_number = ?, assisted_query_certificate_number = ?, cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ?" parameters="encrypt_111X, assisted_query_111X, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_set_for_literals" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_set_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = 1, certificate_number = ?, password = 'aaa', amount = 1000, status = 'OK'" parameters="111X"/>
<output sql="INSERT INTO t_account SET account_id = 1, cipher_certificate_number = ?, assisted_query_certificate_number = ?, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK'" parameters="encrypt_111X, assisted_query_111X"/>
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_set_with_plain_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_set_with_plain_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = ?, certificate_number = ?, password = 'aaa', amount = ?, status = ?" parameters="1, 111X, 1000, OK" />
<output sql="INSERT INTO t_account_bak SET account_id = ?, cipher_certificate_number = ?, assisted_query_certificate_number = ?, plain_certificate_number = ?, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = ?, plain_amount = ?, status = ?" parameters="1, encrypt_111X, assisted_query_111X, 111X, encrypt_1000, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="mixed_insert_set_with_plain_for_literals" db-type="MySQL">
+ <rewrite-assertion id="mixed_insert_set_with_plain_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = 1, certificate_number = '111X', password = 'aaa', amount = ?, status = 'OK'" parameters="1000"/>
<output sql="INSERT INTO t_account_bak SET account_id = 1, cipher_certificate_number = 'encrypt_111X', assisted_query_certificate_number = 'assisted_query_111X', plain_certificate_number = '111X', cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = ?, plain_amount = ?, status = 'OK'" parameters="encrypt_1000, 1000"/>
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_cipher.xml
index 4480264..692a32b 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_cipher.xml
@@ -17,74 +17,74 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-cipher.yaml">
- <rewrite-assertion id="select_for_parameters">
+ <rewrite-assertion id="select_for_parameters" db-types="MySQL">
<input sql="SELECT account_id, password, amount AS a, status AS s FROM t_account WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT account_id, cipher_password AS password, cipher_amount AS a, status AS s FROM t_account WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_for_literals">
+ <rewrite-assertion id="select_for_literals" db-types="MySQL">
<input sql="SELECT account_id, password, amount AS a, status AS s FROM t_account WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="SELECT account_id, cipher_password AS password, cipher_amount AS a, status AS s FROM t_account WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters">
+ <rewrite-assertion id="select_plain_for_parameters" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.password = ? AND a.amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.assisted_query_password = ? AND a.cipher_amount = ? AND a.status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_literals">
+ <rewrite-assertion id="select_plain_for_literals" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.password = 'aaa' AND a.amount = 1000 AND a.status = 'OK'" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.assisted_query_password = 'assisted_query_aaa' AND a.cipher_amount = 'encrypt_1000' AND a.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space">
+ <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.password in(?, ?) AND a.amount in (?, ?)" parameters="aaa, aaa, 1000, 1000" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.assisted_query_password in(?, ?) AND a.cipher_amount in (?, ?)" parameters="assisted_query_aaa, assisted_query_aaa, encrypt_1000, encrypt_1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space_and_parameter_has_left_space">
+ <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space_and_parameter_has_left_space" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.password in( ?, ?) AND a.amount in (?, ?)" parameters="aaa, aaa, 1000, 1000" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.assisted_query_password in(?, ?) AND a.cipher_amount in (?, ?)" parameters="assisted_query_aaa, assisted_query_aaa, encrypt_1000, encrypt_1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space_and_parameter_has_left_newline">
+ <rewrite-assertion id="select_plain_for_parameters_with_in_has_no_left_space_and_parameter_has_left_newline" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.password in(
?, ?) AND a.amount in (?, ?)" parameters="aaa, aaa, 1000, 1000" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.assisted_query_password in(?, ?) AND a.cipher_amount in (?, ?)" parameters="assisted_query_aaa, assisted_query_aaa, encrypt_1000, encrypt_1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters_with_in_has_more_than_one_left_space_and_parameter_has_left_newline">
+ <rewrite-assertion id="select_plain_for_parameters_with_in_has_more_than_one_left_space_and_parameter_has_left_newline" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.password in (
?, ?) AND a.amount in (?, ?)" parameters="aaa, aaa, 1000, 1000" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.assisted_query_password in (?, ?) AND a.cipher_amount in (?, ?)" parameters="assisted_query_aaa, assisted_query_aaa, encrypt_1000, encrypt_1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_unqualified_shorthand">
+ <rewrite-assertion id="select_with_unqualified_shorthand" db-types="MySQL">
<input sql="SELECT * FROM t_account" />
<output sql="SELECT `t_account`.`account_id`, `t_account`.`cipher_certificate_number` AS certificate_number, `t_account`.`cipher_password` AS password, `t_account`.`cipher_amount` AS amount, `t_account`.`status` FROM t_account" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_qualified_shorthand">
+ <rewrite-assertion id="select_with_qualified_shorthand" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_certificate_number` AS certificate_number, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection">
+ <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection" db-types="MySQL">
<input sql="SELECT a.*, account_id, 1+1 FROM t_account a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_certificate_number` AS certificate_number, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_join">
+ <rewrite-assertion id="select_with_join" db-types="MySQL">
<input sql="SELECT t_account.amount, t_account_bak.amount FROM t_account LEFT JOIN t_account_bak ON t_account.id = t_account_bak.id WHERE t_account.amount = ? OR t_account_bak.amount = ?" parameters="1, 2" />
<output sql="SELECT t_account.cipher_amount AS amount, t_account_bak.cipher_amount AS amount FROM t_account LEFT JOIN t_account_bak ON t_account.id = t_account_bak.id WHERE t_account.cipher_amount = ? OR t_account_bak.cipher_amount = ?" parameters="encrypt_1, encrypt_2" />
</rewrite-assertion>
- <rewrite-assertion id="select_where_with_predicate_with_in_expr_for_literals" db-type="PostgreSQL">
+ <rewrite-assertion id="select_where_with_predicate_with_in_expr_for_literals" db-types="PostgreSQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.amount in ('1000', '2000')" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.cipher_amount in ('encrypt_1000', 'encrypt_2000')" />
</rewrite-assertion>
- <rewrite-assertion id="select_where_with_predicate_with_in_expr_for_parameters" db-type="PostgreSQL">
+ <rewrite-assertion id="select_where_with_predicate_with_in_expr_for_parameters" db-types="PostgreSQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.amount in (?, ?)" parameters="1000, 2000" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.cipher_amount in (?, ?)" parameters="encrypt_1000, encrypt_2000" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_plain.xml
index 385b3e3..3ae8c0e 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/select_for_query_with_plain.xml
@@ -17,37 +17,37 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml">
- <rewrite-assertion id="select_plain_for_parameters">
+ <rewrite-assertion id="select_plain_for_parameters" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.password = ? AND a.amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT a.account_id, a.plain_password AS password, a.plain_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.plain_password = ? AND a.plain_amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_literals">
+ <rewrite-assertion id="select_plain_for_literals" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.password = 'aaa' AND a.amount = 1000 AND a.status = 'OK'" />
<output sql="SELECT a.account_id, a.plain_password AS password, a.plain_amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.plain_password = 'aaa' AND a.plain_amount = 1000 AND a.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_unqualified_shorthand">
+ <rewrite-assertion id="select_with_unqualified_shorthand" db-types="MySQL">
<input sql="SELECT * FROM t_account_bak" />
<output sql="SELECT `t_account_bak`.`account_id`, `t_account_bak`.`cipher_certificate_number` AS certificate_number, `t_account_bak`.`plain_password` AS password, `t_account_bak`.`plain_amount` AS amount, `t_account_bak`.`status` FROM t_account_bak" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_qualified_shorthand">
+ <rewrite-assertion id="select_with_qualified_shorthand" db-types="MySQL">
<input sql="SELECT a.* FROM t_account_bak a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_certificate_number` AS certificate_number, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status` FROM t_account_bak a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection">
+ <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection" db-types="MySQL">
<input sql="SELECT a.*, account_id, 1+1 FROM t_account_bak a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_certificate_number` AS certificate_number, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account_bak a" />
</rewrite-assertion>
- <rewrite-assertion id="select_join_with_alias">
+ <rewrite-assertion id="select_join_with_alias" db-types="MySQL">
<input sql="SELECT a.password from t_account a, t_account_bak b where a.account_id = b.account_id"/>
<output sql="SELECT a.cipher_password AS password from t_account a, t_account_bak b where a.account_id = b.account_id"/>
</rewrite-assertion>
- <rewrite-assertion id="select_join_with_table_name">
+ <rewrite-assertion id="select_join_with_table_name" db-types="MySQL">
<input sql="SELECT t_account.password from t_account, t_account_bak where t_account.account_id = t_account_bak.account_id"/>
<output sql="SELECT t_account.cipher_password AS password from t_account, t_account_bak where t_account.account_id = t_account_bak.account_id"/>
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_cipher.xml
index 30d2906..c90b2fe 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_cipher.xml
@@ -17,22 +17,22 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-cipher.yaml">
- <rewrite-assertion id="update_for_parameters">
+ <rewrite-assertion id="update_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account SET account_id = ?, certificate_number = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND certificate_number = ? AND password = ? AND amount = ? AND status = ?" parameters="1, 111X, aaa, 1000, OK, 1, 111X, aaa, 1000, OK" />
<output sql="UPDATE t_account SET account_id = ?, cipher_certificate_number = ?, assisted_query_certificate_number = ?, cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ? WHERE account_id = ? AND assisted_query_certificate_number = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, encrypt_111X, assisted_query_111X, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 1, assisted_query_111X, assisted_query_aaa, encryp [...]
</rewrite-assertion>
- <rewrite-assertion id="update_for_literals">
+ <rewrite-assertion id="update_for_literals" db-types="MySQL">
<input sql="UPDATE t_account SET account_id = 1, certificate_number = '111X', password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND certificate_number = '111X' AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account SET account_id = 1, cipher_certificate_number = 'encrypt_111X', assisted_query_certificate_number = 'assisted_query_111X', cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK' WHERE account_id = 1 AND assisted_query_certificate_number = 'assisted_query_111X' AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_parameters">
+ <rewrite-assertion id="update_plain_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = ?, certificate_number = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND certificate_number = ? AND password = ? AND amount = ? AND status = ?" parameters="1, 111X, aaa, 1000, OK, 1, 111X, aaa, 1000, OK" />
<output sql="UPDATE t_account_bak SET account_id = ?, cipher_certificate_number = ?, assisted_query_certificate_number = ?, plain_certificate_number = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ? WHERE account_id = ? AND assisted_query_certificate_number = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, encrypt_111X, assisted_query_111X, 111X, encrypt_aaa, assisted_q [...]
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_literals">
+ <rewrite-assertion id="update_plain_for_literals" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = 1, certificate_number = '111X', password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND certificate_number = '111X' AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account_bak SET account_id = 1, cipher_certificate_number = 'encrypt_111X', assisted_query_certificate_number = 'assisted_query_111X', plain_certificate_number = '111X', cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK' WHERE account_id = 1 AND assisted_query_certificate_number = 'assisted_query_111X' AND assisted_query_password = 'assist [...]
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_plain.xml
index d38715d..0453db3 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/encrypt/case/update_for_query_with_plain.xml
@@ -17,12 +17,12 @@
-->
<rewrite-assertions yaml-rule="scenario/encrypt/config/query-with-plain.yaml">
- <rewrite-assertion id="update_plain_for_parameters">
+ <rewrite-assertion id="update_plain_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK, 1, aaa, 1000, OK" />
<output sql="UPDATE t_account_bak SET account_id = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ? WHERE account_id = ? AND plain_password = ? AND plain_amount = ? AND status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_literals">
+ <rewrite-assertion id="update_plain_for_literals" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account_bak SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK' WHERE account_id = 1 AND plain_password = 'aaa' AND plain_amount = 1000 AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/create.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/create.xml
index 37eb1bf..15e335f 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/create.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/create.xml
@@ -17,22 +17,22 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-cipher.yaml">
- <rewrite-assertion id="create_table_with_single_cipher_column">
+ <rewrite-assertion id="create_table_with_single_cipher_column" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(account_id INT, password VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_0(account_id INT, cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_1(account_id INT, cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100));" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_cipher_column">
+ <rewrite-assertion id="create_table_with_multi_cipher_column" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(account_id INT, password VARCHAR(100), amount VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_0(account_id INT, cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100), cipher_amount VARCHAR(100), plain_amount VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_1(account_id INT, cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100), cipher_amount VARCHAR(100), plain_amount VARCHAR(100));" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_all_cipher_column">
+ <rewrite-assertion id="create_table_with_all_cipher_column" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(password VARCHAR(100), amount VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_0(cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100), cipher_amount VARCHAR(100), plain_amount VARCHAR(100));" />
<output sql="CREATE TABLE t_account_detail_1(cipher_password VARCHAR(100), assisted_query_password VARCHAR(100), plain_password VARCHAR(100), cipher_amount VARCHAR(100), plain_amount VARCHAR(100));" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_random_blank_cipher_column">
+ <rewrite-assertion id="create_table_with_random_blank_cipher_column" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail( account_id INT , password VARCHAR(100) , amount VARCHAR(100)); " />
<output sql="CREATE TABLE t_account_detail_0( account_id INT , cipher_password VARCHAR(100) , assisted_query_password VARCHAR(100) , plain_password VARCHAR(100) , cipher_amount VARCHAR(100), plain_amount VARCHAR(100)); " />
<output sql="CREATE TABLE t_account_detail_1( account_id INT , cipher_password VARCHAR(100) , assisted_query_password VARCHAR(100) , plain_password VARCHAR(100) , cipher_amount VARCHAR(100), plain_amount VARCHAR(100)); " />
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_cipher.xml
index c676154..e2ae987 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_cipher.xml
@@ -17,22 +17,22 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-cipher.yaml">
- <rewrite-assertion id="delete_for_parameters">
+ <rewrite-assertion id="delete_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account_1 WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account_1 WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="delete_plain_for_parameters">
+ <rewrite-assertion id="delete_plain_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account_bak_1 WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account_bak_1 WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_plain.xml
index bcec677..029bba9 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/delete_for_query_with_plain.xml
@@ -17,12 +17,12 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-plain.yaml">
- <rewrite-assertion id="delete_plain_for_parameters">
+ <rewrite-assertion id="delete_plain_for_parameters" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="DELETE FROM t_account_bak_1 WHERE account_id = ? AND plain_password = ? AND plain_amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_for_literals">
+ <rewrite-assertion id="delete_for_literals" db-types="MySQL">
<input sql="DELETE FROM t_account_bak WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="DELETE FROM t_account_bak_1 WHERE account_id = 1 AND plain_password = 'aaa' AND plain_amount = 1000 AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/insert.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/insert.xml
index 3c476b6..b2045bf 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/insert.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/insert.xml
@@ -17,135 +17,135 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-cipher.yaml">
- <rewrite-assertion id="insert_values_with_columns_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, password, amount, status) VALUES (?, ?, ?, ?), (2, 'bbb', 2000, 'OK'), (?, ?, ?, ?), (4, 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_1(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?)" parameters="1, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 3, encrypt_ccc, assisted_query_ccc, encrypt_3000, OK" />
<output sql="INSERT INTO t_account_0(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_id_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, password, amount, status) VALUES (1, 'aaa', 1000, 'OK'), (2, 'bbb', 2000, 'OK'), (3, 'ccc', 3000, 'OK'), (4, 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_1(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, 'encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK'), (3, 'encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', 'OK')" />
<output sql="INSERT INTO t_account_0(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(password, amount, status) VALUES (?, ?, ?), ('bbb', 2000, 'OK'), (?, ?, ?), ('ddd', 4000, 'OK')" parameters="aaa, 1000, OK, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_1(cipher_password, assisted_query_password, cipher_amount, status, account_id) VALUES (?, ?, ?, ?, ?), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK', 1), (?, ?, ?, ?, ?), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK', 1)" parameters="encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 1, encrypt_ccc, assisted_query_ccc, encrypt_3000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_without_id_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account(password, amount, status) VALUES ('aaa', 1000, 'OK'), ('bbb', 2000, 'OK'), ('ccc', 3000, 'OK'), ('ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_1(cipher_password, assisted_query_password, cipher_amount, status, account_id) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK', 1), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK', 1), ('encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', 'OK', 1), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, password, amount, status) VALUES (?, ?, ?, ?), (2, 'bbb', 2000, 'OK'), (?, ?, ?, ?), (4, 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak_1(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?)" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 3, encrypt_ccc, assisted_query_ccc, ccc, encrypt_3000, 3000, OK" />
<output sql="INSERT INTO t_account_bak_0(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_with_id_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(account_id, password, amount, status) VALUES (1, 'aaa', 1000, 'OK'), (2, 'bbb', 2000, 'OK'), (3, 'ccc', 3000, 'OK'), (4, 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak_1(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (3, 'encrypt_ccc', 'assisted_query_ccc', 'ccc', 'encrypt_3000', 3000, 'OK')" />
<output sql="INSERT INTO t_account_bak_0(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(password, amount, status) VALUES (?, ?, ?), ('bbb', 2000, 'OK'), (?, ?, ?), ('ddd', 4000, 'OK')" parameters="aaa, 1000, OK, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak_1(cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status, account_id) VALUES (?, ?, ?, ?, ?, ?, ?), ('encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK', 1), (?, ?, ?, ?, ?, ?, ?), ('encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK', 1)" parameters="encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1, encrypt_ccc, assisted_query_ccc, ccc, encrypt_3000, [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_literals">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(password, amount, status) VALUES ('aaa', 1000, 'OK'), ('bbb', 2000, 'OK'), ('ccc', 3000, 'OK'), ('ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak_1(cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status, account_id) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK', 1), ('encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK', 1), ('encrypt_ccc', 'assisted_query_ccc', 'ccc', 'encrypt_3000', 3000, 'OK', 1), ('encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_emojis">
+ <rewrite-assertion id="insert_values_with_columns_with_plain_without_id_for_emojis" db-types="MySQL">
<input sql="INSERT INTO t_account_bak(password, amount, status) VALUES ('aaa', 1000, 'test🍎😀'), ('bbb', 2000, 'test🍎😀'), ('ccc', 3000, 'test🍎😀'), ('ddd', 4000, 'test🍎😀')" />
<output sql="INSERT INTO t_account_bak_1(cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status, account_id) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'test🍎😀', 1), ('encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'test🍎😀', 1), ('encrypt_ccc', 'assisted_query_ccc', 'ccc', 'encrypt_3000', 3000, 'test🍎😀', 1), ('encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'test🍎😀', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account(account_id, password, amount, status) VALUES (?, ?, ?, ?), (2, 'bbb', 2000, 'OK'), (?, ?, ?, ?), (4, 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_1(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?)" parameters="1, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 3, encrypt_ccc, assisted_query_ccc, encrypt_3000, OK" />
<output sql="INSERT INTO t_account_0(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_id_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1, 'aaa', 1000, 'OK'), (2, 'bbb', 2000, 'OK'), (3, 'ccc', 3000, 'OK'), (4, 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_1(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (1, 'encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK'), (3, 'encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', 'OK')" />
<output sql="INSERT INTO t_account_0(account_id, cipher_password, assisted_query_password, cipher_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_without_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (?, ?, ?), ('bbb', 2000, 'OK'), (?, ?, ?), ('ddd', 4000, 'OK')" parameters="aaa, 1000, OK, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_1(cipher_password, assisted_query_password, cipher_amount, status, account_id) VALUES (?, ?, ?, ?, ?), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK', 1), (?, ?, ?, ?, ?), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK', 1)" parameters="encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 1, encrypt_ccc, assisted_query_ccc, encrypt_3000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_without_id_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES ('aaa', 1000, 'OK'), ('bbb', 2000, 'OK'), ('ccc', 3000, 'OK'), ('ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_1(cipher_password, assisted_query_password, cipher_amount, status, account_id) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'encrypt_1000', 'OK', 1), ('encrypt_bbb', 'assisted_query_bbb', 'encrypt_2000', 'OK', 1), ('encrypt_ccc', 'assisted_query_ccc', 'encrypt_3000', 'OK', 1), ('encrypt_ddd', 'assisted_query_ddd', 'encrypt_4000', 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (?, ?, ?, ?), (2, 'bbb', 2000, 'OK'), (?, ?, ?, ?), (4, 'ddd', 4000, 'OK')" parameters="1, aaa, 1000, OK, 3, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak_1(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?)" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 3, encrypt_ccc, assisted_query_ccc, ccc, encrypt_3000, 3000, OK" />
<output sql="INSERT INTO t_account_bak_0(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_with_id_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (1, 'aaa', 1000, 'OK'), (2, 'bbb', 2000, 'OK'), (3, 'ccc', 3000, 'OK'), (4, 'ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak_1(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (1, 'encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK'), (3, 'encrypt_ccc', 'assisted_query_ccc', 'ccc', 'encrypt_3000', 3000, 'OK')" />
<output sql="INSERT INTO t_account_bak_0(account_id, cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status) VALUES (2, 'encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK'), (4, 'encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_without_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES (?, ?, ?), ('bbb', 2000, 'OK'), (?, ?, ?), ('ddd', 4000, 'OK')" parameters="aaa, 1000, OK, ccc, 3000, OK" />
<output sql="INSERT INTO t_account_bak_1(cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status, account_id) VALUES (?, ?, ?, ?, ?, ?, ?), ('encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK', 1), (?, ?, ?, ?, ?, ?, ?), ('encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK', 1)" parameters="encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1, encrypt_ccc, assisted_query_ccc, ccc, encrypt_3000, [...]
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_plain_without_id_for_literals">
+ <rewrite-assertion id="insert_values_without_columns_with_plain_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak VALUES ('aaa', 1000, 'OK'), ('bbb', 2000, 'OK'), ('ccc', 3000, 'OK'), ('ddd', 4000, 'OK')" />
<output sql="INSERT INTO t_account_bak_1(cipher_password, assisted_query_password, plain_password, cipher_amount, plain_amount, status, account_id) VALUES ('encrypt_aaa', 'assisted_query_aaa', 'aaa', 'encrypt_1000', 1000, 'OK', 1), ('encrypt_bbb', 'assisted_query_bbb', 'bbb', 'encrypt_2000', 2000, 'OK', 1), ('encrypt_ccc', 'assisted_query_ccc', 'ccc', 'encrypt_3000', 3000, 'OK', 1), ('encrypt_ddd', 'assisted_query_ddd', 'ddd', 'encrypt_4000', 4000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = ?, password = ?, amount = ?, status = ?" parameters="1, aaa, 1000, OK" />
<output sql="INSERT INTO t_account_1 SET account_id = ?, cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_1 SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET password = ?, amount = ?, status = ?" parameters="aaa, 1000, OK" />
<output sql="INSERT INTO t_account_1 SET cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ?, account_id = ?" parameters="encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_1 SET cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK', account_id = 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_plain_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_plain_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = ?, password = ?, amount = ?, status = ?" parameters="1, aaa, 1000, OK" />
<output sql="INSERT INTO t_account_bak_1 SET account_id = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_without_plain_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_without_plain_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET password = ?, amount = ?, status = ?" parameters="aaa, 1000, OK" />
<output sql="INSERT INTO t_account_bak_1 SET cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ?, account_id = ?" parameters="encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_plain_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_plain_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_bak_1 SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_plain_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_plain_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account_bak SET password = 'aaa', amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_bak_1 SET cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK', account_id = 1" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_cipher.xml
index 220f171..628359d 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_cipher.xml
@@ -17,56 +17,56 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-cipher.yaml">
- <rewrite-assertion id="select_for_parameters">
+ <rewrite-assertion id="select_for_parameters" db-types="MySQL">
<input sql="SELECT account_id, password, amount AS a, status AS s FROM t_account WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT account_id, cipher_password AS password, cipher_amount AS a, status AS s FROM t_account_1 WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_for_literals">
+ <rewrite-assertion id="select_for_literals" db-types="MySQL">
<input sql="SELECT account_id, password, amount AS a, status AS s FROM t_account WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="SELECT account_id, cipher_password AS password, cipher_amount AS a, status AS s FROM t_account_1 WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_parameters">
+ <rewrite-assertion id="select_plain_for_parameters" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.password = ? AND a.amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak_1 AS a WHERE a.account_id = ? AND a.assisted_query_password = ? AND a.cipher_amount = ? AND a.status = ?" parameters="1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_literals">
+ <rewrite-assertion id="select_plain_for_literals" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.password = 'aaa' AND a.amount = 1000 AND a.status = 'OK'" />
<output sql="SELECT a.account_id, a.cipher_password AS password, a.cipher_amount AS a, a.status AS s FROM t_account_bak_1 AS a WHERE a.account_id = 1 AND a.assisted_query_password = 'assisted_query_aaa' AND a.cipher_amount = 'encrypt_1000' AND a.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_table_as_qualified_name">
+ <rewrite-assertion id="select_with_table_as_qualified_name" db-types="MySQL">
<input sql="SELECT t_account.account_id, t_account.password, t_account.amount AS a, status AS s FROM t_account WHERE t_account.account_id = 1 AND t_account.password = 'aaa' AND t_account.amount = 1000 AND t_account.status = 'OK'" />
<output sql="SELECT t_account_1.account_id, t_account_1.cipher_password AS password, t_account_1.cipher_amount AS a, status AS s FROM t_account_1 WHERE t_account_1.account_id = 1 AND t_account_1.assisted_query_password = 'assisted_query_aaa' AND t_account_1.cipher_amount = 'encrypt_1000' AND t_account_1.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_unqualified_shorthand">
+ <rewrite-assertion id="select_with_unqualified_shorthand" db-types="MySQL">
<input sql="SELECT * FROM t_account" />
<output sql="SELECT `t_account_0`.`account_id`, `t_account_0`.`cipher_password` AS password, `t_account_0`.`cipher_amount` AS amount, `t_account_0`.`status` FROM t_account_0" />
<output sql="SELECT `t_account_1`.`account_id`, `t_account_1`.`cipher_password` AS password, `t_account_1`.`cipher_amount` AS amount, `t_account_1`.`status` FROM t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_qualified_shorthand">
+ <rewrite-assertion id="select_with_qualified_shorthand" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_1 a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_sharding_qualified_shorthand_join_table">
+ <rewrite-assertion id="select_with_sharding_qualified_shorthand_join_table" db-types="MySQL">
<input sql="SELECT b.* FROM t_account a, t_account_detail b where a.password = b.password" />
<output sql="SELECT b.* FROM t_account_0 a, t_account_detail_0 b where a.assisted_query_password = b.assisted_query_password" />
<output sql="SELECT b.* FROM t_account_1 a, t_account_detail_1 b where a.assisted_query_password = b.assisted_query_password" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_encrypt_qualified_shorthand_join_table">
+ <rewrite-assertion id="select_with_encrypt_qualified_shorthand_join_table" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a, t_account_detail b where a.password = b.password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a, t_account_detail_0 b where a.assisted_query_password = b.assisted_query_password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_1 a, t_account_detail_1 b where a.assisted_query_password = b.assisted_query_password" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_encrypt_left_join_table">
+ <rewrite-assertion id="select_with_encrypt_left_join_table" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a left join t_account_bak b on a.password = b.account_id left join t_account_detail c on a.password = c.password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a left join t_account_bak_0 b on a.assisted_query_password = b.account_id left join t_account_detail_0 c on a.assisted_query_password = c.assisted_query_password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a left join t_account_bak_1 b on a.assisted_query_password = b.account_id left join t_account_detail_0 c on a.assisted_query_password = c.assisted_query_password" />
@@ -74,25 +74,25 @@
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_1 a left join t_account_bak_1 b on a.assisted_query_password = b.account_id left join t_account_detail_1 c on a.assisted_query_password = c.assisted_query_password" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_encrypt_right_join_table">
+ <rewrite-assertion id="select_with_encrypt_right_join_table" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a right join t_account_detail b on a.password = b.password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a right join t_account_detail_0 b on a.assisted_query_password = b.assisted_query_password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_1 a right join t_account_detail_1 b on a.assisted_query_password = b.assisted_query_password" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_encrypt_join_table">
+ <rewrite-assertion id="select_with_encrypt_join_table" db-types="MySQL">
<input sql="SELECT a.* FROM t_account a join t_account_detail b on a.password = b.password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_0 a join t_account_detail_0 b on a.assisted_query_password = b.assisted_query_password" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status` FROM t_account_1 a join t_account_detail_1 b on a.assisted_query_password = b.assisted_query_password" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection">
+ <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection" db-types="MySQL">
<input sql="SELECT a.*, account_id, 1+1 FROM t_account a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account_0 a" />
<output sql="SELECT `a`.`account_id`, `a`.`cipher_password` AS password, `a`.`cipher_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account_1 a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_table_qualified_shorthand">
+ <rewrite-assertion id="select_with_table_qualified_shorthand" db-types="MySQL">
<input sql="SELECT t_account.* FROM t_account" />
<output sql="SELECT `t_account_0`.`account_id`, `t_account_0`.`cipher_password` AS password, `t_account_0`.`cipher_amount` AS amount, `t_account_0`.`status` FROM t_account_0" />
<output sql="SELECT `t_account_1`.`account_id`, `t_account_1`.`cipher_password` AS password, `t_account_1`.`cipher_amount` AS amount, `t_account_1`.`status` FROM t_account_1" />
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_plain.xml
index 0b42c18..304c0c0 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/select_for_query_with_plain.xml
@@ -17,35 +17,35 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-plain.yaml">
- <rewrite-assertion id="select_plain_for_parameters">
+ <rewrite-assertion id="select_plain_for_parameters" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = ? AND a.password = ? AND a.amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
<output sql="SELECT a.account_id, a.plain_password AS password, a.plain_amount AS a, a.status AS s FROM t_account_bak_1 AS a WHERE a.account_id = ? AND a.plain_password = ? AND a.plain_amount = ? AND a.status = ?" parameters="1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="select_plain_for_literals">
+ <rewrite-assertion id="select_plain_for_literals" db-types="MySQL">
<input sql="SELECT a.account_id, a.password, a.amount AS a, a.status AS s FROM t_account_bak AS a WHERE a.account_id = 1 AND a.password = 'aaa' AND a.amount = 1000 AND a.status = 'OK'" />
<output sql="SELECT a.account_id, a.plain_password AS password, a.plain_amount AS a, a.status AS s FROM t_account_bak_1 AS a WHERE a.account_id = 1 AND a.plain_password = 'aaa' AND a.plain_amount = 1000 AND a.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_unqualified_shorthand">
+ <rewrite-assertion id="select_with_unqualified_shorthand" db-types="MySQL">
<input sql="SELECT * FROM t_account_bak" />
<output sql="SELECT `t_account_bak_0`.`account_id`, `t_account_bak_0`.`plain_password` AS password, `t_account_bak_0`.`plain_amount` AS amount, `t_account_bak_0`.`status` FROM t_account_bak_0" />
<output sql="SELECT `t_account_bak_1`.`account_id`, `t_account_bak_1`.`plain_password` AS password, `t_account_bak_1`.`plain_amount` AS amount, `t_account_bak_1`.`status` FROM t_account_bak_1" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_qualified_shorthand">
+ <rewrite-assertion id="select_with_qualified_shorthand" db-types="MySQL">
<input sql="SELECT a.* FROM t_account_bak a" />
<output sql="SELECT `a`.`account_id`, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status` FROM t_account_bak_0 a" />
<output sql="SELECT `a`.`account_id`, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status` FROM t_account_bak_1 a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection">
+ <rewrite-assertion id="select_with_mix_qualified_shorthand_and_other_projection" db-types="MySQL">
<input sql="SELECT a.*, account_id, 1+1 FROM t_account_bak a" />
<output sql="SELECT `a`.`account_id`, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account_bak_0 a" />
<output sql="SELECT `a`.`account_id`, `a`.`plain_password` AS password, `a`.`plain_amount` AS amount, `a`.`status`, account_id, 1+1 FROM t_account_bak_1 a" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_table_qualified_shorthand">
+ <rewrite-assertion id="select_with_table_qualified_shorthand" db-types="MySQL">
<input sql="SELECT t_account_bak.* FROM t_account_bak" />
<output sql="SELECT `t_account_bak_0`.`account_id`, `t_account_bak_0`.`plain_password` AS password, `t_account_bak_0`.`plain_amount` AS amount, `t_account_bak_0`.`status` FROM t_account_bak_0" />
<output sql="SELECT `t_account_bak_1`.`account_id`, `t_account_bak_1`.`plain_password` AS password, `t_account_bak_1`.`plain_amount` AS amount, `t_account_bak_1`.`status` FROM t_account_bak_1" />
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_cipher.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_cipher.xml
index 6f0a3e0..20a1d6f 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_cipher.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_cipher.xml
@@ -17,22 +17,22 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-cipher.yaml">
- <rewrite-assertion id="update_for_parameters">
+ <rewrite-assertion id="update_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account SET account_id = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK, 1, aaa, 1000, OK" />
<output sql="UPDATE t_account_1 SET account_id = ?, cipher_password = ?, assisted_query_password = ?, cipher_amount = ?, status = ? WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, encrypt_1000, OK, 1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="update_for_literals">
+ <rewrite-assertion id="update_for_literals" db-types="MySQL">
<input sql="UPDATE t_account SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account_1 SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', cipher_amount = 'encrypt_1000', status = 'OK' WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_parameters">
+ <rewrite-assertion id="update_plain_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK, 1, aaa, 1000, OK" />
<output sql="UPDATE t_account_bak_1 SET account_id = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ? WHERE account_id = ? AND assisted_query_password = ? AND cipher_amount = ? AND status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1, assisted_query_aaa, encrypt_1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_literals">
+ <rewrite-assertion id="update_plain_for_literals" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account_bak_1 SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK' WHERE account_id = 1 AND assisted_query_password = 'assisted_query_aaa' AND cipher_amount = 'encrypt_1000' AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_plain.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_plain.xml
index ef6ce12..1a188c0 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_plain.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/mix/case/update_for_query_with_plain.xml
@@ -17,12 +17,12 @@
-->
<rewrite-assertions yaml-rule="scenario/mix/config/query-with-plain.yaml">
- <rewrite-assertion id="update_plain_for_parameters">
+ <rewrite-assertion id="update_plain_for_parameters" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = ?, password = ?, amount = ?, status = ? WHERE account_id = ? AND password = ? AND amount = ? AND status = ?" parameters="1, aaa, 1000, OK, 1, aaa, 1000, OK" />
<output sql="UPDATE t_account_bak_1 SET account_id = ?, cipher_password = ?, assisted_query_password = ?, plain_password = ?, cipher_amount = ?, plain_amount = ?, status = ? WHERE account_id = ? AND plain_password = ? AND plain_amount = ? AND status = ?" parameters="1, encrypt_aaa, assisted_query_aaa, aaa, encrypt_1000, 1000, OK, 1, aaa, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="update_plain_for_literals">
+ <rewrite-assertion id="update_plain_for_literals" db-types="MySQL">
<input sql="UPDATE t_account_bak SET account_id = 1, password = 'aaa', amount = 1000, status = 'OK' WHERE account_id = 1 AND password = 'aaa' AND amount = 1000 AND status = 'OK'" />
<output sql="UPDATE t_account_bak_1 SET account_id = 1, cipher_password = 'encrypt_aaa', assisted_query_password = 'assisted_query_aaa', plain_password = 'aaa', cipher_amount = 'encrypt_1000', plain_amount = 1000, status = 'OK' WHERE account_id = 1 AND plain_password = 'aaa' AND plain_amount = 1000 AND status = 'OK'" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/alter.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/alter.xml
index 22eaa47..3ddbe2b 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/alter.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/alter.xml
@@ -17,131 +17,131 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="alter_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_order_item_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_order_extend_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_account_detail_0 (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_account_detail_1 (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_order_type (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_table_with_rename_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="alter_table_with_single_table_with_rename_table_for_postgresql" db-types="PostgreSQL">
<input sql="ALTER TABLE t_single RENAME TO t_single_extend" />
<output sql="ALTER TABLE t_single RENAME TO t_single_extend" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_order_item_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_order_extend_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_account_detail_0 (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_account_detail_1 (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_config (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_order ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
<output sql="ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk_t_order_0 FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_account ADD CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
<output sql="ALTER TABLE t_account_0 ADD CONSTRAINT t_account_fk_t_account_0 FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
<output sql="ALTER TABLE t_account_1 ADD CONSTRAINT t_account_fk_t_account_1 FOREIGN KEY (account_id) REFERENCES t_single (account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_order_type (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
<output sql="ALTER TABLE t_config ADD CONSTRAINT t_config_fk_t_config FOREIGN KEY (order_id) REFERENCES t_single (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_config (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id)" />
<output sql="ALTER TABLE t_single ADD CONSTRAINT t_single_fk_t_single FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id)" />
</rewrite-assertion>
- <rewrite-assertion id="alter_table_with_single_table_with_rename_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="alter_table_with_single_table_with_rename_table_for_mysql" db-types="MySQL">
<input sql="ALTER TABLE t_single RENAME TO t_single_extend" />
<output sql="ALTER TABLE t_single RENAME TO t_single_extend" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/analyze.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/analyze.xml
index 73dc387..e174df1 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/analyze.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/analyze.xml
@@ -17,161 +17,161 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="analyze_current_database_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_current_database_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE" />
<output sql="ANALYZE" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_sharding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_data_node_sharding_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_order" />
<output sql="ANALYZE t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_sharding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_multi_data_node_sharding_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_account" />
<output sql="ANALYZE t_account_0" />
<output sql="ANALYZE t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_config" />
<output sql="ANALYZE t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_single" />
<output sql="ANALYZE t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_binding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_data_node_binding_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_order, t_order_item" />
<output sql="ANALYZE t_order_0, t_order_item_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_unbinding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_data_node_unbinding_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_order, t_order_extend" />
<output sql="ANALYZE t_order_0, t_order_extend_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_single_data_node_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_single_data_node_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_account, t_order" />
<output sql="ANALYZE t_account_0, t_order_0" />
<output sql="ANALYZE t_account_1, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_binding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_multi_data_node_binding_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_account, t_account_detail" />
<output sql="ANALYZE t_account_0, t_account_detail_0" />
<output sql="ANALYZE t_account_1, t_account_detail_1" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_and_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_data_node_and_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_order, t_config" />
<output sql="ANALYZE t_order_0, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_account, t_config" />
<output sql="ANALYZE t_account_0, t_config" />
<output sql="ANALYZE t_account_1, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_and_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_data_node_and_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_order, t_single" />
<output sql="ANALYZE t_order_0, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_account, t_single" />
<output sql="ANALYZE t_account_0, t_single" />
<output sql="ANALYZE t_account_1, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_and_single_data_node_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_broadcast_and_single_data_node_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_config, t_order" />
<output sql="ANALYZE t_config, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_config, t_order_type" />
<output sql="ANALYZE t_config, t_order_type" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_and_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_broadcast_and_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_config, t_single" />
<output sql="ANALYZE t_config, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_and_single_data_node_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_and_single_data_node_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_single, t_order" />
<output sql="ANALYZE t_single, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_and_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_and_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_single, t_config" />
<output sql="ANALYZE t_single, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="analyze_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="ANALYZE t_single, t_single_extend" />
<output sql="ANALYZE t_single, t_single_extend" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_sharding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_data_node_sharding_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_order" />
<output sql="ANALYZE TABLE t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_sharding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_multi_data_node_sharding_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_account" />
<output sql="ANALYZE TABLE t_account_0" />
<output sql="ANALYZE TABLE t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_broadcast_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_config" />
<output sql="ANALYZE TABLE t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_single" />
<output sql="ANALYZE TABLE t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_binding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_data_node_binding_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_order, t_order_item" />
<output sql="ANALYZE TABLE t_order_0, t_order_item_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_unbinding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_data_node_unbinding_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_order, t_order_extend" />
<output sql="ANALYZE TABLE t_order_0, t_order_extend_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_single_data_node_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_single_data_node_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_account, t_order" />
<output sql="ANALYZE TABLE t_account_0, t_order_0" />
<output sql="ANALYZE TABLE t_account_1, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_binding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_multi_data_node_binding_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_account, t_account_detail" />
<output sql="ANALYZE TABLE t_account_0, t_account_detail_0" />
<output sql="ANALYZE TABLE t_account_1, t_account_detail_1" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_and_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_data_node_and_broadcast_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_order, t_config" />
<output sql="ANALYZE TABLE t_order_0, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_broadcast_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_account, t_config" />
<output sql="ANALYZE TABLE t_account_0, t_config" />
<output sql="ANALYZE TABLE t_account_1, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_data_node_and_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_data_node_and_single_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_order, t_single" />
<output sql="ANALYZE TABLE t_order_0, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_multi_data_node_and_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_multi_data_node_and_single_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_account, t_single" />
<output sql="ANALYZE TABLE t_account_0, t_single" />
<output sql="ANALYZE TABLE t_account_1, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_and_single_data_node_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_broadcast_and_single_data_node_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_config, t_order" />
<output sql="ANALYZE TABLE t_config, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_broadcast_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_config, t_order_type" />
<output sql="ANALYZE TABLE t_config, t_order_type" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_broadcast_and_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_broadcast_and_single_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_config, t_single" />
<output sql="ANALYZE TABLE t_config, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_and_single_data_node_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_and_single_data_node_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_single, t_order" />
<output sql="ANALYZE TABLE t_single, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_and_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_and_broadcast_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_single, t_config" />
<output sql="ANALYZE TABLE t_single, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="analyze_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="analyze_single_table_for_mysql" db-types="MySQL">
<input sql="ANALYZE TABLE t_single, t_single_extend" />
<output sql="ANALYZE TABLE t_single, t_single_extend" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/create.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/create.xml
index 3fb0a80..6e3f658 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/create.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/create.xml
@@ -17,123 +17,123 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="create_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail_0 (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail_1 (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_table_with_add_foreign_constraint_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_table_with_single_table_with_add_foreign_constraint_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_data_node_unbinding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_extend_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_order_0 (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_binding_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail_0 (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_account_detail_1 (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_config (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_order(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
<output sql="CREATE TABLE t_order_0(order_id INT PRIMARY KEY, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_multi_data_node_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_account_detail(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
<output sql="CREATE TABLE t_account_detail_0(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
<output sql="CREATE TABLE t_account_detail_1(order_id INT PRIMARY KEY, CONSTRAINT t_account_fk FOREIGN KEY (account_id) REFERENCES t_single (account_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_broadcast_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_order_type (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_broadcast_and_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
<output sql="CREATE TABLE t_config(order_id INT PRIMARY KEY, CONSTRAINT t_config_fk FOREIGN KEY (order_id) REFERENCES t_single (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_and_single_data_node_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_order_0 (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_and_broadcast_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id))" />
</rewrite-assertion>
- <rewrite-assertion id="create_table_with_single_table_with_add_foreign_constraint_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_table_with_single_table_with_add_foreign_constraint_for_mysql" db-types="MySQL">
<input sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id))" />
<output sql="CREATE TABLE t_single(order_id INT PRIMARY KEY, CONSTRAINT t_single_fk FOREIGN KEY (order_id) REFERENCES t_single_extend (order_id))" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/delete.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/delete.xml
index f896cb9..aef1892 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/delete.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/delete.xml
@@ -17,44 +17,44 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="delete_with_sharding_value_for_parameters">
+ <rewrite-assertion id="delete_with_sharding_value_for_parameters" db-types="SQL92">
<input sql="DELETE FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="DELETE FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="delete_with_sharding_value_for_literals">
+ <rewrite-assertion id="delete_with_sharding_value_for_literals" db-types="SQL92">
<input sql="DELETE FROM t_account WHERE account_id = 100" />
<output sql="DELETE FROM t_account_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="delete_without_sharding_value_for_parameters">
+ <rewrite-assertion id="delete_without_sharding_value_for_parameters" db-types="SQL92">
<input sql="DELETE FROM sharding_db.t_account WHERE status = ?" parameters="OK" />
<output sql="DELETE FROM t_account_0 WHERE status = ?" parameters="OK" />
<output sql="DELETE FROM t_account_1 WHERE status = ?" parameters="OK" />
</rewrite-assertion>
- <rewrite-assertion id="delete_without_sharding_value_for_literals">
+ <rewrite-assertion id="delete_without_sharding_value_for_literals" db-types="SQL92">
<input sql="DELETE FROM sharding_db.t_account WHERE status = 'OK'" />
<output sql="DELETE FROM t_account_0 WHERE status = 'OK'" />
<output sql="DELETE FROM t_account_1 WHERE status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="delete_multiple_table_with_alias_with_sharding_value_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="delete_multiple_table_with_alias_with_sharding_value_for_parameters" db-types="MySQL">
<input sql="DELETE t FROM t_account t WHERE t.account_id = ?" parameters="100" />
<output sql="DELETE t FROM t_account_0 t WHERE t.account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="delete_multiple_table_with_alias_with_sharding_value_for_literals" db-type="MySQL">
+ <rewrite-assertion id="delete_multiple_table_with_alias_with_sharding_value_for_literals" db-types="MySQL">
<input sql="DELETE t FROM t_account t WHERE t.account_id = 100" />
<output sql="DELETE t FROM t_account_0 t WHERE t.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="delete_multiple_table_with_same_table_name_alias_with_sharding_value_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="delete_multiple_table_with_same_table_name_alias_with_sharding_value_for_parameters" db-types="MySQL">
<input sql="DELETE t_account FROM t_account t_account WHERE t_account.account_id = ?" parameters="100" />
<output sql="DELETE t_account FROM t_account_0 t_account WHERE t_account.account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="delete_multiple_table_with_same_table_name_alias_with_sharding_value_for_literals" db-type="MySQL">
+ <rewrite-assertion id="delete_multiple_table_with_same_table_name_alias_with_sharding_value_for_literals" db-types="MySQL">
<input sql="DELETE t_account FROM t_account t_account WHERE t_account.account_id = 100" />
<output sql="DELETE t_account FROM t_account_0 t_account WHERE t_account.account_id = 100" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/drop.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/drop.xml
index abb7e9b..216bd8a 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/drop.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/drop.xml
@@ -17,93 +17,93 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="drop_table_with_single_data_node_binding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_binding_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_order, t_order_item" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_order_item_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_unbinding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_unbinding_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_order, t_order_extend" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_order_extend_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_multi_data_node_binding_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_multi_data_node_binding_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_account_detail, t_account_detail" />
<output sql="DROP TABLE IF EXISTS t_account_detail_0, t_account_detail_0" />
<output sql="DROP TABLE IF EXISTS t_account_detail_1, t_account_detail_1" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_and_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_and_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_order, t_config" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_and_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_and_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_order, t_single" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_and_single_data_node_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_broadcast_and_single_data_node_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_config, t_order" />
<output sql="DROP TABLE IF EXISTS t_config, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_config, t_order_type" />
<output sql="DROP TABLE IF EXISTS t_config, t_order_type" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_and_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_broadcast_and_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_config, t_single" />
<output sql="DROP TABLE IF EXISTS t_config, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_and_single_data_node_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_and_single_data_node_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_single, t_order" />
<output sql="DROP TABLE IF EXISTS t_single, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_and_broadcast_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_and_broadcast_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_single, t_config" />
<output sql="DROP TABLE IF EXISTS t_single, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_table_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_table_with_single_table_for_postgresql" db-types="PostgreSQL">
<input sql="DROP TABLE IF EXISTS t_single, t_single_extend" />
<output sql="DROP TABLE IF EXISTS t_single, t_single_extend" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_binding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_binding_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_order, t_order_item" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_order_item_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_unbinding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_unbinding_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_order, t_order_extend" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_order_extend_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_multi_data_node_binding_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_multi_data_node_binding_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_account_detail, t_account_detail" />
<output sql="DROP TABLE IF EXISTS t_account_detail_0, t_account_detail_0" />
<output sql="DROP TABLE IF EXISTS t_account_detail_1, t_account_detail_1" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_and_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_and_broadcast_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_order, t_config" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_data_node_and_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_data_node_and_single_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_order, t_single" />
<output sql="DROP TABLE IF EXISTS t_order_0, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_and_single_data_node_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_broadcast_and_single_data_node_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_config, t_order" />
<output sql="DROP TABLE IF EXISTS t_config, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_broadcast_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_config, t_order_type" />
<output sql="DROP TABLE IF EXISTS t_config, t_order_type" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_broadcast_and_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_broadcast_and_single_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_config, t_single" />
<output sql="DROP TABLE IF EXISTS t_config, t_single" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_and_single_data_node_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_and_single_data_node_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_single, t_order" />
<output sql="DROP TABLE IF EXISTS t_single, t_order_0" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_and_broadcast_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_and_broadcast_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_single, t_config" />
<output sql="DROP TABLE IF EXISTS t_single, t_config" />
</rewrite-assertion>
- <rewrite-assertion id="drop_table_with_single_table_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_table_with_single_table_for_mysql" db-types="MySQL">
<input sql="DROP TABLE IF EXISTS t_single, t_single_extend" />
<output sql="DROP TABLE IF EXISTS t_single, t_single_extend" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/index.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/index.xml
index 571ab44..ee30e1a 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/index.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/index.xml
@@ -17,37 +17,37 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="create_index_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="create_index_for_mysql" db-types="MySQL">
<input sql="CREATE INDEX index_name_not_exist ON t_account (status)" />
<output sql="CREATE INDEX index_name_not_exist_t_account_0 ON t_account_0 (status)" />
<output sql="CREATE INDEX index_name_not_exist_t_account_1 ON t_account_1 (status)" />
</rewrite-assertion>
- <rewrite-assertion id="create_index_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_index_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE INDEX index_name_not_exist ON t_account (status)" />
<output sql="CREATE INDEX index_name_not_exist_t_account_0 ON t_account_0 (status)" />
<output sql="CREATE INDEX index_name_not_exist_t_account_1 ON t_account_1 (status)" />
</rewrite-assertion>
- <rewrite-assertion id="create_index_without_index_name_with_single_column_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_index_without_index_name_with_single_column_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE INDEX ON t_account (status)" />
<output sql="CREATE INDEX status_idx_t_account_0 ON t_account_0 (status)" />
<output sql="CREATE INDEX status_idx_t_account_1 ON t_account_1 (status)" />
</rewrite-assertion>
- <rewrite-assertion id="create_index_without_index_name_with_multi_column_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="create_index_without_index_name_with_multi_column_for_postgresql" db-types="PostgreSQL">
<input sql="CREATE INDEX ON t_account (status, account_id)" />
<output sql="CREATE INDEX status_account_id_idx_t_account_0 ON t_account_0 (status, account_id)" />
<output sql="CREATE INDEX status_account_id_idx_t_account_1 ON t_account_1 (status, account_id)" />
</rewrite-assertion>
- <rewrite-assertion id="drop_index_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="drop_index_for_mysql" db-types="MySQL">
<input sql="DROP INDEX index_name ON t_account" />
<output sql="DROP INDEX index_name_t_account_0 ON t_account_0" />
<output sql="DROP INDEX index_name_t_account_1 ON t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="drop_index_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="drop_index_for_postgresql" db-types="PostgreSQL">
<input sql="DROP INDEX index_name" />
<output sql="DROP INDEX index_name_t_account_0" />
<output sql="DROP INDEX index_name_t_account_1" />
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/insert.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/insert.xml
index 30f3f40..845ad8e 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/insert.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/insert.xml
@@ -17,544 +17,544 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="insert_values_with_columns_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_with_columns_with_id_for_parameters" db-types="SQL92">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE amount = VALUES(amount)" parameters="100, 1000, OK" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE amount = VALUES(amount)" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (100, 1000, 'OK') ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (100, 1000, 'OK') ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (amount, status) VALUES (?, ?)" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1 (amount, status, account_id) VALUES (?, ?, ?)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="insert_values_with_columns_without_id_for_parameters_for_postgresql" db-types="PostgreSQL">
<input sql="INSERT INTO t_account (amount, status) VALUES (?, ?)" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1 (amount, status, account_id) VALUES (?, ?, ?)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (amount, status) VALUES (1000, 'OK')" />
<output sql="INSERT INTO t_account_1 (amount, status, account_id) VALUES (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_with_id_for_parameters" db-types="SQL92">
<input sql="INSERT INTO t_account VALUES (?, ?, ?)" parameters="100, 1000, OK" />
<output sql="INSERT INTO t_account_0 VALUES (?, ?, ?)" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_without_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (100, 1000, 'OK')" />
<output sql="INSERT INTO t_account_0 VALUES (100, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_without_id_for_parameters">
+ <rewrite-assertion id="insert_values_without_columns_without_id_for_parameters" db-types="SQL92">
<input sql="INSERT INTO t_account VALUES (?, ?)" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1(amount, status, account_id) VALUES (?, ?, ?)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_without_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1000, 'OK')" />
<output sql="INSERT INTO t_account_1(amount, status, account_id) VALUES (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_without_columns_without_id_for_emojis" db-type="MySQL">
+ <rewrite-assertion id="insert_values_without_columns_without_id_for_emojis" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1000, 'test🍎😀')" />
<output sql="INSERT INTO t_account_1(amount, status, account_id) VALUES (1000, 'test🍎😀', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_binary_operation_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_columns_with_binary_operation_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (?, ?, ?)" parameters="100, account_id + 100, OK" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (?, ?, ?)" parameters="100, account_id + 100, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_values_with_columns_with_binary_operation_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_values_with_columns_with_binary_operation_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (100, account_id + 100, OK)" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (100, account_id + 100, OK)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_parameters">
+ <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_parameters" db-types="SQL92">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (100, 0, 'OK'), (?, ?, ?), (102, 2000, 'OK'), (?, ?, ?), (?, ?, ?), (105, 5000, 'OK')" parameters="101, 1000, OK, 103, 3000, OK, 104, 4000, OK" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (100, 0, 'OK'), (102, 2000, 'OK'), (?, ?, ?)" parameters="104, 4000, OK" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) VALUES (?, ?, ?), (?, ?, ?), (105, 5000, 'OK')" parameters="101, 1000, OK, 103, 3000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_literals">
+ <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_literals" db-types="SQL92">
<input sql="INSERT INTO t_account (account_id, amount, status) VALUES (100, 0, 'OK'), (101, 1000, 'OK'), (102, 2000, 'OK'), (103, 3000, 'OK'), (104, 4000, 'OK'), (105, 5000, 'OK')" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) VALUES (100, 0, 'OK'), (102, 2000, 'OK'), (104, 4000, 'OK')" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) VALUES (101, 1000, 'OK'), (103, 3000, 'OK'), (105, 5000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_with_columns_without_id_for_parameters">
+ <rewrite-assertion id="insert_multiple_values_with_columns_without_id_for_parameters" db-types="SQL92">
<input sql="INSERT INTO t_account (amount, status) VALUES (?, ?), (1000, 'OK')" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1 (amount, status, account_id) VALUES (?, ?, ?), (1000, 'OK', 1)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_with_columns_without_id_for_literals">
+ <rewrite-assertion id="insert_multiple_values_with_columns_without_id_for_literals" db-types="SQL92">
<input sql="INSERT INTO t_account (amount, status) VALUES (1000, 'OK'), (1000, 'OK')" />
<output sql="INSERT INTO t_account_1 (amount, status, account_id) VALUES (1000, 'OK', 1), (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_without_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_multiple_values_without_columns_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (?, ?, ?), (101, 1000, 'OK')" parameters="100, 0, OK" />
<output sql="INSERT INTO t_account_0 VALUES (?, ?, ?)" parameters="100, 0, OK" />
<output sql="INSERT INTO t_account_1 VALUES (101, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_without_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_multiple_values_without_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (100, 0, 'OK'), (101, 1000, 'OK')" />
<output sql="INSERT INTO t_account_0 VALUES (100, 0, 'OK')" />
<output sql="INSERT INTO t_account_1 VALUES (101, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_without_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_multiple_values_without_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (?, ?), (1000, 'OK')" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1(amount, status, account_id) VALUES (?, ?, ?), (1000, 'OK', 1)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_without_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_multiple_values_without_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (1000, 'OK'), (1000, 'OK')" />
<output sql="INSERT INTO t_account_1(amount, status, account_id) VALUES (1000, 'OK', 1), (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_columns_with_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = ?, amount = ?, status = ?" parameters="100, 1000, OK" />
<output sql="INSERT INTO t_account_0 SET account_id = ?, amount = ?, status = ?" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET account_id = 100, amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_0 SET account_id = 100, amount = 1000, status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET amount = ?, status = ?" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1 SET amount = ?, status = ?, account_id = ?" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_set_with_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_set_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SET amount = 1000, status = 'OK'" />
<output sql="INSERT INTO t_account_1 SET amount = 1000, status = 'OK', account_id = 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_into_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_into_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SET amount = ?, status = ?" parameters="1000, OK" />
<output sql="INSERT INTO t_account_1 SET amount = ?, status = ?, account_id = ?" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_parameters_and_on_duplicate_update" db-type="MySQL">
+ <rewrite-assertion id="insert_multiple_values_with_columns_with_id_for_parameters_and_on_duplicate_update" db-types="MySQL">
<input sql="INSERT INTO t_account VALUES (100, 1000, 'OK'), (101, 2000, 'OK'), (102, 1000, 'OK') ON DUPLICATE KEY UPDATE status = ?" parameters="OK_UPDATE" />
<output sql="INSERT INTO t_account_0 VALUES (100, 1000, 'OK'), (102, 1000, 'OK') ON DUPLICATE KEY UPDATE status = ?" parameters="OK_UPDATE" />
<output sql="INSERT INTO t_account_1 VALUES (101, 2000, 'OK') ON DUPLICATE KEY UPDATE status = ?" parameters="OK_UPDATE" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = VALUES(amount)" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="100, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = ? ON DUPLICATE KEY UPDATE amount = ?" parameters="1000, 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = 100 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_binding_table_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_binding_table_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = 1000 ON DUPLICATE KEY UPDATE amount = 20" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_subquery_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_subquery_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_subquery_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_subquery_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = 100) t WHERE t.account_id = 100" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100) t WHERE t.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_subquery_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_subquery_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
<output sql="INSERT INTO t_account_0 SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_subquery_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_subquery_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = 100) t WHERE t.account_id = 100" />
<output sql="INSERT INTO t_account_0 SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100) t WHERE t.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="insert_select_with_pagination_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="insert_select_with_pagination_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="INSERT INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = 100 LIMIT 1, 2" />
<output sql="INSERT INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_with_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_values_with_columns_with_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) VALUES (?, ?, ?)" parameters="100, 1000, OK" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) VALUES (?, ?, ?)" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_with_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_values_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) VALUES (100, 1000, 'OK')" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) VALUES (100, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_values_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (amount, status) VALUES (?, ?)" parameters="1000, OK" />
<output sql="REPLACE INTO t_account_1 (amount, status, account_id) VALUES (?, ?, ?)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_with_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_values_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (amount, status) VALUES (1000, 'OK')" />
<output sql="REPLACE INTO t_account_1 (amount, status, account_id) VALUES (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_without_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_values_without_columns_with_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (?, ?, ?)" parameters="100, 1000, OK" />
<output sql="REPLACE INTO t_account_0 VALUES (?, ?, ?)" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_without_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_values_without_columns_with_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (100, 1000, 'OK')" />
<output sql="REPLACE INTO t_account_0 VALUES (100, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_without_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_values_without_columns_without_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (?, ?)" parameters="1000, OK" />
<output sql="REPLACE INTO t_account_1(amount, status, account_id) VALUES (?, ?, ?)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_values_without_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_values_without_columns_without_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (1000, 'OK')" />
<output sql="REPLACE INTO t_account_1(amount, status, account_id) VALUES (1000, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_with_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_with_columns_with_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) VALUES (100, 0, 'OK'), (?, ?, ?), (102, 2000, 'OK'), (?, ?, ?), (?, ?, ?), (105, 5000, 'OK')" parameters="101, 1000, OK, 103, 3000, OK, 104, 4000, OK" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) VALUES (100, 0, 'OK'), (102, 2000, 'OK'), (?, ?, ?)" parameters="104, 4000, OK" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) VALUES (?, ?, ?), (?, ?, ?), (105, 5000, 'OK')" parameters="101, 1000, OK, 103, 3000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_with_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) VALUES (100, 0, 'OK'), (101, 1000, 'OK'), (102, 2000, 'OK'), (103, 3000, 'OK'), (104, 4000, 'OK'), (105, 5000, 'OK')" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) VALUES (100, 0, 'OK'), (102, 2000, 'OK'), (104, 4000, 'OK')" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) VALUES (101, 1000, 'OK'), (103, 3000, 'OK'), (105, 5000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (amount, status) VALUES (?, ?), (1001, 'OK')" parameters="1000, OK" />
<output sql="REPLACE INTO t_account_1 (amount, status, account_id) VALUES (?, ?, ?), (1001, 'OK', 1)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_with_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (amount, status) VALUES (1000, 'OK'), (1001, 'OK')" />
<output sql="REPLACE INTO t_account_1 (amount, status, account_id) VALUES (1000, 'OK', 1), (1001, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_without_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_without_columns_with_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (?, ?, ?), (101, 1000, 'OK')" parameters="100, 0, OK" />
<output sql="REPLACE INTO t_account_0 VALUES (?, ?, ?)" parameters="100, 0, OK" />
<output sql="REPLACE INTO t_account_1 VALUES (101, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_without_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_without_columns_with_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (100, 0, 'OK'), (101, 1000, 'OK')" />
<output sql="REPLACE INTO t_account_0 VALUES (100, 0, 'OK')" />
<output sql="REPLACE INTO t_account_1 VALUES (101, 1000, 'OK')" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_without_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_without_columns_without_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (?, ?), (1001, 'OK')" parameters="1000, OK" />
<output sql="REPLACE INTO t_account_1(amount, status, account_id) VALUES (?, ?, ?), (1001, 'OK', 1)" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_multiple_values_without_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_multiple_values_without_columns_without_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account VALUES (1000, 'OK'), (1001, 'OK')" />
<output sql="REPLACE INTO t_account_1(amount, status, account_id) VALUES (1000, 'OK', 1), (1001, 'OK', 1)" />
</rewrite-assertion>
- <rewrite-assertion id="replace_set_with_columns_with_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_set_with_columns_with_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SET account_id = ?, amount = ?, status = ?" parameters="100, 1000, OK" />
<output sql="REPLACE INTO t_account_0 SET account_id = ?, amount = ?, status = ?" parameters="100, 1000, OK" />
</rewrite-assertion>
- <rewrite-assertion id="replace_set_with_columns_with_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_set_with_columns_with_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SET account_id = 100, amount = 1000, status = 'OK'" />
<output sql="REPLACE INTO t_account_0 SET account_id = 100, amount = 1000, status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="replace_set_with_columns_without_id_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_set_with_columns_without_id_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SET amount = ?, status = ?" parameters="1000, OK" />
<output sql="REPLACE INTO t_account_1 SET amount = ?, status = ?, account_id = ?" parameters="1000, OK, 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_set_with_columns_without_id_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_set_with_columns_without_id_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SET amount = 1000, status = 'OK'" />
<output sql="REPLACE INTO t_account_1 SET amount = 1000, status = 'OK', account_id = 1" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = 100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = 100" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE account_id = ?" parameters="100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE account_id = 100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE account_id = ?" parameters="100" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = ?" parameters="1000" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE account_id = 100" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_binding_table_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_binding_table_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account_detail WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_detail_0 WHERE amount = 1000" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_detail_1 WHERE amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_subquery_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_subquery_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_subquery_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_subquery_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = 100) t WHERE t.account_id = 100" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100) t WHERE t.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_subquery_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_subquery_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
<output sql="REPLACE INTO t_account_0 SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ?) t WHERE t.account_id = ?" parameters="100, 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_subquery_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_subquery_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account WHERE account_id = 100) t WHERE t.account_id = 100" />
<output sql="REPLACE INTO t_account_0 SELECT t.account_id, t.amount, t.status FROM (SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100) t WHERE t.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_with_all_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_with_all_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_with_all_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_with_all_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_with_all_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_with_all_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE account_id = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_with_all_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_with_all_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account (account_id, amount, status) SELECT account_id, amount, status FROM t_account WHERE amount = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_0 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_0 WHERE amount = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_1 (account_id, amount, status) SELECT account_id, amount, status FROM t_account_1 WHERE amount = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_without_columns_with_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_without_columns_with_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_without_columns_without_sharding_column_for_parameters" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_without_columns_without_sharding_column_for_parameters" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = ? LIMIT ?, ?" parameters="100, 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_without_columns_with_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_without_columns_with_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE account_id = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE account_id = 100 LIMIT 1, 2" />
</rewrite-assertion>
- <rewrite-assertion id="replace_select_with_pagination_without_columns_without_sharding_column_for_literals" db-type="MySQL">
+ <rewrite-assertion id="replace_select_with_pagination_without_columns_without_sharding_column_for_literals" db-types="MySQL">
<input sql="REPLACE INTO t_account SELECT account_id, amount, status FROM t_account WHERE amount = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_0 SELECT account_id, amount, status FROM t_account_0 WHERE amount = 100 LIMIT 1, 2" />
<output sql="REPLACE INTO t_account_1 SELECT account_id, amount, status FROM t_account_1 WHERE amount = 100 LIMIT 1, 2" />
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/select.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/select.xml
index adfa872..c25d8a8 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/select.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/select.xml
@@ -17,507 +17,507 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="select_with_sharding_value_for_parameters">
+ <rewrite-assertion id="select_with_sharding_value_for_parameters" db-types="SQL92">
<input sql="SELECT * FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_sharding_value_for_literals">
+ <rewrite-assertion id="select_with_sharding_value_for_literals" db-types="SQL92">
<input sql="SELECT * FROM t_account WHERE account_id = 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_right_sharding_value_for_parameters">
+ <rewrite-assertion id="select_with_right_sharding_value_for_parameters" db-types="SQL92">
<input sql="SELECT * FROM t_account WHERE ? = account_id" parameters="100" />
<output sql="SELECT * FROM t_account_0 WHERE ? = account_id" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_right_sharding_value_for_literals">
+ <rewrite-assertion id="select_with_right_sharding_value_for_literals" db-types="SQL92">
<input sql="SELECT * FROM t_account WHERE 100 = account_id" />
<output sql="SELECT * FROM t_account_0 WHERE 100 = account_id" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_not_exists" db-type="MySQL">
+ <rewrite-assertion id="select_with_not_exists" db-types="MySQL">
<input sql="SELECT * FROM t_account a WHERE not exists (select * from t_account_detail where a.account_id=account_id and account_id=1000) and account_id = 100" />
<output sql="SELECT * FROM t_account_0 a WHERE not exists (select * from t_account_detail_0 where a.account_id=account_id and account_id=1000) and account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_sum_fun">
+ <rewrite-assertion id="select_with_sum_fun" db-types="SQL92">
<input sql="SELECT SUM(DISTINCT account_id), SUM(account_id) FROM t_account WHERE account_id = 100" />
<output sql="SELECT SUM(DISTINCT account_id), SUM(account_id) FROM t_account WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_avg_fun">
+ <rewrite-assertion id="select_with_avg_fun" db-types="SQL92">
<input sql="SELECT AVG(DISTINCT t.account_id), account_id FROM t_account t WHERE account_id = 100" />
<output sql="SELECT AVG(DISTINCT t.account_id), account_id FROM t_account_0 t WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_having">
+ <rewrite-assertion id="select_with_having" db-types="SQL92">
<input sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ?" parameters="1"/>
<output sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ?" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_having_and_window_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_with_having_and_window_for_mysql" db-types="MySQL">
<input sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ? WINDOW w AS (PARTITION BY account_id)" parameters="1"/>
<output sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ? WINDOW w AS (PARTITION BY account_id)" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_having_and_window_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_with_having_and_window_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ? WINDOW w AS (PARTITION BY account_id)" parameters="1"/>
<output sql="SELECT COUNT(account_id) as count_alias FROM t_account GROUP BY amount HAVING count_alias > ? WINDOW w AS (PARTITION BY account_id)" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_schema">
+ <rewrite-assertion id="select_with_schema" db-types="SQL92">
<input sql="SELECT * FROM sharding_db.t_account" />
<output sql="SELECT * FROM t_account_0"/>
<output sql="SELECT * FROM t_account_1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery" db-types="MySQL">
<input sql="SELECT * FROM (select t_account.account_id from t_account where t_account.account_id=?) a WHERE account_id = 100" parameters="100" />
<output sql="SELECT * FROM (select t_account_0.account_id from t_account_0 where t_account_0.account_id=?) a WHERE account_id = 100" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_and_different_sharding_conditions" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_and_different_sharding_conditions" db-types="MySQL">
<input sql="SELECT * FROM (select t_account.account_id from t_account where t_account.account_id=?) a WHERE account_id = 101" parameters="100" />
<output sql="SELECT * FROM (select t_account.account_id from t_account where t_account.account_id=?) a WHERE account_id = 101" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_with_subquery" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_with_subquery" db-types="MySQL">
<input sql="SELECT * FROM (select b.account_id from (select t_account.account_id from t_account) b where b.account_id=?) a WHERE account_id = 100" parameters="100" />
<output sql="SELECT * FROM (select b.account_id from (select t_account.account_id from t_account) b where b.account_id=?) a WHERE account_id = 100" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_in_projection_and_where" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_in_projection_and_where" db-types="MySQL">
<input sql="SELECT (select id from t_account limit 1) as myid FROM (select b.account_id from (select t_account.account_id from t_account) b where b.account_id=?) a WHERE account_id >= (select account_id from t_account limit 1)" parameters="100"/>
<output sql="SELECT (select id from t_account limit 1) as myid FROM (select b.account_id from (select t_account.account_id from t_account) b where b.account_id=?) a WHERE account_id >= (select account_id from t_account limit 1)" parameters="100"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_only_in_projection" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_only_in_projection" db-types="MySQL">
<input sql="SELECT (select id from t_account)"/>
<output sql="SELECT (select id from t_account)"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_for_where_in_predicate" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_for_where_in_predicate" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id = ? AND amount IN (SELECT amount FROM t_account WHERE account_id = ?)" parameters="100, 100"/>
<output sql="SELECT * FROM t_account_0 WHERE account_id = ? AND amount IN (SELECT amount FROM t_account_0 WHERE account_id = ?)" parameters="100, 100"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_subquery_for_where_between_and_predicate" db-type="MySQL">
+ <rewrite-assertion id="select_with_subquery_for_where_between_and_predicate" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id = ? AND amount BETWEEN (SELECT amount FROM t_account WHERE account_id = ?) AND ?" parameters="100, 100, 1500"/>
<output sql="SELECT * FROM t_account_0 WHERE account_id = ? AND amount BETWEEN (SELECT amount FROM t_account_0 WHERE account_id = ?) AND ?" parameters="100, 100, 1500"/>
</rewrite-assertion>
- <rewrite-assertion id="select_without_sharding_value_for_parameters">
+ <rewrite-assertion id="select_without_sharding_value_for_parameters" db-types="SQL92">
<input sql="SELECT * FROM sharding_db.t_account WHERE amount = ?" parameters="1000" />
<output sql="SELECT * FROM t_account_0 WHERE amount = ?" parameters="1000" />
<output sql="SELECT * FROM t_account_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_without_sharding_value_for_literals">
+ <rewrite-assertion id="select_without_sharding_value_for_literals" db-types="SQL92">
<input sql="SELECT * FROM sharding_db.t_account WHERE amount = 1000" />
<output sql="SELECT * FROM t_account_0 WHERE amount = 1000" />
<output sql="SELECT * FROM t_account_1 WHERE amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_for_literals_with_order_by" db-type="MySQL">
+ <rewrite-assertion id="select_for_literals_with_order_by" db-types="MySQL">
<input sql="SELECT distinct a.account_id FROM t_account as a" />
<output sql="SELECT distinct a.account_id FROM t_account_0 as a ORDER BY a.account_id ASC " />
<output sql="SELECT distinct a.account_id FROM t_account_1 as a ORDER BY a.account_id ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_for_literals_with_order_by_with_table_prefix" db-type="MySQL">
+ <rewrite-assertion id="select_for_literals_with_order_by_with_table_prefix" db-types="MySQL">
<input sql="SELECT `t_account`.`amount` FROM `t_account` order by `t_account`.`account_id` ASC" />
<output sql="SELECT `t_account_0`.`amount` , `t_account_0`.`account_id` AS ORDER_BY_DERIVED_0 FROM `t_account_0` order by `t_account_0`.`account_id` ASC" />
<output sql="SELECT `t_account_1`.`amount` , `t_account_1`.`account_id` AS ORDER_BY_DERIVED_0 FROM `t_account_1` order by `t_account_1`.`account_id` ASC" />
</rewrite-assertion>
- <rewrite-assertion id="select_for_literals_with_order_by_no_quote_with_table_prefix" db-type="MySQL">
+ <rewrite-assertion id="select_for_literals_with_order_by_no_quote_with_table_prefix" db-types="MySQL">
<input sql="SELECT t_account.amount FROM t_account order by t_account.account_id ASC" />
<output sql="SELECT t_account_0.amount , t_account_0.account_id AS ORDER_BY_DERIVED_0 FROM t_account_0 order by t_account_0.account_id ASC" />
<output sql="SELECT t_account_1.amount , t_account_1.account_id AS ORDER_BY_DERIVED_0 FROM t_account_1 order by t_account_1.account_id ASC" />
</rewrite-assertion>
- <rewrite-assertion id="select_binding_table_with_sharding_value_for_parameters">
+ <rewrite-assertion id="select_binding_table_with_sharding_value_for_parameters" db-types="SQL92">
<input sql="SELECT * FROM t_account o, t_account_detail i WHERE o.account_id=i.account_id AND o.account_id = ?" parameters="100" />
<output sql="SELECT * FROM t_account_0 o, t_account_detail_0 i WHERE o.account_id=i.account_id AND o.account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_binding_table_with_sharding_value_for_literals">
+ <rewrite-assertion id="select_binding_table_with_sharding_value_for_literals" db-types="SQL92">
<input sql="SELECT * FROM t_account o, t_account_detail i WHERE o.account_id=i.account_id AND o.account_id = 100" />
<output sql="SELECT * FROM t_account_0 o, t_account_detail_0 i WHERE o.account_id=i.account_id AND o.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_binding_table_without_sharding_value_for_parameters">
+ <rewrite-assertion id="select_binding_table_without_sharding_value_for_parameters" db-types="SQL92">
<input sql="SELECT * FROM t_account JOIN t_account_detail ON account_id WHERE t_account.amount = ?" parameters="1000" />
<output sql="SELECT * FROM t_account_0 JOIN t_account_detail_0 ON account_id WHERE t_account_0.amount = ?" parameters="1000" />
<output sql="SELECT * FROM t_account_1 JOIN t_account_detail_1 ON account_id WHERE t_account_1.amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_binding_table_without_sharding_value_for_literals">
+ <rewrite-assertion id="select_binding_table_without_sharding_value_for_literals" db-types="SQL92">
<input sql="SELECT * FROM t_account JOIN t_account_detail ON account_id WHERE t_account.amount = 1000" />
<output sql="SELECT * FROM t_account_0 JOIN t_account_detail_0 ON account_id WHERE t_account_0.amount = 1000" />
<output sql="SELECT * FROM t_account_1 JOIN t_account_detail_1 ON account_id WHERE t_account_1.amount = 1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_avg_with_single_route">
+ <rewrite-assertion id="select_avg_with_single_route" db-types="SQL92">
<input sql="SELECT AVG(amount) FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="SELECT AVG(amount) FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_avg_with_multiple_route">
+ <rewrite-assertion id="select_avg_with_multiple_route" db-types="SQL92">
<input sql="SELECT AVG(amount) FROM t_account WHERE amount = ?" parameters="1000" />
<output sql="SELECT AVG(amount) , COUNT(amount) AS AVG_DERIVED_COUNT_0 , SUM(amount) AS AVG_DERIVED_SUM_0 FROM t_account_0 WHERE amount = ?" parameters="1000" />
<output sql="SELECT AVG(amount) , COUNT(amount) AS AVG_DERIVED_COUNT_0 , SUM(amount) AS AVG_DERIVED_SUM_0 FROM t_account_1 WHERE amount = ?" parameters="1000" />
</rewrite-assertion>
- <rewrite-assertion id="select_distinct_with_single_route">
+ <rewrite-assertion id="select_distinct_with_single_route" db-types="SQL92">
<input sql="SELECT COUNT(DISTINCT account_id) a, SUM(DISTINCT account_id) a FROM t_account WHERE account_id = ?" parameters="100" />
<output sql="SELECT COUNT(DISTINCT account_id) a, SUM(DISTINCT account_id) a FROM t_account_0 WHERE account_id = ?" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_distinct_with_alias_with_multiple_route">
+ <rewrite-assertion id="select_distinct_with_alias_with_multiple_route" db-types="SQL92">
<input sql="SELECT COUNT(DISTINCT account_id) a, SUM(DISTINCT account_id) b FROM t_account" />
<output sql="SELECT DISTINCT account_id a, account_id b FROM t_account_0" />
<output sql="SELECT DISTINCT account_id a, account_id b FROM t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="select_distinct_without_alias_with_multiple_route">
+ <rewrite-assertion id="select_distinct_without_alias_with_multiple_route" db-types="SQL92">
<input sql="SELECT COUNT(DISTINCT account_id), SUM(DISTINCT account_id) FROM t_account" />
<output sql="SELECT DISTINCT account_id AS AGGREGATION_DISTINCT_DERIVED_0, account_id AS AGGREGATION_DISTINCT_DERIVED_1 FROM t_account_0" />
<output sql="SELECT DISTINCT account_id AS AGGREGATION_DISTINCT_DERIVED_0, account_id AS AGGREGATION_DISTINCT_DERIVED_1 FROM t_account_1" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_with_single_route">
+ <rewrite-assertion id="select_account_by_with_single_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account WHERE account_id = ? ORDER BY amount" parameters="100" />
<output sql="SELECT account_id FROM t_account_0 WHERE account_id = ? ORDER BY amount" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_with_order_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_account_by_with_order_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account ORDER BY account_id" />
<output sql="SELECT account_id FROM t_account_0 ORDER BY account_id" />
<output sql="SELECT account_id FROM t_account_1 ORDER BY account_id" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_without_account_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_account_by_without_account_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account ORDER BY amount" />
<output sql="SELECT account_id , amount AS ORDER_BY_DERIVED_0 FROM t_account_0 ORDER BY amount" />
<output sql="SELECT account_id , amount AS ORDER_BY_DERIVED_0 FROM t_account_1 ORDER BY amount" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_without_unqualified_shorthand_with_multiple_route">
+ <rewrite-assertion id="select_account_by_without_unqualified_shorthand_with_multiple_route" db-types="SQL92">
<input sql="SELECT * FROM t_account ORDER BY amount" />
<output sql="SELECT * FROM t_account_0 ORDER BY amount" />
<output sql="SELECT * FROM t_account_1 ORDER BY amount" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_without_qualified_shorthand_contains_order_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_account_by_without_qualified_shorthand_contains_order_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT o.* FROM t_account o JOIN t_account_detail i ON account_id ORDER BY o.amount" />
<output sql="SELECT o.* FROM t_account_0 o JOIN t_account_detail_0 i ON account_id ORDER BY o.amount" />
<output sql="SELECT o.* FROM t_account_1 o JOIN t_account_detail_1 i ON account_id ORDER BY o.amount" />
</rewrite-assertion>
- <rewrite-assertion id="select_account_by_without_qualified_shorthand_not_contains_order_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_account_by_without_qualified_shorthand_not_contains_order_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT o.* FROM t_account o JOIN t_account_detail i ON account_id ORDER BY i.amount" />
<output sql="SELECT o.* , i.amount AS ORDER_BY_DERIVED_0 FROM t_account_0 o JOIN t_account_detail_0 i ON account_id ORDER BY i.amount" />
<output sql="SELECT o.* , i.amount AS ORDER_BY_DERIVED_0 FROM t_account_1 o JOIN t_account_detail_1 i ON account_id ORDER BY i.amount" />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_with_single_route">
+ <rewrite-assertion id="select_group_by_with_single_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account WHERE account_id = ? GROUP BY amount" parameters="100" />
<output sql="SELECT account_id FROM t_account_0 WHERE account_id = ? GROUP BY amount" parameters="100" />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_with_group_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_group_by_with_group_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account GROUP BY account_id" />
<output sql="SELECT account_id FROM t_account_0 GROUP BY account_id ORDER BY account_id ASC " />
<output sql="SELECT account_id FROM t_account_1 GROUP BY account_id ORDER BY account_id ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_without_group_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_group_by_without_group_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT account_id FROM t_account GROUP BY amount" />
<output sql="SELECT account_id , amount AS GROUP_BY_DERIVED_0 FROM t_account_0 GROUP BY amount ORDER BY amount ASC " />
<output sql="SELECT account_id , amount AS GROUP_BY_DERIVED_0 FROM t_account_1 GROUP BY amount ORDER BY amount ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_without_unqualified_shorthand_with_multiple_route">
+ <rewrite-assertion id="select_group_by_without_unqualified_shorthand_with_multiple_route" db-types="SQL92">
<input sql="SELECT * FROM t_account GROUP BY amount" />
<output sql="SELECT * FROM t_account_0 GROUP BY amount ORDER BY amount ASC " />
<output sql="SELECT * FROM t_account_1 GROUP BY amount ORDER BY amount ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_without_qualified_shorthand_contains_group_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_group_by_without_qualified_shorthand_contains_group_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT o.* FROM t_account o JOIN t_account_detail i ON account_id GROUP BY o.amount" />
<output sql="SELECT o.* FROM t_account_0 o JOIN t_account_detail_0 i ON account_id GROUP BY o.amount ORDER BY o.amount ASC " />
<output sql="SELECT o.* FROM t_account_1 o JOIN t_account_detail_1 i ON account_id GROUP BY o.amount ORDER BY o.amount ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_without_qualified_shorthand_not_contains_group_by_projection_with_multiple_route">
+ <rewrite-assertion id="select_group_by_without_qualified_shorthand_not_contains_group_by_projection_with_multiple_route" db-types="SQL92">
<input sql="SELECT o.* FROM t_account o JOIN t_account_detail i ON account_id GROUP BY i.amount" />
<output sql="SELECT o.* , i.amount AS GROUP_BY_DERIVED_0 FROM t_account_0 o JOIN t_account_detail_0 i ON account_id GROUP BY i.amount ORDER BY i.amount ASC " />
<output sql="SELECT o.* , i.amount AS GROUP_BY_DERIVED_0 FROM t_account_1 o JOIN t_account_detail_1 i ON account_id GROUP BY i.amount ORDER BY i.amount ASC " />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_and_order_by_with_different_item_with_multiple_route">
+ <rewrite-assertion id="select_group_by_and_order_by_with_different_item_with_multiple_route" db-types="SQL92">
<input sql="SELECT status FROM t_account GROUP BY amount ORDER BY account_id" />
<output sql="SELECT status , amount AS GROUP_BY_DERIVED_0 , account_id AS ORDER_BY_DERIVED_0 FROM t_account_0 GROUP BY amount ORDER BY account_id" />
<output sql="SELECT status , amount AS GROUP_BY_DERIVED_0 , account_id AS ORDER_BY_DERIVED_0 FROM t_account_1 GROUP BY amount ORDER BY account_id" />
</rewrite-assertion>
- <rewrite-assertion id="select_group_by_and_order_by_with_different_direction_with_multiple_route">
+ <rewrite-assertion id="select_group_by_and_order_by_with_different_direction_with_multiple_route" db-types="SQL92">
<input sql="SELECT status FROM t_account GROUP BY account_id ORDER BY account_id DESC" />
<output sql="SELECT status , account_id AS GROUP_BY_DERIVED_0 FROM t_account_0 GROUP BY account_id ORDER BY account_id DESC" />
<output sql="SELECT status , account_id AS GROUP_BY_DERIVED_0 FROM t_account_1 GROUP BY account_id ORDER BY account_id DESC" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_single_route_for_parameters_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_single_route_for_parameters_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id = 100 LIMIT ?, ?" parameters="100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = 100 LIMIT ?, ?" parameters="100, 10" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_single_route_for_literals_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_single_route_for_literals_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id = 100 LIMIT 100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = 100 LIMIT 100, 10" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_for_parameters_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_for_parameters_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) LIMIT ?, ?" parameters="100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) LIMIT ?, ?" parameters="0, 110" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) LIMIT ?, ?" parameters="0, 110" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_for_literals_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_for_literals_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) LIMIT 100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) LIMIT 0, 110" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) LIMIT 0, 110" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_parameters_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_parameters_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ?, ?" parameters="100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ?, ?" parameters="0, 2147483647" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ?, ?" parameters="0, 2147483647" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_literals_for_mysql" db-type="MySQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_literals_for_mysql" db-types="MySQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 100, 10" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 0, 2147483647" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 0, 2147483647" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_single_route_for_parameters_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_single_route_for_parameters_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id = 100 LIMIT ? OFFSET ?" parameters="10, 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = 100 LIMIT ? OFFSET ?" parameters="10, 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_single_route_for_literals_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_single_route_for_literals_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id = 100 LIMIT 10 OFFSET 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id = 100 LIMIT 10 OFFSET 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_for_parameters_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_for_parameters_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) LIMIT ? OFFSET ?" parameters="10, 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) LIMIT ? OFFSET ?" parameters="110, 0" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) LIMIT ? OFFSET ?" parameters="110, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_for_literals_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_for_literals_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) LIMIT 10 OFFSET 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) LIMIT 110 OFFSET 0" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) LIMIT 110 OFFSET 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_parameters_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_parameters_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ? OFFSET ?" parameters="10, 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ? OFFSET ?" parameters="2147483647, 0" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT ? OFFSET ?" parameters="2147483647, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_literals_for_postgresql" db-type="PostgreSQL">
+ <rewrite-assertion id="select_limit_with_multiple_route_with_memory_group_by_for_literals_for_postgresql" db-types="PostgreSQL">
<input sql="SELECT * FROM t_account WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 10 OFFSET 100" />
<output sql="SELECT * FROM t_account_0 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 2147483647 OFFSET 0" />
<output sql="SELECT * FROM t_account_1 WHERE account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC LIMIT 2147483647 OFFSET 0" />
</rewrite-assertion>
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_for_parameters_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_for_parameters_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id = 100) row_ WHERE rownum <= ?) t WHERE t.rownum_ > ?" parameters="110, 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id = 100) row_ WHERE rownum <= ?) t WHERE t.rownum_ > ?" parameters="110, 100" />-->
<!--</rewrite-assertion>-->
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_for_literals_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_for_literals_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id = 100) row_ WHERE rownum <= 110) t WHERE t.rownum_ > 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id = 100) row_ WHERE rownum <= 110) t WHERE t.rownum_ > 100" />-->
<!--</rewrite-assertion>-->
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_for_parameters_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_for_parameters_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ?) t WHERE t.rownum_ > ?" parameters="110, 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ?) t WHERE t.rownum_ > ?" parameters="110, 0" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ?) t WHERE t.rownum_ > ?" parameters="110, 0" />-->
<!--</rewrite-assertion>-->
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_for_literals_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_for_literals_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 110) t WHERE t.rownum_ > 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 110) t WHERE t.rownum_ > 0" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 110) t WHERE t.rownum_ > 0" />-->
<!--</rewrite-assertion>-->
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_with_memory_group_by_for_parameters_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_with_memory_group_by_for_parameters_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ? GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > ?" parameters="110, 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ? GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > ?" parameters="2147483647, 0" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= ? GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > ?" parameters="2147483647, 0" />-->
<!--</rewrite-assertion>-->
<!-- FIXME -->
- <!--<rewrite-assertion id="select_row_number_with_single_route_with_memory_group_by_for_literals_for_oracle" db-type="Oracle">-->
+ <!--<rewrite-assertion id="select_row_number_with_single_route_with_memory_group_by_for_literals_for_oracle" db-types="Oracle">-->
<!--<input sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 110 GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > 100" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 2147483647 GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > 0" />-->
<!--<output sql="SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (SELECT o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) row_ WHERE rownum <= 2147483647 GROUP BY account_id,rownum ORDER BY account_id DESC) t WHERE t.rownum_ > 0" />-->
<!--</rewrite-assertion>-->
- <rewrite-assertion id="select_top_with_single_route_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_single_route_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_single_route_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_single_route_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_single_route_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_single_route_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_single_route_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_single_route_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100) AS row_ WHERE row_.rownum_ > 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_multiple_route_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_multiple_route_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_multiple_route_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_multiple_route_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 0" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 0" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101)) AS row_ WHERE row_.rownum_ > 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_single_route_with_memory_group_by_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_single_route_with_memory_group_by_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_single_route_with_memory_group_by_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_single_route_with_memory_group_by_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_single_route_with_memory_group_by_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_single_route_with_memory_group_by_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_single_route_with_memory_group_by_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_single_route_with_memory_group_by_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id = 100 GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_multiple_route_with_memory_group_by_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_multiple_route_with_memory_group_by_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
<output sql="SELECT * FROM (SELECT TOP(?) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_with_multiple_route_with_memory_group_by_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_with_multiple_route_with_memory_group_by_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 0" />
<output sql="SELECT * FROM (SELECT TOP(110) row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_with_memory_group_by_for_parameters_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_with_memory_group_by_for_parameters_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 100" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
<output sql="SELECT * FROM (SELECT TOP(?) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > ?" parameters="110, 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_with_memory_group_by_for_literals_for_sqlserver" db-type="SQLServer">
+ <rewrite-assertion id="select_top_percent_with_ties_with_multiple_route_with_memory_group_by_for_literals_for_sqlserver" db-types="SQLServer">
<input sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 100" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_0 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 0" />
<output sql="SELECT * FROM (SELECT TOP(110) PERCENT WITH TIES row_number() OVER (ORDER BY o.account_id) AS rownum_, o.account_id FROM t_account_1 o WHERE o.account_id IN (100, 101) GROUP BY account_id ORDER BY account_id DESC) AS row_ WHERE row_.rownum_ > 0" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_table_as_qualified_name">
+ <rewrite-assertion id="select_with_table_as_qualified_name" db-types="SQL92">
<input sql="SELECT t_account.account_id, t_account.password, t_account.amount AS a, status AS s FROM t_account WHERE t_account.account_id = 1 AND t_account.password = 'aaa' AND t_account.amount = 1000 AND t_account.status = 'OK'" />
<output sql="SELECT t_account_1.account_id, t_account_1.password, t_account_1.amount AS a, status AS s FROM t_account_1 WHERE t_account_1.account_id = 1 AND t_account_1.password = 'aaa' AND t_account_1.amount = 1000 AND t_account_1.status = 'OK'" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_join_table_with_qualified_columns">
+ <rewrite-assertion id="select_with_join_table_with_qualified_columns" db-types="SQL92">
<input sql="SELECT * FROM t_account, t_account_detail WHERE t_account.account_id = 1 AND t_account.account_id = t_account_detail.account_id" />
<output sql="SELECT * FROM t_account_1, t_account_detail_1 WHERE t_account_1.account_id = 1 AND t_account_1.account_id = t_account_detail_1.account_id" />
</rewrite-assertion>
- <rewrite-assertion id="select_with_join_table_on_condition_with_qualified_columns">
+ <rewrite-assertion id="select_with_join_table_on_condition_with_qualified_columns" db-types="SQL92">
<input sql="SELECT * FROM t_account join t_account_detail on t_account.account_id = t_account_detail.account_id and t_account.account_id = ?" parameters="1"/>
<output sql="SELECT * FROM t_account_1 join t_account_detail_1 on t_account_1.account_id = t_account_detail_1.account_id and t_account_1.account_id = ?" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_join_table_where_condition_with_qualified_columns">
+ <rewrite-assertion id="select_with_join_table_where_condition_with_qualified_columns" db-types="SQL92">
<input sql="SELECT * FROM t_account join t_account_detail on t_account.account_id = t_account_detail.account_id where t_account.account_id = ?" parameters="1"/>
<output sql="SELECT * FROM t_account_1 join t_account_detail_1 on t_account_1.account_id = t_account_detail_1.account_id where t_account_1.account_id = ?" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_join_table_on_in_condition_with_qualified_columns">
+ <rewrite-assertion id="select_with_join_table_on_in_condition_with_qualified_columns" db-types="SQL92">
<input sql="SELECT * FROM t_account join t_account_detail on t_account.account_id = t_account_detail.account_id and t_account.account_id in ( ? )" parameters="1"/>
<output sql="SELECT * FROM t_account_1 join t_account_detail_1 on t_account_1.account_id = t_account_detail_1.account_id and t_account_1.account_id in ( ? )" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_union_single_table" db-type="MySQL">
+ <rewrite-assertion id="select_union_single_table" db-types="MySQL">
<input sql="SELECT id FROM t_single UNION SELECT id FROM t_single_extend"/>
<output sql="SELECT id FROM t_single UNION SELECT id FROM t_single_extend"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_join_table_with_different_sharding_columns">
+ <rewrite-assertion id="select_with_join_table_with_different_sharding_columns" db-types="SQL92">
<input sql="SELECT * FROM t_user JOIN t_user_extend ON t_user.id = t_user_extend.user_id WHERE t_user_extend.user_id = ?" parameters="1"/>
<output sql="SELECT * FROM t_user_1 JOIN t_user_extend_1 ON t_user_1.id = t_user_extend_1.user_id WHERE t_user_extend_1.user_id = ?" parameters="1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_or_and_condition">
+ <rewrite-assertion id="select_with_or_and_condition" db-types="SQL92">
<input sql="SELECT * FROM t_account WHERE amount=? OR amount=? AND account_id=?" parameters="1, 2, 3"/>
<output sql="SELECT * FROM t_account_0 WHERE amount=? OR amount=? AND account_id=?" parameters="1, 2, 3"/>
<output sql="SELECT * FROM t_account_1 WHERE amount=? OR amount=? AND account_id=?" parameters="1, 2, 3"/>
</rewrite-assertion>
- <rewrite-assertion id="select_multi_nested_subquery_with_binding_tables">
+ <rewrite-assertion id="select_multi_nested_subquery_with_binding_tables" db-types="SQL92">
<input sql="SELECT * FROM (SELECT id, content FROM t_user WHERE id = ? AND content IN (SELECT content FROM t_user_extend WHERE user_id = ?)) AS temp" parameters="1, 1"/>
<output sql="SELECT * FROM (SELECT id, content FROM t_user_1 WHERE id = ? AND content IN (SELECT content FROM t_user_extend_1 WHERE user_id = ?)) AS temp" parameters="1, 1"/>
</rewrite-assertion>
- <rewrite-assertion id="select_with_broadcast_table_and_single_table">
+ <rewrite-assertion id="select_with_broadcast_table_and_single_table" db-types="SQL92">
<input sql="SELECT * FROM t_single s INNER JOIN t_config c ON s.account_id = c.account_id" />
<output sql="SELECT * FROM t_single s INNER JOIN t_config c ON s.account_id = c.account_id" />
</rewrite-assertion>
- <rewrite-assertion id="select_binding_table_with_uppercase_table_name">
+ <rewrite-assertion id="select_binding_table_with_uppercase_table_name" db-types="SQL92">
<input sql="SELECT * FROM T_ROLE JOIN T_ROLE_ADMIN ON T_ROLE.ROLE_ID = T_ROLE_ADMIN.ROLE_ID WHERE T_ROLE_ADMIN.ROLE_ID = ?" parameters="1000" />
<output sql="SELECT * FROM T_ROLE JOIN T_ROLE_ADMIN ON T_ROLE.ROLE_ID = T_ROLE_ADMIN.ROLE_ID WHERE T_ROLE_ADMIN.ROLE_ID = ?" parameters="1000" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/show.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/show.xml
index 7e9ed6a..55dc891 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/show.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/show.xml
@@ -17,47 +17,47 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="show_columns_from_table_without_schema" db-type="MySQL">
+ <rewrite-assertion id="show_columns_from_table_without_schema" db-types="MySQL">
<input sql="SHOW COLUMNS FROM t_account" />
<output sql="SHOW COLUMNS FROM t_account_0" />
</rewrite-assertion>
- <rewrite-assertion id="show_columns_from_table_with_schema" db-type="MySQL">
+ <rewrite-assertion id="show_columns_from_table_with_schema" db-types="MySQL">
<input sql="SHOW COLUMNS FROM t_account FROM sharding_db" />
<output sql="SHOW COLUMNS FROM t_account_0 " />
</rewrite-assertion>
- <rewrite-assertion id="show_columns_from_table_with_owner" db-type="MySQL">
+ <rewrite-assertion id="show_columns_from_table_with_owner" db-types="MySQL">
<input sql="SHOW COLUMNS FROM sharding_db.t_account" />
<output sql="SHOW COLUMNS FROM t_account_0" />
</rewrite-assertion>
- <rewrite-assertion id="show_columns_from_table_with_back_quote" db-type="MySQL">
+ <rewrite-assertion id="show_columns_from_table_with_back_quote" db-types="MySQL">
<input sql="SHOW COLUMNS FROM `sharding_db`.`t_account` FROM `sharding_db`" />
<output sql="SHOW COLUMNS FROM `t_account_0` " />
</rewrite-assertion>
- <rewrite-assertion id="show_tables" db-type="MySQL">
+ <rewrite-assertion id="show_tables" db-types="MySQL">
<input sql="SHOW FULL TABLES FROM `sharding_db`" />
<output sql="SHOW FULL TABLES " />
</rewrite-assertion>
- <rewrite-assertion id="show_tables_with_pattern_matching_filter" db-type="MySQL">
+ <rewrite-assertion id="show_tables_with_pattern_matching_filter" db-types="MySQL">
<input sql="SHOW FULL TABLES FROM `sharding_db` LIKE 't_acc%'" />
<output sql="SHOW FULL TABLES LIKE 't_acc%'" />
</rewrite-assertion>
- <rewrite-assertion id="show_index_from_table_without_schema" db-type="MySQL">
+ <rewrite-assertion id="show_index_from_table_without_schema" db-types="MySQL">
<input sql="SHOW INDEX FROM t_account" />
<output sql="SHOW INDEX FROM t_account_0" />
</rewrite-assertion>
- <rewrite-assertion id="show_index_from_table_with_schema" db-type="MySQL">
+ <rewrite-assertion id="show_index_from_table_with_schema" db-types="MySQL">
<input sql="SHOW INDEX FROM t_account FROM sharding_db" />
<output sql="SHOW INDEX FROM t_account_0 " />
</rewrite-assertion>
- <rewrite-assertion id="show_index_from_table_with_owner" db-type="MySQL">
+ <rewrite-assertion id="show_index_from_table_with_owner" db-types="MySQL">
<input sql="SHOW INDEX FROM sharding_db.t_account" />
<output sql="SHOW INDEX FROM t_account_0" />
</rewrite-assertion>
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/update.xml b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/update.xml
index 545bf3b..d701715 100644
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/update.xml
+++ b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/scenario/sharding/case/update.xml
@@ -17,45 +17,45 @@
-->
<rewrite-assertions yaml-rule="scenario/sharding/config/sharding-rule.yaml">
- <rewrite-assertion id="update_with_sharding_value_for_parameters">
+ <rewrite-assertion id="update_with_sharding_value_for_parameters" db-types="SQL92">
<input sql="UPDATE t_account SET status = ? WHERE account_id = ?" parameters="'OK', 100" />
<output sql="UPDATE t_account_0 SET status = ? WHERE account_id = ?" parameters="'OK', 100" />
</rewrite-assertion>
- <rewrite-assertion id="update_with_sharding_value_with_table_for_parameters">
+ <rewrite-assertion id="update_with_sharding_value_with_table_for_parameters" db-types="SQL92">
<input sql="UPDATE t_account SET t_account.status = ? WHERE t_account.account_id = ?" parameters="'OK', 100" />
<output sql="UPDATE t_account_0 SET t_account_0.status = ? WHERE t_account_0.account_id = ?" parameters="'OK', 100" />
</rewrite-assertion>
- <rewrite-assertion id="update_with_sharding_value_for_literals">
+ <rewrite-assertion id="update_with_sharding_value_for_literals" db-types="SQL92">
<input sql="UPDATE t_account SET status = 'OK' WHERE account_id = 100" />
<output sql="UPDATE t_account_0 SET status = 'OK' WHERE account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="update_with_sharding_value_with_table_for_literals">
+ <rewrite-assertion id="update_with_sharding_value_with_table_for_literals" db-types="SQL92">
<input sql="UPDATE t_account SET t_account.status = 'OK' WHERE t_account.account_id = 100" />
<output sql="UPDATE t_account_0 SET t_account_0.status = 'OK' WHERE t_account_0.account_id = 100" />
</rewrite-assertion>
- <rewrite-assertion id="update_without_sharding_value_for_parameters">
+ <rewrite-assertion id="update_without_sharding_value_for_parameters" db-types="SQL92">
<input sql="UPDATE t_account SET status = ? WHERE amount = ?" parameters="'OK', 1000" />
<output sql="UPDATE t_account_0 SET status = ? WHERE amount = ?" parameters="'OK', 1000" />
<output sql="UPDATE t_account_1 SET status = ? WHERE amount = ?" parameters="'OK', 1000" />
</rewrite-assertion>
- <rewrite-assertion id="update_without_sharding_value_with_table_for_parameters">
+ <rewrite-assertion id="update_without_sharding_value_with_table_for_parameters" db-types="SQL92">
<input sql="UPDATE t_account SET t_account.status = ? WHERE t_account.amount = ?" parameters="'OK', 1000" />
<output sql="UPDATE t_account_0 SET t_account_0.status = ? WHERE t_account_0.amount = ?" parameters="'OK', 1000" />
<output sql="UPDATE t_account_1 SET t_account_1.status = ? WHERE t_account_1.amount = ?" parameters="'OK', 1000" />
</rewrite-assertion>
- <rewrite-assertion id="update_without_sharding_value_for_literals">
+ <rewrite-assertion id="update_without_sharding_value_for_literals" db-types="SQL92">
<input sql="UPDATE t_account SET status = 'OK' WHERE amount = 10" />
<output sql="UPDATE t_account_0 SET status = 'OK' WHERE amount = 10" />
<output sql="UPDATE t_account_1 SET status = 'OK' WHERE amount = 10" />
</rewrite-assertion>
- <rewrite-assertion id="update_without_sharding_value_with_table_for_literals">
+ <rewrite-assertion id="update_without_sharding_value_with_table_for_literals" db-types="SQL92">
<input sql="UPDATE t_account SET t_account.status = 'OK' WHERE t_account.amount = 10" />
<output sql="UPDATE t_account_0 SET t_account_0.status = 'OK' WHERE t_account_0.amount = 10" />
<output sql="UPDATE t_account_1 SET t_account_1.status = 'OK' WHERE t_account_1.amount = 10" />