Loading mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ eval select * from $t4 order by colint; eval select * from $t5 order by colint; eval select * from $t6 order by colint; if (!$drop_partition_not_supported) { eval alter table $t1 drop partition p0; eval alter table $t2 drop partition p0; eval alter table $t4 drop partition p0; Loading @@ -55,3 +57,4 @@ eval select * from $t3 order by col1; eval select * from $t4 order by colint; eval select * from $t5 order by colint; eval select * from $t6 order by colint; } mysql-test/suite/parts/inc/partition_alter_11.inc +8 −22 Original line number Diff line number Diff line Loading @@ -92,16 +92,13 @@ $partitioning; #----------- PARTITION BY RANGE if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) let $partitioning= PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), PARTITION parte VALUES LESS THAN ($max_row), PARTITION partf VALUES LESS THAN $MAX_VALUE)'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION partf VALUES LESS THAN $MAX_VALUE); } eval CREATE TABLE t1 ( $column_list Loading @@ -113,15 +110,11 @@ $partitioning; #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 let $partitioning= PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN $MAX_VALUE)'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION partd VALUES LESS THAN $MAX_VALUE); } eval CREATE TABLE t1 ( $column_list Loading @@ -133,8 +126,7 @@ $partitioning; #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11, SUBPARTITION subpart12), PARTITION part2 VALUES LESS THAN ($max_row_div4) Loading @@ -142,9 +134,7 @@ PARTITION part2 VALUES LESS THAN ($max_row_div4) PARTITION part3 VALUES LESS THAN ($max_row_div2) (SUBPARTITION subpart31, SUBPARTITION subpart32), PARTITION part4 VALUES LESS THAN $MAX_VALUE (SUBPARTITION subpart41, SUBPARTITION subpart42))'; let $partitioning= `SELECT @aux`; --enable_query_log (SUBPARTITION subpart41, SUBPARTITION subpart42)); } eval CREATE TABLE t1 ( $column_list Loading Loading @@ -176,15 +166,11 @@ $partitioning; #----------- PARTITION BY LIST -- SUBPARTITION BY KEY if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY LIST(ABS(MOD(f_int1,2))) let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no (PARTITION part1 VALUES IN (0), PARTITION part2 VALUES IN (1), PARTITION part3 VALUES IN (NULL))'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION part3 VALUES IN (NULL)); } eval CREATE TABLE t1 ( $column_list Loading mysql-test/suite/parts/inc/partition_bigint.inc +9 −2 Original line number Diff line number Diff line Loading @@ -6,22 +6,27 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=-2; delete from t1 where a=-2; --sorted_result select * from t1; select * from t1 where a=18446744073709551615; delete from t1 where a=18446744073709551615; --sorted_result select * from t1; drop table t1; eval create table t2 (a bigint unsigned not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 8; show create table t2; insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); --sorted_result select * from t2; select * from t2 where a=18446744073709551615; delete from t2 where a=18446744073709551615; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -37,11 +42,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a bigint not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=9223372036854775806; delete from t3 where a=9223372036854775806; --sorted_result select * from t3; drop table t3; mysql-test/suite/parts/inc/partition_int.inc +8 −2 Original line number Diff line number Diff line Loading @@ -6,19 +6,23 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=4294967293; delete from t1 where a=4294967293; --sorted_result select * from t1; drop table t1; eval create table t2 (a int unsigned not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 8; show create table t2; insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292); --sorted_result select * from t2; select * from t2 where a=4294967293; delete from t2 where a=4294967293; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -34,11 +38,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a int not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=2147483645; delete from t3 where a=2147483645; --sorted_result select * from t3; drop table t3; mysql-test/suite/parts/inc/partition_mediumint.inc +7 −1 Original line number Diff line number Diff line Loading @@ -6,9 +6,11 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=16777213; delete from t1 where a=16777213; --sorted_result select * from t1; drop table t1; Loading @@ -16,9 +18,11 @@ eval create table t2 (a mediumint unsigned not null, primary key(a)) engine=$eng partition by key (a) partitions 8; show create table t2; insert into t2 values (16777215), (16777214), (16777213), (16777212); --sorted_result select * from t2; select * from t2 where a=16777213; delete from t2 where a=16777213; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -34,11 +38,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a mediumint not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=8388605; delete from t3 where a=8388605; --sorted_result select * from t3; drop table t3; Loading
mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ eval select * from $t4 order by colint; eval select * from $t5 order by colint; eval select * from $t6 order by colint; if (!$drop_partition_not_supported) { eval alter table $t1 drop partition p0; eval alter table $t2 drop partition p0; eval alter table $t4 drop partition p0; Loading @@ -55,3 +57,4 @@ eval select * from $t3 order by col1; eval select * from $t4 order by colint; eval select * from $t5 order by colint; eval select * from $t6 order by colint; }
mysql-test/suite/parts/inc/partition_alter_11.inc +8 −22 Original line number Diff line number Diff line Loading @@ -92,16 +92,13 @@ $partitioning; #----------- PARTITION BY RANGE if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) let $partitioning= PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), PARTITION parte VALUES LESS THAN ($max_row), PARTITION partf VALUES LESS THAN $MAX_VALUE)'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION partf VALUES LESS THAN $MAX_VALUE); } eval CREATE TABLE t1 ( $column_list Loading @@ -113,15 +110,11 @@ $partitioning; #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 let $partitioning= PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN $MAX_VALUE)'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION partd VALUES LESS THAN $MAX_VALUE); } eval CREATE TABLE t1 ( $column_list Loading @@ -133,8 +126,7 @@ $partitioning; #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11, SUBPARTITION subpart12), PARTITION part2 VALUES LESS THAN ($max_row_div4) Loading @@ -142,9 +134,7 @@ PARTITION part2 VALUES LESS THAN ($max_row_div4) PARTITION part3 VALUES LESS THAN ($max_row_div2) (SUBPARTITION subpart31, SUBPARTITION subpart32), PARTITION part4 VALUES LESS THAN $MAX_VALUE (SUBPARTITION subpart41, SUBPARTITION subpart42))'; let $partitioning= `SELECT @aux`; --enable_query_log (SUBPARTITION subpart41, SUBPARTITION subpart42)); } eval CREATE TABLE t1 ( $column_list Loading Loading @@ -176,15 +166,11 @@ $partitioning; #----------- PARTITION BY LIST -- SUBPARTITION BY KEY if ($with_partitioning) { --disable_query_log eval SET @aux = 'PARTITION BY LIST(ABS(MOD(f_int1,2))) let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no (PARTITION part1 VALUES IN (0), PARTITION part2 VALUES IN (1), PARTITION part3 VALUES IN (NULL))'; let $partitioning= `SELECT @aux`; --enable_query_log PARTITION part3 VALUES IN (NULL)); } eval CREATE TABLE t1 ( $column_list Loading
mysql-test/suite/parts/inc/partition_bigint.inc +9 −2 Original line number Diff line number Diff line Loading @@ -6,22 +6,27 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=-2; delete from t1 where a=-2; --sorted_result select * from t1; select * from t1 where a=18446744073709551615; delete from t1 where a=18446744073709551615; --sorted_result select * from t1; drop table t1; eval create table t2 (a bigint unsigned not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 8; show create table t2; insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); --sorted_result select * from t2; select * from t2 where a=18446744073709551615; delete from t2 where a=18446744073709551615; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -37,11 +42,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a bigint not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=9223372036854775806; delete from t3 where a=9223372036854775806; --sorted_result select * from t3; drop table t3;
mysql-test/suite/parts/inc/partition_int.inc +8 −2 Original line number Diff line number Diff line Loading @@ -6,19 +6,23 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=4294967293; delete from t1 where a=4294967293; --sorted_result select * from t1; drop table t1; eval create table t2 (a int unsigned not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 8; show create table t2; insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292); --sorted_result select * from t2; select * from t2 where a=4294967293; delete from t2 where a=4294967293; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -34,11 +38,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a int not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=2147483645; delete from t3 where a=2147483645; --sorted_result select * from t3; drop table t3;
mysql-test/suite/parts/inc/partition_mediumint.inc +7 −1 Original line number Diff line number Diff line Loading @@ -6,9 +6,11 @@ partition pa3 max_rows=30 min_rows=4, partition pa4 max_rows=40 min_rows=2); show create table t1; insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); --sorted_result select * from t1; select * from t1 where a=16777213; delete from t1 where a=16777213; --sorted_result select * from t1; drop table t1; Loading @@ -16,9 +18,11 @@ eval create table t2 (a mediumint unsigned not null, primary key(a)) engine=$eng partition by key (a) partitions 8; show create table t2; insert into t2 values (16777215), (16777214), (16777213), (16777212); --sorted_result select * from t2; select * from t2 where a=16777213; delete from t2 where a=16777213; --sorted_result select * from t2; delete from t2; let $count=$maxrows; Loading @@ -34,11 +38,13 @@ select count(*) from t2; drop table t2; eval create table t3 (a mediumint not null, primary key(a)) engine=$engine partition by key (a) partitions 10; partition by key (a) partitions 7; show create table t3; insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0); --sorted_result select * from t3; select * from t3 where a=8388605; delete from t3 where a=8388605; --sorted_result select * from t3; drop table t3;