Commit 6995b41b authored by mikael@dator6.(none)'s avatar mikael@dator6.(none)

Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-engines

into  dator6.(none):/home/mikael/mysql_clones/mysql-5.1-engines
parents 81354123 296c967a
drop table if exists t1; drop table if exists t1;
# test with not null
create table t1 (a bit not null) partition by key (a);
insert into t1 values (b'1');
select hex(a) from t1 where a = b'1';
hex(a)
1
drop table t1;
create table t1 (a tinyint not null) partition by key (a); create table t1 (a tinyint not null) partition by key (a);
insert into t1 values (2); insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
...@@ -30,22 +37,22 @@ a ...@@ -30,22 +37,22 @@ a
2 2
drop table t1; drop table t1;
create table t1 (a float not null) partition by key (a); create table t1 (a float not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
a a
0.5
drop table t1; drop table t1;
create table t1 (a double not null) partition by key (a); create table t1 (a double not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
a a
2.1 0.5
drop table t1; drop table t1;
create table t1 (a decimal not null) partition by key (a); create table t1 (a decimal(4,2) not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (2.1);
Warnings:
Note 1265 Data truncated for column 'a' at row 1
select * from t1 where a = 2.1; select * from t1 where a = 2.1;
a a
2.10
drop table t1; drop table t1;
create table t1 (a date not null) partition by key (a); create table t1 (a date not null) partition by key (a);
insert into t1 values ('2001-01-01'); insert into t1 values ('2001-01-01');
...@@ -125,6 +132,13 @@ select * from t1 where a = 'y'; ...@@ -125,6 +132,13 @@ select * from t1 where a = 'y';
a a
y y
drop table t1; drop table t1;
# test with null allowed
create table t1 (a bit) partition by key (a);
insert into t1 values (b'1');
select hex(a) from t1 where a = b'1';
hex(a)
1
drop table t1;
create table t1 (a tinyint) partition by key (a); create table t1 (a tinyint) partition by key (a);
insert into t1 values (2); insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
...@@ -156,22 +170,22 @@ a ...@@ -156,22 +170,22 @@ a
2 2
drop table t1; drop table t1;
create table t1 (a float) partition by key (a); create table t1 (a float) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
a a
0.5
drop table t1; drop table t1;
create table t1 (a double) partition by key (a); create table t1 (a double) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
a a
2.1 0.5
drop table t1; drop table t1;
create table t1 (a decimal) partition by key (a); create table t1 (a decimal(4,2)) partition by key (a);
insert into t1 values (2.1); insert into t1 values (2.1);
Warnings:
Note 1265 Data truncated for column 'a' at row 1
select * from t1 where a = 2.1; select * from t1 where a = 2.1;
a a
2.10
drop table t1; drop table t1;
create table t1 (a date) partition by key (a); create table t1 (a date) partition by key (a);
insert into t1 values ('2001-01-01'); insert into t1 values ('2001-01-01');
...@@ -254,25 +268,41 @@ drop table t1; ...@@ -254,25 +268,41 @@ drop table t1;
create table t1 (a varchar(65531)) partition by key (a); create table t1 (a varchar(65531)) partition by key (a);
insert into t1 values ('bbbb'); insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
a a
aaaa
select * from t1 where a like 'aaa%'; select * from t1 where a like 'aaa%';
a a
aaaa aaaa
select * from t1 where a = 'bbbb';
a
bbbb
drop table t1; drop table t1;
create table t1 (a varchar(65532)) partition by key (a); create table t1 (a varchar(65532)) partition by key (a);
insert into t1 values ('bbbb'); insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
a a
aaaa
select * from t1 where a like 'aaa%'; select * from t1 where a like 'aaa%';
a a
aaaa aaaa
select * from t1 where a = 'bbbb';
a
bbbb
drop table t1; drop table t1;
create table t1 (a varchar(65533) not null) partition by key (a); create table t1 (a varchar(65533) not null) partition by key (a);
insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
a
aaaa
select * from t1 where a like 'aaa%';
a a
aaaa
select * from t1 where a = 'bbbb';
a
bbbb
drop table t1; drop table t1;
create table t1 (a varchar(65533)) partition by key (a); create table t1 (a varchar(65533)) partition by key (a);
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
...@@ -280,3 +310,17 @@ create table t1 (a varchar(65534) not null) partition by key (a); ...@@ -280,3 +310,17 @@ create table t1 (a varchar(65534) not null) partition by key (a);
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
create table t1 (a varchar(65535)) partition by key (a); create table t1 (a varchar(65535)) partition by key (a);
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
create table t1 (a bit(27), primary key (a)) engine=myisam
partition by hash (a)
(partition p0, partition p1, partition p2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(27) NOT NULL DEFAULT '\0\0\0\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM, PARTITION p2 ENGINE = MyISAM) */
insert into t1 values (1),(4),(7),(10),(13),(16),(19),(22),(25),(28),(31),(34);
select hex(a) from t1 where a = 7;
hex(a)
7
drop table t1;
...@@ -30,29 +30,6 @@ ...@@ -30,29 +30,6 @@
let $unique= ; let $unique= ;
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# #
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
#
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
eval SET @data_dir = 'DATA DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
let $index_directory = `select @indx_dir`;
let $with_directories= 1;
--source suite/parts/inc/partition_methods1.inc
--source suite/parts/inc/partition_directory.inc
let $with_directories= 0;
--enable_query_log
#
--echo # 1.2 The partitioning function contains two columns. --echo # 1.2 The partitioning function contains two columns.
let $unique= ; let $unique= ;
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
...@@ -72,28 +49,6 @@ if ($more_pk_ui_tests) ...@@ -72,28 +49,6 @@ if ($more_pk_ui_tests)
--echo # 2.2 UNIQUE INDEX consisting of one column --echo # 2.2 UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1); let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
#
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
eval SET @data_dir = 'DATA DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
let $index_directory = `select @indx_dir`;
let $with_directories= TRUE;
--source suite/parts/inc/partition_methods1.inc
let $with_directories= FALSE;
--enable_query_log
# #
if ($do_pk_tests) if ($do_pk_tests)
{ {
......
################################################################################
# inc/partition_basic_symlink.inc #
# #
# Purpose: #
# Basic tests around create partitioned table with/without PRIMARY KEY and #
# /or UNIQUE INDEX #
# Also includes test for DATA/INDEX DIR which requires symlinked files #
# #
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: mattiasj #
# Change Date: 2008-02-06 #
# Change: copied it from partition_basic.inc and kept DATA/INDEX DIR #
################################################################################
--enable_abort_on_error
--echo
--echo #========================================================================
--echo # Check partitioning methods on just created tables
--echo # The tables should be defined without/with PRIMARY KEY and
--echo # UNIQUE INDEXes.
--echo # Every test round has to check
--echo # PARTITION BY HASH/KEY/LIST/RANGE
--echo # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ...
--echo #========================================================================
--echo #------------------------------------------------------------------------
--echo # 1 Tables without PRIMARY KEY or UNIQUE INDEXes
--echo #------------------------------------------------------------------------
--echo # 1.1 The partitioning function contains one column.
let $unique= ;
--source suite/parts/inc/partition_methods1.inc
#
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
#
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
eval SET @data_dir = 'DATA DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
let $index_directory = `select @indx_dir`;
let $with_directories= 1;
--source suite/parts/inc/partition_methods1.inc
--source suite/parts/inc/partition_directory.inc
let $with_directories= 0;
--enable_query_log
#
--echo # 1.2 The partitioning function contains two columns.
let $unique= ;
--source suite/parts/inc/partition_methods2.inc
#
--echo #------------------------------------------------------------------------
--echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
--echo # The partitioning function contains one column.
--echo #------------------------------------------------------------------------
if ($more_pk_ui_tests)
{
if ($do_pk_tests)
{
--echo # 2.1 PRIMARY KEY consisting of one column
let $unique= , PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_methods1.inc
}
--echo # 2.2 UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_methods1.inc
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
#
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
eval SET @data_dir = 'DATA DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
let $index_directory = `select @indx_dir`;
let $with_directories= TRUE;
--source suite/parts/inc/partition_methods1.inc
let $with_directories= FALSE;
--enable_query_log
#
if ($do_pk_tests)
{
--echo # 2.3 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
}
#
--echo # 2.4 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
#
}
--echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
if ($do_pk_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
--echo #------------------------------------------------------------------------
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
--echo # The partitioning function contains two columns.
--echo #------------------------------------------------------------------------
#
if ($more_pk_ui_tests)
{
if ($do_pk_tests)
{
--echo # 3.1 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
}
#
--echo # 3.2 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
}
#
--echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
if ($do_pk_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a bigint unsigned not null, primary key(a)) engine=$engine eval create table t1 (a bigint unsigned not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1; select * from t1;
......
--echo ---- Partitioning and binary data type --echo ---- Partitioning and binary data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a binary(255) not null, primary key(a)) engine=$engine eval create table t1 (a binary(255) not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64)); insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select hex(a) from t1; select hex(a) from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
...@@ -23,8 +11,8 @@ drop table t1; ...@@ -23,8 +11,8 @@ drop table t1;
eval create table t1 (a bit(0), primary key (a)) engine=$engine eval create table t1 (a bit(0), primary key (a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory, partition pa1,
partition pa2 $data_directory $index_directory); partition pa2);
show create table t1; show create table t1;
drop table t1; drop table t1;
...@@ -37,15 +25,16 @@ insert into t1 values ...@@ -37,15 +25,16 @@ insert into t1 values
(b'0000000000000000000000000000000000000000000000000000000000000001'), (b'0000000000000000000000000000000000000000000000000000000000000001'),
(b'1010101010101010101010101010101010101010101010101010101010101010'), (b'1010101010101010101010101010101010101010101010101010101010101010'),
(b'0101010101010101010101010101010101010101010101010101010101010101'); (b'0101010101010101010101010101010101010101010101010101010101010101');
--sorted_result
select hex(a) from t1; select hex(a) from t1;
drop table t1; drop table t1;
eval create table t1 (a bit(64), primary key (a)) engine=$engine eval create table t1 (a bit(64), primary key (a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'), (b'1111111111111111111111111111111111111111111111111111111111111111'),
...@@ -55,6 +44,7 @@ insert into t1 values ...@@ -55,6 +44,7 @@ insert into t1 values
(b'0101010101010101010101010101010101010101010101010101010101010101'); (b'0101010101010101010101010101010101010101010101010101010101010101');
select hex(a) from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101'; select hex(a) from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
delete from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101'; delete from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
--sorted_result
select hex(a) from t1; select hex(a) from t1;
drop table t1; drop table t1;
...@@ -62,12 +52,15 @@ eval create table t2 (a bit, primary key (a)) engine=$engine ...@@ -62,12 +52,15 @@ eval create table t2 (a bit, primary key (a)) engine=$engine
partition by key (a) partitions 4; partition by key (a) partitions 4;
show create table t2; show create table t2;
insert into t2 values (b'0'), (b'1'); insert into t2 values (b'0'), (b'1');
--sorted_result
select hex(a) from t2; select hex(a) from t2;
alter table t2 drop primary key; alter table t2 drop primary key;
show create table t2; show create table t2;
--sorted_result
select hex(a) from t2; select hex(a) from t2;
alter table t2 add primary key (a); alter table t2 add primary key (a);
show create table t2; show create table t2;
--sorted_result
select hex(a) from t2; select hex(a) from t2;
drop table t2; drop table t2;
...@@ -90,6 +83,7 @@ dec $count; ...@@ -90,6 +83,7 @@ dec $count;
select hex(a) from t3 where a=b'01010101'; select hex(a) from t3 where a=b'01010101';
delete from t3 where a=b'01010101'; delete from t3 where a=b'01010101';
select count(*) from t3; select count(*) from t3;
--sorted_result
select hex(a) from t3; select hex(a) from t3;
drop table t3; drop table t3;
...@@ -111,5 +105,6 @@ dec $count; ...@@ -111,5 +105,6 @@ dec $count;
select hex(a) from t4 where a=b'00000001'; select hex(a) from t4 where a=b'00000001';
delete from t4 where a=b'00000001'; delete from t4 where a=b'00000001';
select count(*) from t4; select count(*) from t4;
--sorted_result
select hex(a) from t4; select hex(a) from t4;
drop table t4; drop table t4;
--echo ---- Partitioning and blob data type --echo ---- Partitioning and blob data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
--error ER_BLOB_FIELD_IN_PART_FUNC_ERROR --error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
eval create table t1 (a blob not null, primary key(a(767))) engine=$engine eval create table t1 (a blob not null, primary key(a(767))) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
#show create table t1; #show create table t1;
#insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64)); #insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64));
......
--echo ---- Partitioning and char data type --echo ---- Partitioning and char data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a char(255) not null, primary key(a)) engine=$engine eval create table t1 (a char(255) not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64)); insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a date not null, primary key(a)) engine=$engine eval create table t1 (a date not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15'); insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a datetime not null, primary key(a)) engine=$engine eval create table t1 (a datetime not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a decimal(10,4) not null, primary key(a)) engine=$engine eval create table t1 (a decimal(10,4) not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567); insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a double not null, primary key(a)) engine=$engine eval create table t1 (a double not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208); insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
select * from t1; select * from t1;
......
--echo ---- Partitioning and enum data type --echo ---- Partitioning and enum data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine eval create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('A'),('D'),('L'),('G'); insert into t1 values ('A'),('D'),('L'),('G');
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a float not null, primary key(a)) engine=$engine eval create table t1 (a float not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5); insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a int unsigned not null, primary key(a)) engine=$engine eval create table t1 (a int unsigned not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
--error ER_TOO_MANY_KEY_PARTS --error ER_TOO_MANY_KEY_PARTS
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine=$engine eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine=$engine
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
--disable_abort_on error --disable_abort_on error
show create table t1; show create table t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine=$engine eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine=$engine
partition by key (a,b,c,d) ( partition by key (a,b,c,d) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'), ('1975-01-01', 'abcde', 'abcde','m'),
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine=$engine eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine=$engine
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a mediumint unsigned not null, primary key(a)) engine=$engine eval create table t1 (a mediumint unsigned not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1; select * from t1;
......
--echo ---- Partitioning and set data type --echo ---- Partitioning and set data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine eval create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K'); insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
select * from t1 order by a; select * from t1 order by a;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a smallint unsigned not null, primary key(a)) engine=$engine eval create table t1 (a smallint unsigned not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256); insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1; select * from t1;
......
--echo ---- Partitioning and text data type --echo ---- Partitioning and text data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
--error ER_BLOB_FIELD_IN_PART_FUNC_ERROR --error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
eval create table t1 (a text not null, primary key(a(767))) engine=$engine eval create table t1 (a text not null, primary key(a(767))) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
#show create table t1; #show create table t1;
#insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64)); #insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64));
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a time not null, primary key(a)) engine=$engine eval create table t1 (a time not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59'); insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a timestamp not null, primary key(a)) engine=$engine eval create table t1 (a timestamp not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a tinyint unsigned not null, primary key(a)) engine=$engine eval create table t1 (a tinyint unsigned not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (255), (254), (253), (252), (1), (2), (128); insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1; select * from t1;
......
--echo ---- Partitioning and varbinary data type --echo ---- Partitioning and varbinary data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a varbinary(767) not null, primary key(a)) engine=$engine eval create table t1 (a varbinary(767) not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64)); insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1; select * from t1;
......
--echo ---- Partitioning and varchar data type --echo ---- Partitioning and varchar data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a varchar(767) not null, primary key(a)) engine=$engine eval create table t1 (a varchar(767) not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64)); insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1; select * from t1;
......
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
''/tmp''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
eval SET @indx_dir = 'INDEX DIRECTORY =
''/tmp''';
let $index_directory = `select @indx_dir`;
--enable_query_log
eval create table t1 (a year not null, primary key(a)) engine=$engine eval create table t1 (a year not null, primary key(a)) engine=$engine
partition by key (a) ( partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2, partition pa1 max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3, partition pa2 max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4, partition pa3 max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2); partition pa4 max_rows=40 min_rows=2);
show create table t1; show create table t1;
insert into t1 values ('1975'), (2020), ('1980'), ('2000'); insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1; select * from t1;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` ( ...@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
drop table t1; drop table t1;
create table t1 (a bit(0), primary key (a)) engine='INNODB' create table t1 (a bit(0), primary key (a)) engine='INNODB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1,
'/tmp' INDEX DIRECTORY = partition pa2);
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 ENGINE = InnoDB, PARTITION pa2 ENGINE = InnoDB) */
drop table t1; drop table t1;
create table t1 (a bit(64), primary key (a)) engine='INNODB' create table t1 (a bit(64), primary key (a)) engine='INNODB'
partition by key (a) partitions 2; partition by key (a) partitions 2;
...@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF ...@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
drop table t1; drop table t1;
create table t1 (a bit(64), primary key (a)) engine='INNODB' create table t1 (a bit(64), primary key (a)) engine='INNODB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'), (b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'), (b'1000000000000000000000000000000000000000000000000000000000000000'),
...@@ -105,8 +93,8 @@ t2 CREATE TABLE `t2` ( ...@@ -105,8 +93,8 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */
select hex(a) from t2; select hex(a) from t2;
hex(a) hex(a)
1
0 0
1
alter table t2 add primary key (a); alter table t2 add primary key (a);
show create table t2; show create table t2;
Table Create Table Table Create Table
...@@ -142,20 +130,6 @@ count(*) ...@@ -142,20 +130,6 @@ count(*)
select hex(a) from t3; select hex(a) from t3;
hex(a) hex(a)
1 1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10 10
11 11
12 12
...@@ -172,6 +146,7 @@ F ...@@ -172,6 +146,7 @@ F
1D 1D
1E 1E
1F 1F
2
20 20
21 21
22 22
...@@ -188,6 +163,7 @@ F ...@@ -188,6 +163,7 @@ F
2D 2D
2E 2E
2F 2F
3
30 30
31 31
32 32
...@@ -204,6 +180,7 @@ F ...@@ -204,6 +180,7 @@ F
3D 3D
3E 3E
3F 3F
4
40 40
41 41
42 42
...@@ -220,6 +197,7 @@ F ...@@ -220,6 +197,7 @@ F
4D 4D
4E 4E
4F 4F
5
50 50
51 51
52 52
...@@ -235,6 +213,7 @@ F ...@@ -235,6 +213,7 @@ F
5D 5D
5E 5E
5F 5F
6
60 60
61 61
62 62
...@@ -251,6 +230,7 @@ F ...@@ -251,6 +230,7 @@ F
6D 6D
6E 6E
6F 6F
7
70 70
71 71
72 72
...@@ -267,6 +247,7 @@ F ...@@ -267,6 +247,7 @@ F
7D 7D
7E 7E
7F 7F
8
80 80
81 81
82 82
...@@ -283,6 +264,7 @@ F ...@@ -283,6 +264,7 @@ F
8D 8D
8E 8E
8F 8F
9
90 90
91 91
92 92
...@@ -299,6 +281,7 @@ F ...@@ -299,6 +281,7 @@ F
9D 9D
9E 9E
9F 9F
A
A0 A0
A1 A1
A2 A2
...@@ -315,6 +298,7 @@ AC ...@@ -315,6 +298,7 @@ AC
AD AD
AE AE
AF AF
B
B0 B0
B1 B1
B2 B2
...@@ -331,6 +315,7 @@ BC ...@@ -331,6 +315,7 @@ BC
BD BD
BE BE
BF BF
C
C0 C0
C1 C1
C2 C2
...@@ -347,6 +332,7 @@ CC ...@@ -347,6 +332,7 @@ CC
CD CD
CE CE
CF CF
D
D0 D0
D1 D1
D2 D2
...@@ -363,6 +349,7 @@ DC ...@@ -363,6 +349,7 @@ DC
DD DD
DE DE
DF DF
E
E0 E0
E1 E1
E2 E2
...@@ -379,6 +366,7 @@ EC ...@@ -379,6 +366,7 @@ EC
ED ED
EE EE
EF EF
F
F0 F0
F1 F1
F2 F2
...@@ -417,20 +405,6 @@ count(*) ...@@ -417,20 +405,6 @@ count(*)
31 31
select hex(a) from t4; select hex(a) from t4;
hex(a) hex(a)
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10 10
11 11
12 12
...@@ -447,5 +421,19 @@ F ...@@ -447,5 +421,19 @@ F
1D 1D
1E 1E
1F 1F
2
20 20
3
4
5
6
7
8
9
A
B
C
D
E
F
drop table t4; drop table t4;
...@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` ( ...@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
drop table t1; drop table t1;
create table t1 (a bit(0), primary key (a)) engine='MyISAM' create table t1 (a bit(0), primary key (a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1,
'/tmp' INDEX DIRECTORY = partition pa2);
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 ENGINE = MyISAM, PARTITION pa2 ENGINE = MyISAM) */
drop table t1; drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM' create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) partitions 2; partition by key (a) partitions 2;
...@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF ...@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
drop table t1; drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM' create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'), (b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'), (b'1000000000000000000000000000000000000000000000000000000000000000'),
...@@ -142,20 +130,6 @@ count(*) ...@@ -142,20 +130,6 @@ count(*)
select hex(a) from t3; select hex(a) from t3;
hex(a) hex(a)
1 1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10 10
11 11
12 12
...@@ -172,6 +146,7 @@ F ...@@ -172,6 +146,7 @@ F
1D 1D
1E 1E
1F 1F
2
20 20
21 21
22 22
...@@ -188,6 +163,7 @@ F ...@@ -188,6 +163,7 @@ F
2D 2D
2E 2E
2F 2F
3
30 30
31 31
32 32
...@@ -204,6 +180,7 @@ F ...@@ -204,6 +180,7 @@ F
3D 3D
3E 3E
3F 3F
4
40 40
41 41
42 42
...@@ -220,6 +197,7 @@ F ...@@ -220,6 +197,7 @@ F
4D 4D
4E 4E
4F 4F
5
50 50
51 51
52 52
...@@ -235,6 +213,7 @@ F ...@@ -235,6 +213,7 @@ F
5D 5D
5E 5E
5F 5F
6
60 60
61 61
62 62
...@@ -251,6 +230,7 @@ F ...@@ -251,6 +230,7 @@ F
6D 6D
6E 6E
6F 6F
7
70 70
71 71
72 72
...@@ -267,6 +247,7 @@ F ...@@ -267,6 +247,7 @@ F
7D 7D
7E 7E
7F 7F
8
80 80
81 81
82 82
...@@ -283,6 +264,7 @@ F ...@@ -283,6 +264,7 @@ F
8D 8D
8E 8E
8F 8F
9
90 90
91 91
92 92
...@@ -299,6 +281,7 @@ F ...@@ -299,6 +281,7 @@ F
9D 9D
9E 9E
9F 9F
A
A0 A0
A1 A1
A2 A2
...@@ -315,6 +298,7 @@ AC ...@@ -315,6 +298,7 @@ AC
AD AD
AE AE
AF AF
B
B0 B0
B1 B1
B2 B2
...@@ -331,6 +315,7 @@ BC ...@@ -331,6 +315,7 @@ BC
BD BD
BE BE
BF BF
C
C0 C0
C1 C1
C2 C2
...@@ -347,6 +332,7 @@ CC ...@@ -347,6 +332,7 @@ CC
CD CD
CE CE
CF CF
D
D0 D0
D1 D1
D2 D2
...@@ -363,6 +349,7 @@ DC ...@@ -363,6 +349,7 @@ DC
DD DD
DE DE
DF DF
E
E0 E0
E1 E1
E2 E2
...@@ -379,6 +366,7 @@ EC ...@@ -379,6 +366,7 @@ EC
ED ED
EE EE
EF EF
F
F0 F0
F1 F1
F2 F2
...@@ -417,20 +405,6 @@ count(*) ...@@ -417,20 +405,6 @@ count(*)
31 31
select hex(a) from t4; select hex(a) from t4;
hex(a) hex(a)
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10 10
11 11
12 12
...@@ -447,5 +421,19 @@ F ...@@ -447,5 +421,19 @@ F
1D 1D
1E 1E
1F 1F
2
20 20
3
4
5
6
7
8
9
A
B
C
D
E
F
drop table t4; drop table t4;
create table t1 (a timestamp not null, primary key(a)) engine='InnoDB' create table t1 (a timestamp not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
...@@ -281,24 +273,16 @@ a ...@@ -281,24 +273,16 @@ a
drop table t4; drop table t4;
create table t1 (a date not null, primary key(a)) engine='InnoDB' create table t1 (a date not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` date NOT NULL, `a` date NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15'); insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1; select * from t1;
a a
...@@ -608,24 +592,16 @@ a ...@@ -608,24 +592,16 @@ a
drop table t4; drop table t4;
create table t1 (a time not null, primary key(a)) engine='InnoDB' create table t1 (a time not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` time NOT NULL, `a` time NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59'); insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1; select * from t1;
a a
...@@ -1073,24 +1049,16 @@ a ...@@ -1073,24 +1049,16 @@ a
drop table t4; drop table t4;
create table t1 (a datetime not null, primary key(a)) engine='InnoDB' create table t1 (a datetime not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` datetime NOT NULL, `a` datetime NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
...@@ -1350,24 +1318,16 @@ a ...@@ -1350,24 +1318,16 @@ a
drop table t4; drop table t4;
create table t1 (a year not null, primary key(a)) engine='InnoDB' create table t1 (a year not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL, `a` year(4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values ('1975'), (2020), ('1980'), ('2000'); insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1; select * from t1;
a a
......
create table t1 (a timestamp not null, primary key(a)) engine='MyISAM' create table t1 (a timestamp not null, primary key(a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
...@@ -281,24 +273,16 @@ a ...@@ -281,24 +273,16 @@ a
drop table t4; drop table t4;
create table t1 (a date not null, primary key(a)) engine='MyISAM' create table t1 (a date not null, primary key(a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` date NOT NULL, `a` date NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15'); insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1; select * from t1;
a a
...@@ -608,24 +592,16 @@ a ...@@ -608,24 +592,16 @@ a
drop table t4; drop table t4;
create table t1 (a time not null, primary key(a)) engine='MyISAM' create table t1 (a time not null, primary key(a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` time NOT NULL, `a` time NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59'); insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1; select * from t1;
a a
...@@ -1073,24 +1049,16 @@ a ...@@ -1073,24 +1049,16 @@ a
drop table t4; drop table t4;
create table t1 (a datetime not null, primary key(a)) engine='MyISAM' create table t1 (a datetime not null, primary key(a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` datetime NOT NULL, `a` datetime NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
...@@ -1350,24 +1318,16 @@ a ...@@ -1350,24 +1318,16 @@ a
drop table t4; drop table t4;
create table t1 (a year not null, primary key(a)) engine='MyISAM' create table t1 (a year not null, primary key(a)) engine='MyISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL, `a` year(4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values ('1975'), (2020), ('1980'), ('2000'); insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1; select * from t1;
a a
......
create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB' create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL, `a` decimal(10,4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567); insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
select * from t1; select * from t1;
a a
......
create table t1 (a decimal(10,4) not null, primary key(a)) engine='MYISAM' create table t1 (a decimal(10,4) not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL, `a` decimal(10,4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567); insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
select * from t1; select * from t1;
a a
......
create table t1 (a float not null, primary key(a)) engine='InnoDB' create table t1 (a float not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` float NOT NULL, `a` float NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5); insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1; select * from t1;
a a
...@@ -91,24 +83,16 @@ count(*) ...@@ -91,24 +83,16 @@ count(*)
drop table t2; drop table t2;
create table t1 (a double not null, primary key(a)) engine='InnoDB' create table t1 (a double not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` double NOT NULL, `a` double NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208); insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
select * from t1; select * from t1;
a a
......
create table t1 (a float not null, primary key(a)) engine='MYISAM' create table t1 (a float not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` float NOT NULL, `a` float NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5); insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1; select * from t1;
a a
...@@ -91,24 +83,16 @@ count(*) ...@@ -91,24 +83,16 @@ count(*)
drop table t2; drop table t2;
create table t1 (a double not null, primary key(a)) engine='MYISAM' create table t1 (a double not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` double NOT NULL, `a` double NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208); insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
select * from t1; select * from t1;
a a
......
create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB' create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL, `a` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (255), (254), (253), (252), (1), (2), (128); insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1; select * from t1;
a a
...@@ -108,24 +100,16 @@ a ...@@ -108,24 +100,16 @@ a
drop table t3; drop table t3;
create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB' create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL, `a` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256); insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1; select * from t1;
a a
...@@ -216,24 +200,16 @@ a ...@@ -216,24 +200,16 @@ a
drop table t3; drop table t3;
create table t1 (a int unsigned not null, primary key(a)) engine='InnoDB' create table t1 (a int unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL, `a` int(10) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
select * from t1; select * from t1;
a a
...@@ -324,24 +300,16 @@ a ...@@ -324,24 +300,16 @@ a
drop table t3; drop table t3;
create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB' create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL, `a` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1; select * from t1;
a a
...@@ -432,24 +400,16 @@ a ...@@ -432,24 +400,16 @@ a
drop table t3; drop table t3;
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB' create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL, `a` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1; select * from t1;
a a
......
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM' create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL, `a` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (255), (254), (253), (252), (1), (2), (128); insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1; select * from t1;
a a
...@@ -108,24 +100,16 @@ a ...@@ -108,24 +100,16 @@ a
drop table t3; drop table t3;
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM' create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL, `a` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256); insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1; select * from t1;
a a
...@@ -216,24 +200,16 @@ a ...@@ -216,24 +200,16 @@ a
drop table t3; drop table t3;
create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM' create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL, `a` int(10) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
select * from t1; select * from t1;
a a
...@@ -324,24 +300,16 @@ a ...@@ -324,24 +300,16 @@ a
drop table t3; drop table t3;
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM' create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL, `a` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1; select * from t1;
a a
...@@ -432,24 +400,16 @@ a ...@@ -432,24 +400,16 @@ a
drop table t3; drop table t3;
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM' create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL, `a` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1; select * from t1;
a a
......
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='InnoDB' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='InnoDB'
partition by key (a,b,c,d) ( partition by key (a,b,c,d) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` ( ...@@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(50) NOT NULL, `c` varchar(50) NOT NULL,
`d` enum('m','w') NOT NULL DEFAULT 'm', `d` enum('m','w') NOT NULL DEFAULT 'm',
PRIMARY KEY (`a`,`b`,`c`,`d`) PRIMARY KEY (`a`,`b`,`c`,`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'), ('1975-01-01', 'abcde', 'abcde','m'),
('1983-12-31', 'cdef', 'srtbvsr', 'w'), ('1983-12-31', 'cdef', 'srtbvsr', 'w'),
...@@ -40,18 +32,10 @@ a b c d ...@@ -40,18 +32,10 @@ a b c d
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='InnoDB' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` ( ...@@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` (
`h` tinyint(4) NOT NULL, `h` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
...@@ -85,18 +69,10 @@ a b c d e f g h i ...@@ -85,18 +69,10 @@ a b c d e f g h i
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` ( ...@@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` (
`h1` tinyint(4) NOT NULL, `h1` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
...@@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i ...@@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='InnoDB' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
ERROR 42000: Too many key parts specified; max 16 parts allowed ERROR 42000: Too many key parts specified; max 16 parts allowed
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` ( ...@@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` (
`h3` tinyint(4) NOT NULL, `h3` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
......
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='MyISAM' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='MyISAM'
partition by key (a,b,c,d) ( partition by key (a,b,c,d) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` ( ...@@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(50) NOT NULL, `c` varchar(50) NOT NULL,
`d` enum('m','w') NOT NULL DEFAULT 'm', `d` enum('m','w') NOT NULL DEFAULT 'm',
PRIMARY KEY (`a`,`b`,`c`,`d`) PRIMARY KEY (`a`,`b`,`c`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'), ('1975-01-01', 'abcde', 'abcde','m'),
('1983-12-31', 'cdef', 'srtbvsr', 'w'), ('1983-12-31', 'cdef', 'srtbvsr', 'w'),
...@@ -40,18 +32,10 @@ a b c d ...@@ -40,18 +32,10 @@ a b c d
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='MyISAM' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` ( ...@@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` (
`h` tinyint(4) NOT NULL, `h` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
...@@ -85,18 +69,10 @@ a b c d e f g h i ...@@ -85,18 +69,10 @@ a b c d e f g h i
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` ( ...@@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` (
`h1` tinyint(4) NOT NULL, `h1` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
...@@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i ...@@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
drop table t1; drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='MyISAM' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) ( partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
ERROR 42000: Too many key parts specified; max 16 parts allowed ERROR 42000: Too many key parts specified; max 16 parts allowed
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM' create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h) ( partition by key(a,b,c,d,e,f,g,h) (
partition pa1 DATA DIRECTORY = partition pa1 max_rows=20 min_rows=2,
'/tmp' INDEX DIRECTORY = partition pa2 max_rows=30 min_rows=3,
'/tmp' max_rows=20 min_rows=2, partition pa3 max_rows=30 min_rows=4,
partition pa2 DATA DIRECTORY = partition pa4 max_rows=40 min_rows=2);
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` ( ...@@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` (
`h3` tinyint(4) NOT NULL, `h3` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL, `i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`) PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
insert into t1 values insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'), ('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'), ('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
......
################################################################################
# t/partition_basic_innodb.test #
# #
# Purpose: #
# Tests around Create Partitioned table using DATA/INDEX DIR #
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: mattiasj #
# Change Date: 2008-02-05 #
# Change: copied it from partition_basic_innodb.test and kept DATA DIR #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
##### Options, for debugging support #####
let $debug= 0;
let $with_partitioning= 1;
##### Option, for displaying files #####
let $ls= 1;
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
# on partioned tables
SET @max_row = 20;
##### Execute more tests #####
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
# The server must support partitioning.
--source include/have_partition.inc
# The server must support symlink for DATA/INDEX DIRECTORY.
--source include/have_symlink.inc
# windows does not support symlink for DATA/INDEX DIRECTORY.
--source include/not_windows.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
let $do_file_tests= 0;
##### Execute PRIMARY KEY tests #####
# AFAIK InnoDB clusters the table around PRIMARY KEYs.
let $do_pk_tests= 1;
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic_symlink.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
################################################################################
# t/partition_basic_myisam.test #
# #
# Purpose: #
# Tests around Create Partitioned table using DATA/INDEX DIR #
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: mattiasj #
# Change Date: 2008-02-05 #
# Change: copied it from partition_basic_myisam.test and kept DATA DIR #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
##### Options, for debugging support #####
let $debug= 0;
let $with_partitioning= 1;
##### Option, for displaying files #####
let $ls= 1;
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
# on partioned tables
SET @max_row = 20;
##### Execute more tests #####
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
# The server must support partitioning.
--source include/have_partition.inc
# The server must support symlink for DATA/INDEX DIRECTORY.
--source include/have_symlink.inc
# windows does not support symlink for DATA/INDEX DIRECTORY.
--source include/not_windows.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'MyISAM';
# The server uses in case of MyISAM symlinking (if available) and the expected
# results fit to symlinking support.
--source include/have_symlink.inc
##### Execute the test of "table" files
# MyISAM has files per PK, UI, ...
let $do_file_tests= 1;
##### Execute PRIMARY KEY tests #####
# AFAIK MyISAM treats PRIMARY KEYs like UNIQUE INDEXes
let $do_pk_tests= 0;
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic_symlink.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
...@@ -27,27 +27,6 @@ f4 datetime; ...@@ -27,27 +27,6 @@ f4 datetime;
let $col_access_list = f1,f2,f3,f4 ; let $col_access_list = f1,f2,f3,f4 ;
let $col_new_list = new.f1,new.f2,new.f3 new.f4 ; let $col_new_list = new.f1,new.f2,new.f3 new.f4 ;
#--------------------------------------------------
# initialize directories for partitions
#--------------------------------------------------
--disable_query_log
# DATA DIRECTORY
# Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
eval SET @data_dir = 'DATA DIRECTORY =
''$MYSQLTEST_VARDIR/master-data/tmpdata''';
let $data_directory = `select @data_dir`;
#INDEX DIRECTORY
# Make directory for partition index
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpindex || true
eval SET @indx_dir = 'INDEX DIRECTORY =
''$MYSQLTEST_VARDIR/master-data/tmpindex''';
let $index_directory = `select @indx_dir`;
--enable_query_log
#--------------------------------------------------- #---------------------------------------------------
# Setting the parameters to use during testing # Setting the parameters to use during testing
#--------------------------------------------------- #---------------------------------------------------
...@@ -134,16 +113,16 @@ create table test_stat ( ...@@ -134,16 +113,16 @@ create table test_stat (
# tb3_eng1: key partitioning # tb3_eng1: key partitioning
#---------------------------------------------------------------------- #----------------------------------------------------------------------
#--replace_result $data_directory <data_directory> $index_directory <index_directory> $ENG1 ENG1 #--replace_result $ENG1 ENG1
eval create table tb3_eng1 ( eval create table tb3_eng1 (
i1 int NOT NULL auto_increment, primary key (i1), i1 int NOT NULL auto_increment, primary key (i1),
$column_list $column_list
) engine=$ENG1 ) engine=$ENG1
PARTITION BY KEY (i1) PARTITIONS 4 PARTITION BY KEY (i1) PARTITIONS 4
(PARTITION part1 $data_directory $index_directory, (PARTITION part1,
PARTITION part2 $data_directory $index_directory, PARTITION part2,
PARTITION part3 $data_directory $index_directory, PARTITION part3,
PARTITION part4 $data_directory $index_directory); PARTITION part4);
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR #--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt' eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
# FIXME: disabled this test because of valgrind error -- echo # test with not null
#create table t1 (a bit not null) partition by key (a); create table t1 (a bit not null) partition by key (a);
#insert into t1 values (b'1'); insert into t1 values (b'1');
#select * from t1 where a = b'1'; select hex(a) from t1 where a = b'1';
#drop table t1; drop table t1;
create table t1 (a tinyint not null) partition by key (a); create table t1 (a tinyint not null) partition by key (a);
insert into t1 values (2); insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
...@@ -37,14 +37,14 @@ insert into t1 values (2); ...@@ -37,14 +37,14 @@ insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
drop table t1; drop table t1;
create table t1 (a float not null) partition by key (a); create table t1 (a float not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
drop table t1; drop table t1;
create table t1 (a double not null) partition by key (a); create table t1 (a double not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
drop table t1; drop table t1;
create table t1 (a decimal not null) partition by key (a); create table t1 (a decimal(4,2) not null) partition by key (a);
insert into t1 values (2.1); insert into t1 values (2.1);
select * from t1 where a = 2.1; select * from t1 where a = 2.1;
drop table t1; drop table t1;
...@@ -100,11 +100,11 @@ create table t1 (a set('y','n') not null) partition by key (a); ...@@ -100,11 +100,11 @@ create table t1 (a set('y','n') not null) partition by key (a);
insert into t1 values ('y'); insert into t1 values ('y');
select * from t1 where a = 'y'; select * from t1 where a = 'y';
drop table t1; drop table t1;
# FIXME: disabled this test because of valgrind error -- echo # test with null allowed
#create table t1 (a bit) partition by key (a); create table t1 (a bit) partition by key (a);
#insert into t1 values (b'1'); insert into t1 values (b'1');
#select * from t1 where a = b'1'; select hex(a) from t1 where a = b'1';
#drop table t1; drop table t1;
create table t1 (a tinyint) partition by key (a); create table t1 (a tinyint) partition by key (a);
insert into t1 values (2); insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
...@@ -126,14 +126,14 @@ insert into t1 values (2); ...@@ -126,14 +126,14 @@ insert into t1 values (2);
select * from t1 where a = 2; select * from t1 where a = 2;
drop table t1; drop table t1;
create table t1 (a float) partition by key (a); create table t1 (a float) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
drop table t1; drop table t1;
create table t1 (a double) partition by key (a); create table t1 (a double) partition by key (a);
insert into t1 values (2.1); insert into t1 values (0.5);
select * from t1 where a = 2.1; select * from t1 where a = 0.5;
drop table t1; drop table t1;
create table t1 (a decimal) partition by key (a); create table t1 (a decimal(4,2)) partition by key (a);
insert into t1 values (2.1); insert into t1 values (2.1);
select * from t1 where a = 2.1; select * from t1 where a = 2.1;
drop table t1; drop table t1;
...@@ -192,18 +192,23 @@ drop table t1; ...@@ -192,18 +192,23 @@ drop table t1;
create table t1 (a varchar(65531)) partition by key (a); create table t1 (a varchar(65531)) partition by key (a);
insert into t1 values ('bbbb'); insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
select * from t1 where a like 'aaa%'; select * from t1 where a like 'aaa%';
select * from t1 where a = 'bbbb';
drop table t1; drop table t1;
create table t1 (a varchar(65532)) partition by key (a); create table t1 (a varchar(65532)) partition by key (a);
insert into t1 values ('bbbb'); insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
select * from t1 where a like 'aaa%'; select * from t1 where a like 'aaa%';
select * from t1 where a = 'bbbb';
drop table t1; drop table t1;
create table t1 (a varchar(65533) not null) partition by key (a); create table t1 (a varchar(65533) not null) partition by key (a);
insert into t1 values ('bbbb');
insert into t1 values ('aaaa'); insert into t1 values ('aaaa');
select * from t1 where a = 'aaa%'; select * from t1 where a = 'aaaa';
select * from t1 where a like 'aaa%';
select * from t1 where a = 'bbbb';
drop table t1; drop table t1;
-- error ER_TOO_BIG_ROWSIZE -- error ER_TOO_BIG_ROWSIZE
create table t1 (a varchar(65533)) partition by key (a); create table t1 (a varchar(65533)) partition by key (a);
...@@ -211,3 +216,14 @@ create table t1 (a varchar(65533)) partition by key (a); ...@@ -211,3 +216,14 @@ create table t1 (a varchar(65533)) partition by key (a);
create table t1 (a varchar(65534) not null) partition by key (a); create table t1 (a varchar(65534) not null) partition by key (a);
-- error ER_TOO_BIG_ROWSIZE -- error ER_TOO_BIG_ROWSIZE
create table t1 (a varchar(65535)) partition by key (a); create table t1 (a varchar(65535)) partition by key (a);
#
# Bug#34358: error in key_restore for bitfields with uneven bits
#
create table t1 (a bit(27), primary key (a)) engine=myisam
partition by hash (a)
(partition p0, partition p1, partition p2);
show create table t1;
insert into t1 values (1),(4),(7),(10),(13),(16),(19),(22),(25),(28),(31),(34);
select hex(a) from t1 where a = 7;
drop table t1;
...@@ -8793,6 +8793,23 @@ Field_bit::Field_bit(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, ...@@ -8793,6 +8793,23 @@ Field_bit::Field_bit(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
} }
void Field_bit::hash(ulong *nr, ulong *nr2)
{
if (is_null())
{
*nr^= (*nr << 1) | 1;
}
else
{
CHARSET_INFO *cs= &my_charset_bin;
longlong value= Field_bit::val_int();
uchar tmp[8];
mi_int8store(tmp,value);
cs->coll->hash_sort(cs, tmp, 8, nr, nr2);
}
}
size_t size_t
Field_bit::do_last_null_byte() const Field_bit::do_last_null_byte() const
{ {
......
...@@ -1904,6 +1904,7 @@ class Field_bit :public Field { ...@@ -1904,6 +1904,7 @@ class Field_bit :public Field {
Field::move_field_offset(ptr_diff); Field::move_field_offset(ptr_diff);
bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*); bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
} }
void hash(ulong *nr, ulong *nr2);
private: private:
virtual size_t do_last_null_byte() const; virtual size_t do_last_null_byte() const;
......
...@@ -168,6 +168,7 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info, ...@@ -168,6 +168,7 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
} }
for (key_part= key_info->key_part ; (int) key_length > 0 ; key_part++) for (key_part= key_info->key_part ; (int) key_length > 0 ; key_part++)
{ {
uchar used_uneven_bits= 0;
if (key_part->null_bit) if (key_part->null_bit)
{ {
if (*from_key++) if (*from_key++)
...@@ -186,6 +187,8 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info, ...@@ -186,6 +187,8 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
set_rec_bits(bits, to_record + key_part->null_offset + set_rec_bits(bits, to_record + key_part->null_offset +
(key_part->null_bit == 128), (key_part->null_bit == 128),
field->bit_ofs, field->bit_len); field->bit_ofs, field->bit_len);
/* we have now used the byte with 'uneven' bits */
used_uneven_bits= 1;
} }
} }
if (key_part->key_part_flag & HA_BLOB_PART) if (key_part->key_part_flag & HA_BLOB_PART)
...@@ -222,7 +225,9 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info, ...@@ -222,7 +225,9 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
else else
{ {
length= min(key_length, key_part->length); length= min(key_length, key_part->length);
memcpy(to_record + key_part->offset, from_key, (size_t) length); /* skip the byte with 'uneven' bits, if used */
memcpy(to_record + key_part->offset, from_key + used_uneven_bits
, (size_t) length - used_uneven_bits);
} }
from_key+= length; from_key+= length;
key_length-= length; key_length-= length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment