Commit 2bac240c authored by unknown's avatar unknown

Bug#34225: test suit parts uses /tmp-dir

Since it used /tmp-dir, it continues to fail on the same server
until the /tmp-dir is cleaned. (Another problem was that it
uses DATA/INDEX DIR without checking for symlink, which is needed)


Solution:
Moved all DATA/INDEX DIR test to a new partition_basic_symlink.inc file
and use this for myisam and innodb, also requiring symlinks and
not_windows.
(i.e. removed DATA/INDEX DIR use from several tests)


mysql-test/suite/parts/inc/partition_basic.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_bigint.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_binary.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_bit.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_blob.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_char.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_date.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_datetime.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_decimal.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_double.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_enum.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_float.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_int.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_16col.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_32col.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_4col.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_8col.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_mediumint.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_set.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_smallint.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_text.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_time.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_timestamp.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_tinyint.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_varbinary.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_varchar.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_year.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_bit_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_bit_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_char_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_char_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_datetime_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_datetime_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_decimal_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_decimal_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_float_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_float_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_int_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_int_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_special_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/r/partition_special_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/t/partition_sessions.test:
  Bug#34225: test suit parts uses /tmp-dir
  
  Removed the DATA/INDEX DIR, since the test is not dependent of it
  (adding "--source include/have_symlink.inc" would have disabled it
  on some platforms/configurations)
mysql-test/suite/parts/inc/partition_basic_symlink.inc:
  Bug#34225: test suit parts uses /tmp-dir
  
  Added this test case for testing some DATA/INDEX DIRECTORY cases
  since I removed so much of it from all other tests.
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Added this test case for testing some DATA/INDEX DIRECTORY cases
  since I removed so much of it from all other tests.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
  Bug#34225: test suit parts uses /tmp-dir
  
  Added this test case for testing some DATA/INDEX DIRECTORY cases
  since I removed so much of it from all other tests.
mysql-test/suite/parts/t/partition_basic_symlink_innodb.test:
  Bug#34225: test suit parts uses /tmp-dir
  
  Added this test case for testing some DATA/INDEX DIRECTORY cases
  since I removed so much of it from all other tests.
mysql-test/suite/parts/t/partition_basic_symlink_myisam.test:
  Bug#34225: test suit parts uses /tmp-dir
  
  Added this test case for testing some DATA/INDEX DIRECTORY cases
  since I removed so much of it from all other tests.
parent 629b355b
......@@ -30,29 +30,6 @@
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
......@@ -72,28 +49,6 @@ if ($more_pk_ui_tests)
--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)
{
......
################################################################################
# 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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1;
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
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
drop table if exists t1;
--enable_warnings
......@@ -23,8 +11,8 @@ drop table t1;
eval create table t1 (a bit(0), primary key (a)) engine=$engine
partition by key (a) (
partition pa1 $data_directory $index_directory,
partition pa2 $data_directory $index_directory);
partition pa1,
partition pa2);
show create table t1;
drop table t1;
......@@ -42,10 +30,10 @@ drop table t1;
eval create table t1 (a bit(64), primary key (a)) engine=$engine
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
......
--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
eval create table t1 (a blob not null, primary key(a(767))) engine=$engine
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
#show create table t1;
#insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64));
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
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');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
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);
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
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);
select * from t1;
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values ('A'),('D'),('L'),('G');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
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
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 pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
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'),
......
--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
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 pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
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
partition by key(a,b,c,d,e,f,g,h) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
--disable_abort_on error
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
partition by key (a,b,c,d) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values
('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
partition by key(a,b,c,d,e,f,g,h) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values
('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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1;
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1;
......
--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
eval create table t1 (a text not null, primary key(a(767))) engine=$engine
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
#show create table t1;
#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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
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');
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1;
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
......
--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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
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
partition by key (a) (
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1;
......
This diff is collapsed.
This diff is collapsed.
......@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a bit(0), primary key (a)) engine='INNODB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
partition pa1,
partition pa2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
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;
create table t1 (a bit(64), primary key (a)) engine='INNODB'
partition by key (a) partitions 2;
......@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit(64), primary key (a)) engine='INNODB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
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
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
......
......@@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a bit(0), primary key (a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
partition pa1,
partition pa2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
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;
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) partitions 2;
......@@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
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
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
......
create table t1 (a timestamp not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
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');
select * from t1;
a
......@@ -281,24 +273,16 @@ a
drop table t4;
create table t1 (a date not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date NOT NULL,
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');
select * from t1;
a
......@@ -608,24 +592,16 @@ a
drop table t4;
create table t1 (a time not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time NOT NULL,
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');
select * from t1;
a
......@@ -1073,24 +1049,16 @@ a
drop table t4;
create table t1 (a datetime not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime NOT NULL,
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');
select * from t1;
a
......@@ -1350,24 +1318,16 @@ a
drop table t4;
create table t1 (a year not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL,
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');
select * from t1;
a
......
create table t1 (a timestamp not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
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');
select * from t1;
a
......@@ -281,24 +273,16 @@ a
drop table t4;
create table t1 (a date not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date NOT NULL,
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');
select * from t1;
a
......@@ -608,24 +592,16 @@ a
drop table t4;
create table t1 (a time not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time NOT NULL,
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');
select * from t1;
a
......@@ -1073,24 +1049,16 @@ a
drop table t4;
create table t1 (a datetime not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime NOT NULL,
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');
select * from t1;
a
......@@ -1350,24 +1318,16 @@ a
drop table t4;
create table t1 (a year not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL,
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');
select * from t1;
a
......
create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL,
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);
select * from t1;
a
......
create table t1 (a decimal(10,4) not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL,
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);
select * from t1;
a
......
create table t1 (a float not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` float NOT NULL,
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);
select * from t1;
a
......@@ -91,24 +83,16 @@ count(*)
drop table t2;
create table t1 (a double not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double NOT NULL,
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);
select * from t1;
a
......
create table t1 (a float not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` float NOT NULL,
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);
select * from t1;
a
......@@ -91,24 +83,16 @@ count(*)
drop table t2;
create table t1 (a double not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double NOT NULL,
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);
select * from t1;
a
......
create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -108,24 +100,16 @@ a
drop table t3;
create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -216,24 +200,16 @@ a
drop table t3;
create table t1 (a int unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -324,24 +300,16 @@ a
drop table t3;
create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -432,24 +400,16 @@ a
drop table t3;
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL,
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);
select * from t1;
a
......
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -108,24 +100,16 @@ a
drop table t3;
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -216,24 +200,16 @@ a
drop table t3;
create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -324,24 +300,16 @@ a
drop table t3;
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL,
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);
select * from t1;
a
......@@ -432,24 +400,16 @@ a
drop table t3;
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/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);
partition pa1 max_rows=20 min_rows=2,
partition pa2 max_rows=30 min_rows=3,
partition pa3 max_rows=30 min_rows=4,
partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL,
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);
select * from t1;
a
......
################################################################################
# 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;
let $col_access_list = f1,f2,f3,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
#---------------------------------------------------
......@@ -134,16 +113,16 @@ create table test_stat (
# 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 (
i1 int NOT NULL auto_increment, primary key (i1),
$column_list
) engine=$ENG1
PARTITION BY KEY (i1) PARTITIONS 4
(PARTITION part1 $data_directory $index_directory,
PARTITION part2 $data_directory $index_directory,
PARTITION part3 $data_directory $index_directory,
PARTITION part4 $data_directory $index_directory);
(PARTITION part1,
PARTITION part2,
PARTITION part3,
PARTITION part4);
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
......
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