diff --git a/sharding-core/src/test/resources/parser/alter.xml b/sharding-core/src/test/resources/parser/alter.xml index 5acb73c8e1963..73996be15e466 100644 --- a/sharding-core/src/test/resources/parser/alter.xml +++ b/sharding-core/src/test/resources/parser/alter.xml @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - +
diff --git a/sharding-core/src/test/resources/parser/create.xml b/sharding-core/src/test/resources/parser/create.xml index 8f8c15974a8fe..edf63dfea9f66 100644 --- a/sharding-core/src/test/resources/parser/create.xml +++ b/sharding-core/src/test/resources/parser/create.xml @@ -1,6 +1,6 @@ - +
@@ -9,7 +9,7 @@ - +
@@ -18,7 +18,7 @@ - +
@@ -27,7 +27,7 @@ - +
@@ -36,7 +36,7 @@ - +
@@ -45,7 +45,7 @@ - +
@@ -54,7 +54,7 @@ - +
@@ -64,7 +64,7 @@ - +
diff --git a/sharding-core/src/test/resources/parser/delete.xml b/sharding-core/src/test/resources/parser/delete.xml index 36912d40b5abb..a1d660544b1f7 100644 --- a/sharding-core/src/test/resources/parser/delete.xml +++ b/sharding-core/src/test/resources/parser/delete.xml @@ -1,6 +1,6 @@ - +
@@ -19,7 +19,7 @@ - +
diff --git a/sharding-core/src/test/resources/parser/drop.xml b/sharding-core/src/test/resources/parser/drop.xml index ee53e9a069b8d..00c930f8d1bc3 100644 --- a/sharding-core/src/test/resources/parser/drop.xml +++ b/sharding-core/src/test/resources/parser/drop.xml @@ -1,6 +1,6 @@ - +
@@ -9,7 +9,7 @@ - +
@@ -18,7 +18,7 @@ - +
@@ -27,7 +27,7 @@ - +
@@ -36,7 +36,7 @@ - +
@@ -45,7 +45,7 @@ - +
@@ -54,7 +54,7 @@ - +
@@ -64,13 +64,13 @@ - + - + diff --git a/sharding-core/src/test/resources/parser/insert.xml b/sharding-core/src/test/resources/parser/insert.xml index 6cedcced20fb1..6cd8fc76270b7 100644 --- a/sharding-core/src/test/resources/parser/insert.xml +++ b/sharding-core/src/test/resources/parser/insert.xml @@ -1,6 +1,6 @@ - +
@@ -20,13 +20,16 @@ - +
- + + + + @@ -40,61 +43,61 @@ - + -
+
- - + + + + + order_id + user_id + + + + - - - - - + + - - + + - + -
+
- - - - item_id - - - + + - - + + - - + + - - + +
- + @@ -107,8 +110,8 @@ - - + +
@@ -127,14 +130,14 @@ - - + +
- + @@ -150,14 +153,19 @@ - - + +
- + + + item_id + + + @@ -170,37 +178,57 @@ - - + + -
+
- - + + - - + + - - + + + + + + + + + + + + +
+ + + + + + + + + + + + - - + +
- - - - + @@ -213,8 +241,8 @@ - - + +
@@ -236,8 +264,8 @@ - - + + @@ -261,14 +289,42 @@ - - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
- + @@ -295,19 +351,19 @@ - - + +
- + item_id - + @@ -329,8 +385,8 @@ - - assertInsertWithJsonAndGeo + +
@@ -348,64 +404,8 @@ - - - -
- - - - - - - order_id - user_id - - - - - - - - - - - - - - - - - - - -
- - - - - - - order_id - user_id - - - - - - - - - - - - - - - - - - + +
@@ -438,8 +438,8 @@ - - + +
@@ -469,7 +469,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_alias_as_keyword.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_alias_as_keyword.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_alias_as_keyword.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_alias_as_keyword.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_between_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_between_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_between_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_between_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count_like_concat.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count_like_concat.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count_like_concat.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count_like_concat.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_count_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_count_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_full_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_full_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_full_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_full_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_key_word_alias.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_key_word_alias.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_key_word_alias.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_key_word_alias.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_order_by_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_order_by_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_order_by_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_order_by_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_order_by_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_order_by_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_order_by_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_order_by_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_with_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_with_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_without_grouped_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_without_grouped_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_group_by_without_grouped_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_group_by_without_grouped_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_in_with_same_sharding_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_in_with_same_sharding_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_in_with_same_sharding_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_in_with_same_sharding_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_inner_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_inner_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_inner_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_inner_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_not_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_not_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_not_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_not_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_not_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_not_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_not_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_not_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_for_complex_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_for_complex_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_for_complex_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_for_complex_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_for_simple_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_for_simple_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_for_simple_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_for_simple_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_with_binding_and_broadcast_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_with_binding_and_broadcast_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_with_binding_and_broadcast_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_with_binding_and_broadcast_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_mix_and_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_mix_and_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_different_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_different_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_different_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_different_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_none_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_none_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_none_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_none_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_same_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_same_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_or_with_same_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_or_with_same_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_asc_and_index_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_asc_and_index_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_asc_and_index_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_asc_and_index_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_desc_and_index_asc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_desc_and_index_asc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_desc_and_index_asc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_desc_and_index_asc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_with_date.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_with_date.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_with_date.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_with_date.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_with_ordered_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_with_ordered_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_order_by_with_ordered_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_order_by_with_ordered_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset_and_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset_and_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_offset_and_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_offset_and_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_row_number_and_limit.xml new file mode 100644 index 0000000000000..794208d2a73c2 --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_row_number_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_top_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_top_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_top_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_pagination_with_top_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sharding_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sharding_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sharding_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sharding_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sharding_route_with_broadcast_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sharding_route_with_broadcast_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sharding_route_with_broadcast_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sharding_route_with_broadcast_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_group_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_group_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_group_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_group_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_multiple_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_multiple_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_multiple_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_multiple_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_order_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_order_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_order_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_order_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sub_query_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sub_query_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_expression.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_expression.xml similarity index 99% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_expression.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_expression.xml index 291ed4f8631f1..ac15cd910b9e5 100644 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_expression.xml +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_expression.xml @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_force_index_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_force_index_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_force_index_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_force_index_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_item_alias_match_order_by_and_group_by_items.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_item_alias_match_order_by_and_group_by_items.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_item_alias_match_order_by_and_group_by_items.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_item_alias_match_order_by_and_group_by_items.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_regexp.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_regexp.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_with_regexp.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/db/select_with_regexp.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_alias_as_keyword.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_alias_as_keyword.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_alias_as_keyword.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_alias_as_keyword.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_between_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_between_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_between_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_between_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count_like_concat.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count_like_concat.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count_like_concat.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count_like_concat.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_count_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_count_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_full_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_full_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_full_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_full_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_key_word_alias.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_key_word_alias.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_key_word_alias.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_key_word_alias.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_order_by_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_with_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_with_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_without_grouped_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_without_grouped_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_group_by_without_grouped_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_group_by_without_grouped_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_in_with_same_sharding_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_in_with_same_sharding_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_in_with_same_sharding_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_in_with_same_sharding_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_inner_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_inner_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_inner_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_inner_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_not_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_not_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_not_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_not_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_not_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_not_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_not_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_not_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_for_complex_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_for_complex_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_for_complex_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_for_complex_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_for_simple_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_for_simple_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_for_simple_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_for_simple_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_mix_and_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_different_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_different_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_different_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_different_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_none_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_none_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_none_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_none_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_same_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_same_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_or_with_same_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_or_with_same_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_asc_and_index_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_asc_and_index_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_asc_and_index_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_asc_and_index_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_desc_and_index_asc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_desc_and_index_asc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_desc_and_index_asc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_desc_and_index_asc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_with_date.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_with_date.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_with_date.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_with_date.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_with_ordered_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_with_ordered_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_order_by_with_ordered_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_order_by_with_ordered_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_offset_and_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml new file mode 100644 index 0000000000000..ade9d20589e19 --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_top_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_top_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_top_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_pagination_with_top_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sharding_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sharding_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sharding_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sharding_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sharding_route_with_broadcast_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sharding_route_with_broadcast_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sharding_route_with_broadcast_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sharding_route_with_broadcast_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_group_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_group_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_group_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_group_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_multiple_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_multiple_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_multiple_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_multiple_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_order_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_order_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_order_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_order_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sub_query_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sub_query_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_expression.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_expression.xml similarity index 99% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_expression.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_expression.xml index 8247e02c94aea..5130902c60999 100644 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_expression.xml +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_expression.xml @@ -100,4 +100,4 @@ - \ No newline at end of file + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_force_index_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_force_index_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_force_index_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_force_index_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_regexp.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_regexp.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_with_regexp.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/dbtbl_with_masterslave/select_with_regexp.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/empty_order.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/empty_order.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/empty_order.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/empty_order.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/empty_order_item.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/empty_order_item.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/empty_order_item.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/empty_order_item.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_alias_as_keyword.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_alias_as_keyword.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_alias_as_keyword.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_alias_as_keyword.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_between_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_between_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_between_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_between_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count_like_concat.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count_like_concat.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count_like_concat.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count_like_concat.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_count_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_count_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_full_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_full_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_full_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_full_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_key_word_alias.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_key_word_alias.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_key_word_alias.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_key_word_alias.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_order_by_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_order_by_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_order_by_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_order_by_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_order_by_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_order_by_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_order_by_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_order_by_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_with_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_with_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_without_grouped_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_without_grouped_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_group_by_without_grouped_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_group_by_without_grouped_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_in_with_same_sharding_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_in_with_same_sharding_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_in_with_same_sharding_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_in_with_same_sharding_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_inner_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_inner_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_inner_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_inner_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_not_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_not_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_not_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_not_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_not_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_not_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_not_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_not_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_for_complex_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_for_complex_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_for_complex_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_for_complex_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_for_simple_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_for_simple_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_for_simple_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_for_simple_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_with_binding_and_broadcast_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_mix_and_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_mix_and_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_different_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_different_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_different_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_different_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_none_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_none_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_none_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_none_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_same_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_same_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_or_with_same_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_or_with_same_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_asc_and_index_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_asc_and_index_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_asc_and_index_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_asc_and_index_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_desc_and_index_asc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_desc_and_index_asc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_desc_and_index_asc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_desc_and_index_asc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_with_date.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_with_date.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_with_date.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_with_date.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_with_ordered_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_with_ordered_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_order_by_with_ordered_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_order_by_with_ordered_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset.xml new file mode 100644 index 0000000000000..5d798a71ae15c --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_limit.xml new file mode 100644 index 0000000000000..5f901993ffa1f --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_row_count.xml new file mode 100644 index 0000000000000..ba1eef8ed0fcf --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_offset_and_row_count.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_count.xml new file mode 100644 index 0000000000000..5f901993ffa1f --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_count.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_number_and_limit.xml new file mode 100644 index 0000000000000..8a74aa12393d8 --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_row_number_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_top_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_top_and_limit.xml new file mode 100644 index 0000000000000..e5d5155cd7a0c --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_pagination_with_top_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sharding_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sharding_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sharding_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sharding_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sharding_route_with_broadcast_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sharding_route_with_broadcast_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sharding_route_with_broadcast_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sharding_route_with_broadcast_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_group_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_group_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_group_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_group_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_multiple_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_multiple_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_multiple_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_multiple_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_order_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_order_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_order_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_order_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sub_query_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sub_query_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_expression.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_expression.xml similarity index 99% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_expression.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_expression.xml index 48ffd4ebbe953..df210b2df30df 100644 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_expression.xml +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_expression.xml @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_force_index_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_force_index_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_force_index_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_force_index_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_item_alias_match_order_by_and_group_by_items.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_regexp.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_regexp.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/masterslave/select_with_regexp.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/masterslave/select_with_regexp.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/select_constant_without_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/select_constant_without_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/select_constant_without_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/select_constant_without_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_alias_as_keyword.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_alias_as_keyword.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_alias_as_keyword.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_alias_as_keyword.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_between_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_between_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_between_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_between_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count_like_concat.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count_like_concat.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count_like_concat.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count_like_concat.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_count_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_count_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_full_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_full_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_full_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_full_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_avg.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_avg.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_avg.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_avg.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_key_word_alias.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_key_word_alias.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_key_word_alias.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_key_word_alias.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_order_by_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_order_by_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_order_by_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_order_by_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_order_by_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_order_by_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_order_by_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_order_by_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_with_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_with_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_without_grouped_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_without_grouped_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_group_by_without_grouped_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_group_by_without_grouped_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_in_with_same_sharding_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_in_with_same_sharding_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_in_with_same_sharding_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_in_with_same_sharding_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_inner_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_inner_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_inner_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_inner_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_max.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_max.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_max.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_max.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_min.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_min.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_min.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_min.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_not_equal_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_not_equal_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_not_equal_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_not_equal_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_not_in_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_not_in_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_not_in_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_not_in_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_for_complex_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_for_complex_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_for_complex_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_for_complex_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_for_simple_pattern.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_for_simple_pattern.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_for_simple_pattern.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_for_simple_pattern.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_with_binding_and_broadcast_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_with_binding_and_broadcast_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_with_binding_and_broadcast_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_with_binding_and_broadcast_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_mix_and_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_mix_and_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_different_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_different_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_different_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_different_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_none_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_none_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_none_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_none_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_same_sharding_columns.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_same_sharding_columns.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_or_with_same_sharding_columns.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_or_with_same_sharding_columns.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_asc_and_index_desc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_asc_and_index_desc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_asc_and_index_desc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_asc_and_index_desc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_desc_and_index_asc.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_desc_and_index_asc.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_desc_and_index_asc.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_desc_and_index_asc.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_with_date.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_with_date.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_with_date.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_with_date.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_with_ordered_column.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_with_ordered_column.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_order_by_with_ordered_column.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_order_by_with_ordered_column.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset_and_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset_and_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_offset_and_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_offset_and_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_row_count.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_row_count.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_row_count.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_row_count.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_row_number_and_limit.xml new file mode 100644 index 0000000000000..3f879dce89fe9 --- /dev/null +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_row_number_and_limit.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_top_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_top_and_limit.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_top_and_limit.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_pagination_with_top_and_limit.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sharding_route_with_binding_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sharding_route_with_binding_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sharding_route_with_binding_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sharding_route_with_binding_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sharding_route_with_broadcast_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sharding_route_with_broadcast_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sharding_route_with_broadcast_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sharding_route_with_broadcast_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_group_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_group_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_group_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_group_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_multiple_tables.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_multiple_tables.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_multiple_tables.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_multiple_tables.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_order_by.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_order_by.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_order_by.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_order_by.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_single_table.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_single_table.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sub_query_with_single_table.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sub_query_with_single_table.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sum.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sum.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_sum.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_sum.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_date_function.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_date_function.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_date_function.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_date_function.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_expression.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_expression.xml similarity index 98% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_expression.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_expression.xml index 935f9ac1a8143..0d5091ab7ce96 100644 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_expression.xml +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_expression.xml @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_force_index_join.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_force_index_join.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_force_index_join.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_force_index_join.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_item_alias_match_order_by_and_group_by_items.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_item_alias_match_order_by_and_group_by_items.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_item_alias_match_order_by_and_group_by_items.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_item_alias_match_order_by_and_group_by_items.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_regexp.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_regexp.xml similarity index 100% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_with_regexp.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dataset/tbl/select_with_regexp.xml diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dql-integrate-test-cases.xml b/sharding-jdbc/src/test/resources/asserts/cases/dql/dql-integrate-test-cases.xml similarity index 95% rename from sharding-jdbc/src/test/resources/asserts/cases/select/dql-integrate-test-cases.xml rename to sharding-jdbc/src/test/resources/asserts/cases/dql/dql-integrate-test-cases.xml index cf91b2958191c..59eb7f9a391ea 100644 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dql-integrate-test-cases.xml +++ b/sharding-jdbc/src/test/resources/asserts/cases/dql/dql-integrate-test-cases.xml @@ -388,75 +388,87 @@ - - + + + + + + + + + + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_row_number_and_limit.xml deleted file mode 100644 index 463c8a1bf0f96..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/db/select_pagination_with_row_number_and_limit.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml deleted file mode 100644 index eebe75b4da717..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/dbtbl_with_masterslave/select_pagination_with_row_number_and_limit.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_row_number_and_limit.xml b/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_row_number_and_limit.xml deleted file mode 100644 index 6af522666fa52..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/cases/select/dataset/tbl/select_pagination_with_row_number_and_limit.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sharding-jdbc/src/test/resources/asserts/env/db/sharding-rule.yaml b/sharding-jdbc/src/test/resources/asserts/env/db/sharding-rule.yaml index 8954ab27c93b6..b78f70bd9c878 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/db/sharding-rule.yaml +++ b/sharding-jdbc/src/test/resources/asserts/env/db/sharding-rule.yaml @@ -9,14 +9,13 @@ shardingRule: rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm t_order_item: actualDataNodes: db_${0..9}.t_order_item - keyGeneratorColumnName: order_item_id - keyGeneratorClassName: io.shardingsphere.dbtest.fixture.DecrementKeyGenerator databaseStrategy: standard: shardingColumn: user_id preciseAlgorithmClassName: io.shardingsphere.dbtest.fixture.PreciseModuloAlgorithm rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm + keyGeneratorColumnName: item_id + keyGeneratorClassName: io.shardingsphere.dbtest.fixture.ConstantKeyGenerator bindingTables: - t_order,t_order_item defaultDataSourceName: db_0 - defaultKeyGeneratorClassName: io.shardingsphere.dbtest.fixture.IncrementKeyGenerator diff --git a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/data-init.xml b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/data-init.xml index 4c7a03e45ce28..f2a204281c702 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/data-init.xml +++ b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/data-init.xml @@ -1,644 +1,644 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/schema.xml b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/schema.xml index a7f549629056d..ad874acc6a1f5 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/schema.xml +++ b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/schema.xml @@ -1,26 +1,26 @@ - master_0 - master_1 - master_2 - master_3 - master_4 - master_5 - master_6 - master_7 - master_8 - master_9 - slave_0 - slave_1 - slave_2 - slave_3 - slave_4 - slave_5 - slave_6 - slave_7 - slave_8 - slave_9 + master_db_0 + master_db_1 + master_db_2 + master_db_3 + master_db_4 + master_db_5 + master_db_6 + master_db_7 + master_db_8 + master_db_9 + slave_db_0 + slave_db_1 + slave_db_2 + slave_db_3 + slave_db_4 + slave_db_5 + slave_db_6 + slave_db_7 + slave_db_8 + slave_db_9 CREATE TABLE t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) @@ -33,16 +33,6 @@ CREATE TABLE t_order_7 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) CREATE TABLE t_order_8 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) CREATE TABLE t_order_9 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) - CREATE INDEX order_index ON t_order_0 (order_id) - CREATE INDEX order_index ON t_order_1 (order_id) - CREATE INDEX order_index ON t_order_2 (order_id) - CREATE INDEX order_index ON t_order_3 (order_id) - CREATE INDEX order_index ON t_order_4 (order_id) - CREATE INDEX order_index ON t_order_5 (order_id) - CREATE INDEX order_index ON t_order_6 (order_id) - CREATE INDEX order_index ON t_order_7 (order_id) - CREATE INDEX order_index ON t_order_8 (order_id) - CREATE INDEX order_index ON t_order_9 (order_id) CREATE TABLE t_order_item_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) CREATE TABLE t_order_item_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) CREATE TABLE t_order_item_2 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) diff --git a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/sharding-rule.yaml b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/sharding-rule.yaml index 84e1e88259c35..5764abbada028 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/sharding-rule.yaml +++ b/sharding-jdbc/src/test/resources/asserts/env/dbtbl_with_masterslave/sharding-rule.yaml @@ -14,8 +14,6 @@ shardingRule: shardingColumn: order_id preciseAlgorithmClassName: io.shardingsphere.dbtest.fixture.PreciseModuloAlgorithm rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm - keyGeneratorColumnName: order_id - keyGeneratorClassName: io.shardingsphere.core.integrate.api.yaml.fixture.IncrementKeyGenerator logicIndex: t_order_index t_order_item: actualDataNodes: db_ms_${0..9}.t_order_item_${0..9} @@ -29,61 +27,62 @@ shardingRule: shardingColumn: order_id preciseAlgorithmClassName: io.shardingsphere.dbtest.fixture.PreciseModuloAlgorithm rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm + keyGeneratorColumnName: item_id + keyGeneratorClassName: io.shardingsphere.dbtest.fixture.ConstantKeyGenerator bindingTables: - t_order,t_order_item defaultDataSourceName: db_ms_0 - defaultKeyGeneratorClassName: io.shardingsphere.dbtest.fixture.IncrementKeyGenerator - + masterSlaveRules: db_ms_0: - masterDataSourceName: master_0 + masterDataSourceName: master_db_0 slaveDataSourceNames: - - slave_0 + - slave_db_0 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_1: - masterDataSourceName: master_1 + masterDataSourceName: master_db_1 slaveDataSourceNames: - - slave_1 + - slave_db_1 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_2: - masterDataSourceName: master_2 + masterDataSourceName: master_db_2 slaveDataSourceNames: - - slave_2 + - slave_db_2 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_3: - masterDataSourceName: master_3 + masterDataSourceName: master_db_3 slaveDataSourceNames: - - slave_3 + - slave_db_3 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_4: - masterDataSourceName: master_4 + masterDataSourceName: master_db_4 slaveDataSourceNames: - - slave_4 + - slave_db_4 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_5: - masterDataSourceName: master_5 + masterDataSourceName: master_db_5 slaveDataSourceNames: - - slave_5 + - slave_db_5 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_6: - masterDataSourceName: master_6 + masterDataSourceName: master_db_6 slaveDataSourceNames: - - slave_6 + - slave_db_6 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_7: - masterDataSourceName: master_7 + masterDataSourceName: master_db_7 slaveDataSourceNames: - - slave_7 + - slave_db_7 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_8: - masterDataSourceName: master_8 + masterDataSourceName: master_db_8 slaveDataSourceNames: - - slave_8 + - slave_db_8 loadBalanceAlgorithmType: ROUND_ROBIN db_ms_9: - masterDataSourceName: master_9 + masterDataSourceName: master_db_9 slaveDataSourceNames: - - slave_9 + - slave_db_9 loadBalanceAlgorithmType: ROUND_ROBIN configMap: key1: value1 diff --git a/sharding-jdbc/src/test/resources/asserts/env/jdbc/schema.xml b/sharding-jdbc/src/test/resources/asserts/env/jdbc/schema.xml index 6ee3e75a34914..97aed2d3d74f0 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/jdbc/schema.xml +++ b/sharding-jdbc/src/test/resources/asserts/env/jdbc/schema.xml @@ -7,8 +7,8 @@ CREATE TABLE t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) CREATE TABLE t_order_1 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) - CREATE TABLE t_order_item_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (item_id)) - CREATE TABLE t_order_item_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (item_id)) + CREATE TABLE t_order_item_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) + CREATE TABLE t_order_item_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) CREATE TABLE t_config (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id)) CREATE TABLE t_global (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id)) diff --git a/sharding-jdbc/src/test/resources/asserts/env/masterslave/data-init.xml b/sharding-jdbc/src/test/resources/asserts/env/masterslave/data-init.xml index f1bd64b42c493..0ff1e36074225 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/masterslave/data-init.xml +++ b/sharding-jdbc/src/test/resources/asserts/env/masterslave/data-init.xml @@ -299,8 +299,8 @@ - + diff --git a/sharding-jdbc/src/test/resources/asserts/env/nullable/data-init.xml b/sharding-jdbc/src/test/resources/asserts/env/nullable/data-init.xml deleted file mode 100644 index 5300424b53319..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/env/nullable/data-init.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/asserts/env/nullable/schema.xml b/sharding-jdbc/src/test/resources/asserts/env/nullable/schema.xml deleted file mode 100644 index 65a43bee1dce5..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/env/nullable/schema.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - nullable_0 - nullable_1 - nullable_2 - nullable_3 - nullable_4 - nullable_5 - nullable_6 - nullable_7 - nullable_8 - nullable_9 - - - CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NULL, sku_num INT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) - - - DROP TABLE t_order - - diff --git a/sharding-jdbc/src/test/resources/asserts/env/nullable/sharding-rule.yaml b/sharding-jdbc/src/test/resources/asserts/env/nullable/sharding-rule.yaml deleted file mode 100644 index 208cb2d4c7816..0000000000000 --- a/sharding-jdbc/src/test/resources/asserts/env/nullable/sharding-rule.yaml +++ /dev/null @@ -1,12 +0,0 @@ -shardingRule: - defaultDataSourceName: nullable_0 - defaultKeyGeneratorClassName: io.shardingsphere.dbtest.fixture.IncrementKeyGenerator - tables: - t_order: - actualDataNodes: nullable_${0..9}.t_order - databaseStrategy: - standard: - shardingColumn: user_id - preciseAlgorithmClassName: io.shardingsphere.dbtest.fixture.SingleAlgorithm - bindingTables: - - t_order diff --git a/sharding-jdbc/src/test/resources/asserts/env/tbl/schema.xml b/sharding-jdbc/src/test/resources/asserts/env/tbl/schema.xml index b35a1bf15769a..d0a74f0c1ea53 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/tbl/schema.xml +++ b/sharding-jdbc/src/test/resources/asserts/env/tbl/schema.xml @@ -14,16 +14,6 @@ CREATE TABLE t_order_7 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) CREATE TABLE t_order_8 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) CREATE TABLE t_order_9 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id)) - CREATE INDEX order_index ON t_order_0 (order_id) - CREATE INDEX order_index ON t_order_1 (order_id) - CREATE INDEX order_index ON t_order_2 (order_id) - CREATE INDEX order_index ON t_order_3 (order_id) - CREATE INDEX order_index ON t_order_4 (order_id) - CREATE INDEX order_index ON t_order_5 (order_id) - CREATE INDEX order_index ON t_order_6 (order_id) - CREATE INDEX order_index ON t_order_7 (order_id) - CREATE INDEX order_index ON t_order_8 (order_id) - CREATE INDEX order_index ON t_order_9 (order_id) CREATE TABLE t_order_item_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) CREATE TABLE t_order_item_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) CREATE TABLE t_order_item_2 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id)) diff --git a/sharding-jdbc/src/test/resources/asserts/env/tbl/sharding-rule.yaml b/sharding-jdbc/src/test/resources/asserts/env/tbl/sharding-rule.yaml index 8065556f30687..9199aea9f430c 100644 --- a/sharding-jdbc/src/test/resources/asserts/env/tbl/sharding-rule.yaml +++ b/sharding-jdbc/src/test/resources/asserts/env/tbl/sharding-rule.yaml @@ -9,14 +9,13 @@ shardingRule: rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm t_order_item: actualDataNodes: tbl.t_order_item_${0..9} - keyGeneratorColumnName: order_item_id - keyGeneratorClassName: io.shardingsphere.dbtest.fixture.DecrementKeyGenerator tableStrategy: standard: shardingColumn: order_id preciseAlgorithmClassName: io.shardingsphere.dbtest.fixture.PreciseModuloAlgorithm rangeAlgorithmClassName: io.shardingsphere.dbtest.fixture.RangeModuloAlgorithm + keyGeneratorColumnName: item_id + keyGeneratorClassName: io.shardingsphere.dbtest.fixture.ConstantKeyGenerator bindingTables: - t_order,t_order_item defaultDataSourceName: tbl - defaultKeyGeneratorClassName: io.shardingsphere.dbtest.fixture.IncrementKeyGenerator diff --git a/sharding-jdbc/src/test/resources/integrate/assert/alter.xml b/sharding-jdbc/src/test/resources/integrate/assert/alter.xml deleted file mode 100644 index 9e37fb05f641e..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/alter.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/create.xml b/sharding-jdbc/src/test/resources/integrate/assert/create.xml deleted file mode 100644 index e69ac290a9899..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/create.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/delete.xml b/sharding-jdbc/src/test/resources/integrate/assert/delete.xml deleted file mode 100644 index 4f952c1e0acf8..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/delete.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/drop.xml b/sharding-jdbc/src/test/resources/integrate/assert/drop.xml deleted file mode 100644 index 02cbba4870d74..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/drop.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/insert.xml b/sharding-jdbc/src/test/resources/integrate/assert/insert.xml deleted file mode 100644 index 2f8fd6603b5ad..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/insert.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/select_nullable.xml b/sharding-jdbc/src/test/resources/integrate/assert/select_nullable.xml deleted file mode 100644 index 2c69024d0b3f0..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/select_nullable.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/truncate.xml b/sharding-jdbc/src/test/resources/integrate/assert/truncate.xml deleted file mode 100644 index 8f6f5930e8aac..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/truncate.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sharding-jdbc/src/test/resources/integrate/assert/update.xml b/sharding-jdbc/src/test/resources/integrate/assert/update.xml deleted file mode 100644 index 4f9d1e1c83d3e..0000000000000 --- a/sharding-jdbc/src/test/resources/integrate/assert/update.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteBackendHandler.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteBackendHandler.java new file mode 100644 index 0000000000000..bc4267a8dbe12 --- /dev/null +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteBackendHandler.java @@ -0,0 +1,256 @@ +/* + * Copyright 2016-2018 shardingsphere.io. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *

+ */ + +package io.shardingsphere.proxy.backend.common; + +import io.shardingsphere.core.constant.DatabaseType; +import io.shardingsphere.core.constant.SQLType; +import io.shardingsphere.core.exception.ShardingException; +import io.shardingsphere.core.merger.MergeEngineFactory; +import io.shardingsphere.core.merger.MergedResult; +import io.shardingsphere.core.merger.QueryResult; +import io.shardingsphere.core.parsing.SQLJudgeEngine; +import io.shardingsphere.core.parsing.parser.sql.SQLStatement; +import io.shardingsphere.core.routing.SQLExecutionUnit; +import io.shardingsphere.core.routing.SQLRouteResult; +import io.shardingsphere.core.routing.SQLUnit; +import io.shardingsphere.core.routing.router.masterslave.MasterSlaveRouter; +import io.shardingsphere.proxy.backend.resource.BaseJDBCResource; +import io.shardingsphere.proxy.config.RuleRegistry; +import io.shardingsphere.proxy.metadata.ProxyShardingRefreshHandler; +import io.shardingsphere.proxy.transport.common.packet.DatabaseProtocolPacket; +import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; +import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; +import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; +import lombok.Getter; +import lombok.Setter; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; + +/** + * Abstract ExecuteBackendHandler for SQL or PrepareStatement. + * + * @author zhaojun + */ +@Getter +public abstract class ExecuteBackendHandler implements BackendHandler { + + private final String sql; + + private MergedResult mergedResult; + + private int currentSequenceId; + + @Setter + private int columnCount; + + private boolean isMerged; + + private boolean hasMoreResultValueFlag; + + private final DatabaseType databaseType; + + private final boolean showSQL; + + @Setter + private BaseJDBCResource jdbcResource; + + public ExecuteBackendHandler(final String sql, final DatabaseType databaseType, final boolean showSQL) { + this.sql = sql; + isMerged = false; + hasMoreResultValueFlag = true; + this.databaseType = databaseType; + this.showSQL = showSQL; + } + + @Override + public CommandResponsePackets execute() { + try { + SQLRouteResult sqlRouteResult = RuleRegistry.getInstance().isOnlyMasterSlave() ? doMasterSlaveRoute() : doSqlShardingRoute(); + return doExecuteInternal(sqlRouteResult); + } catch (final Exception ex) { + return new CommandResponsePackets(new ErrPacket(1, 0, "", "", "" + ex.getMessage())); + } + } + + private CommandResponsePackets doExecuteInternal(final SQLRouteResult routeResult) throws SQLException { + if (routeResult.getExecutionUnits().isEmpty()) { + return new CommandResponsePackets(new OKPacket(1, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); + } + if (SQLType.DDL.equals(routeResult.getSqlStatement().getType()) && RuleRegistry.isXaTransaction()) { + throw new SQLException("DDL command can't not execute in xa transaction mode."); + } + ExecutorService executorService = RuleRegistry.getInstance().getExecutorService(); + List> futureList = new ArrayList<>(1024); + for (SQLExecutionUnit each : routeResult.getExecutionUnits()) { + Statement statement = prepareResource(each.getDataSource(), each.getSqlUnit().getSql(), routeResult.getSqlStatement()); + futureList.add(executorService.submit(newSubmitTask(statement, routeResult.getSqlStatement(), each.getSqlUnit().getSql()))); + } + List packets = buildCommandResponsePackets(futureList); + CommandResponsePackets result = merge(routeResult.getSqlStatement(), packets); + if (!RuleRegistry.getInstance().isOnlyMasterSlave()) { + ProxyShardingRefreshHandler.build(routeResult).execute(); + } + return result; + } + + private SQLRouteResult doMasterSlaveRoute() { + MasterSlaveRouter masterSlaveRouter = new MasterSlaveRouter(RuleRegistry.getInstance().getMasterSlaveRule()); + SQLStatement sqlStatement = new SQLJudgeEngine(sql).judge(); + SQLRouteResult result = new SQLRouteResult(sqlStatement, null); + String dataSourceName = masterSlaveRouter.route(sqlStatement.getType()).iterator().next(); + SQLUnit sqlUnit = new SQLUnit(sql, Collections.>emptyList()); + result.getExecutionUnits().add(new SQLExecutionUnit(dataSourceName, sqlUnit)); + return result; + } + + protected abstract SQLRouteResult doSqlShardingRoute(); + + protected abstract Statement prepareResource(String dataSourceName, String unitSql, SQLStatement sqlStatement) throws SQLException; + + protected abstract Callable newSubmitTask(Statement statement, SQLStatement sqlStatement, String unitSql); + + private List buildCommandResponsePackets(final List> futureList) { + List result = new ArrayList<>(); + for (Future each : futureList) { + try { + result.add(each.get()); + + } catch (final InterruptedException | ExecutionException ex) { + throw new ShardingException(ex.getMessage(), ex); + } + } + return result; + } + + private CommandResponsePackets merge(final SQLStatement sqlStatement, final List packets) { + CommandResponsePackets headPackets = new CommandResponsePackets(); + for (CommandResponsePackets each : packets) { + headPackets.addPacket(each.getHeadPacket()); + } + for (DatabaseProtocolPacket each : headPackets.getDatabaseProtocolPackets()) { + if (each instanceof ErrPacket) { + return new CommandResponsePackets(each); + } + } + if (SQLType.DML == sqlStatement.getType()) { + return mergeDML(headPackets); + } + if (SQLType.DQL == sqlStatement.getType() || SQLType.DAL == sqlStatement.getType()) { + return mergeDQLorDAL(sqlStatement, packets); + } + return packets.get(0); + } + + private CommandResponsePackets mergeDML(final CommandResponsePackets firstPackets) { + int affectedRows = 0; + long lastInsertId = 0; + for (DatabaseProtocolPacket each : firstPackets.getDatabaseProtocolPackets()) { + if (each instanceof OKPacket) { + OKPacket okPacket = (OKPacket) each; + affectedRows += okPacket.getAffectedRows(); + lastInsertId = okPacket.getLastInsertId(); + } + } + return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); + } + + private CommandResponsePackets mergeDQLorDAL(final SQLStatement sqlStatement, final List packets) { + List queryResults = new ArrayList<>(packets.size()); + for (int i = 0; i < packets.size(); i++) { + // TODO replace to a common PacketQueryResult + queryResults.add(newQueryResult(packets.get(i), jdbcResource.getResultSets().get(i))); + } + try { + mergedResult = MergeEngineFactory.newInstance(RuleRegistry.getInstance().getShardingRule(), queryResults, sqlStatement).merge(); + isMerged = true; + } catch (final SQLException ex) { + return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); + } + return buildPackets(packets); + } + + protected abstract QueryResult newQueryResult(CommandResponsePackets packet, ResultSet resultSet); + + private CommandResponsePackets buildPackets(final List packets) { + CommandResponsePackets result = new CommandResponsePackets(); + Iterator databaseProtocolPacketsSampling = packets.iterator().next().getDatabaseProtocolPackets().iterator(); + FieldCountPacket fieldCountPacketSampling = (FieldCountPacket) databaseProtocolPacketsSampling.next(); + result.addPacket(fieldCountPacketSampling); + ++currentSequenceId; + for (int i = 0; i < columnCount; i++) { + result.addPacket(databaseProtocolPacketsSampling.next()); + ++currentSequenceId; + } + result.addPacket(databaseProtocolPacketsSampling.next()); + ++currentSequenceId; + return result; + } + + /** + * Has more Result value. + * + * @return has more result value + * @throws SQLException sql exception + */ + public boolean hasMoreResultValue() throws SQLException { + if (!isMerged || !hasMoreResultValueFlag) { + jdbcResource.clear(); + return false; + } + if (!mergedResult.next()) { + hasMoreResultValueFlag = false; + jdbcResource.clear(); + } + return true; + } + + /** + * Get result value. + * + * @return database protocol packet + */ + public DatabaseProtocolPacket getResultValue() { + if (!hasMoreResultValueFlag) { + return new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue()); + } + try { + List data = new ArrayList<>(columnCount); + for (int i = 1; i <= columnCount; i++) { + data.add(mergedResult.getValue(i, Object.class)); + } + return newDatabaseProtocolPacket(++currentSequenceId, data); + } catch (final SQLException ex) { + return new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage()); + } + } + + protected abstract DatabaseProtocolPacket newDatabaseProtocolPacket(int sequenceId, List data); +} diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteWorker.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteWorker.java new file mode 100644 index 0000000000000..bb18cfc9d383d --- /dev/null +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/ExecuteWorker.java @@ -0,0 +1,155 @@ +/* + * Copyright 2016-2018 shardingsphere.io. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *

+ */ + +package io.shardingsphere.proxy.backend.common; + +import io.shardingsphere.core.parsing.parser.sql.SQLStatement; +import io.shardingsphere.core.routing.router.masterslave.MasterVisitedManager; +import io.shardingsphere.proxy.config.RuleRegistry; +import io.shardingsphere.proxy.transport.mysql.constant.ColumnType; +import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; +import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; +import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.ColumnDefinition41Packet; +import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; +import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.TextResultSetRowPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; +import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Callable; + +/** + * Abstract ExecuteWorker class, include SQL and PreparedStatement implement. + * + * @author zhaojun + */ +@AllArgsConstructor +@Getter +public abstract class ExecuteWorker implements Callable { + + private final ExecuteBackendHandler executeBackendHandler; + + private final SQLStatement sqlStatement; + + @Override + public CommandResponsePackets call() { + try { + return execute(); + } catch (SQLException ex) { + return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); + } finally { + MasterVisitedManager.clear(); + } + } + + private CommandResponsePackets execute() throws SQLException { + switch (sqlStatement.getType()) { + case DQL: + case DAL: + return executeQuery(); + case DML: + case DDL: + return executeUpdate(); + default: + return executeCommon(); + } + } + + private CommandResponsePackets executeQuery() throws SQLException { + if (ProxyMode.MEMORY_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { + return executeQueryWithStreamResultSet(); + } else if (ProxyMode.CONNECTION_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { + return executeQueryWithNonStreamResultSet(); + } else { + return new CommandResponsePackets(new ErrPacket(1, 0, "", "", "Invalid proxy.mode")); + } + } + + protected abstract CommandResponsePackets executeQueryWithStreamResultSet() throws SQLException; + + protected abstract CommandResponsePackets executeQueryWithNonStreamResultSet() throws SQLException; + + protected abstract CommandResponsePackets executeUpdate() throws SQLException; + + protected abstract CommandResponsePackets executeCommon() throws SQLException; + + protected CommandResponsePackets getQueryDatabaseProtocolPackets() throws SQLException { + CommandResponsePackets result = new CommandResponsePackets(); + int currentSequenceId = 0; + int lastResultSetIndex = executeBackendHandler.getJdbcResource().getResultSets().size() - 1; + ResultSetMetaData resultSetMetaData = executeBackendHandler.getJdbcResource().getResultSets().get(lastResultSetIndex).getMetaData(); + int columnCount = resultSetMetaData.getColumnCount(); + executeBackendHandler.setColumnCount(columnCount); + if (0 == columnCount) { + result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); + return result; + } + result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); + for (int i = 1; i <= columnCount; i++) { + result.addPacket(new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), + resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), + resultSetMetaData.getColumnDisplaySize(i), ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)), 0)); + } + result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); + return result; + } + + protected CommandResponsePackets getCommonDatabaseProtocolPackets(final ResultSet resultSet) throws SQLException { + CommandResponsePackets result = new CommandResponsePackets(); + int currentSequenceId = 0; + ResultSetMetaData resultSetMetaData = resultSet.getMetaData(); + int columnCount = resultSetMetaData.getColumnCount(); + executeBackendHandler.setColumnCount(columnCount); + if (0 == columnCount) { + result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); + return result; + } + result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); + for (int i = 1; i <= columnCount; i++) { + result.addPacket(new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), + resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), + resultSetMetaData.getColumnDisplaySize(i), ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)), 0)); + } + result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); + while (resultSet.next()) { + List data = new ArrayList<>(columnCount); + for (int i = 1; i <= columnCount; i++) { + data.add(resultSet.getObject(i)); + } + result.addPacket(new TextResultSetRowPacket(++currentSequenceId, data)); + } + result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); + return result; + } + + protected long getGeneratedKey(final Statement statement) throws SQLException { + long result = 0; + ResultSet resultSet = statement.getGeneratedKeys(); + if (resultSet.next()) { + result = resultSet.getLong(1); + } + return result; + } +} diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteBackendHandler.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteBackendHandler.java index 546571540b24e..32413ccb62732 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteBackendHandler.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteBackendHandler.java @@ -18,249 +18,70 @@ package io.shardingsphere.proxy.backend.common; import io.shardingsphere.core.constant.DatabaseType; -import io.shardingsphere.core.constant.SQLType; -import io.shardingsphere.core.exception.ShardingException; -import io.shardingsphere.core.merger.MergeEngineFactory; -import io.shardingsphere.core.merger.MergedResult; import io.shardingsphere.core.merger.QueryResult; -import io.shardingsphere.core.parsing.SQLJudgeEngine; import io.shardingsphere.core.parsing.parser.sql.SQLStatement; -import io.shardingsphere.core.routing.SQLExecutionUnit; import io.shardingsphere.core.routing.SQLRouteResult; import io.shardingsphere.core.routing.StatementRoutingEngine; -import io.shardingsphere.core.routing.router.masterslave.MasterSlaveRouter; import io.shardingsphere.proxy.backend.mysql.MySQLPacketQueryResult; import io.shardingsphere.proxy.backend.resource.ProxyJDBCResource; import io.shardingsphere.proxy.backend.resource.ProxyJDBCResourceFactory; import io.shardingsphere.proxy.config.RuleRegistry; -import io.shardingsphere.proxy.metadata.ProxyShardingRefreshHandler; import io.shardingsphere.proxy.transport.common.packet.DatabaseProtocolPacket; -import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.TextResultSetRowPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; -import lombok.Getter; -import lombok.Setter; import javax.sql.DataSource; import java.sql.Connection; +import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.Iterator; import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; +import java.util.concurrent.Callable; /** * SQL execute backend handler. * * @author zhangliang * @author panjuan + * @author zhaojun */ -@Getter -@Setter -public final class SQLExecuteBackendHandler implements BackendHandler { - - private final String sql; - - private MergedResult mergedResult; - - private int currentSequenceId; - - private int columnCount; - - private boolean isMerged; - - private boolean hasMoreResultValueFlag; - - private final DatabaseType databaseType; - - private final boolean showSQL; - - private ProxyJDBCResource proxyJDBCResource; +public final class SQLExecuteBackendHandler extends ExecuteBackendHandler implements BackendHandler { public SQLExecuteBackendHandler(final String sql, final DatabaseType databaseType, final boolean showSQL) { - this.sql = sql; - proxyJDBCResource = ProxyJDBCResourceFactory.newResource(); - isMerged = false; - hasMoreResultValueFlag = true; - this.databaseType = databaseType; - this.showSQL = showSQL; + super(sql, databaseType, showSQL); + super.setJdbcResource(ProxyJDBCResourceFactory.newResource()); } @Override - public CommandResponsePackets execute() { - try { - if (RuleRegistry.getInstance().isOnlyMasterSlave()) { - return executeForMasterSlave(); - } else { - return executeForSharding(); - } - } catch (final Exception ex) { - return new CommandResponsePackets(new ErrPacket(1, 0, "", "", "" + ex.getMessage())); - } - } - - private CommandResponsePackets executeForMasterSlave() throws SQLException { - MasterSlaveRouter masterSlaveRouter = new MasterSlaveRouter(RuleRegistry.getInstance().getMasterSlaveRule()); - SQLStatement sqlStatement = new SQLJudgeEngine(sql).judge(); - if (SQLType.DDL.equals(sqlStatement.getType()) && RuleRegistry.isXaTransaction()) { - throw new SQLException("DDL command can't not execute in xa transaction mode."); - } - String dataSourceName = masterSlaveRouter.route(sqlStatement.getType()).iterator().next(); - List packets = new CopyOnWriteArrayList<>(); - ExecutorService executorService = RuleRegistry.getInstance().getExecutorService(); - List> resultList = new ArrayList<>(1024); - Statement statement = prepareResource(dataSourceName); - resultList.add(executorService.submit(new SQLExecuteWorker(this, sqlStatement, statement, sql))); - getCommandResponsePackets(resultList, packets); - return merge(sqlStatement, packets); - } - - private CommandResponsePackets executeForSharding() throws SQLException { - StatementRoutingEngine routingEngine = new StatementRoutingEngine(RuleRegistry.getInstance().getShardingRule(), RuleRegistry.getInstance().getShardingMetaData(), databaseType, showSQL); - SQLRouteResult routeResult = routingEngine.route(sql); - if (routeResult.getExecutionUnits().isEmpty()) { - return new CommandResponsePackets(new OKPacket(1, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - if (SQLType.DDL.equals(routeResult.getSqlStatement().getType()) && RuleRegistry.isXaTransaction()) { - throw new SQLException("DDL command can't not execute in xa transaction mode."); - } - List packets = new CopyOnWriteArrayList<>(); - ExecutorService executorService = RuleRegistry.getInstance().getExecutorService(); - List> resultList = new ArrayList<>(1024); - for (SQLExecutionUnit each : routeResult.getExecutionUnits()) { - Statement statement = prepareResource(each.getDataSource()); - resultList.add(executorService.submit(new SQLExecuteWorker(this, routeResult.getSqlStatement(), statement, each.getSqlUnit().getSql()))); - } - getCommandResponsePackets(resultList, packets); - CommandResponsePackets result = merge(routeResult.getSqlStatement(), packets); - ProxyShardingRefreshHandler.build(routeResult).execute(); - return result; + protected SQLRouteResult doSqlShardingRoute() { + StatementRoutingEngine routingEngine = new StatementRoutingEngine(RuleRegistry.getInstance().getShardingRule(), + RuleRegistry.getInstance().getShardingMetaData(), getDatabaseType(), isShowSQL()); + return routingEngine.route(getSql()); } - private Statement prepareResource(final String dataSourceName) throws SQLException { + @Override + protected Statement prepareResource(final String dataSourceName, final String unitSql, final SQLStatement sqlStatement) throws SQLException { DataSource dataSource = RuleRegistry.getInstance().getDataSourceMap().get(dataSourceName); Connection connection = dataSource.getConnection(); Statement statement = connection.createStatement(); + ProxyJDBCResource proxyJDBCResource = (ProxyJDBCResource) getJdbcResource(); proxyJDBCResource.addConnection(connection); proxyJDBCResource.addStatement(statement); return statement; } - private void getCommandResponsePackets(final List> resultList, final List packets) { - for (Future each : resultList) { - try { - packets.add(each.get()); - } catch (final InterruptedException | ExecutionException ex) { - throw new ShardingException(ex.getMessage(), ex); - } - } - } - - private CommandResponsePackets merge(final SQLStatement sqlStatement, final List packets) { - CommandResponsePackets headPackets = new CommandResponsePackets(); - for (CommandResponsePackets each : packets) { - headPackets.addPacket(each.getHeadPacket()); - } - for (DatabaseProtocolPacket each : headPackets.getDatabaseProtocolPackets()) { - if (each instanceof ErrPacket) { - return new CommandResponsePackets(each); - } - } - if (SQLType.DML == sqlStatement.getType()) { - return mergeDML(headPackets); - } - if (SQLType.DQL == sqlStatement.getType() || SQLType.DAL == sqlStatement.getType()) { - return mergeDQLorDAL(sqlStatement, packets); - } - return packets.get(0); - } - - private CommandResponsePackets mergeDML(final CommandResponsePackets firstPackets) { - int affectedRows = 0; - long lastInsertId = 0; - for (DatabaseProtocolPacket each : firstPackets.getDatabaseProtocolPackets()) { - if (each instanceof OKPacket) { - OKPacket okPacket = (OKPacket) each; - affectedRows += okPacket.getAffectedRows(); - lastInsertId = okPacket.getLastInsertId(); - } - } - return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - - private CommandResponsePackets mergeDQLorDAL(final SQLStatement sqlStatement, final List packets) { - List queryResults = new ArrayList<>(packets.size()); - for (int i = 0; i < packets.size(); i++) { - // TODO replace to a common PacketQueryResult - queryResults.add(new MySQLPacketQueryResult(packets.get(i), proxyJDBCResource.getResultSets().get(i))); - } - try { - mergedResult = MergeEngineFactory.newInstance(RuleRegistry.getInstance().getShardingRule(), queryResults, sqlStatement).merge(); - isMerged = true; - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } - return buildPackets(packets); - } - - private CommandResponsePackets buildPackets(final List packets) { - CommandResponsePackets result = new CommandResponsePackets(); - Iterator databaseProtocolPacketsSampling = packets.iterator().next().getDatabaseProtocolPackets().iterator(); - FieldCountPacket fieldCountPacketSampling = (FieldCountPacket) databaseProtocolPacketsSampling.next(); - result.addPacket(fieldCountPacketSampling); - ++currentSequenceId; - for (int i = 0; i < columnCount; i++) { - result.addPacket(databaseProtocolPacketsSampling.next()); - ++currentSequenceId; - } - result.addPacket(databaseProtocolPacketsSampling.next()); - ++currentSequenceId; - return result; + @Override + protected Callable newSubmitTask(final Statement statement, final SQLStatement sqlStatement, final String unitSql) { + return new SQLExecuteWorker(this, sqlStatement, statement, unitSql); } - /** - * Has more Result value. - * - * @return has more result value - * @throws SQLException sql exception - */ - public boolean hasMoreResultValue() throws SQLException { - if (!isMerged || !hasMoreResultValueFlag) { - proxyJDBCResource.clear(); - return false; - } - if (!mergedResult.next()) { - hasMoreResultValueFlag = false; - proxyJDBCResource.clear(); - } - return true; + @Override + protected QueryResult newQueryResult(final CommandResponsePackets packet, final ResultSet resultSet) { + return new MySQLPacketQueryResult(packet, resultSet); } - /** - * Get result value. - * - * @return database protocol packet - */ - public DatabaseProtocolPacket getResultValue() { - if (!hasMoreResultValueFlag) { - return new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue()); - } - try { - List data = new ArrayList<>(columnCount); - for (int i = 1; i <= columnCount; i++) { - data.add(mergedResult.getValue(i, Object.class)); - } - return new TextResultSetRowPacket(++currentSequenceId, data); - } catch (final SQLException ex) { - return new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage()); - } + @Override + protected DatabaseProtocolPacket newDatabaseProtocolPacket(final int sequenceId, final List data) { + return new TextResultSetRowPacket(sequenceId, data); } } diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteWorker.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteWorker.java index 58953d270f251..0480db0bda332 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteWorker.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/SQLExecuteWorker.java @@ -20,185 +20,75 @@ import com.sun.rowset.CachedRowSetImpl; import io.shardingsphere.core.parsing.parser.sql.SQLStatement; import io.shardingsphere.core.parsing.parser.sql.dml.insert.InsertStatement; -import io.shardingsphere.core.routing.router.masterslave.MasterVisitedManager; -import io.shardingsphere.proxy.config.RuleRegistry; -import io.shardingsphere.proxy.transport.mysql.constant.ColumnType; import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.ColumnDefinition41Packet; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.TextResultSetRowPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; -import lombok.AllArgsConstructor; import javax.sql.rowset.CachedRowSet; import java.sql.ResultSet; -import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; import java.util.concurrent.Callable; /** * SQL execute worker. * * @author zhangyonglun + * @author zhaojun */ -@AllArgsConstructor -public final class SQLExecuteWorker implements Callable { +public final class SQLExecuteWorker extends ExecuteWorker implements Callable { private static final Integer FETCH_ONE_ROW_A_TIME = Integer.MIN_VALUE; - private final SQLExecuteBackendHandler sqlExecuteBackendHandler; - - private final SQLStatement sqlStatement; - private final Statement statement; private final String sql; - @Override - public CommandResponsePackets call() { - return execute(); - } - - private CommandResponsePackets execute() { - switch (sqlStatement.getType()) { - case DQL: - case DAL: - return executeQuery(); - case DML: - case DDL: - return executeUpdate(); - default: - return executeCommon(); - } + public SQLExecuteWorker(final SQLExecuteBackendHandler sqlExecuteBackendHandler, final SQLStatement sqlStatement, final Statement statement, final String sql) { + super(sqlExecuteBackendHandler, sqlStatement); + this.statement = statement; + this.sql = sql; } - private CommandResponsePackets executeQuery() { - if (ProxyMode.MEMORY_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { - return executeQueryWithStreamResultSet(); - } else if (ProxyMode.CONNECTION_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { - return executeQueryWithNonStreamResultSet(); - } else { - return new CommandResponsePackets(new ErrPacket(1, 0, "", "", "Invalid proxy.mode")); - } - } - - private CommandResponsePackets executeQueryWithStreamResultSet() { - try { - statement.setFetchSize(FETCH_ONE_ROW_A_TIME); - sqlExecuteBackendHandler.getProxyJDBCResource().addResultSet(statement.executeQuery(sql)); - return getQueryDatabaseProtocolPackets(); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } + @Override + protected CommandResponsePackets executeQueryWithStreamResultSet() throws SQLException { + statement.setFetchSize(FETCH_ONE_ROW_A_TIME); + getExecuteBackendHandler().getJdbcResource().addResultSet(statement.executeQuery(sql)); + return getQueryDatabaseProtocolPackets(); } - private CommandResponsePackets executeQueryWithNonStreamResultSet() { + @Override + protected CommandResponsePackets executeQueryWithNonStreamResultSet() throws SQLException { try ( ResultSet resultSet = statement.executeQuery(sql) ) { CachedRowSet cachedRowSet = new CachedRowSetImpl(); cachedRowSet.populate(resultSet); - sqlExecuteBackendHandler.getProxyJDBCResource().addResultSet(cachedRowSet); + getExecuteBackendHandler().getJdbcResource().addResultSet(cachedRowSet); return getQueryDatabaseProtocolPackets(); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } - } - - private CommandResponsePackets executeUpdate() { - try { - int affectedRows; - long lastInsertId = 0; - if (sqlStatement instanceof InsertStatement) { - affectedRows = statement.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS); - lastInsertId = getGeneratedKey(statement); - } else { - affectedRows = statement.executeUpdate(sql); - } - return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } finally { - MasterVisitedManager.clear(); - } - } - - private CommandResponsePackets executeCommon() { - try { - boolean hasResultSet = statement.execute(sql); - if (hasResultSet) { - return getCommonDatabaseProtocolPackets(statement.getResultSet()); - } else { - return new CommandResponsePackets(new OKPacket(1, statement.getUpdateCount(), 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } finally { - MasterVisitedManager.clear(); } } - private CommandResponsePackets getQueryDatabaseProtocolPackets() throws SQLException { - CommandResponsePackets result = new CommandResponsePackets(); - int currentSequenceId = 0; - int lastResultSetIndex = sqlExecuteBackendHandler.getProxyJDBCResource().getResultSets().size() - 1; - ResultSetMetaData resultSetMetaData = sqlExecuteBackendHandler.getProxyJDBCResource().getResultSets().get(lastResultSetIndex).getMetaData(); - int columnCount = resultSetMetaData.getColumnCount(); - sqlExecuteBackendHandler.setColumnCount(columnCount); - if (0 == columnCount) { - result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - return result; - } - result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); - for (int i = 1; i <= columnCount; i++) { - result.addPacket(new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), - resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), - resultSetMetaData.getColumnDisplaySize(i), ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)), 0)); - } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - return result; - } - - private CommandResponsePackets getCommonDatabaseProtocolPackets(final ResultSet resultSet) throws SQLException { - CommandResponsePackets result = new CommandResponsePackets(); - int currentSequenceId = 0; - ResultSetMetaData resultSetMetaData = resultSet.getMetaData(); - int columnCount = resultSetMetaData.getColumnCount(); - sqlExecuteBackendHandler.setColumnCount(columnCount); - if (0 == columnCount) { - result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - return result; - } - result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); - for (int i = 1; i <= columnCount; i++) { - result.addPacket(new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), - resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), - resultSetMetaData.getColumnDisplaySize(i), ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)), 0)); - } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - while (resultSet.next()) { - List data = new ArrayList<>(columnCount); - for (int i = 1; i <= columnCount; i++) { - data.add(resultSet.getObject(i)); - } - result.addPacket(new TextResultSetRowPacket(++currentSequenceId, data)); + @Override + protected CommandResponsePackets executeUpdate() throws SQLException { + int affectedRows; + long lastInsertId = 0; + if (getSqlStatement() instanceof InsertStatement) { + affectedRows = statement.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS); + lastInsertId = getGeneratedKey(statement); + } else { + affectedRows = statement.executeUpdate(sql); } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - return result; + return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); } - private long getGeneratedKey(final Statement statement) throws SQLException { - long result = 0; - ResultSet resultSet = statement.getGeneratedKeys(); - if (resultSet.next()) { - result = resultSet.getLong(1); + @Override + protected CommandResponsePackets executeCommon() throws SQLException { + boolean hasResultSet = statement.execute(sql); + if (hasResultSet) { + return getCommonDatabaseProtocolPackets(statement.getResultSet()); + } else { + return new CommandResponsePackets(new OKPacket(1, statement.getUpdateCount(), 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); } - return result; } } diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteBackendHandler.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteBackendHandler.java index 5068d66927f53..e9181fd9142de 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteBackendHandler.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteBackendHandler.java @@ -18,270 +18,99 @@ package io.shardingsphere.proxy.backend.common; import io.shardingsphere.core.constant.DatabaseType; -import io.shardingsphere.core.constant.SQLType; -import io.shardingsphere.core.exception.ShardingException; -import io.shardingsphere.core.merger.MergeEngineFactory; -import io.shardingsphere.core.merger.MergedResult; import io.shardingsphere.core.merger.QueryResult; -import io.shardingsphere.core.parsing.SQLJudgeEngine; import io.shardingsphere.core.parsing.parser.sql.SQLStatement; import io.shardingsphere.core.parsing.parser.sql.dml.insert.InsertStatement; import io.shardingsphere.core.routing.PreparedStatementRoutingEngine; -import io.shardingsphere.core.routing.SQLExecutionUnit; import io.shardingsphere.core.routing.SQLRouteResult; -import io.shardingsphere.core.routing.router.masterslave.MasterSlaveRouter; import io.shardingsphere.proxy.backend.mysql.MySQLPacketStatementExecuteQueryResult; import io.shardingsphere.proxy.backend.resource.ProxyJDBCResourceFactory; import io.shardingsphere.proxy.backend.resource.ProxyPrepareJDBCResource; import io.shardingsphere.proxy.config.RuleRegistry; -import io.shardingsphere.proxy.metadata.ProxyShardingRefreshHandler; import io.shardingsphere.proxy.transport.common.packet.DatabaseProtocolPacket; import io.shardingsphere.proxy.transport.mysql.constant.ColumnType; -import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; import io.shardingsphere.proxy.transport.mysql.packet.command.statement.PreparedStatementRegistry; import io.shardingsphere.proxy.transport.mysql.packet.command.statement.execute.BinaryResultSetRowPacket; import io.shardingsphere.proxy.transport.mysql.packet.command.statement.execute.PreparedStatementParameter; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; import lombok.Getter; -import lombok.Setter; import javax.sql.DataSource; import java.sql.Connection; import java.sql.PreparedStatement; +import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; +import java.util.concurrent.Callable; import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; /** * Statement execute backend handler. * * @author zhangyonglun + * @author zhaojun */ -@Getter -@Setter -public final class StatementExecuteBackendHandler implements BackendHandler { - - private static final Integer FETCH_ONE_ROW_A_TIME = Integer.MIN_VALUE; +public final class StatementExecuteBackendHandler extends ExecuteBackendHandler implements BackendHandler { private final List preparedStatementParameters; - private MergedResult mergedResult; - - private int currentSequenceId; - - private int columnCount; - + @Getter private final List columnTypes; - private boolean isMerged; - - private boolean hasMoreResultValueFlag; - - private final DatabaseType databaseType; - - private final boolean showSQL; - - private final String sql; - - private final ProxyPrepareJDBCResource proxyPrepareJDBCResource; - - public StatementExecuteBackendHandler(final List preparedStatementParameters, final int statementId, final DatabaseType databaseType, final boolean showSQL) { + public StatementExecuteBackendHandler(final List preparedStatementParameters, final int statementId, + final DatabaseType databaseType, final boolean showSQL) { + super(PreparedStatementRegistry.getInstance().getSQL(statementId), databaseType, showSQL); + super.setJdbcResource(ProxyJDBCResourceFactory.newPrepareResource()); this.preparedStatementParameters = preparedStatementParameters; columnTypes = new CopyOnWriteArrayList<>(); - isMerged = false; - hasMoreResultValueFlag = true; - this.databaseType = databaseType; - this.showSQL = showSQL; - sql = PreparedStatementRegistry.getInstance().getSQL(statementId); - proxyPrepareJDBCResource = ProxyJDBCResourceFactory.newPrepareResource(); } @Override - public CommandResponsePackets execute() { - try { - if (RuleRegistry.getInstance().isOnlyMasterSlave()) { - return executeForMasterSlave(); - } else { - return executeForSharding(); - } - } catch (final Exception ex) { - return new CommandResponsePackets(new ErrPacket(1, 0, "", "", ex.getMessage())); - } + protected SQLRouteResult doSqlShardingRoute() { + PreparedStatementRoutingEngine routingEngine = new PreparedStatementRoutingEngine(getSql(), + RuleRegistry.getInstance().getShardingRule(), RuleRegistry.getInstance().getShardingMetaData(), getDatabaseType(), isShowSQL()); + return routingEngine.route(getComStmtExecuteParameters()); } - private CommandResponsePackets executeForMasterSlave() throws SQLException { - MasterSlaveRouter masterSlaveRouter = new MasterSlaveRouter(RuleRegistry.getInstance().getMasterSlaveRule()); - SQLStatement sqlStatement = new SQLJudgeEngine(sql).judge(); - if (SQLType.DDL.equals(sqlStatement.getType()) && RuleRegistry.isXaTransaction()) { - throw new SQLException("DDL command can't not execute in xa transaction mode."); + /** + * Get PreparedStatement Parameter values. + * + * @return parameter value list + */ + public List getComStmtExecuteParameters() { + List result = new ArrayList<>(32); + for (PreparedStatementParameter each : preparedStatementParameters) { + result.add(each.getValue()); } - String dataSourceName = masterSlaveRouter.route(sqlStatement.getType()).iterator().next(); - List packets = new CopyOnWriteArrayList<>(); - ExecutorService executorService = RuleRegistry.getInstance().getExecutorService(); - List> resultList = new ArrayList<>(1024); - PreparedStatement preparedStatement = prepareResource(dataSourceName, sql, sqlStatement); - resultList.add(executorService.submit(new StatementExecuteWorker(this, sqlStatement, preparedStatement))); - getCommandResponsePackets(resultList, packets); - return merge(sqlStatement, packets); + return result; } - private CommandResponsePackets executeForSharding() throws SQLException { - PreparedStatementRoutingEngine routingEngine = new PreparedStatementRoutingEngine(sql, - RuleRegistry.getInstance().getShardingRule(), RuleRegistry.getInstance().getShardingMetaData(), databaseType, showSQL); - // TODO support null value parameter - SQLRouteResult routeResult = routingEngine.route(getComStmtExecuteParameters()); - if (routeResult.getExecutionUnits().isEmpty()) { - return new CommandResponsePackets(new OKPacket(1, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - if (SQLType.DDL.equals(routeResult.getSqlStatement().getType()) && RuleRegistry.isXaTransaction()) { - throw new SQLException("DDL command can't not execute in xa transaction mode."); - } - List packets = new CopyOnWriteArrayList<>(); - ExecutorService executorService = RuleRegistry.getInstance().getExecutorService(); - List> resultList = new ArrayList<>(1024); - for (SQLExecutionUnit each : routeResult.getExecutionUnits()) { - PreparedStatement preparedStatement = prepareResource(each.getDataSource(), each.getSqlUnit().getSql(), routeResult.getSqlStatement()); - resultList.add(executorService.submit(new StatementExecuteWorker(this, routeResult.getSqlStatement(), preparedStatement))); - } - getCommandResponsePackets(resultList, packets); - CommandResponsePackets result = merge(routeResult.getSqlStatement(), packets); - ProxyShardingRefreshHandler.build(routeResult).execute(); - return result; + @Override + protected Callable newSubmitTask(final Statement statement, final SQLStatement sqlStatement, final String unitSql) { + return new StatementExecuteWorker(this, sqlStatement, (PreparedStatement) statement); } - private PreparedStatement prepareResource(final String dataSourceName, final String unitSql, final SQLStatement sqlStatement) throws SQLException { + @Override + protected PreparedStatement prepareResource(final String dataSourceName, final String unitSql, final SQLStatement sqlStatement) throws SQLException { DataSource dataSource = RuleRegistry.getInstance().getDataSourceMap().get(dataSourceName); Connection connection = dataSource.getConnection(); PreparedStatement statement = sqlStatement instanceof InsertStatement ? connection.prepareStatement(unitSql, Statement.RETURN_GENERATED_KEYS) : connection.prepareStatement(unitSql); - proxyPrepareJDBCResource.addConnection(connection); - proxyPrepareJDBCResource.addPrepareStatemnt(statement); + ProxyPrepareJDBCResource prepareProxyJDBCResource = (ProxyPrepareJDBCResource) getJdbcResource(); + prepareProxyJDBCResource.addConnection(connection); + prepareProxyJDBCResource.addPrepareStatemnt(statement); return statement; } - private void getCommandResponsePackets(final List> resultList, final List packets) { - for (Future each : resultList) { - try { - packets.add(each.get()); - } catch (final InterruptedException | ExecutionException ex) { - throw new ShardingException(ex.getMessage(), ex); - } - } - } - - List getComStmtExecuteParameters() { - List result = new ArrayList<>(32); - for (PreparedStatementParameter each : preparedStatementParameters) { - result.add(each.getValue()); - } - return result; - } - - private CommandResponsePackets merge(final SQLStatement sqlStatement, final List packets) { - CommandResponsePackets headPackets = new CommandResponsePackets(); - for (CommandResponsePackets each : packets) { - headPackets.addPacket(each.getHeadPacket()); - } - for (DatabaseProtocolPacket each : headPackets.getDatabaseProtocolPackets()) { - if (each instanceof ErrPacket) { - return new CommandResponsePackets(each); - } - } - if (SQLType.DML == sqlStatement.getType()) { - return mergeDML(headPackets); - } - if (SQLType.DQL == sqlStatement.getType() || SQLType.DAL == sqlStatement.getType()) { - return mergeDQLorDAL(sqlStatement, packets); - } - return packets.get(0); - } - - private CommandResponsePackets mergeDML(final CommandResponsePackets firstPackets) { - int affectedRows = 0; - for (DatabaseProtocolPacket each : firstPackets.getDatabaseProtocolPackets()) { - if (each instanceof OKPacket) { - OKPacket okPacket = (OKPacket) each; - affectedRows += okPacket.getAffectedRows(); - } - } - return new CommandResponsePackets(new OKPacket(1, affectedRows, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - - private CommandResponsePackets mergeDQLorDAL(final SQLStatement sqlStatement, final List packets) { - List queryResults = new ArrayList<>(packets.size()); - for (int i = 0; i < packets.size(); i++) { - // TODO replace to a common PacketQueryResult - queryResults.add(new MySQLPacketStatementExecuteQueryResult(packets.get(i), proxyPrepareJDBCResource.getResultSets().get(i), columnTypes)); - } - try { - mergedResult = MergeEngineFactory.newInstance(RuleRegistry.getInstance().getShardingRule(), queryResults, sqlStatement).merge(); - isMerged = true; - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } - return buildPackets(packets); - } - - private CommandResponsePackets buildPackets(final List packets) { - CommandResponsePackets result = new CommandResponsePackets(); - Iterator databaseProtocolPacketsSampling = packets.iterator().next().getDatabaseProtocolPackets().iterator(); - FieldCountPacket fieldCountPacketSampling = (FieldCountPacket) databaseProtocolPacketsSampling.next(); - result.addPacket(fieldCountPacketSampling); - ++currentSequenceId; - for (int i = 0; i < columnCount; i++) { - result.addPacket(databaseProtocolPacketsSampling.next()); - ++currentSequenceId; - } - result.addPacket(databaseProtocolPacketsSampling.next()); - ++currentSequenceId; - return result; - } - - /** - * Has more Result value. - * - * @return has more result value - * @throws SQLException sql exception - */ - public boolean hasMoreResultValue() throws SQLException { - if (!isMerged || !hasMoreResultValueFlag) { - proxyPrepareJDBCResource.clear(); - return false; - } - if (!mergedResult.next()) { - hasMoreResultValueFlag = false; - proxyPrepareJDBCResource.clear(); - } - return true; + @Override + protected QueryResult newQueryResult(final CommandResponsePackets packet, final ResultSet resultSet) { + return new MySQLPacketStatementExecuteQueryResult(packet, resultSet, columnTypes); } - /** - * Get result value. - * - * @return database protocol packet - */ - public DatabaseProtocolPacket getResultValue() { - if (!hasMoreResultValueFlag) { - return new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue()); - } - try { - List data = new ArrayList<>(columnCount); - for (int i = 1; i <= columnCount; i++) { - data.add(mergedResult.getValue(i, Object.class)); - } - return new BinaryResultSetRowPacket(++currentSequenceId, columnCount, data, columnTypes); - } catch (final SQLException ex) { - return new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage()); - } + @Override + protected DatabaseProtocolPacket newDatabaseProtocolPacket(final int sequenceId, final List data) { + return new BinaryResultSetRowPacket(sequenceId, getColumnCount(), data, columnTypes); } } diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteWorker.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteWorker.java index 46231c1dac8c9..92d786599d86a 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteWorker.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/backend/common/StatementExecuteWorker.java @@ -20,203 +20,81 @@ import com.sun.rowset.CachedRowSetImpl; import io.shardingsphere.core.parsing.parser.sql.SQLStatement; import io.shardingsphere.core.parsing.parser.sql.dml.insert.InsertStatement; -import io.shardingsphere.core.routing.router.masterslave.MasterVisitedManager; -import io.shardingsphere.proxy.config.RuleRegistry; -import io.shardingsphere.proxy.transport.mysql.constant.ColumnType; import io.shardingsphere.proxy.transport.mysql.constant.StatusFlag; import io.shardingsphere.proxy.transport.mysql.packet.command.CommandResponsePackets; -import io.shardingsphere.proxy.transport.mysql.packet.command.statement.execute.BinaryResultSetRowPacket; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.ColumnDefinition41Packet; -import io.shardingsphere.proxy.transport.mysql.packet.command.text.query.FieldCountPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.EofPacket; -import io.shardingsphere.proxy.transport.mysql.packet.generic.ErrPacket; import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; -import lombok.AllArgsConstructor; import javax.sql.rowset.CachedRowSet; import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.ResultSetMetaData; import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; import java.util.concurrent.Callable; /** * Statement execute worker. * * @author zhangyonglun + * @author zhaojun */ -@AllArgsConstructor -public final class StatementExecuteWorker implements Callable { +public final class StatementExecuteWorker extends ExecuteWorker implements Callable { private static final Integer FETCH_ONE_ROW_A_TIME = Integer.MIN_VALUE; - private final StatementExecuteBackendHandler statementExecuteBackendHandler; + private final PreparedStatement preparedStatement; - private final SQLStatement sqlStatement; + public StatementExecuteWorker(final StatementExecuteBackendHandler statementExecuteBackendHandler, final SQLStatement sqlStatement, final PreparedStatement preparedStatement) { + super(statementExecuteBackendHandler, sqlStatement); + this.preparedStatement = preparedStatement; + } - private final PreparedStatement preparedStatement; + @Override + protected CommandResponsePackets executeQueryWithStreamResultSet() throws SQLException { + preparedStatement.setFetchSize(FETCH_ONE_ROW_A_TIME); + setJDBCPreparedStatementParameters(preparedStatement); + getExecuteBackendHandler().getJdbcResource().getResultSets().add(preparedStatement.executeQuery()); + return getQueryDatabaseProtocolPackets(); + } @Override - public CommandResponsePackets call() { - return execute(sqlStatement); + protected CommandResponsePackets executeQueryWithNonStreamResultSet() throws SQLException { + setJDBCPreparedStatementParameters(preparedStatement); + ResultSet resultSet = preparedStatement.executeQuery(); + CachedRowSet cachedRowSet = new CachedRowSetImpl(); + cachedRowSet.populate(resultSet); + getExecuteBackendHandler().getJdbcResource().getResultSets().add(cachedRowSet); + return getQueryDatabaseProtocolPackets(); } - private CommandResponsePackets execute(final SQLStatement sqlStatement) { - switch (sqlStatement.getType()) { - case DQL: - case DAL: - return executeQuery(); - case DML: - case DDL: - return executeUpdate(); - default: - return executeCommon(); + @Override + protected CommandResponsePackets executeUpdate() throws SQLException { + PreparedStatement preparedStatement = null; + int affectedRows; + long lastInsertId = 0; + setJDBCPreparedStatementParameters(preparedStatement); + if (getSqlStatement() instanceof InsertStatement) { + affectedRows = preparedStatement.executeUpdate(); + lastInsertId = getGeneratedKey(preparedStatement); + } else { + affectedRows = preparedStatement.executeUpdate(); } + return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); } - private CommandResponsePackets executeQuery() { - if (ProxyMode.MEMORY_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { - return executeQueryWithStreamResultSet(); - } else if (ProxyMode.CONNECTION_STRICTLY == ProxyMode.valueOf(RuleRegistry.getInstance().getProxyMode())) { - return executeQueryWithNonStreamResultSet(); + @Override + protected CommandResponsePackets executeCommon() throws SQLException { + setJDBCPreparedStatementParameters(preparedStatement); + boolean hasResultSet = preparedStatement.execute(); + if (hasResultSet) { + return getCommonDatabaseProtocolPackets(preparedStatement.getResultSet()); } else { - return new CommandResponsePackets(new ErrPacket(1, 0, "", "", "Invalid proxy.mode")); + return new CommandResponsePackets(new OKPacket(1, preparedStatement.getUpdateCount(), 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); } } private void setJDBCPreparedStatementParameters(final PreparedStatement preparedStatement) throws SQLException { + StatementExecuteBackendHandler statementExecuteBackendHandler = (StatementExecuteBackendHandler) getExecuteBackendHandler(); for (int i = 0; i < statementExecuteBackendHandler.getComStmtExecuteParameters().size(); i++) { preparedStatement.setObject(i + 1, statementExecuteBackendHandler.getComStmtExecuteParameters().get(i)); } } - - private CommandResponsePackets executeQueryWithStreamResultSet() { - try { - preparedStatement.setFetchSize(FETCH_ONE_ROW_A_TIME); - setJDBCPreparedStatementParameters(preparedStatement); - statementExecuteBackendHandler.getProxyPrepareJDBCResource().getResultSets().add(preparedStatement.executeQuery()); - return getQueryDatabaseProtocolPackets(); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } - } - - private CommandResponsePackets executeQueryWithNonStreamResultSet() { - try { - setJDBCPreparedStatementParameters(preparedStatement); - ResultSet resultSet = preparedStatement.executeQuery(); - CachedRowSet cachedRowSet = new CachedRowSetImpl(); - cachedRowSet.populate(resultSet); - statementExecuteBackendHandler.getProxyPrepareJDBCResource().getResultSets().add(cachedRowSet); - return getQueryDatabaseProtocolPackets(); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } - } - - private CommandResponsePackets executeUpdate() { - PreparedStatement preparedStatement = null; - try { - int affectedRows; - long lastInsertId = 0; - if (sqlStatement instanceof InsertStatement) { - setJDBCPreparedStatementParameters(preparedStatement); - affectedRows = preparedStatement.executeUpdate(); - lastInsertId = getGeneratedKey(preparedStatement); - } else { - setJDBCPreparedStatementParameters(preparedStatement); - affectedRows = preparedStatement.executeUpdate(); - } - return new CommandResponsePackets(new OKPacket(1, affectedRows, lastInsertId, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } finally { - MasterVisitedManager.clear(); - if (null != preparedStatement) { - try { - preparedStatement.close(); - } catch (final SQLException ignore) { - } - } - } - } - - private CommandResponsePackets executeCommon() { - try { - setJDBCPreparedStatementParameters(preparedStatement); - boolean hasResultSet = preparedStatement.execute(); - if (hasResultSet) { - return getCommonDatabaseProtocolPackets(preparedStatement.getResultSet()); - } else { - return new CommandResponsePackets(new OKPacket(1, preparedStatement.getUpdateCount(), 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - } - } catch (final SQLException ex) { - return new CommandResponsePackets(new ErrPacket(1, ex.getErrorCode(), "", ex.getSQLState(), ex.getMessage())); - } finally { - MasterVisitedManager.clear(); - } - } - - private CommandResponsePackets getQueryDatabaseProtocolPackets() throws SQLException { - CommandResponsePackets result = new CommandResponsePackets(); - int currentSequenceId = 0; - int lastIndex = statementExecuteBackendHandler.getProxyPrepareJDBCResource().getResultSets().size() - 1; - ResultSetMetaData resultSetMetaData = statementExecuteBackendHandler.getProxyPrepareJDBCResource().getResultSets().get(lastIndex).getMetaData(); - int columnCount = resultSetMetaData.getColumnCount(); - statementExecuteBackendHandler.setColumnCount(columnCount); - if (0 == columnCount) { - result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - return result; - } - result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); - for (int i = 1; i <= columnCount; i++) { - ColumnType columnType = ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)); - ColumnDefinition41Packet columnDefinition41Packet = new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), - resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), resultSetMetaData.getColumnDisplaySize(i), columnType, 0); - result.addPacket(columnDefinition41Packet); - statementExecuteBackendHandler.getColumnTypes().add(columnType); - } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - return result; - } - - private CommandResponsePackets getCommonDatabaseProtocolPackets(final ResultSet resultSet) throws SQLException { - CommandResponsePackets result = new CommandResponsePackets(); - int currentSequenceId = 0; - ResultSetMetaData resultSetMetaData = resultSet.getMetaData(); - int columnCount = resultSetMetaData.getColumnCount(); - if (0 == columnCount) { - result.addPacket(new OKPacket(++currentSequenceId, 0, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue(), 0, "")); - return result; - } - result.addPacket(new FieldCountPacket(++currentSequenceId, columnCount)); - for (int i = 1; i <= columnCount; i++) { - ColumnType columnType = ColumnType.valueOfJDBCType(resultSetMetaData.getColumnType(i)); - ColumnDefinition41Packet columnDefinition41Packet = new ColumnDefinition41Packet(++currentSequenceId, resultSetMetaData.getSchemaName(i), resultSetMetaData.getTableName(i), - resultSetMetaData.getTableName(i), resultSetMetaData.getColumnLabel(i), resultSetMetaData.getColumnName(i), resultSetMetaData.getColumnDisplaySize(i), columnType, 0); - result.addPacket(columnDefinition41Packet); - statementExecuteBackendHandler.getColumnTypes().add(columnType); - } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - while (resultSet.next()) { - List data = new ArrayList<>(columnCount); - for (int i = 1; i <= columnCount; i++) { - data.add(resultSet.getObject(i)); - } - result.addPacket(new BinaryResultSetRowPacket(++currentSequenceId, columnCount, data, statementExecuteBackendHandler.getColumnTypes())); - } - result.addPacket(new EofPacket(++currentSequenceId, 0, StatusFlag.SERVER_STATUS_AUTOCOMMIT.getValue())); - return result; - } - - private long getGeneratedKey(final PreparedStatement preparedStatement) throws SQLException { - long result = 0; - ResultSet resultSet = preparedStatement.getGeneratedKeys(); - if (resultSet.next()) { - result = resultSet.getLong(1); - } - return result; - } } diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/metadata/ProxyShardingRefreshHandler.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/metadata/ProxyShardingRefreshHandler.java index 59d4058d9a18e..7cd79f9738fef 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/metadata/ProxyShardingRefreshHandler.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/metadata/ProxyShardingRefreshHandler.java @@ -42,7 +42,6 @@ public void execute() { String logicTable = getRouteResult().getSqlStatement().getTables().getSingleTableName(); TableRule tableRule = getShardingRule().getTableRule(logicTable); getShardingMetaData().refresh(tableRule, getShardingRule()); - } } diff --git a/sharding-proxy/src/main/java/io/shardingsphere/proxy/transport/mysql/packet/command/text/query/ComQueryPacket.java b/sharding-proxy/src/main/java/io/shardingsphere/proxy/transport/mysql/packet/command/text/query/ComQueryPacket.java index 48ae247fa2ddd..28f9d6f5f424c 100644 --- a/sharding-proxy/src/main/java/io/shardingsphere/proxy/transport/mysql/packet/command/text/query/ComQueryPacket.java +++ b/sharding-proxy/src/main/java/io/shardingsphere/proxy/transport/mysql/packet/command/text/query/ComQueryPacket.java @@ -33,6 +33,8 @@ import io.shardingsphere.proxy.transport.mysql.packet.generic.OKPacket; import lombok.extern.slf4j.Slf4j; +import javax.transaction.Status; +import javax.transaction.SystemException; import java.sql.SQLException; /** @@ -41,6 +43,7 @@ * * @author zhangliang * @author linjiaqi + * @author zhaojun */ @Slf4j public final class ComQueryPacket extends CommandPacket implements CommandPacketRebuilder { @@ -171,7 +174,7 @@ private boolean isXaCommit() { return "COMMIT".equalsIgnoreCase(sql); } - private boolean isXaRollback() { - return "ROLLBACK".equalsIgnoreCase(sql); + private boolean isXaRollback() throws SystemException { + return "ROLLBACK".equalsIgnoreCase(sql) && Status.STATUS_NO_TRANSACTION != AtomikosUserTransaction.getInstance().getStatus(); } } diff --git a/sharding-sql-test/src/main/resources/sql/ddl/alter.xml b/sharding-sql-test/src/main/resources/sql/ddl/alter.xml index e26e4a4bd316f..19ce2431c3fee 100644 --- a/sharding-sql-test/src/main/resources/sql/ddl/alter.xml +++ b/sharding-sql-test/src/main/resources/sql/ddl/alter.xml @@ -1,6 +1,5 @@ - - - + + diff --git a/sharding-sql-test/src/main/resources/sql/ddl/create.xml b/sharding-sql-test/src/main/resources/sql/ddl/create.xml index b6537efd745d5..8703e9d12d331 100644 --- a/sharding-sql-test/src/main/resources/sql/ddl/create.xml +++ b/sharding-sql-test/src/main/resources/sql/ddl/create.xml @@ -1,12 +1,11 @@ - - - - - - - - - + + + + + + + + diff --git a/sharding-sql-test/src/main/resources/sql/ddl/drop.xml b/sharding-sql-test/src/main/resources/sql/ddl/drop.xml index 7c3bf4912c59a..43de808bc0bd8 100644 --- a/sharding-sql-test/src/main/resources/sql/ddl/drop.xml +++ b/sharding-sql-test/src/main/resources/sql/ddl/drop.xml @@ -1,13 +1,12 @@ - - - - - - - - - - + + + + + + + + + diff --git a/sharding-sql-test/src/main/resources/sql/ddl/truncate.xml b/sharding-sql-test/src/main/resources/sql/ddl/truncate.xml index 8997647a74adc..e1aad054902de 100644 --- a/sharding-sql-test/src/main/resources/sql/ddl/truncate.xml +++ b/sharding-sql-test/src/main/resources/sql/ddl/truncate.xml @@ -1,5 +1,5 @@ - - + + diff --git a/sharding-sql-test/src/main/resources/sql/dml/delete.xml b/sharding-sql-test/src/main/resources/sql/dml/delete.xml index f8b2077e866a9..14ed907991bef 100644 --- a/sharding-sql-test/src/main/resources/sql/dml/delete.xml +++ b/sharding-sql-test/src/main/resources/sql/dml/delete.xml @@ -1,5 +1,5 @@ - - + + diff --git a/sharding-sql-test/src/main/resources/sql/dml/insert.xml b/sharding-sql-test/src/main/resources/sql/dml/insert.xml index 6c6fe09219044..b2f9f7ad2728d 100644 --- a/sharding-sql-test/src/main/resources/sql/dml/insert.xml +++ b/sharding-sql-test/src/main/resources/sql/dml/insert.xml @@ -1,31 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/sharding-sql-test/src/main/resources/sql/dml/update.xml b/sharding-sql-test/src/main/resources/sql/dml/update.xml index 65ed1433857fd..c13b27c74832d 100644 --- a/sharding-sql-test/src/main/resources/sql/dml/update.xml +++ b/sharding-sql-test/src/main/resources/sql/dml/update.xml @@ -1,6 +1,6 @@ - - - + + + diff --git a/sharding-sql-test/src/main/resources/sql/dql/select_nullable.xml b/sharding-sql-test/src/main/resources/sql/dql/select_nullable.xml deleted file mode 100644 index cef10ffc9ff87..0000000000000 --- a/sharding-sql-test/src/main/resources/sql/dql/select_nullable.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - -