Skip to content

Commit

Permalink
Manual merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss committed Feb 7, 2025
1 parent 1e2379d commit 7393e06
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 965 deletions.
19 changes: 19 additions & 0 deletions cmd/explaintest/r/integration_partition.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
drop table if exists t;
CREATE TABLE `t` (`tenant_id` bigint(20) NOT NULL DEFAULT '0',`order_id` bigint(20) NOT NULL DEFAULT '0',UNIQUE KEY `uk_ten_ord` (`order_id`, `tenant_id`)) PARTITION BY HASH(`tenant_id`) PARTITIONS 32;
INSERT INTO t(tenant_id, order_id) VALUES (123, 456);
select * from t where (tenant_id, order_id) in (('123','456'));
tenant_id order_id
123 456
select * from t where (tenant_id, order_id) in (('0123','456'));
tenant_id order_id
123 456
drop table t;
CREATE TABLE `t` (`tenant_id` bigint(20) NOT NULL DEFAULT '0',`order_id` bigint(20) NOT NULL DEFAULT '0',UNIQUE KEY `uk_ten_ord` (`order_id`, `tenant_id`));
INSERT INTO t(tenant_id, order_id) VALUES (123, 456);
select * from t where (tenant_id, order_id) in (('123','456'));
tenant_id order_id
123 456
select * from t where (tenant_id, order_id) in (('0123','456'));
tenant_id order_id
123 456
drop table t;
14 changes: 14 additions & 0 deletions cmd/explaintest/t/integration_partition.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TestIssue54746
drop table if exists t;
CREATE TABLE `t` (`tenant_id` bigint(20) NOT NULL DEFAULT '0',`order_id` bigint(20) NOT NULL DEFAULT '0',UNIQUE KEY `uk_ten_ord` (`order_id`, `tenant_id`)) PARTITION BY HASH(`tenant_id`) PARTITIONS 32;
INSERT INTO t(tenant_id, order_id) VALUES (123, 456);
select * from t where (tenant_id, order_id) in (('123','456'));
select * from t where (tenant_id, order_id) in (('0123','456'));

drop table t;
CREATE TABLE `t` (`tenant_id` bigint(20) NOT NULL DEFAULT '0',`order_id` bigint(20) NOT NULL DEFAULT '0',UNIQUE KEY `uk_ten_ord` (`order_id`, `tenant_id`));
INSERT INTO t(tenant_id, order_id) VALUES (123, 456);
select * from t where (tenant_id, order_id) in (('123','456'));
select * from t where (tenant_id, order_id) in (('0123','456'));

drop table t;
Loading

0 comments on commit 7393e06

Please sign in to comment.