-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
965 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.