Fixes for the bugs

Bug#31610 Remove outdated and redundant tests:
                 partition_02myisam partition_03ndb
       Bug#32405 testsuite parts: partition_char_myisam wrong content
and cleanup of testsuite
   - remove/correct wrong comments
   - remove workarounds for fixed bugs
   - replace error numbers with error names
   - exclude subtests from execution which fail now because of
     new limitations for partitioning functions
   - remove code for the no more intended dual use
     fast test in regression tests/slow test in testsuite
   - analyze and fix problems with partition_char_innodb
   - fix problems caused by last change of error numbers
   - Introduce error name to error number mapping which makes
     maintenance after next error renumbering easier


BitKeeper/deleted/.del-partition_03ndb.result:
  Rename: mysql-test/suite/ndb/r/partition_03ndb.result -> BitKeeper/deleted/.del-partition_03ndb.result
BitKeeper/deleted/.del-partition_03ndb.test:
  Rename: mysql-test/suite/ndb/t/partition_03ndb.test -> BitKeeper/deleted/.del-partition_03ndb.test
BitKeeper/deleted/.del-partition_1.inc:
  Rename: mysql-test/include/partition_1.inc -> BitKeeper/deleted/.del-partition_1.inc
BitKeeper/deleted/.del-partition_02myisam.result:
  Rename: mysql-test/r/partition_02myisam.result -> BitKeeper/deleted/.del-partition_02myisam.result
BitKeeper/deleted/.del-partition_02myisam.test:
  Rename: mysql-test/t/partition_02myisam.test -> BitKeeper/deleted/.del-partition_02myisam.test
BitKeeper/deleted/.del-partition_char_myisam.result:
  Rename: mysql-test/suite/parts/r/partition_char_myisam.result -> BitKeeper/deleted/.del-partition_char_myisam.result
mysql-test/suite/parts/inc/methods1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition.pre:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_10.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_11.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_12.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_20.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter3.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter4.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_11.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_13.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_41.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_basic.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_binary.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_bit.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_blob.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_char.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_drop.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_cleanup.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_directory.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_engine.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_enum.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout_check1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout_check2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_methods1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_methods2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_set.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax_1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax_2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_text.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg3.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_value.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_varbinary.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_varchar.inc:
  Fixes + cleanup
mysql-test/suite/parts/r/partition_alter1_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter1_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter2_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter2_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter4_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter4_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_bit_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_char_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_datetime_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_decimal_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_engine_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_float_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_float_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_int_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_special_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_syntax_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_syntax_myisam.result:
  Updated result
mysql-test/suite/parts/t/disabled.def:
  Fixes + cleanup
mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter3_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter3_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter4_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter4_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_char_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_char_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_datetime_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_datetime_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_decimal_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_decimal_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_float_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_float_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_special_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_special_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/r/partition_char_myisam.result:
  Updated result
  bk rm + new file is caused by bk complaining about filetype
This commit is contained in:
unknown 2007-11-20 16:04:07 +01:00
parent 82ece99c63
commit 0a9e4c79d4
120 changed files with 3437 additions and 7479 deletions
mysql-test
include
r
suite
ndb
parts
inc
r
t

View file

@ -1,750 +0,0 @@
-- source include/have_partition.inc
# include/partition_1.inc
#
# Partitionong tests
#
# Attention: The variable
# $engine -- Storage engine to be tested.
# must be set within the script sourcing this file.
#
--disable_abort_on_error
SET AUTOCOMMIT= 1;
##### Disabled testcases, because of open bugs #####
--echo
--echo #------------------------------------------------------------------------
--echo # There are several testcases disabled because ouf the open bugs
--echo # #15407 , #15408 , #15890 , #15961 , #13447 , #15966 , #15968, #16370
--echo #------------------------------------------------------------------------
# Bug#15407 Partitions: crash if subpartition
let $fixed_bug15407= 0;
# Bug#15408 Partitions: subpartition names are not unique
let $fixed_bug15408= 0;
# Bug#15890 Partitions: Strange interpretation of partition number
let $fixed_bug15890= 0;
# Bug#15961 Partitions: Creation of subpart. table without subpart. rule not rejected
let $fixed_bug15961= 0;
# Bug#13447 Partitions: crash with alter table
let $fixed_bug13447= 0;
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
let $fixed_bug15966= 0;
# Bug#15968 Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
let $fixed_bug15968= 0;
# Bug #16370 Partitions: subpartitions names not mentioned in SHOW CREATE TABLE output
let $fixed_bug16370= 0;
##### Option, for displaying files #####
#
# Attention: Displaying the directory content via "ls $MYSQLTEST_VARDIR/master-data/test/t*"
# is probably not portable.
# let $ls= 0; disables the execution of "ls ....."
let $ls= 0;
################################################################################
# Partitioning syntax
#
# CREATE TABLE .... (column-list ..)
# PARTITION BY
# KEY '(' ( column-list ) ')'
# | RANGE '(' ( expr ) ')'
# | LIST '(' ( expr ) ')'
# | HASH '(' ( expr ) ')'
# [PARTITIONS num ]
# [SUBPARTITION BY
# KEY '(' ( column-list ) ')'
# | HASH '(' ( expr ) ')'
# [SUBPARTITIONS num ]
# ]
# [ '('
# ( PARTITION logical-name
# [ VALUES LESS THAN '(' ( expr | MAX_VALUE ) ')' ]
# [ VALUES IN '(' (expr)+ ')' ]
# [ TABLESPACE tablespace-name ]
# [ [ STORAGE ] ENGINE [ '=' ] storage-engine-name ]
# [ NODEGROUP nodegroup-id ]
# [ '('
# ( SUBPARTITION logical-name
# [ TABLESPACE tablespace-name ]
# [ STORAGE ENGINE = storage-engine-name ]
# [ NODEGROUP nodegroup-id ]
# )+
# ')'
# )+
# ')'
# ]
################################################################################
--echo
--echo #------------------------------------------------------------------------
--echo # 0. Setting of auxiliary variables + Creation of an auxiliary table
--echo # needed in all testcases
--echo #------------------------------------------------------------------------
let $max_row= `SELECT @max_row`;
let $max_row_div2= `SELECT @max_row DIV 2`;
let $max_row_div3= `SELECT @max_row DIV 3`;
let $max_row_div4= `SELECT @max_row DIV 4`;
let $max_int_4= 2147483647;
--disable_warnings
DROP TABLE IF EXISTS t0_template;
--enable_warnings
CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1))
ENGINE = MEMORY;
--echo # Logging of <max_row> INSERTs into t0_template suppressed
--disable_query_log
let $num= $max_row;
while ($num)
{
eval INSERT INTO t0_template SET f1 = $num, f2 = '---$num---';
dec $num;
}
--enable_query_log
--echo
--echo #------------------------------------------------------------------------
--echo # 1. Some syntax checks
--echo #------------------------------------------------------------------------
--echo # 1.1 Subpartioned table without subpartitioning rule must be rejected
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
if ($fixed_bug15961)
{
# Bug#15961 Partitions: Creation of subpart. table without subpart. rule not rejected
--error 9999
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11));
}
--echo # FIXME Implement testcases, where it is checked that all create and
--echo # alter table statements
--echo # - with missing mandatory parameters are rejected
--echo # - with optional parameters are accepted
--echo # - with wrong combinations of optional parameters are rejected
--echo # - ............
--echo
--echo #------------------------------------------------------------------------
--echo # 2. Checks where the engine is assigned on all supported (CREATE TABLE
--echo # statement) positions + basic operations on the tables
--echo # Storage engine mixups are currently (2005-12-23) not supported
--echo #------------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 2.1 non partitioned table (for comparison)
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine;
# MLML Full size (as check of check routine)
--source include/partition_10.inc
DROP TABLE t1;
#
--echo # 2.2 Assignment of storage engine just after column list only
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
PARTITION BY HASH(f1) PARTITIONS 2;
--source include/partition_10.inc
DROP TABLE t1;
#
--echo # 2.3 Assignment of storage engine just after partition or subpartition
--echo # name only
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1)
( PARTITION part1 STORAGE ENGINE = $engine,
PARTITION part2 STORAGE ENGINE = $engine
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
);
--source include/partition_10.inc
DROP TABLE t1;
#
--echo # 2.4 Some but not all named partitions or subpartitions get a storage
--echo # engine assigned
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1)
( PARTITION part1 STORAGE ENGINE = $engine,
PARTITION part2
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1)
( PARTITION part1 ,
PARTITION part2 STORAGE ENGINE = $engine
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21,
SUBPARTITION subpart22 )
);
--source include/partition_10.inc
DROP TABLE t1;
#
--echo # 2.5 Storage engine assignment after partition name + after name of
--echo # subpartitions belonging to another partition
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2) ENGINE = $engine
(SUBPARTITION subpart11,
SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4) ENGINE = $engine
(SUBPARTITION subpart21,
SUBPARTITION subpart22)
);
--source include/partition_10.inc
DROP TABLE t1;
#
--echo # 2.6 Precedence of storage engine assignments
--echo # 2.6.1 Storage engine assignment after column list + after partition
--echo # or subpartition name
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
PARTITION BY HASH(f1)
( PARTITION part1 STORAGE ENGINE = $engine,
PARTITION part2 STORAGE ENGINE = $engine
);
--source include/partition_10.inc
DROP TABLE t1;
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = $engine
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
);
--source include/partition_10.inc
DROP TABLE t1;
--echo # 2.6.2 Storage engine assignment after partition name + after
--echo # subpartition name
# in partition part + in sub partition part
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN ($max_row_div2) STORAGE ENGINE = $engine
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine),
PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21 STORAGE ENGINE = $engine,
SUBPARTITION subpart22 STORAGE ENGINE = $engine)
);
--source include/partition_10.inc
DROP TABLE t1;
--echo # 2.7 Session default engine differs from engine used within create table
eval SET SESSION storage_engine=$engine_other;
if ($fixed_bug15966)
{
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) ( PARTITION part1 ENGINE = $engine);
--source include/partition_10.inc
DROP TABLE t1;
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11 STORAGE ENGINE = $engine,
SUBPARTITION subpart12 STORAGE ENGINE = $engine));
--source include/partition_10.inc
DROP TABLE t1;
}
eval SET SESSION storage_engine=$engine;
--echo
--echo #------------------------------------------------------------------------
--echo # 3. Check assigning the number of partitions and subpartitions
--echo # with and without named partitions/subpartitions
--echo #------------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 3.1 (positive) without partition/subpartition number assignment
--echo # 3.1.1 no partition number, no named partitions
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1);
--source include/partition_10.inc
DROP TABLE t1;
--echo # 3.1.2 no partition number, named partitions
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2);
--source include/partition_10.inc
DROP TABLE t1;
# Attention: Several combinations are impossible
# If subpartitioning exists
# - partitioning algorithm must be RANGE or LIST
# This implies the assignment of named partitions.
# - subpartitioning algorithm must be HASH or KEY
--echo # 3.1.3 variations on no partition/subpartition number, named partitions,
--echo # different subpartitions are/are not named
#
# Partition name -- "properties"
# part1 -- first/non last
# part2 -- non first/non last
# part3 -- non first/ last
#
# Testpattern:
# named subpartitions in
# Partition part1 part2 part3
# N N N
# N N Y
# N Y N
# N Y Y
# Y N N
# Y N Y
# Y Y N
# Y Y Y
--disable_query_log
let $part0= CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1);
#
eval SET @aux = '(PARTITION part1 VALUES LESS THAN ($max_row_div2),';
let $part1_N= `SELECT @AUX`;
eval SET @aux = '(PARTITION part1 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart11 , SUBPARTITION subpart12 ),';
let $part1_Y= `SELECT @AUX`;
#
eval SET @aux = 'PARTITION part2 VALUES LESS THAN ($max_row),';
let $part2_N= `SELECT @AUX`;
eval SET @aux = 'PARTITION part2 VALUES LESS THAN ($max_row)
(SUBPARTITION subpart21 , SUBPARTITION subpart22 ),';
let $part2_Y= `SELECT @AUX`;
#
eval SET @aux = 'PARTITION part3 VALUES LESS THAN ($max_int_4))';
let $part3_N= `SELECT @AUX`;
eval SET @aux = 'PARTITION part3 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart31 , SUBPARTITION subpart32 ))';
let $part3_Y= `SELECT @AUX`;
--enable_query_log
eval $part0 $part1_N $part2_N $part3_N ;
DROP TABLE t1;
# Bug#15407 Partitions: crash if subpartition
if ($fixed_bug15407)
{
eval $part0 $part1_N $part2_N $part3_Y ;
--source include/partition_10.inc
DROP TABLE t1;
eval $part0 $part1_N $part2_Y $part3_N ;
--source include/partition_10.inc
DROP TABLE t1;
eval $part0 $part1_N $part2_Y $part3_Y ;
--source include/partition_10.inc
DROP TABLE t1;
eval $part0 $part1_Y $part2_N $part3_N ;
--source include/partition_10.inc
DROP TABLE t1;
eval $part0 $part1_Y $part2_N $part3_Y ;
--source include/partition_10.inc
DROP TABLE t1;
eval $part0 $part1_Y $part2_Y $part3_N ;
--source include/partition_10.inc
DROP TABLE t1;
}
eval $part0 $part1_Y $part2_Y $part3_Y ;
--source include/partition_10.inc
DROP TABLE t1;
--echo # 3.2 partition/subpartition numbers good and bad values and notations
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 3.2.1 partition/subpartition numbers INTEGER notation
# ML: "positive/negative" is my private judgement. It need no to correspond
# with the server response.
# (positive) number = 2
let $part_number= 2;
--source include/partition_11.inc
# (positive) special case number = 1
let $part_number= 1;
--source include/partition_11.inc
# (negative) 0 is non sense
let $part_number= 0;
--source include/partition_11.inc
# (negative) -1 is non sense
let $part_number= -1;
--source include/partition_11.inc
# (negative) 1000000 is too huge
let $part_number= 1000000;
--source include/partition_11.inc
if ($fixed_bug15890)
{
--echo # 3.2.2 partition/subpartition numbers DECIMAL notation
# (positive) number = 2.0
let $part_number= 2.0;
--source include/partition_11.inc
# (negative) -2.0 is non sense
let $part_number= -2.0;
--source include/partition_11.inc
# (negative) case number = 0.0 is non sense
let $part_number= 0.0;
--source include/partition_11.inc
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) number = 1.5 is non sense
let $part_number= 1.5;
--source include/partition_11.inc
# (negative) number is too huge
let $part_number= 999999999999999999999999999999.999999999999999999999999999999;
--source include/partition_11.inc
# (negative) number is nearly zero
let $part_number= 0.000000000000000000000000000001;
--source include/partition_11.inc
--echo # 3.2.3 partition/subpartition numbers FLOAT notation
##### FLOAT notation
# (positive) number = 2.0E+0
let $part_number= 2.0E+0;
--source include/partition_11.inc
# Bug#15890 Partitions: Strange interpretation of partition number
# (positive) number = 0.2E+1
let $part_number= 0.2E+1;
--source include/partition_11.inc
# (negative) -2.0E+0 is non sense
let $part_number= -2.0E+0;
--source include/partition_11.inc
# (negative) 0.15E+1 is non sense
let $part_number= 0.15E+1;
--source include/partition_11.inc
# (negative) 0.0E+300 is zero
let $part_number= 0.0E+300;
--source include/partition_11.inc
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 1E+300 is too huge
let $part_number= 1E+300;
--source include/partition_11.inc
# (negative) 1E-300 is nearly zero
let $part_number= 1E-300;
--source include/partition_11.inc
}
--echo # 3.2.4 partition/subpartition numbers STRING notation
##### STRING notation
# (negative?) case number = '2'
let $part_number= '2';
--source include/partition_11.inc
# (negative?) case number = '2.0'
let $part_number= '2.0';
--source include/partition_11.inc
# (negative?) case number = '0.2E+1'
let $part_number= '0.2E+1';
--source include/partition_11.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= '2A';
--source include/partition_11.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= 'A2';
--source include/partition_11.inc
# (negative) empty string
let $part_number= '';
--source include/partition_11.inc
# (negative) string without any digits
let $part_number= 'GARBAGE';
--source include/partition_11.inc
--echo # 3.2.5 partition/subpartition numbers other notations
# (negative) Strings starts with digit, but 'A' follows
let $part_number= 2A;
--source include/partition_11.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= A2;
--source include/partition_11.inc
# (negative) string without any digits
let $part_number= GARBAGE;
--source include/partition_11.inc
# (negative?) double quotes
let $part_number= "2";
--source include/partition_11.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= "2A";
--source include/partition_11.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= "A2";
--source include/partition_11.inc
# (negative) string without any digits
let $part_number= "GARBAGE";
--source include/partition_11.inc
--echo # 3.3 Mixups of assigned partition/subpartition numbers and names
--echo # 3.3.1 (positive) number of partition/subpartition
--echo # = number of named partition/subpartition
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1) PARTITIONS 2
SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
--source include/partition_layout.inc
DROP TABLE t1;
--echo # 3.3.2 (positive) number of partition/subpartition ,
--echo # 0 (= no) named partition/subpartition
--echo # already checked above
--echo # 3.3.3 (negative) number of partitions/subpartitions
--echo # > number of named partitions/subpartitions
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ;
# Wrong number of named subpartitions in first partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11 ),
PARTITION part2 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
# Wrong number of named subpartitions in non first/non last partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2000)
(SUBPARTITION subpart21 ),
PARTITION part3 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart31, SUBPARTITION subpart32)
);
# Wrong number of named subpartitions in last partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1) PARTITIONS 2
SUBPARTITION BY HASH(f1) SUBPARTITIONS 2
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart21 )
);
--echo # 3.3.4 (negative) number of partitions < number of named partitions
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ;
# Wrong number of named subpartitions in first partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
# Wrong number of named subpartitions in non first/non last partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2000)
(SUBPARTITION subpart21 ),
PARTITION part3 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart31, SUBPARTITION subpart32)
);
# Wrong number of named subpartitions in last partition
--error 1064
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1) SUBPARTITIONS 1
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (2147483647)
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
--echo
--echo #------------------------------------------------------------------------
--echo # 4. Checks of logical partition/subpartition name
--echo # file name clashes during CREATE TABLE
--echo #------------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 4.1 (negative) A partition name used more than once
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1);
#
if ($fixed_bug15408)
{
# Bug#15408 Partitions: subpartition names are not unique
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
( PARTITION part1 VALUES LESS THAN (1000)
(SUBPARTITION subpart11, SUBPARTITION subpart11)
);
}
--echo # FIXME Implement testcases with filename problems
--echo # existing file of other table --- partition/subpartition file name
--echo # partition/subpartition file name --- file of the same table
--echo
--echo #------------------------------------------------------------------------
--echo # 5. Alter table experiments
--echo #------------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 5.1 alter table add partition
--echo # 5.1.1 (negative) add partition to non partitioned table
CREATE TABLE t1 ( f1 INTEGER, f2 char(20));
--source include/partition_layout.inc
# MyISAM gets ER_PARTITION_MGMT_ON_NONPARTITIONED and NDB 1005
# The error code of NDB differs, because all NDB tables are partitioned even
# if the CREATE TABLE does not contain a partitioning clause.
--error ER_PARTITION_MGMT_ON_NONPARTITIONED,1005
ALTER TABLE t1 ADD PARTITION (PARTITION part1);
--source include/partition_layout.inc
DROP TABLE t1;
--echo # 5.1.2 Add one partition to a table with one partition
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1);
--source include/partition_layout.inc
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
--disable_query_log
eval SELECT $engine = 'NDB' INTO @aux;
let $my_exit= `SELECT @aux`;
if ($my_exit)
{
exit;
}
--enable_query_log
ALTER TABLE t1 ADD PARTITION (PARTITION part1);
--source include/partition_12.inc
DROP TABLE t1;
--echo # 5.1.3 Several times add one partition to a table with some partitions
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
--source include/partition_layout.inc
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
# Partition name before first existing partition name
ALTER TABLE t1 ADD PARTITION (PARTITION part0);
--source include/partition_12.inc
DELETE FROM t1;
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
# Partition name between existing partition names
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
--source include/partition_12.inc
DELETE FROM t1;
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
if ($fixed_bug13447)
{
# Partition name after all existing partition names
# Bug#13447 Partitions: crash with alter table
ALTER TABLE t1 ADD PARTITION (PARTITION part4);
}
--source include/partition_12.inc
DROP TABLE t1;
--echo # 5.1.4 Add several partitions to a table with some partitions
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3);
--source include/partition_layout.inc
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
if ($fixed_bug13447)
{
# Bug#13447 Partitions: crash with alter table
ALTER TABLE t1 ADD PARTITION (PARTITION part0, PARTITION part2, PARTITION part4);
}
--source include/partition_12.inc
DROP TABLE t1;
--echo # 5.1.5 (negative) Add partitions to a table with some partitions
--echo # clash on new and already existing partition names
CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2, PARTITION part3);
# Clash on first/non last partition name
--error ER_SAME_NAME_PARTITION
ALTER TABLE t1 ADD PARTITION (PARTITION part1);
# Clash on non first/non last partition name
--error ER_SAME_NAME_PARTITION
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
# Clash on non first/last partition name
--error ER_SAME_NAME_PARTITION
ALTER TABLE t1 ADD PARTITION (PARTITION part3);
# Clash on all partition names
--error ER_SAME_NAME_PARTITION
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part2, PARTITION part3);
DROP TABLE t1;
# FIXME Is there any way to add a subpartition to an already existing partition
--echo # 5.2 alter table add subpartition
--echo # 5.2.1 Add one subpartition to a table with subpartitioning rule and
--echo # no explicit defined subpartitions
eval CREATE TABLE t1 ( f1 INTEGER, f2 char(20))
PARTITION BY RANGE(f1)
SUBPARTITION BY HASH(f1)
(PARTITION part1 VALUES LESS THAN ($max_row_div2));
if ($fixed_bug16370)
{
--source include/partition_layout.inc
}
eval INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND $max_row_div2 - 1;
eval ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN ($max_int_4)
(SUBPARTITION subpart21));
if ($fixed_bug16370)
{
--source include/partition_12.inc
}
DROP TABLE t1;
DROP TABLE if exists t0_template;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,26 +0,0 @@
###############################################
# #
# Partition tests NDB tables #
# #
###############################################
#
# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE !
# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN
# THE SOURCED FIELS ONLY.
#
# Storage engine to be tested
let $engine= 'NDB' ;
-- source include/have_ndb.inc
eval SET SESSION storage_engine=$engine;
# Other storage engine <> storage engine to be tested
let $engine_other= 'MEMORY';
# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments
# on partioned tables
# Attention: In the moment the result files fit to @max_row = 200 only
SET @max_row = 200;
-- source include/partition_1.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_methods1.inc #
# inc/partition_methods1.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@ -11,7 +11,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
# 3. Execute include/partition_check.inc #
# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@ -21,14 +21,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# include/partition_method1s.inc #
# inc/partition_method1s.inc #
# #
# Attention: The routine include/partition_methods2.inc is very similar #
# Attention: The routine inc/partition_methods2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -52,7 +52,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY KEY
@ -67,7 +66,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST
@ -90,7 +88,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE
@ -114,7 +111,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
@ -137,7 +133,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
@ -163,7 +158,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
@ -186,7 +180,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
@ -209,5 +202,4 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;

View file

@ -21,253 +21,207 @@ let $sqlfunc = ascii(col1);
let $valsqlfunc = ascii('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ord(col1);
let $valsqlfunc = ord('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = greatest(col1,15);
let $valsqlfunc = greatest(1,15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = isnull(col1);
let $valsqlfunc = isnull(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = least(col1,15);
let $valsqlfunc = least(15,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = case when col1>15 then 20 else 10 end;
let $valsqlfunc = case when 1>30 then 20 else 15 end;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ifnull(col1,30);
let $valsqlfunc = ifnull(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = nullif(col1,30);
let $valsqlfunc = nullif(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_length(col1);
let $valsqlfunc = bit_length(255);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = char_length(col1);
let $valsqlfunc = char_length('a');
#let $coltype = int;
#--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = character_length(col1);
let $valsqlfunc = character_length('a');
let $coltype = char(30)
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = find_in_set(col1,'1,2,3,4,5,6,7,8,9');
let $valsqlfunc = find_in_set('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = instr(col1,'acb');
let $valsqlfunc = instr('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = length(col1);
let $valsqlfunc = length('a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = locate('a',col1);
let $valsqlfunc = locate('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = octet_length(col1);
let $valsqlfunc = octet_length('a,b,c,d,e,f,g,h,i');
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = position('a' in col1);
let $valsqlfunc = position('i' in 'a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = strcmp(col1,'acb');
let $valsqlfunc = strcmp('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = crc32(col1);
let $valsqlfunc = crc32('a,b,c,d,e,f,g,h,i');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = round(col1);
let $valsqlfunc = round(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = sign(col1);
let $valsqlfunc = sign(123);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_add(col1,5);
let $valsqlfunc = period_add(9804,5);
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_diff(col1,col2);
let $valsqlfunc = period_diff(9809,199907);
let $coltype = datetime,col2 datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = int,col2 int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = timestampdiff(day,5,col1);
let $valsqlfunc = timestampdiff(YEAR,'2002-05-01','2001-01-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = unix_timestamp(col1);
let $valsqlfunc = unix_timestamp ('2002-05-01');
let $coltype = date;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = week(col1);
let $valsqlfunc = week('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = weekofyear(col1);
let $valsqlfunc = weekofyear('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = cast(col1 as signed);
let $valsqlfunc = cast(123 as signed);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = convert(col1,unsigned);
let $valsqlfunc = convert(123,unsigned);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 | 20;
let $valsqlfunc = 10 | 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 & 20;
let $valsqlfunc = 10 & 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 ^ 20;
let $valsqlfunc = 10 ^ 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 << 20;
let $valsqlfunc = 10 << 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 >> 20;
let $valsqlfunc = 10 >> 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ~col1;
let $valsqlfunc = ~20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_count(col1);
let $valsqlfunc = bit_count(20);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = inet_aton(col1);
let $valsqlfunc = inet_aton('192.168.1.1');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
set @var =20;
let $sqlfunc = bit_length(col1)+@var-@var;
let $valsqlfunc = bit_length(20)+@var-@var;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
delimiter //;
@ -298,5 +252,4 @@ let $sqlfunc = getmaxsigned_t1(col1);
let $valsqlfunc = getmaxsigned(10);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
drop function if exists getmaxsigned_t1;

View file

@ -1,5 +1,6 @@
################################################################################
# t/part_supported_sql_funcs_delete.inc # # #
# t/part_supported_sql_funcs_delete.inc #
# #
# Purpose: #
# Delete access of the tests frame for allowed sql functions #
# #

View file

@ -38,7 +38,6 @@ let $val2 = 13 ;
let $val3 = 17 ;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = ceiling(col1);
@ -51,7 +50,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = floor(col1);
let $valsqlfunc = floor(15.123);
@ -63,7 +61,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = mod(col1,10);
let $valsqlfunc = mod(15,10);
@ -74,7 +71,6 @@ let $val2 = 19;
let $val3 = 17;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = day(col1);
let $valsqlfunc = day('2006-12-21');
@ -85,7 +81,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofmonth(col1);
let $valsqlfunc = dayofmonth('2006-12-24');
@ -96,7 +91,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofweek(col1);
let $valsqlfunc = dayofweek('2006-12-24');
@ -107,7 +101,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofyear(col1);
let $valsqlfunc = dayofyear('2006-12-25');
@ -118,10 +111,8 @@ let $val2 = '2006-01-17';
let $val3 = '2006-02-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = extract(month from col1);
let $valsqlfunc = extract(year from '1998-11-23');
@ -132,7 +123,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = hour(col1);
let $valsqlfunc = hour('18:30');
@ -143,7 +133,6 @@ let $val2 = '14:30';
let $val3 = '21:59';
let $val4 = '10:30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = microsecond(col1);
let $valsqlfunc = microsecond('10:30:10.000010');
@ -154,7 +143,6 @@ let $val2 = '04:30:01.000018';
let $val3 = '00:59:22.000024';
let $val4 = '05:30:34.000037';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = minute(col1);
let $valsqlfunc = minute('18:30');
@ -164,7 +152,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:24:23';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = second(col1);
let $valsqlfunc = second('18:30:14');
@ -175,10 +162,8 @@ let $val2 = '14:30:20';
let $val3 = '21:59:22';
let $val4 = '10:22:33';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = month(col1);
let $valsqlfunc = month('2006-10-14');
@ -189,7 +174,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-05-25';
let $val4 = '2006-11-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = quarter(col1);
let $valsqlfunc = quarter('2006-10-14');
@ -200,7 +184,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-09-25';
let $val4 = '2006-07-30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = time_to_sec(col1)-(time_to_sec(col1)-20);
let $valsqlfunc = time_to_sec('18:30:14')-(time_to_sec('17:59:59'));
@ -211,7 +194,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:33:11';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
@ -222,7 +204,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
let $sqlfunc = datediff(col1, '2006-01-01');
@ -234,7 +215,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekday(col1);
let $valsqlfunc = weekday('2006-10-14');
@ -245,7 +225,6 @@ let $val2 = '2006-11-17';
let $val3 = '2006-05-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = year(col1)-1990;
let $valsqlfunc = year('2005-10-14')-1990;
@ -256,7 +235,6 @@ let $val2 = '2000-02-17';
let $val3 = '2004-05-25';
let $val4 = '2002-02-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = yearweek(col1)-200600;
let $valsqlfunc = yearweek('2006-10-14')-200600;
@ -267,4 +245,3 @@ let $val2 = '2006-08-17';
let $val3 = '2006-03-25';
let $val4 = '2006-11-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition.pre #
# inc/partition.pre #
# #
# Purpose: #
# Auxiliary script creating prerequisites needed by the partitioning tests #
@ -26,27 +26,21 @@
eval SET @@session.storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs #####
--echo
--echo #------------------------------------------------------------------------
--echo # There are several testcases disabled because of the open bugs
--echo # #15890
if (`SELECT @@session.storage_engine IN('ndbcluster')`)
{
--echo # #18730, Bug#18735
}
--echo #------------------------------------------------------------------------
# Attention: Only bugs appearing in all storage engines should be mentioned above.
# The top level test wrapper (example: t/partition_basic_ndb.test)
# may set the $fixed_bug<nnnnn> variable to 0 after sourcing
# this file.
# Bug#15890 Partitions: Strange interpretation of partition number
let $fixed_bug15890= 0;
# Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
# Attention: NDB testcases set this variable later to 0
let $fixed_bug18730= 1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
# Attention: NDB testcases set this variable later to 0
let $fixed_bug18735= 1;
# --echo
# --echo #------------------------------------------------------------------------
# --echo # There are several testcases disabled because of the open bugs
# if (`SELECT @@session.storage_engine IN('ndbcluster')`)
# {
# --echo # #18730
# }
# --echo #------------------------------------------------------------------------
# # Attention: Only bugs appearing in all storage engines should be mentioned above.
# # The top level test wrapper (example: t/partition_basic_ndb.test)
# # may set the $fixed_bug<nnnnn> variable to 0 after sourcing
# # this file.
# # Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
# # Attention: NDB testcases set this variable later to 0
# let $fixed_bug18730= 1;
--echo
--echo #------------------------------------------------------------------------
@ -66,6 +60,17 @@ if ($debug)
--echo # It is to be expected, that we get huge differences.
}
let $ER_DUP_KEY= 1022;
let $ER_GET_ERRNO= 1030;
let $ER_BAD_NULL_ERROR= 1048;
let $ER_DUP_ENTRY= 1062;
let $ER_PARSE_ERROR= 1064;
let $ER_TOO_MANY_PARTITIONS_ERROR= 1499;
let $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF= 1503;
let $ER_NO_PARTS_ERROR= 1504;
let $ER_DROP_PARTITION_NON_EXISTENT= 1507;
let $ER_SAME_NAME_PARTITION= 1517;
let $ER_NO_PARTITION_FOR_GIVEN_VALUE= 1526;
# Set the variable $engine_other to a storage engine <> $engine
--disable_query_log
@ -308,23 +313,23 @@ if (0)
# (t/partition_<feature>_<engine>.test)
# a) General not engine specific settings and requirements
# $debug, $ls, @max_row, $more_trigger_tests, .....
# --source include/have_partition.inc
# --source inc/have_partition.inc
# b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine
# SET SESSION storage_engine
# $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed
# via
# --source include/partition.pre
# --source inc/partition.pre
# d) Set "fixed_bug<number>" variables to 1 if there are open engine
# specific bugs which need worarounds.
# e) Execute the feature specific testscript via
# --source include/partition_<feature>.inc
# --source inc/partition_<feature>.inc
# f) Perform a cleanup by removing all objects created within the tests
# --source include/partition_cleanup.inc
# --source inc/partition_cleanup.inc
#
# 2.2. script generating the prerequisites needed in all tests
# (include/partition.pre)
# (inc/partition.pre)
# a) Message about open bugs causing that
# - some testcases are disabled
# - it cannot be avoided that the file with expected results suffers
@ -340,36 +345,70 @@ if (0)
# c) Setting of auxiliary variables
# d) Creation of auxiliary tables ....
#
# 3. script checking a feature
# (include/partition_<feature.inc>.inc)
# Example:
# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
# b) CREATE TABLE t1 ...
# c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The first 50 % of all t0_template rows will be inserted into t1.
# d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX)
# e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The second 50 % of all t0_template rows will be inserted into t1.
# Now t1 and t0_template should have the same content.
# f) Check the "usability" of the current table t1
# via
# --source include/partition_check.pre
# g) DROP TABLE t1
# Switch to other CREATE and ALTER statements and run sequence a)-g) again
# ...
# 2.3. script checking a feature
# (inc/partition_<feature.inc>.inc)
# Example:
# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
# b) CREATE TABLE t1 ...
# c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The first 50 % of all t0_template rows will be inserted into t1.
# d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX)
# e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The second 50 % of all t0_template rows will be inserted into t1.
# Now t1 and t0_template should have the same content.
# f) Check the "usability" of the current table t1
# via
# --source inc/partition_check.pre
# g) DROP TABLE t1
# Switch to other CREATE and ALTER statements and run sequence a)-g) again
# ...
#
# 2.4. script checking if a certain table shows the expected behaviour
# ("usability" check): inc/partition_check.inc
# - SELECT/INSERT/UPDATE/DELETE affecting single and multiple records
# - check of values of special interest like NULL etc.
# - INSERT/UPDATE with BEFORE/AFTER triggers
# - violations of UNIQUE constraints, if there are any defined
# - transactions ...
# - TRUNCATE/OPTIMIZE/..
# - ...
#
#
# 2.5. There are some auxiliary scripts with sub tests where we cannot predict
# if we get an error and if we get one, which one.
# Example: INSERT a record where the value for a certain column equals
# some existing record.
# Depending on existing/not existing PRIMARY KEYs, UNIQUE INDEXes
# the response might be "no error", ER_DUP_KEY, ER_DUP_ENTRY.
# Our requirements:
# 1. We cannot abort whenever get an error message from the server.
# 2. We want the exact server message into the protocol.
# 3. We want abort testing if we know that a certain error must not happen.
# Common but unusable Solutions:
# a) --error 0, ER_DUP_KEY, ER_DUP_ENTRY
# <statment>
# We get no error message even if the statement fails.
# b) --error ER_DUP_KEY, ER_DUP_ENTRY
# <statment>
# We might get "got one of the expected errors".
# There are situations where the statement must be successful.
# c) --disable_abort_on_error
# <statment>
# --enable_abort_on_error
# And nothing extra
# We do not abort in case of unexpected server errors.
#
# Final solution:
# --disable_abort_on_error
# <statment>
# --enable_abort_on_error
# Check via error number if the error is not totally unexpected.
# The sub tests use $ER_DUP_KEY, $ER_DUP_ENTRY, etc.
# Assignment of values happen in this file.
#
# 4. script checking if a certain table shows the expected behaviour
# ("usability" check): include/partition_check.inc
# - SELECT/INSERT/UPDATE/DELETE affecting single and multiple records
# - check of values of special interest like NULL etc.
# - INSERT/UPDATE with BEFORE/AFTER triggers
# - violations of UNIQUE constraints, if there are any defined
# - transactions ...
# - TRUNCATE/OPTIMIZE/..
# - ...
#
# 3. How to analyze a partitioning bug revealed with these tests/ How to build
# a small replay script from the monstrous protocols ?
# a small replay script from the monstrous protocols ?
#------------------------------------------------------------------------------#
# a) crash -- use the file var/master-data/mysql/general_log.CSV
# b) no crash, but unexpected server response (there is no "reject file)
@ -382,19 +421,19 @@ if (0)
# protocolling of some queries.
# In most cases you will find that the r/<testcase>.<log/reject> contains at
# least a line "# # check <something>: 0".
# That means that a check within include/partition_check did not got the
# That means that a check within inc/partition_check did not got the
# expected result.
# A good start for a replay script would be
# 1. Copy t/partition_<feature>_<engine>.test to t/my_test.test
# 2. Edit t/my_test.test
# - set $debug to 1
# - replace the line
# "--source include/partition_<feature>.inc"
# "--source inc/partition_<feature>.inc"
# with all statements between the last
# CREATE TABLE t1 statement (included this)
# and the line
# "# Start usability test (include/partition_check.inc)"
# - add the content of include/partition_check.inc at the end.
# "# Start usability test (inc/partition_check.inc)"
# - add the content of inc/partition_check.inc at the end.
#
# Please excuse that the partitioning tests generate such huge protocols which
# and are not very handy when it comes to bug analysis. I tried to squeez out

View file

@ -1,4 +1,4 @@
# include/partition_10.inc
# inc/partition_10.inc
#
# Do some basic checks on a table.
#
@ -10,7 +10,7 @@
# is like expected.
#
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# Select on empty table
@ -50,20 +50,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';

View file

@ -1,4 +1,4 @@
# include/partition_11.inc
# inc/partition_11.inc
#
# Try to create a table with the given partition number
#
@ -13,7 +13,7 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
--source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
@ -29,6 +29,6 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
--source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}

View file

@ -1,10 +1,10 @@
# include/partition_12.inc
# inc/partition_12.inc
#
# Do some basic things on a table, if the SQL command executed just before
# sourcing this file was successful.
#
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# (mass) Insert max_row_div2 + 1 records
@ -42,20 +42,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';

View file

@ -1,10 +1,11 @@
################################################################################
# include/partition_20.inc #
# inc/partition_20.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_check.inc. #
# Auxiliary script, only useful when sourced by #
# suite/parts/inc/partition_check.inc. #
# #
# 1. Check if the preceeding statement caused that the expected number of #
# 1. Check if the preceding statement caused that the expected number of #
# records was #
# - inserted #
# - updated or deleted+inserted #
@ -17,19 +18,13 @@
# must be set before sourcing this routine. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
# include/partition_20.inc
#
# Auxiliary script, only useful when sourced by include/partition_check.inc.
#
# Check of preceeding statement via Select
if ($no_debug)
{
--disable_query_log

View file

@ -1,12 +1,12 @@
################################################################################
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Purpose: #
# ADD/DROP PRIMARY KEYs and/or UNIQUE INDEXes tests on partitioned tables #
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -26,7 +26,7 @@
--echo # within the partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
if ($do_pk_tests)
{
# The value of the following test is maybe covered by 1.1.3.
@ -35,12 +35,10 @@ if ($do_pk_tests)
--echo # 1.1.1 PRIMARY KEY consisting of one column
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
# This must fail, because PRIMARY KEY does not contain f_int1
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
# The value of the following test is maybe covered by 1.1.4.
if ($more_pk_ui_tests)
@ -48,65 +46,52 @@ if ($more_pk_ui_tests)
--echo # 1.1.2 UNIQUE INDEX consisting of one column
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
# This must fail, because UNIQUE INDEX does not contain f_int1
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
if ($do_pk_tests)
{
--echo # 1.1.3 PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
--echo # 1.1.4 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
--echo #------------------------------------------------------------------------
--echo # 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns
--echo # (f_int1 and f_int2) within the partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
# ---> include/partition_alter_13.inc
# ---> inc/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 1.2.1 PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
--echo # 1.2.2 UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $alter= ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= ;
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
#
@ -122,7 +107,7 @@ if ($do_pk_tests)
--echo # 2.1 Partitioning function contains one column(f_int1)
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
# The value of the following test is maybe covered by 2.1.5.
if ($more_pk_ui_tests)
{
@ -132,14 +117,12 @@ if ($more_pk_ui_tests)
let $unique= , PRIMARY KEY(f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
#
--echo # 2.1.2 DROP UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@ -147,20 +130,16 @@ if ($more_pk_ui_tests)
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
#
--echo # 2.1.4 DROP UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
#
if ($do_pk_tests)
@ -169,42 +148,35 @@ if ($do_pk_tests)
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
--echo #------------------------------------------------------------------------
--echo # 2.2 Partitioning function contains two columns (f_int1,f_int2)
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
# ---> include/partition_alter_13.inc
# ---> inc/partition_alter_13.inc
if ($do_pk_tests)
{
--echo # 2.2.1 DROP PRIMARY KEY consisting of two columns
let $alter= ALTER TABLE t1 DROP PRIMARY KEY;
let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo # 2.2.2 DROP UNIQUE INDEX consisting of two columns
let $alter= ALTER TABLE t1 DROP INDEX uidx1;
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@ -212,26 +184,23 @@ if ($do_pk_tests)
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
let $alter= ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1;
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
let $alter= ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2;
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
if (0)
{
--echo
--echo #========================================================================
--echo # 3. ALTER TABLE "ALTER" PRIMARY KEY
--echo # ML: I think that an ALTER TABLE statement where a PRIMARY KEY is
--echo # dropped and recreated (with different layout) might be of
--echo # interest, if the tree containing the table data has to be
--echo # reorganized during this operation.
--echo # mleich: I think that an ALTER TABLE statement where a PRIMARY
--echo # KEY is dropped and recreated (with different layout) might
--echo # be of interest, if the tree containing the table data has
--echo # to be reorganized during this operation.
--echo # To be implemented
--echo #========================================================================
--echo

View file

@ -1,12 +1,12 @@
################################################################################
# include/partition_alter2.inc #
# inc/partition_alter2.inc #
# #
# Purpose: #
# Tests where the columns used within the partitioning function are altered. #
# This routine is only useful for the partition_<feature>_<engine> tests. .#
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -22,12 +22,11 @@
--echo # 1.1 ALTER column f_int2 not used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int2 BIGINT;
--echo # 1.1.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@ -38,14 +37,11 @@ if ($do_pk_tests)
{
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
#
--echo # 1.1.3 UNIQUE INDEX exists
@ -55,14 +51,11 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
if ($more_pk_ui_tests)
{
@ -71,47 +64,35 @@ if ($more_pk_ui_tests)
--echo # 1.2 ALTER column f_int1 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 BIGINT;
--echo # 1.2.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
--echo # 1.2.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo # 1.2.3 UNIQUE INDEX exists
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo #------------------------------------------------------------------------
@ -119,14 +100,12 @@ if ($more_pk_ui_tests)
--echo # f_int1 or (f_int1 and f_int2) used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
# ---> include/partition_alter_13.inc
# ---> inc/partition_alter_13.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 BIGINT, MODIFY f_int2 BIGINT;
--echo # 1.3.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@ -137,18 +116,13 @@ if ($do_pk_tests)
{
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo # 1.3.3 UNIQUE INDEX exists
@ -158,18 +132,13 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
--echo
--echo #========================================================================
@ -180,12 +149,11 @@ let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--echo # 2.1 ALTER column f_int2 not used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int2 MEDIUMINT;
--echo # 2.1.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
if ($do_pk_tests)
{
@ -196,14 +164,11 @@ if ($do_pk_tests)
--echo # 2.1.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
#
--echo # 2.1.3 UNIQUE INDEX exists
@ -213,14 +178,11 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
#
if ($more_pk_ui_tests)
{
@ -229,61 +191,47 @@ if ($more_pk_ui_tests)
--echo # 2.2 ALTER column f_int1 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: Only f_int1 is used within the partitioning function
# ---> include/partition_alter_11.inc
# ---> inc/partition_alter_11.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 MEDIUMINT;
--echo # 2.2.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
--echo # 2.2.2 PRIMARY KEY exists
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo # 2.2.3 UNIQUE INDEX exists
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo #------------------------------------------------------------------------
--echo # 2.3 ALTER column f_int1 and f_int2 used in partitioning function
--echo #------------------------------------------------------------------------
# Rule: f_int1 and f_int2 is used within the partitioning function
# ---> include/partition_alter_13.inc
# ---> inc/partition_alter_13.inc
let $alter= ALTER TABLE t1 MODIFY f_int1 MEDIUMINT, MODIFY f_int2 MEDIUMINT;
--echo # 2.3.1 no PRIMARY KEY or UNIQUE INDEX exists
let $unique= ;
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if ($do_pk_tests)
{
@ -295,17 +243,12 @@ if ($do_pk_tests)
let $unique= , PRIMARY KEY (f_int1);
--source suite/parts/inc/partition_alter_11.inc
}
# --source include/partition_alter_11.inc
let $unique= , PRIMARY KEY (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , PRIMARY KEY (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
}
#
--echo # 2.3.3 UNIQUE INDEX exists
@ -315,18 +258,13 @@ if ($more_pk_ui_tests)
{
let $unique= , UNIQUE INDEX uidx (f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
}
let $unique= , UNIQUE INDEX uidx (f_int1,f_int2);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
let $unique= , UNIQUE INDEX uidx (f_int2,f_int1);
--source suite/parts/inc/partition_alter_11.inc
# --source include/partition_alter_11.inc
--source suite/parts/inc/partition_alter_13.inc
# --source include/partition_alter_13.inc
#
if (0)
@ -338,8 +276,8 @@ if (0)
--echo # INTEGER --> FLOAT
--echo # INTEGER --> DECIMAL
--echo # INTEGER --> VARCHAR
--echo # ML: I assume that at least the first two variants are of some
--echo # interest. But I am unsure if the server allows such
--echo # mleich: I assume that at least the first two variants are of
--echo # some interest. But I am unsure if the server allows such
--echo # conversions. I also think that such operations have a
--echo # conversions very small likelihood.
--echo # To be implemented.

View file

@ -1,11 +1,11 @@
################################################################################
# include/partition_alter3.inc #
# inc/partition_alter3.inc #
# #
# Purpose: #
# Tests for partition management commands for HASH and KEY partitioning #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@ -32,7 +32,7 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
INTO @exp_row_count;
# DEBUG SELECT @exp_row_count;
# 4. Print the layout, check Readability
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo #------------------------------------------------------------------------
@ -44,16 +44,16 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
#
--echo # 1.1.2 Assign HASH partitioning
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.3 Assign other HASH partitioning to already partitioned table
--echo # + test and switch back + test
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.4 Add PARTITIONS not fitting to HASH --> must fail
@ -64,7 +64,7 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
#
--echo # 1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.6 Add two named partitions, name clash --> must fail
@ -73,12 +73,12 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
#
--echo # 1.1.7 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.1.8 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
--echo #------------------------------------------------------------------------
@ -89,7 +89,7 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
ALTER TABLE t1 DROP PARTITION part1;
#
--echo # 1.2.2 COALESCE PARTITION partitionname is not supported
--error 1064
--error ER_PARSE_ERROR
ALTER TABLE t1 COALESCE PARTITION part1;
#
--echo # 1.2.3 Decrease by 0 is non sense --> must fail
@ -101,7 +101,7 @@ let $loop= 7;
while ($loop)
{
ALTER TABLE t1 COALESCE PARTITION 1;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
dec $loop;
}
@ -111,14 +111,13 @@ ALTER TABLE t1 COALESCE PARTITION 1;
#
--echo # 1.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
# --source suite/parts/inc/partition_check_drop.inc
--echo
--echo #========================================================================
@ -134,7 +133,7 @@ $column_list
# 2. Fill the table t1 with some records
eval $insert_all;
# 4. Print the layout, check Readability
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo #------------------------------------------------------------------------
@ -143,7 +142,7 @@ eval $insert_all;
--echo #------------------------------------------------------------------------
--echo # 2.1.1 Assign KEY partitioning
ALTER TABLE t1 PARTITION BY KEY(f_int1);
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.2 Add PARTITIONS not fitting to KEY --> must fail
@ -154,17 +153,17 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
#
--echo # 2.1.3 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.4 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.1.5 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
--echo #------------------------------------------------------------------------
@ -180,7 +179,7 @@ let $loop= 7;
while ($loop)
{
ALTER TABLE t1 COALESCE PARTITION 1;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
dec $loop;
}
@ -190,12 +189,11 @@ ALTER TABLE t1 COALESCE PARTITION 1;
#
--echo # 2.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
# --source suite/parts/inc/partition_check_drop.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Purpose: #
# Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) #
@ -22,19 +22,15 @@
--echo # 1.1 ALTER ... ANALYZE PARTITION part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 2 ALTER ... CHECK PARTITION
@ -42,19 +38,15 @@ let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--echo # 2.1 ALTER ... CHECK PARTITION part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 3 ALTER ... OPTIMIZE PARTITION
@ -62,19 +54,15 @@ let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--echo # 3.1 ALTER ... OPTIMIZE PARTITION part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.3 ALTER ... OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 4 ALTER ... REBUILD PARTITION
@ -82,19 +70,15 @@ let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--echo # 4.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION
@ -102,19 +86,15 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 5.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 6 ALTER ... REMOVE PARTITIONING
@ -122,5 +102,4 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 6.1 ALTER ... REMOVE PARTITIONING;
let $alter= ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc

View file

@ -1,17 +1,17 @@
################################################################################
# include/partition_alter_1.inc #
# inc/partition_alter_1.inc #
# #
# Purpose: #
# Alter a partioned table and check the usability afterwards #
# This script is only usefule when sourced by #
# include/partition_alter_1[1|3].inc #
# inc/partition_alter_1[1|3].inc #
# #
# 0. Expect there is a table t1 #
# 1. Insert the first half of the table t0_template into t1 #
# 2. Execute the ALTER TABLE statement within the variable $alter #
# Case SQL code in #
# 0: 1. Insert the second half of the table t0_template into t1 #
# 2. Execute the usability test include/partition_check.inc #
# 2. Execute the usability test inc/partition_check.inc #
# >0, but expected: nothing #
# >0 and unexpected: abort #
# 3. DROP the table t1 #
@ -20,10 +20,10 @@
# Example: #
# CREATE TABLE t1 (f_int1 INT,f_int2 INT, .... ); #
# let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2); #
# include/partition_alter_1.inc #
# inc/partition_alter_1.inc #
# #
# The parameters $insert_first_half and $insert_second_half #
# are also to be set outside (source ./include/partition.pre). #
# are also to be set outside (source ./inc/partition.pre). #
# #
#------------------------------------------------------------------------------#
# Original Author: mleich #
@ -50,13 +50,15 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run_test= `SELECT @my_errno = 0`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1502,1506)`;
if ($unexpected_error)
if (`SELECT @my_errno NOT IN (0,$ER_GET_ERRNO,
$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,
$ER_DROP_PARTITION_NON_EXISTENT)`);
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1030,1502,1506
--echo # Expected/handled SQL codes are 0,$ER_GET_ERRNO,$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,$ER_DROP_PARTITION_NON_EXISTENT
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
--echo # Please check the error name to number mapping in inc/partition.pre.
exit;
--echo
}
@ -66,6 +68,5 @@ if ($run_test)
{
eval $insert_second_half;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
}
DROP TABLE t1;

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_alter_11.inc #
# inc/partition_alter_11.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
# 2. Execute include/partition_alter_1.inc, which will #
# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Attention: The routine include/partition_alter_13.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_alter_13.inc #
# inc/partition_alter_13.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
# 2. Execute include/partition_alter_1.inc, which will #
# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Attention: The routine include/partition_alter_11.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_alter_11.inc #
# inc/partition_alter_11.inc #
# #
# Purpose: #
# Check ALTER partitioned table and the state of the table afterwards #
@ -10,11 +10,11 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do #
# 1. Create the partitioned table #
# 2. Execute include/partition_alter_1.inc, which will #
# 2. Execute inc/partition_alter_1.inc, which will #
# - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 #
# - Execute the usability test include/partition_check.inc #
# - Execute the usability test inc/partition_check.inc #
# - Drop the table t1 #
# done #
# #
@ -26,14 +26,14 @@
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Attention: The routine include/partition_alter_13.inc is very similar #
# Attention: The routine inc/partition_alter_13.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -56,7 +56,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY
if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST
if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE
if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
)
$partitioning;
--source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc

View file

@ -1,12 +1,12 @@
################################################################################
# include/partition_basic.inc #
# inc/partition_basic.inc #
# #
# Purpose: #
# Basic tests around create partitioned table with/without PRIMARY KEY and #
# /or UNIQUE INDEX #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -29,7 +29,6 @@
--echo # 1.1 The partitioning function contains one column.
let $unique= ;
--source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
#
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
#
@ -50,16 +49,13 @@ let $unique= ;
let $with_directories= 1;
--source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
--source suite/parts/inc/partition_directory.inc
# --source include/partition_methods1.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
# --source include/partition_methods2.inc
#
--echo #------------------------------------------------------------------------
--echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@ -72,12 +68,10 @@ if ($more_pk_ui_tests)
--echo # 2.1 PRIMARY KEY consisting of one column
let $unique= , PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_methods1.inc
# --source include/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
# --source include/partition_methods1.inc
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
#
@ -98,7 +92,6 @@ if ($more_pk_ui_tests)
let $with_directories= TRUE;
--source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
let $with_directories= FALSE;
--enable_query_log
#
@ -107,19 +100,15 @@ if ($more_pk_ui_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
# --source include/partition_methods1.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
# --source include/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
# --source include/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
#
}
--echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
@ -127,14 +116,11 @@ 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
# --source include/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
# --source include/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
# --source include/partition_methods1.inc
--echo #------------------------------------------------------------------------
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
@ -148,20 +134,16 @@ if ($more_pk_ui_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
# --source include/partition_methods2.inc
let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
# --source include/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
# --source include/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
}
#
--echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
@ -169,11 +151,8 @@ 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
# --source include/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
# --source include/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
# --source include/partition_methods2.inc

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and binary data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@ -43,6 +45,9 @@ select count(*) from t2;
select hex(a) from t2;
drop table t2;
# mleich: Several partitioning functions are no more allowed.
if (0)
{
eval create table t3 (a binary(255) not null, primary key(a)) engine=$engine
partition by range (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values less than (16),
@ -66,6 +71,7 @@ select count(*) from t3;
select hex(a) from t3;
drop table t3;
eval create table t4 (a binary(255) not null, primary key(a)) engine=$engine
partition by list (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),
@ -86,6 +92,9 @@ eval insert into t4 values (repeat(char(ascii('a')+$letter),$count+54));
dec $count;
inc $letter;
}
select count(*) from t4;
select hex(a) from t4;
drop table t4;
}
# End of tests with disallowed partitioning functions.

View file

@ -14,7 +14,7 @@ let $index_directory = `select @indx_dir`;
drop table if exists t1;
--enable_warnings
--error 1439
--error ER_TOO_BIG_DISPLAYWIDTH
eval create table t1 (a bit(65), primary key (a)) engine=$engine partition by key (a);
eval create table t1 (a bit(0), primary key (a)) engine=$engine partition by key (a);

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and blob data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and char data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@ -42,6 +44,7 @@ select count(*) from t2;
select * from t2;
drop table t2;
# mleich: Several partitioning functions are no more allowed.
if (0)
{
eval create table t3 (a char(255) not null, primary key(a)) engine=$engine
@ -91,5 +94,4 @@ select count(*) from t4;
select a from t4;
drop table t4;
}
#if (0)
# End of tests with disallowed partitioning functions.

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_check.inc #
# inc/partition_check.inc #
# #
# Purpose: #
# Do some basic usability checks on table t1. #
@ -27,7 +27,7 @@
# Records can be deleted or inserted, but the content of the #
# records after a test/testsequence should follow this scheme. #
# #
# All checks of preceeding statements via Select are so written, #
# All checks of preceding statements via Select are so written, #
# that they deliver a #
# # check <n> success: 1 #
# when everything is like expected. #
@ -47,10 +47,9 @@
################################################################################
--echo # Start usability test (include/partition_check.inc)
--echo # Start usability test (inc/partition_check.inc)
# Print the CREATE TABLE STATEMENT and store the current layout of the table
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
#-------------------------------------------------------------------------------
@ -160,8 +159,7 @@ if ($run)
# partitioning mechanism.
# Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns
# 1022: ER_DUP_KEY
# 1062: ER_DUP_ENTRY
# ER_DUP_KEY, ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
@ -174,14 +172,13 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
let $any_unique= `SELECT @my_errno IN (1022,1062)`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
let $any_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $any_unique AS any_unique,
# $unexpected_error AS unexpected_error;
if ($unexpected_error)
# @my_errno AS sql_errno;
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1022,1062
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@ -204,8 +201,7 @@ if ($any_unique)
## 1.3.1 Check, if f_int1 is UNIQUE
# Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns
# 1022: ER_DUP_KEY
# 1062: ER_DUP_ENTRY
# ER_DUP_KEY, ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
@ -218,14 +214,13 @@ if ($any_unique)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
let $f_int1_is_unique= `SELECT @my_errno IN (1022,1062)`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
let $f_int1_is_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $f_int1_is_unique AS any_unique,
# $unexpected_error AS unexpected_error;
if ($unexpected_error)
# @my_errno AS sql_errno;
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1022,1062
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@ -242,7 +237,7 @@ if ($any_unique)
DELETE FROM t1 WHERE f_charbig = 'delete me';
}
## 1.3.2 Check, if f_int2 is UNIQUE
## 1.3.2 Check, if f_int2 is UNIQUE (get ER_DUP_KEY or ER_DUP_ENTRY
--disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
@ -255,14 +250,13 @@ if ($any_unique)
}
eval SET @my_errno = $mysql_errno;
let $run_delete= `SELECT @my_errno = 0`;
let $f_int1_is_unique= `SELECT @my_errno IN (1022,1062)`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1022,1062)`;
let $f_int1_is_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
# DEBUG eval SELECT $run_delete AS run_delete, $f_int1_is_unique AS any_unique,
# $unexpected_error AS unexpected_error;
if ($unexpected_error)
# @my_errno AS sql_errno;
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1022,1062
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@ -289,14 +283,11 @@ if ($any_unique)
# per f_int1 used in partitioning function
let $col_to_check= f_int1;
--source suite/parts/inc/partition_check_read.inc
# --source include/partition_check_read.inc
## 2.2 Read all existing and some not existing records of table
# per f_int2 used in partitioning function
let $col_to_check= f_int2;
--source suite/parts/inc/partition_check_read.inc
if ($fixed_bug18735)
{
#-------------------------------------------------------------------------------
# 3 Some operations with multiple records
@ -321,7 +312,7 @@ SELECT '# check multiple-2 success: ' AS "",COUNT(*) = @max_row - @max_row_div3
# (Insert the records deleted in 3.2)
INSERT INTO t1 SELECT * FROM t0_template
WHERE MOD(f_int1,3) = 0;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -337,7 +328,7 @@ FROM t1;
UPDATE t1 SET f_int1 = f_int1 + @max_row
WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
AND @max_row_div2 + @max_row_div4;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -352,7 +343,7 @@ SELECT '# check multiple-4 success: ' AS "",(COUNT(*) = @max_row) AND (MIN(f_int
DELETE FROM t1
WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
AND @max_row_div2 + @max_row_div4 + @max_row;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -405,7 +396,7 @@ INSERT INTO t1
SET f_int1 = @cur_value , f_int2 = @cur_value,
f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
f_charbig = '#SINGLE#';
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -423,7 +414,7 @@ INSERT INTO t1
SET f_int1 = @cur_value , f_int2 = @cur_value,
f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
f_charbig = '#SINGLE#';
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -443,7 +434,7 @@ SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
UPDATE t1 SET f_int1 = @cur_value2
WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -464,7 +455,7 @@ SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
UPDATE t1 SET f_int1 = @cur_value1
WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -476,7 +467,7 @@ WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
# 4.5 Delete the record with the highest value of f_int1.
SELECT MAX(f_int1) INTO @cur_value FROM t1;
DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
# Check of preceeding statements via Select
# Check of preceding statements via Select
if ($no_debug)
{
--disable_query_log
@ -487,7 +478,7 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 = f_int1 = @cur_value;
#
# 4.6 Delete the record with f_int1 = -1
DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
# Check of preceeding statements via Select
# Check of preceding statements via Select
if ($no_debug)
{
--disable_query_log
@ -499,9 +490,9 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 IN (-1,@cur_value);
# 4.7 Insert one record with such a big value for f_int1, so that in case
# - f_int1 is used within the partitioning algorithm
# - we use range partitioning
# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1525)
# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE
# "Table has no partition for value ...."
# or ER_SAME_NAME_PARTITION (1514)
# or ER_SAME_NAME_PARTITION
--disable_abort_on_error
eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##';
--enable_abort_on_error
@ -510,17 +501,16 @@ if ($no_debug)
--disable_query_log
}
eval SET @my_errno = $mysql_errno;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1525)`;
if ($unexpected_error)
if (`SELECT @my_errno NOT IN (0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1514,1525
--echo # Expected/handled SQL codes are 0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
--echo
}
# Check of preceeding statement via Select, if the INSERT was successful
# Check of preceding statement via Select, if the INSERT was successful
let $run= `SELECT @my_errno = 0`;
if ($run)
{
@ -538,8 +528,6 @@ eval DELETE FROM t1 WHERE f_charbig = '#$max_int_4##';
}
--enable_query_log
}
# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 5 Experiments with NULL
@ -562,14 +550,13 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0,
# mechanism if the result of the expression in the partitioning algorithm
# becomes NULL.
# This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX
# 1048: ER_BAD_NULL_ERROR
# with ER_BAD_NULL_ERROR.
--disable_abort_on_error
INSERT INTO t1
SET f_int1 = NULL , f_int2 = -@max_row,
f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
f_charbig = '#NULL#';
# Some other NULL experiments if preceeding INSERT was successfull
# Some other NULL experiments if preceding INSERT was successfull
--enable_abort_on_error
if ($no_debug)
{
@ -577,13 +564,13 @@ if ($no_debug)
}
eval SET @my_errno = $mysql_errno;
let $run= `SELECT @my_errno = 0`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1048)`;
if ($unexpected_error)
if (`SELECT @my_errno NOT IN (0,$ER_BAD_NULL_ERROR)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1048
--echo # Expected/handled SQL codes are 0,$ER_BAD_NULL_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
--echo # Please check the error name to number mapping in inc/partition.pre.
exit;
--echo
}
@ -593,7 +580,7 @@ if ($unexpected_error)
# The following checks do not make sense if f_int1 cannot be NULL
if ($run)
{
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -612,7 +599,7 @@ if ($no_debug)
{
--disable_query_log
}
# Check of preceeding statement via Select
# Check of preceding statement via Select
SELECT '# check null-2 success: ' AS "",COUNT(*) = 1 AS "" FROM t1
WHERE f_int1 = -@max_row AND f_charbig = '#NULL#';
--enable_query_log
@ -624,7 +611,7 @@ if ($no_debug)
{
--disable_query_log
}
# Check of preceeding statement via Select
# Check of preceding statement via Select
SELECT '# check null-3 success: ' AS "",COUNT(*) = 1 AS "" FROM t1
WHERE f_int1 IS NULL AND f_charbig = '#NULL#';
--enable_query_log
@ -632,7 +619,7 @@ WHERE f_int1 IS NULL AND f_charbig = '#NULL#';
DELETE FROM t1
WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR)
AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#';
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -697,7 +684,6 @@ if ($any_unique)
UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
# --source include/partition_20.inc
}
if ($f_int2_is_unique)
@ -713,7 +699,6 @@ if ($any_unique)
UPDATE f_int2 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
# --source include/partition_20.inc
}
## 6.3 f_int1, f_int2 is UNIQUE, UPDATE f_int1, f_int2 when DUPLICATE KEY
@ -727,7 +712,6 @@ if ($any_unique)
f_int2 = 2 * @max_row + source_tab.f_int1,
f_charbig = 'was updated';
--source suite/parts/inc/partition_20.inc
# --source include/partition_20.inc
## 6.4 REPLACE
# Bug#16782: Partitions: crash, REPLACE .. on table with PK, DUPLICATE KEY
@ -736,7 +720,7 @@ if ($any_unique)
FROM t0_template source_tab
WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
# DEBUG SELECT * FROM t1 ORDER BY f_int1, f_int2;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -763,10 +747,6 @@ if ($any_unique)
# DEBUG SELECT * FROM t1 ORDER BY f_int1, f_int2;
}
if ($fixed_bug18735)
{
# The following tests work cannot like intended, if we had to omit
# tests because of Bug#18735
#-------------------------------------------------------------------------------
# 7 Transactions
@ -943,14 +923,12 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
}
# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 8 Some special cases
# 8.1 Dramatic increase of the record/partition/subpartition/table sizes
UPDATE t1 SET f_charbig = REPEAT('b', 1000);
# partial check of preceeding statement via Select
# partial check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -961,7 +939,7 @@ WHERE f_int1 = 1 AND f_charbig = REPEAT('b', 1000);
#
# 8.2 Dramatic decrease of the record/partition/subpartition/table sizes
UPDATE t1 SET f_charbig = '';
# partial check of preceeding statement via Select
# partial check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -977,8 +955,7 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
if ($fixed_bug18735)
{
#-------------------------------------------------------------------------------
# 9 TRIGGERs
let $num= 1;
@ -998,28 +975,22 @@ SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
let $event= BEFORE INSERT;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER INSERT;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $statement= UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER UPDATE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $statement= DELETE FROM t0_aux
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE DELETE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER DELETE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
# Cleanup
eval DELETE FROM $tab_in_trigg
@ -1052,28 +1023,22 @@ SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
let $event= BEFORE INSERT;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER INSERT;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $statement= UPDATE t1 SET f_int1 = - f_int1, f_int2 = - f_int2
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER UPDATE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $statement= DELETE FROM t1
WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
let $event= BEFORE DELETE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
let $event= AFTER DELETE;
--source suite/parts/inc/partition_trigg1.inc
# --source include/partition_trigg1.inc
eval DELETE FROM $tab_in_trigg
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
}
@ -1095,7 +1060,6 @@ SET f_charbig = '####updated per update statement itself####';
let $source= old;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
# Currently (2006-02-23) a AFTER TRIGGER is not allowed to modify a row, which
# was just modified: 1362: Updating of NEW row is not allowed in after trigger
@ -1111,7 +1075,6 @@ f_charbig = '####updated per update statement itself####';
let $source= old;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
# Currently (2006-02-23) a AFTER TRIGGER is not allowed to modify a row, which
# was just modified: 1362: Updating of NEW row is not allowed in after trigger
@ -1119,7 +1082,6 @@ let $event= BEFORE UPDATE;
let $source= new;
let $event= BEFORE UPDATE;
--source suite/parts/inc/partition_trigg2.inc
# --source include/partition_trigg2.inc
# FIXME when AFTER TRIGGER can be used
if ($debug)
@ -1138,7 +1100,6 @@ ORDER BY f_int1;
let $event= BEFORE INSERT;
let $source= new;
--source suite/parts/inc/partition_trigg3.inc
# --source include/partition_trigg3.inc
# FIXME when AFTER TRIGGER can be used
# 9.4.2 INSERT assigns no values to the recalculate columns
@ -1150,7 +1111,6 @@ ORDER BY f_int1;
let $event= BEFORE INSERT;
let $source= new;
--source suite/parts/inc/partition_trigg3.inc
# --source include/partition_trigg3.inc
# FIXME when AFTER TRIGGER can be used
if ($debug)
@ -1158,8 +1118,6 @@ if ($debug)
SELECT * FROM t1 ORDER BY f_int1;
}
}
# End workaround for Bug#18735
#-------------------------------------------------------------------------------
# 10 ANALYZE/CHECK/CHECKSUM
@ -1181,17 +1139,15 @@ CHECKSUM TABLE t1 EXTENDED;
# FIXME What will happen with NDB ?
OPTIMIZE TABLE t1;
--source suite/parts/inc/partition_layout_check2.inc
# --source include/partition_layout_check2.inc
# 10.2 REPAIR TABLE
REPAIR TABLE t1 EXTENDED;
--source suite/parts/inc/partition_layout_check2.inc
# --source include/partition_layout_check2.inc
#
# 11.3 Truncate
# Manual about TRUNCATE on tables ( != InnoDB table with FOREIGN KEY ):
# Truncate operations drop and re-create the table ....
TRUNCATE t1;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -1199,6 +1155,5 @@ if ($no_debug)
SELECT '# check TRUNCATE success: ' AS "",COUNT(*) = 0 AS "" FROM t1;
--enable_query_log
--source suite/parts/inc/partition_layout_check2.inc
# --source include/partition_layout_check2.inc
--echo # End usability test (include/partition_check.inc)
--echo # End usability test (inc/partition_check.inc)

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_check_drop.inc #
# inc/partition_check_drop.inc #
# #
# Purpose: #
# Check that a drop table removes all files belonging to this table. #
@ -9,7 +9,7 @@
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-05-12 #
# Change Author: #
# Change Date: #
@ -52,7 +52,7 @@ if ($found_garbage)
if ($ls)
{
--echo # Attention: There are unused files.
--echo # Either the DROP TABLE or a preceeding ALTER TABLE
--echo # Either the DROP TABLE or a preceding ALTER TABLE
--echo # <alter partitioning> worked incomplete.
--echo # We found:
# Print the list of files into the protocol

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_check_read.inc #
# inc/partition_check_read.inc #
# #
# Purpose: #
# Read table t1 row by row #
@ -10,7 +10,7 @@
# - the table contains all expected rows #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -80,7 +80,7 @@ if ($no_debug)
--disable_query_log
}
--echo # check read via $col_to_check success: $success
# ML: The following is omitted because of not reported mysqltest bug
# mleich: The following is omitted because of not reported mysqltest bug
# (@max_row time the success message)
if (0)
{

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_check_read1.inc #
# inc/partition_check_read1.inc #
# #
# Purpose: #
# Read rows from table t1 in different ways #
@ -10,7 +10,7 @@
# must be set before sourcing this routine. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #

View file

@ -1,12 +1,12 @@
################################################################################
# include/partition_check_read2.inc #
# inc/partition_check_read2.inc #
# #
# Purpose: #
# Read rows from table t1 in different ways #
# This routine is only useful for the partition_<feature>_<engine> tests. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #

View file

@ -1,12 +1,12 @@
################################################################################
# include/partition_cleanup.inc #
# inc/partition_cleanup.inc #
# #
# Purpose: #
# Removal of the objects created by the t/partition_<feature>_<engine>.test #
# scripts. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_rectory.inc #
# inc/partition_directory.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@ -9,7 +9,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
# 3. Execute include/partition_check.inc #
# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
#------------------------------------------------------------------------------#
@ -49,7 +49,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -86,7 +85,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -122,7 +120,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -153,7 +150,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -181,7 +177,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -212,7 +207,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -256,7 +250,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_engine.inc #
# inc/partition_engine.inc #
# #
# Purpose: #
# Tests around Create/Alter partitioned tables and storage engine settings #
@ -17,7 +17,7 @@
# storage engine to use. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -45,7 +45,6 @@ $column_list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@ -62,7 +61,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -79,7 +77,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@ -96,7 +93,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -108,7 +104,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -125,7 +120,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -142,7 +136,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@ -164,7 +157,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -181,7 +173,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#
--echo #------------------------------------------------------------------------
@ -199,7 +190,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--echo # 6.2 Storage engine assignment after partition name + after
--echo # subpartition name
@ -236,7 +225,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--echo #------------------------------------------------------------------------
@ -252,7 +240,6 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = $engine);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
# Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 (
@ -266,6 +253,5 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
eval SET SESSION storage_engine=$engine;

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and enum data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@ -47,6 +49,9 @@ select count(*) from t2;
select * from t2;
drop table t2;
# mleich: Several partitioning functions are no more allowed.
if (0)
{
eval create table t3 (a enum (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
@ -71,4 +76,5 @@ dec $letter;
select count(*) from t3;
select * from t3;
drop table t3;
}
# End of tests with disallowed partitioning functions.

View file

@ -1,4 +1,4 @@
# include/partition_layout.inc
# inc/partition_layout.inc
#
# Print partitioning related informations about the table t1
#

View file

@ -1,17 +1,17 @@
################################################################################
# include/partition_layout_check1.inc #
# inc/partition_layout_check1.inc #
# #
# Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to #
# this table + print this into the protocol #
# This script is only usefule when sourced within the partitioning tests. #
# #
# Attention: The routine include/partition_layout_check2.inc is very similar #
# Attention: The routine inc/partition_layout_check2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #

View file

@ -1,18 +1,18 @@
################################################################################
# include/partition_layout_check2.inc #
# inc/partition_layout_check2.inc #
# #
# Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to #
# this table + Check if the layout of the table was not modified #
# since the call of include/partition_layout_check1.inc #
# since the call of inc/partition_layout_check1.inc #
# This script is only usefule when sourced within the partitioning tests. #
# #
# Attention: The routine include/partition_layout_check1.inc is very similar #
# Attention: The routine inc/partition_layout_check1.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_methods1.inc #
# inc/partition_methods1.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@ -11,7 +11,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
# 3. Execute include/partition_check.inc #
# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@ -21,14 +21,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# include/partition_method1s.inc #
# inc/partition_method1s.inc #
# #
# Attention: The routine include/partition_methods2.inc is very similar #
# Attention: The routine inc/partition_methods2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: HH #
# Change Date: 2006-05-12 #
@ -66,7 +66,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -107,7 +106,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -143,7 +141,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -180,7 +177,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -212,7 +208,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -247,7 +242,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -299,7 +293,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -329,7 +322,6 @@ $partitioning;
--enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
let $with_directories= FALSE;

View file

@ -1,5 +1,5 @@
################################################################################
# include/partition_methods2.inc #
# inc/partition_methods2.inc #
# #
# Purpose: #
# Create and check partitioned tables #
@ -10,7 +10,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
# 3. Execute include/partition_check.inc #
# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
@ -20,14 +20,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# include/partition_methods2.inc #
# inc/partition_methods2.inc #
# #
# Attention: The routine include/partition_methods1.inc is very similar #
# Attention: The routine inc/partition_methods1.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -51,7 +51,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY KEY
@ -66,7 +65,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST
@ -89,7 +87,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE
@ -113,7 +110,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
@ -136,7 +132,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
@ -162,7 +157,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
@ -185,7 +179,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
@ -208,5 +201,4 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and set data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =

View file

@ -234,7 +234,6 @@ subpartition by hash($sqlfunc) subpartitions 5
let $t5=t5;
let $t6=t6;
--source suite/parts/inc/part_supported_sql_funcs_delete.inc
# --source include/part_supported_sql_funcs_delete.inc
let $t1=t11;
let $t2=t22;
@ -243,7 +242,6 @@ subpartition by hash($sqlfunc) subpartitions 5
let $t5=t55;
let $t6=t66;
--source suite/parts/inc/part_supported_sql_funcs_delete.inc
# --source include/part_supported_sql_funcs_delete.inc
--echo -------------------------
--echo ---- some alter table end
--echo -------------------------

View file

@ -1,11 +1,11 @@
################################################################################
# include/partition_syntax.inc #
# inc/partition_syntax.inc #
# #
# Purpose: #
# Tests around Create partitioned tables syntax #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -107,17 +107,13 @@ let $unique_index= UNIQUE INDEX (f_int2);
#----------- PARTITION BY HASH
let $partition_scheme= PARTITION BY HASH(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY KEY
let $partition_scheme= PARTITION BY KEY(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST
let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3))
(PARTITION partN VALUES IN (NULL),
@ -125,25 +121,21 @@ let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3))
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY LIST(MOD(f_int1 + f_int2,3))
(PARTITION partN VALUES IN (NULL),
PARTITION part0 VALUES IN (0),
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE
let $partition_scheme= PARTITION BY RANGE(f_int1)
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY RANGE(f_int1 + f_int2)
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#
--echo #------------------------------------------------------------------------
@ -200,14 +192,12 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY RANGE(f_int2)
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
@ -225,7 +214,6 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
--echo
--echo #========================================================================
@ -359,7 +347,6 @@ PARTITION BY LIST(MOD(f_int1,2))
( PARTITION part1 VALUES IN (NULL),
PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0)
# Bug#15447: Partitions: NULL is treated as zero
@ -372,7 +359,6 @@ PARTITION BY LIST(MOD(f_int1,2))
PARTITION part2 VALUES IN (0),
PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
# FIXME Implement some non integer constant tests
@ -395,7 +381,6 @@ $column_list
)
PARTITION BY HASH(f_int1);
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 4.1.2 no partition number, named partitions
eval CREATE TABLE t1 (
@ -403,7 +388,6 @@ $column_list
)
PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2);
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
# Attention: Several combinations are impossible
# If subpartitioning exists
@ -470,7 +454,6 @@ eval $part01 $column_list $part02 $part1_Y $part2_N $part3_Y ;
eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_N ;
eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_Y ;
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo #------------------------------------------------------------------------
@ -480,163 +463,119 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # 4.2.1 partition/subpartition numbers INTEGER notation
# ML: "positive/negative" is my private judgement. It need no to correspond
# with the server response.
# mleich: "positive/negative" is my private judgement. It need not to
# correspond with the server response.
# (positive) number = 2
let $part_number= 2;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (positive) special case number = 1
let $part_number= 1;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 0 is non sense
let $part_number= 0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) -1 is non sense
let $part_number= -1;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 1000000 is too huge
let $part_number= 1000000;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.2 partition/subpartition numbers DECIMAL notation
# (positive) number = 2.0
let $part_number= 2.0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) -2.0 is non sense
let $part_number= -2.0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) case number = 0.0 is non sense
let $part_number= 0.0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
if ($fixed_bug15890)
{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) number = 1.6 is non sense
let $part_number= 1.6;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) number is too huge
let $part_number= 999999999999999999999999999999.999999999999999999999999999999;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) number is nearly zero
let $part_number= 0.000000000000000000000000000001;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.3 partition/subpartition numbers FLOAT notation
##### FLOAT notation
# (positive) number = 2.0E+0
let $part_number= 2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
if ($fixed_bug15890)
{
# Bug#15890 Partitions: Strange interpretation of partition number
# (positive) number = 0.2E+1
let $part_number= 0.2E+1;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) -2.0E+0 is non sense
let $part_number= -2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
if ($fixed_bug15890)
{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 0.16E+1 is non sense
let $part_number= 0.16E+1;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) 0.0E+300 is zero
let $part_number= 0.0E+300;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
if ($fixed_bug15890)
{
# Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 1E+300 is too huge
let $part_number= 1E+300;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 1E-300 is nearly zero
let $part_number= 1E-300;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
--echo # 4.2.4 partition/subpartition numbers STRING notation
##### STRING notation
# (negative?) case number = '2'
let $part_number= '2';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) case number = '2.0'
let $part_number= '2.0';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) case number = '0.2E+1'
let $part_number= '0.2E+1';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= '2A';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= 'A2';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) empty string
let $part_number= '';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= 'GARBAGE';
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.5 partition/subpartition numbers other notations
# (negative) Strings starts with digit, but 'A' follows
let $part_number= 2A;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= A2;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= GARBAGE;
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) double quotes
let $part_number= "2";
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows
let $part_number= "2A";
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows
let $part_number= "A2";
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits
let $part_number= "GARBAGE";
--source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.6 (negative) partition/subpartition numbers per @variables
SET @aux = 5;
@ -665,7 +604,6 @@ $column_list
)
PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list
@ -678,7 +616,6 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart21, SUBPARTITION subpart22)
);
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1;
--echo # 4.3.2 (positive) number of partition/subpartition ,
--echo # 0 (= no) named partition/subpartition

View file

@ -1,8 +1,8 @@
################################################################################
# include/partition_syntax_1.inc #
# inc/partition_syntax_1.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_syntax.inc #
# Auxiliary script, only useful when sourced by inc/partition_syntax.inc #
# #
# Try to create a table with number of partitions/subpartitions #
# = $part_number. Print the layout of the table and drop it. #
@ -29,16 +29,13 @@ PARTITION BY HASH(f_int1) PARTITIONS $part_number;
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
# Expected error codes are
# 0
# 1064 ER_PARSE_ERROR
# Reason: assign -1 partitions
# 1498 ER_TOO_MANY_PARTITIONS_ERROR
# 1503 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_error)
# 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
# and ER_NO_PARTS_ERROR
if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
$ER_NO_PARTS_ERROR)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1064,1498,1503
--echo # Expected/handled SQL codes are 0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,$ER_NO_PARTS_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@ -50,7 +47,6 @@ if ($unexpected_error)
if ($run)
{
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
@ -67,16 +63,13 @@ SUBPARTITIONS $part_number
eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`;
# Expected error codes are
# 0
# 1064 ER_PARSE_ERROR
# Reason: assign -1 partitions
# 1498 ER_TOO_MANY_PARTITIONS_ERROR
# 1503 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_error)
# 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
# and ER_NO_PARTS_ERROR
if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
$ER_NO_PARTS_ERROR)`)
{
--echo # The last command got an unexepected error response.
--echo # Expected/handled SQL codes are 0,1064,1498,1503
--echo # Expected/handled SQL codes are 0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,$ER_NO_PARTS_ERROR
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
exit;
@ -88,6 +81,5 @@ if ($unexpected_error)
if ($run)
{
--source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
eval DROP TABLE t1;
}

View file

@ -1,11 +1,11 @@
################################################################################
# include/partition_syntax_2.inc #
# inc/partition_syntax_2.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_syntax.inc.#
# Auxiliary script, only useful when sourced by inc/partition_syntax.inc. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-05-11 #
# Change Author: #
# Change Date: #
@ -35,11 +35,7 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
)
$partition_scheme;
eval $insert_all;
if ($fixed_bug18735)
{
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
}
DROP TABLE t1;
eval CREATE TABLE t1 (
$column_list,
@ -47,10 +43,6 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
)
$partition_scheme;
eval $insert_all;
if ($fixed_bug18735)
{
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
}
DROP TABLE t1;
}

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and text data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
@ -53,4 +55,3 @@ partition by key (a) partitions 30;
#select count(*) from t2;
#select * from t2;
#drop table t2;

View file

@ -1,8 +1,8 @@
################################################################################
# include/partition_trigg1.inc #
# inc/partition_trigg1.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_check.inc. #
# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# One trigger uses new values (--> event UPDATE, INSERT only) #
# One trigger uses old values (--> event UPDATE, DELETE only) #
# #
@ -12,7 +12,7 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -45,7 +45,7 @@ if ($run1)
eval $statement;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log
@ -94,7 +94,7 @@ if ($run1)
eval $statement;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log

View file

@ -1,8 +1,8 @@
################################################################################
# include/partition_trigg2.inc #
# inc/partition_trigg2.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_check.inc. #
# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# The trigger uses new values (--> event UPDATE, INSERT only) #
# #
# 1. Create a trigger #
@ -11,7 +11,7 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -27,7 +27,7 @@ BEGIN
END|
delimiter ;|
eval $statement;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log

View file

@ -1,8 +1,8 @@
###############################################################################
# include/partition_trigg3.inc #
################################################################################
# inc/partition_trigg3.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_check.inc. #
# Auxiliary script, only useful when sourced by inc/partition_check.inc. #
# The trigger uses new values (--> event UPDATE, INSERT only) #
# #
# 1. Create a trigger #
@ -11,23 +11,13 @@
# 4. Revert the modifications #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
# include/partition_trigg3.inc
#
# Auxiliary script, only useful when sourced by include/partition_check.inc.
#
# 1. Create a trigger
# 2. Execute a statement, which activates the trigger
# 3. Check the results of the trigger activity
# 4. Revert the modifications
#
delimiter |;
# Original version of the trigger
# eval CREATE TRIGGER trg_3 $event ON t1 FOR EACH ROW
@ -55,20 +45,12 @@ END|
delimiter ;|
# Additional statements because of Bug(limitation)#17704
SET @counter = 1;
if ($fixed_bug18730)
{
# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
}
if (!$fixed_bug18730)
{
# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
SELECT @max_row, 1 INTO @my_max1,@my_min2;
}
# Additional statements end
eval $statement;
DROP TRIGGER trg_3;
# Check of preceeding statement via Select
# Check of preceding statement via Select
if ($no_debug)
{
--disable_query_log

View file

@ -1,11 +1,11 @@
################################################################################
# include/partition_value.inc #
# inc/partition_value.inc #
# #
# Purpose: #
# Tests around "exotic" values calculated by the partitioning function #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and varbinary data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =

View file

@ -1,3 +1,5 @@
--echo ---- Partitioning and varchar data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
@ -318,7 +313,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceeding ALTER TABLE
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
@ -597,7 +592,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceeding ALTER TABLE
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) partitions 2;
@ -66,7 +66,7 @@ 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 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),

View file

@ -1,3 +1,4 @@
---- Partitioning and char data type
create table t1 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -12,14 +13,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select * from t1;
a
@ -40,14 +39,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
@ -107,6 +104,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
drop table t2;
---- Partitioning and binary data type
create table t1 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -121,14 +119,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select hex(a) from t1;
hex(a)
@ -152,14 +148,12 @@ hex(a)
drop table t1;
create table t2 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
@ -219,157 +213,7 @@ hex(a)
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t2;
create table t3 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by range (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values less than (16),
partition pa32 values less than (32),
partition pa64 values less than (64),
partition pa128 values less than (128),
partition pa256 values less than (256)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't3'
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (ascii(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 4 (PARTITION pa16 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION pa32 VALUES LESS THAN (32) ENGINE = MyISAM, PARTITION pa64 VALUES LESS THAN (64) ENGINE = MyISAM, PARTITION pa128 VALUES LESS THAN (128) ENGINE = MyISAM, PARTITION pa256 VALUES LESS THAN (256) ENGINE = MyISAM) */
26 inserts;
insert into t3 values (repeat(char(ascii('a')+0),26+54));
insert into t3 values (repeat(char(ascii('a')+1),25+54));
insert into t3 values (repeat(char(ascii('a')+2),24+54));
insert into t3 values (repeat(char(ascii('a')+3),23+54));
insert into t3 values (repeat(char(ascii('a')+4),22+54));
insert into t3 values (repeat(char(ascii('a')+5),21+54));
insert into t3 values (repeat(char(ascii('a')+6),20+54));
insert into t3 values (repeat(char(ascii('a')+7),19+54));
insert into t3 values (repeat(char(ascii('a')+8),18+54));
insert into t3 values (repeat(char(ascii('a')+9),17+54));
insert into t3 values (repeat(char(ascii('a')+10),16+54));
insert into t3 values (repeat(char(ascii('a')+11),15+54));
insert into t3 values (repeat(char(ascii('a')+12),14+54));
insert into t3 values (repeat(char(ascii('a')+13),13+54));
insert into t3 values (repeat(char(ascii('a')+14),12+54));
insert into t3 values (repeat(char(ascii('a')+15),11+54));
insert into t3 values (repeat(char(ascii('a')+16),10+54));
insert into t3 values (repeat(char(ascii('a')+17),9+54));
insert into t3 values (repeat(char(ascii('a')+18),8+54));
insert into t3 values (repeat(char(ascii('a')+19),7+54));
insert into t3 values (repeat(char(ascii('a')+20),6+54));
insert into t3 values (repeat(char(ascii('a')+21),5+54));
insert into t3 values (repeat(char(ascii('a')+22),4+54));
insert into t3 values (repeat(char(ascii('a')+23),3+54));
insert into t3 values (repeat(char(ascii('a')+24),2+54));
insert into t3 values (repeat(char(ascii('a')+25),1+54));
select count(*) from t3;
count(*)
26
select hex(a) from t3;
hex(a)
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t3;
create table t4 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by list (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),
partition pa32 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32),
partition pa64 values in (33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64),
partition pa128 values in (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128),
partition pa256 values in (129,130,131,132,133,134,135,136,137,138,139,140
,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't4'
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ascii(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 4 (PARTITION pa16 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) ENGINE = MyISAM, PARTITION pa32 VALUES IN (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32) ENGINE = MyISAM, PARTITION pa64 VALUES IN (33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64) ENGINE = MyISAM, PARTITION pa128 VALUES IN (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128) ENGINE = MyISAM, PARTITION pa256 VALUES IN (129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256) ENGINE = MyISAM) */
26 inserts;
insert into t4 values (repeat(char(ascii('a')+0),26+54));
insert into t4 values (repeat(char(ascii('a')+1),25+54));
insert into t4 values (repeat(char(ascii('a')+2),24+54));
insert into t4 values (repeat(char(ascii('a')+3),23+54));
insert into t4 values (repeat(char(ascii('a')+4),22+54));
insert into t4 values (repeat(char(ascii('a')+5),21+54));
insert into t4 values (repeat(char(ascii('a')+6),20+54));
insert into t4 values (repeat(char(ascii('a')+7),19+54));
insert into t4 values (repeat(char(ascii('a')+8),18+54));
insert into t4 values (repeat(char(ascii('a')+9),17+54));
insert into t4 values (repeat(char(ascii('a')+10),16+54));
insert into t4 values (repeat(char(ascii('a')+11),15+54));
insert into t4 values (repeat(char(ascii('a')+12),14+54));
insert into t4 values (repeat(char(ascii('a')+13),13+54));
insert into t4 values (repeat(char(ascii('a')+14),12+54));
insert into t4 values (repeat(char(ascii('a')+15),11+54));
insert into t4 values (repeat(char(ascii('a')+16),10+54));
insert into t4 values (repeat(char(ascii('a')+17),9+54));
insert into t4 values (repeat(char(ascii('a')+18),8+54));
insert into t4 values (repeat(char(ascii('a')+19),7+54));
insert into t4 values (repeat(char(ascii('a')+20),6+54));
insert into t4 values (repeat(char(ascii('a')+21),5+54));
insert into t4 values (repeat(char(ascii('a')+22),4+54));
insert into t4 values (repeat(char(ascii('a')+23),3+54));
insert into t4 values (repeat(char(ascii('a')+24),2+54));
insert into t4 values (repeat(char(ascii('a')+25),1+54));
select count(*) from t4;
count(*)
26
select hex(a) from t4;
hex(a)
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t4;
---- Partitioning and varchar data type
create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -384,14 +228,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
@ -412,14 +254,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
@ -479,6 +319,7 @@ xxxxxxxxx
yyyy
z
drop table t2;
---- Partitioning and varbinary data type
create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -493,14 +334,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
@ -521,14 +360,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 30;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
@ -588,6 +425,7 @@ xxxxxxxxx
yyyy
z
drop table t2;
---- Partitioning and enum data type
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -602,14 +440,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values ('A'),('D'),('L'),('G');
select * from t1;
a
@ -641,14 +477,12 @@ create table t2 (a enum (
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
0 inserts;
insert into t2 values (char(ascii('A')+26));
Warnings:
@ -721,60 +555,7 @@ X
Y
Z
drop table t2;
create table t3 (a enum (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
'M','N','O','P','Q','R','S','T','U','V','W','X',
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
partition pa9 values less than (10),
partition pa18 values less than (19),
partition pa27 values less than (28),
partition pa36 values less than (37)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't3'
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa18 VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION pa27 VALUES LESS THAN (28) ENGINE = MyISAM, PARTITION pa36 VALUES LESS THAN (37) ENGINE = MyISAM) */
0 inserts;
select count(*) from t3;
count(*)
0
select * from t3;
a
drop table t3;
create table t4 (a enum (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
'M','N','O','P','Q','R','S','T','U','V','W','X',
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
partition pa9 values in (1,2,3,4,5,6,7,8,9),
partition pa18 values in (10,11,12,13,14,15,16,17,18),
partition pa27 values in (19,20,21,22,23,24,25,26,27),
partition pa36 values in (28,29,30,31,32,33,34,35,36)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't4'
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES IN (1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, PARTITION pa18 VALUES IN (10,11,12,13,14,15,16,17,18) ENGINE = MyISAM, PARTITION pa27 VALUES IN (19,20,21,22,23,24,25,26,27) ENGINE = MyISAM, PARTITION pa36 VALUES IN (28,29,30,31,32,33,34,35,36) ENGINE = MyISAM) */
0 inserts;
select count(*) from t4;
count(*)
0
select * from t4;
a
drop table t4;
---- Partitioning and set data type
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -789,14 +570,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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=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) */
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
select * from t1 order by a;
a
@ -828,14 +607,12 @@ create table t2 (a set (
'Y','Z'
) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` set('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
insert into t2 values ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('S'),('T'),('U'),('V'),('X'),('Y'),('Z');
insert into t2 values ('A,B'),('B,C'),('C,D'),('D,E'),('E,F'),('F,G'),('G,H'),('H,I'),('I,J'),('K,L'),('L,M'),('M,N'),('N,O'),('O,P'),('P,Q'),('Q,R'),('S,T'),('T,U'),('U,V'),('V,W'),('X,Y'),('Y,Z'),('Z,A');
insert into t2 values ('A,B,C'),('B,C,D'),('C,D,E'),('D,E,F'),('E,F,G'),('F,G,H'),('G,H,I'),('H,I,J'),('I,J,K'),('K,L,M'),('L,M,N'),('M,N,O'),('N,O,P'),('O,P,Q'),('P,Q,R'),('Q,R,S'),('S,T,U'),('T,U,V'),('U,V,W'),('V,W,X'),('X,Y,Z'),('Y,Z,A'),('Z,A,B');
@ -947,56 +724,7 @@ Y,Z
A,Y,Z
X,Y,Z
drop table t2;
create table t3 (a set (
'1','2','3','4','5','6','7','8','9','0'
) not null, primary key(a)) engine='InnoDB'
partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
partition pa9 values less than (10),
partition pa18 values less than (19),
partition pa27 values less than (28),
partition pa36 values less than (37),
partition pa64 values less than (65),
partition pa128 values less than (129),
partition pa256 values less than (257),
partition pa512 values less than (513),
partition pa768 values less than (769),
partition pa1024 values less than (1025)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't3'
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` set('1','2','3','4','5','6','7','8','9','0') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa18 VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION pa27 VALUES LESS THAN (28) ENGINE = MyISAM, PARTITION pa36 VALUES LESS THAN (37) ENGINE = MyISAM, PARTITION pa64 VALUES LESS THAN (65) ENGINE = MyISAM, PARTITION pa128 VALUES LESS THAN (129) ENGINE = MyISAM, PARTITION pa256 VALUES LESS THAN (257) ENGINE = MyISAM, PARTITION pa512 VALUES LESS THAN (513) ENGINE = MyISAM, PARTITION pa768 VALUES LESS THAN (769) ENGINE = MyISAM, PARTITION pa1024 VALUES LESS THAN (1025) ENGINE = MyISAM) */
select count(*) from t3;
count(*)
0
select * from t3 order by a;
a
drop table t3;
create table t4 (a set (
'1','2','3') not null, primary key(a)) engine='InnoDB'
partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
partition pa9 values in (1,2,3,4,5,6,7,8,9),
partition pa18 values in (10,11,12,13,14,15,16,17,18),
partition pa27 values in (19,20,21,22,23,24,25,26,27)
);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't4'
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` set('1','2','3') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(a as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa9 VALUES IN (1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, PARTITION pa18 VALUES IN (10,11,12,13,14,15,16,17,18) ENGINE = MyISAM, PARTITION pa27 VALUES IN (19,20,21,22,23,24,25,26,27) ENGINE = MyISAM) */
select count(*) from t4;
count(*)
0
select * from t4 order by a;
a
drop table t4;
---- Partitioning and blob data type
create table t1 (a blob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -1024,6 +752,7 @@ ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a longblob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
---- Partitioning and text data type
create table t1 (a text not null, primary key(a(767))) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =

View file

@ -1,5 +1,6 @@
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='MyISAM'
partition by key (a,b,c,d) (
---- Partitioning and char data type
create table t1 (a char(255) 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,
@ -15,26 +16,764 @@ partition pa4 DATA DIRECTORY =
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date NOT NULL,
`b` varchar(50) NOT NULL,
`c` varchar(50) NOT NULL,
`d` enum('m','w') NOT NULL DEFAULT 'm',
PRIMARY KEY (`a`,`b`,`c`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'),
('1983-12-31', 'cdef', 'srtbvsr', 'w'),
('1980-10-14', 'fgbbd', 'dtzndtz', 'w'),
('2000-06-15', 'jukg','zikhuk','m');
`a` char(255) 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) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select * from t1;
a b c d
1975-01-01 abcde abcde m
1980-10-14 fgbbd dtzndtz w
1983-12-31 cdef srtbvsr w
2000-06-15 jukg zikhuk m
select * from t1 where a<19851231;
a b c d
1975-01-01 abcde abcde m
1980-10-14 fgbbd dtzndtz w
1983-12-31 cdef srtbvsr w
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
select * from t1 where a='b';
a
b
update t1 set a='bb' where a='b';
delete from t1 where a='bb';
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a char(255) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 27;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
insert into t2 values (repeat(char(ascii('a')+2),24+54));
insert into t2 values (repeat(char(ascii('a')+3),23+54));
insert into t2 values (repeat(char(ascii('a')+4),22+54));
insert into t2 values (repeat(char(ascii('a')+5),21+54));
insert into t2 values (repeat(char(ascii('a')+6),20+54));
insert into t2 values (repeat(char(ascii('a')+7),19+54));
insert into t2 values (repeat(char(ascii('a')+8),18+54));
insert into t2 values (repeat(char(ascii('a')+9),17+54));
insert into t2 values (repeat(char(ascii('a')+10),16+54));
insert into t2 values (repeat(char(ascii('a')+11),15+54));
insert into t2 values (repeat(char(ascii('a')+12),14+54));
insert into t2 values (repeat(char(ascii('a')+13),13+54));
insert into t2 values (repeat(char(ascii('a')+14),12+54));
insert into t2 values (repeat(char(ascii('a')+15),11+54));
insert into t2 values (repeat(char(ascii('a')+16),10+54));
insert into t2 values (repeat(char(ascii('a')+17),9+54));
insert into t2 values (repeat(char(ascii('a')+18),8+54));
insert into t2 values (repeat(char(ascii('a')+19),7+54));
insert into t2 values (repeat(char(ascii('a')+20),6+54));
insert into t2 values (repeat(char(ascii('a')+21),5+54));
insert into t2 values (repeat(char(ascii('a')+22),4+54));
insert into t2 values (repeat(char(ascii('a')+23),3+54));
insert into t2 values (repeat(char(ascii('a')+24),2+54));
insert into t2 values (repeat(char(ascii('a')+25),1+54));
select count(*) from t2;
count(*)
26
select * from t2;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
drop table t2;
---- Partitioning and binary data type
create table t1 (a binary(255) 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);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` binary(255) 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) */
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select hex(a) from t1;
hex(a)
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
select a from t1 where substr(a,1,2)='b\0';
a
b
update t1 set a='cc' where substr(a,1,2)= 'b\0';
select a from t1 where substr(a,1,1)='c';
a
cc
delete from t1 where substr(a,1,2)='cc';
select hex(a) from t1;
hex(a)
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t1;
create table t2 (a binary(255) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 27;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` binary(255) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54));
insert into t2 values (repeat(char(ascii('a')+1),25+54));
insert into t2 values (repeat(char(ascii('a')+2),24+54));
insert into t2 values (repeat(char(ascii('a')+3),23+54));
insert into t2 values (repeat(char(ascii('a')+4),22+54));
insert into t2 values (repeat(char(ascii('a')+5),21+54));
insert into t2 values (repeat(char(ascii('a')+6),20+54));
insert into t2 values (repeat(char(ascii('a')+7),19+54));
insert into t2 values (repeat(char(ascii('a')+8),18+54));
insert into t2 values (repeat(char(ascii('a')+9),17+54));
insert into t2 values (repeat(char(ascii('a')+10),16+54));
insert into t2 values (repeat(char(ascii('a')+11),15+54));
insert into t2 values (repeat(char(ascii('a')+12),14+54));
insert into t2 values (repeat(char(ascii('a')+13),13+54));
insert into t2 values (repeat(char(ascii('a')+14),12+54));
insert into t2 values (repeat(char(ascii('a')+15),11+54));
insert into t2 values (repeat(char(ascii('a')+16),10+54));
insert into t2 values (repeat(char(ascii('a')+17),9+54));
insert into t2 values (repeat(char(ascii('a')+18),8+54));
insert into t2 values (repeat(char(ascii('a')+19),7+54));
insert into t2 values (repeat(char(ascii('a')+20),6+54));
insert into t2 values (repeat(char(ascii('a')+21),5+54));
insert into t2 values (repeat(char(ascii('a')+22),4+54));
insert into t2 values (repeat(char(ascii('a')+23),3+54));
insert into t2 values (repeat(char(ascii('a')+24),2+54));
insert into t2 values (repeat(char(ascii('a')+25),1+54));
select count(*) from t2;
count(*)
26
select hex(a) from t2;
hex(a)
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t2;
---- Partitioning and varchar data type
create table t1 (a varchar(767) 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);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(767) 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) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
select * from t1 where a='b';
a
b
update t1 set a='bb' where a='b';
delete from t1 where a='bb';
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varchar(767) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 27;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
insert into t2 values (repeat(char(ascii('a')+2),24*24));
insert into t2 values (repeat(char(ascii('a')+3),23*23));
insert into t2 values (repeat(char(ascii('a')+4),22*22));
insert into t2 values (repeat(char(ascii('a')+5),21*21));
insert into t2 values (repeat(char(ascii('a')+6),20*20));
insert into t2 values (repeat(char(ascii('a')+7),19*19));
insert into t2 values (repeat(char(ascii('a')+8),18*18));
insert into t2 values (repeat(char(ascii('a')+9),17*17));
insert into t2 values (repeat(char(ascii('a')+10),16*16));
insert into t2 values (repeat(char(ascii('a')+11),15*15));
insert into t2 values (repeat(char(ascii('a')+12),14*14));
insert into t2 values (repeat(char(ascii('a')+13),13*13));
insert into t2 values (repeat(char(ascii('a')+14),12*12));
insert into t2 values (repeat(char(ascii('a')+15),11*11));
insert into t2 values (repeat(char(ascii('a')+16),10*10));
insert into t2 values (repeat(char(ascii('a')+17),9*9));
insert into t2 values (repeat(char(ascii('a')+18),8*8));
insert into t2 values (repeat(char(ascii('a')+19),7*7));
insert into t2 values (repeat(char(ascii('a')+20),6*6));
insert into t2 values (repeat(char(ascii('a')+21),5*5));
insert into t2 values (repeat(char(ascii('a')+22),4*4));
insert into t2 values (repeat(char(ascii('a')+23),3*3));
insert into t2 values (repeat(char(ascii('a')+24),2*2));
insert into t2 values (repeat(char(ascii('a')+25),1*1));
select count(*) from t2;
count(*)
26
select * from t2;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ttttttttttttttttttttttttttttttttttttttttttttttttt
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvvvvvvvvvvv
wwwwwwwwwwwwwwww
xxxxxxxxx
yyyy
z
drop table t2;
---- Partitioning and varbinary data type
create table t1 (a varbinary(767) 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);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varbinary(767) 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) */
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
select * from t1 where a='b';
a
b
update t1 set a='bb' where a='b';
delete from t1 where a='bb';
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1;
create table t2 (a varbinary(767) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 30;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30 */
26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26));
insert into t2 values (repeat(char(ascii('a')+1),25*25));
insert into t2 values (repeat(char(ascii('a')+2),24*24));
insert into t2 values (repeat(char(ascii('a')+3),23*23));
insert into t2 values (repeat(char(ascii('a')+4),22*22));
insert into t2 values (repeat(char(ascii('a')+5),21*21));
insert into t2 values (repeat(char(ascii('a')+6),20*20));
insert into t2 values (repeat(char(ascii('a')+7),19*19));
insert into t2 values (repeat(char(ascii('a')+8),18*18));
insert into t2 values (repeat(char(ascii('a')+9),17*17));
insert into t2 values (repeat(char(ascii('a')+10),16*16));
insert into t2 values (repeat(char(ascii('a')+11),15*15));
insert into t2 values (repeat(char(ascii('a')+12),14*14));
insert into t2 values (repeat(char(ascii('a')+13),13*13));
insert into t2 values (repeat(char(ascii('a')+14),12*12));
insert into t2 values (repeat(char(ascii('a')+15),11*11));
insert into t2 values (repeat(char(ascii('a')+16),10*10));
insert into t2 values (repeat(char(ascii('a')+17),9*9));
insert into t2 values (repeat(char(ascii('a')+18),8*8));
insert into t2 values (repeat(char(ascii('a')+19),7*7));
insert into t2 values (repeat(char(ascii('a')+20),6*6));
insert into t2 values (repeat(char(ascii('a')+21),5*5));
insert into t2 values (repeat(char(ascii('a')+22),4*4));
insert into t2 values (repeat(char(ascii('a')+23),3*3));
insert into t2 values (repeat(char(ascii('a')+24),2*2));
insert into t2 values (repeat(char(ascii('a')+25),1*1));
select count(*) from t2;
count(*)
26
select * from t2;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ttttttttttttttttttttttttttttttttttttttttttttttttt
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
vvvvvvvvvvvvvvvvvvvvvvvvv
wwwwwwwwwwwwwwww
xxxxxxxxx
yyyy
z
drop table t2;
---- Partitioning and enum data type
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') 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);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('A','B','C','D','E','F','G','H','I','J','K','L') 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) */
insert into t1 values ('A'),('D'),('L'),('G');
select * from t1;
a
A
D
G
L
select * from t1 where a='A';
a
A
update t1 set a='E' where a='L';
select * from t1;
a
A
D
E
G
delete from t1 where a='E';
select * from t1;
a
A
D
G
drop table t1;
create table t2 (a enum (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
'M','N','O','P','Q','R','S','T','U','V','W','X',
'Y','Z'
) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 27;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
0 inserts;
insert into t2 values (char(ascii('A')+26));
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
insert into t2 values (char(ascii('A')+25));
insert into t2 values (char(ascii('A')+24));
insert into t2 values (char(ascii('A')+23));
insert into t2 values (char(ascii('A')+22));
insert into t2 values (char(ascii('A')+21));
insert into t2 values (char(ascii('A')+20));
insert into t2 values (char(ascii('A')+19));
insert into t2 values (char(ascii('A')+18));
insert into t2 values (char(ascii('A')+17));
insert into t2 values (char(ascii('A')+16));
insert into t2 values (char(ascii('A')+15));
insert into t2 values (char(ascii('A')+14));
insert into t2 values (char(ascii('A')+13));
insert into t2 values (char(ascii('A')+12));
insert into t2 values (char(ascii('A')+11));
insert into t2 values (char(ascii('A')+10));
insert into t2 values (char(ascii('A')+9));
insert into t2 values (char(ascii('A')+8));
insert into t2 values (char(ascii('A')+7));
insert into t2 values (char(ascii('A')+6));
insert into t2 values (char(ascii('A')+5));
insert into t2 values (char(ascii('A')+4));
insert into t2 values (char(ascii('A')+3));
insert into t2 values (char(ascii('A')+2));
insert into t2 values (char(ascii('A')+1));
insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
select count(*) from t2;
count(*)
36
select * from t2;
a
1
2
3
4
5
6
7
8
9
0
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
drop table t2;
---- Partitioning and set data type
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') 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);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` set('A','B','C','D','E','F','G','H','I','J','K','L') 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) */
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
select * from t1 order by a;
a
A,B
C,D
G,H,K
E,L
select * from t1 where a='A,B';
a
A,B
update t1 set a='A,B,C' where a='E,L';
select * from t1 order by a;
a
A,B
A,B,C
C,D
G,H,K
delete from t1 where a='A,B';
select * from t1 order by a;
a
A,B,C
C,D
G,H,K
drop table t1;
create table t2 (a set (
'1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L',
'M','N','O','P','Q','R','S','T','U','V','W','X',
'Y','Z'
) not null, primary key(a)) engine='MyISAM'
partition by key (a) partitions 27;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` set('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27 */
insert into t2 values ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('S'),('T'),('U'),('V'),('X'),('Y'),('Z');
insert into t2 values ('A,B'),('B,C'),('C,D'),('D,E'),('E,F'),('F,G'),('G,H'),('H,I'),('I,J'),('K,L'),('L,M'),('M,N'),('N,O'),('O,P'),('P,Q'),('Q,R'),('S,T'),('T,U'),('U,V'),('V,W'),('X,Y'),('Y,Z'),('Z,A');
insert into t2 values ('A,B,C'),('B,C,D'),('C,D,E'),('D,E,F'),('E,F,G'),('F,G,H'),('G,H,I'),('H,I,J'),('I,J,K'),('K,L,M'),('L,M,N'),('M,N,O'),('N,O,P'),('O,P,Q'),('P,Q,R'),('Q,R,S'),('S,T,U'),('T,U,V'),('U,V,W'),('V,W,X'),('X,Y,Z'),('Y,Z,A'),('Z,A,B');
insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
insert into t2 values ('1,2'),('2,3'),('3,4'),('4,5'),('5,6'),('6,7'),('7,8'),('8,9'),('9,0'),('0,1');
insert into t2 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'),('7,8,9'),('8,9,0'),('9,0,1'),('0,1,2');
select count(*) from t2;
count(*)
99
select * from t2 order by a;
a
1
2
1,2
3
2,3
1,2,3
4
3,4
2,3,4
5
4,5
3,4,5
6
5,6
4,5,6
7
6,7
5,6,7
8
7,8
6,7,8
9
8,9
7,8,9
0
1,0
1,2,0
9,0
1,9,0
8,9,0
A
B
A,B
C
B,C
A,B,C
D
C,D
B,C,D
E
D,E
C,D,E
F
E,F
D,E,F
G
F,G
E,F,G
H
G,H
F,G,H
I
H,I
G,H,I
I,J
H,I,J
K
I,J,K
L
K,L
M
L,M
K,L,M
N
M,N
L,M,N
O
N,O
M,N,O
P
O,P
N,O,P
Q
P,Q
O,P,Q
Q,R
P,Q,R
S
Q,R,S
T
S,T
U
T,U
S,T,U
V
U,V
T,U,V
V,W
U,V,W
X
V,W,X
Y
X,Y
Z
A,Z
A,B,Z
Y,Z
A,Y,Z
X,Y,Z
drop table t2;
---- Partitioning and blob data type
create table t1 (a blob not null, primary key(a(767))) 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);
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a blob not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a tinyblob not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a mediumblob not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a longblob not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
---- Partitioning and text data type
create table t1 (a text not null, primary key(a(767))) 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);
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a tinytext not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a mediumtext not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
create table t2 (a longtext not null, primary key(a(767))) engine='MyISAM'
partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function

View file

@ -17,7 +17,7 @@ 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 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
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
@ -298,7 +298,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1;
a
@ -625,7 +625,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` time NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1;
a
@ -1090,7 +1090,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
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
@ -1367,7 +1367,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1;
a

View file

@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
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

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
@ -62,7 +57,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -497,7 +492,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Assignment of storage engine just after partition or subpartition
@ -516,7 +511,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -951,7 +946,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -971,7 +966,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -1404,7 +1399,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 3 Some but not all named partitions or subpartitions get a storage
@ -1423,7 +1418,7 @@ PARTITION part2
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -1858,7 +1853,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -1873,7 +1868,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -2308,7 +2303,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -2328,7 +2323,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -2761,7 +2756,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -2781,7 +2776,7 @@ SUBPARTITION subpart22 )
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -3214,7 +3209,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 4 Storage engine assignment after partition name + after name of
@ -3238,7 +3233,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -3671,7 +3666,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -3691,7 +3686,7 @@ SUBPARTITION subpart22)
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -4124,7 +4119,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
@ -4144,7 +4139,7 @@ PARTITION part2 STORAGE ENGINE = 'InnoDB'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -4579,7 +4574,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -4599,7 +4594,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -5032,7 +5027,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 6.2 Storage engine assignment after partition name + after
# subpartition name
@ -5054,7 +5049,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -5487,7 +5482,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
@ -5503,7 +5498,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'InnoDB');
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -5938,7 +5933,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -5954,7 +5949,7 @@ SUBPARTITION BY HASH(f_int1)
SUBPARTITION subpart12 STORAGE ENGINE = 'InnoDB'));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -6387,7 +6382,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
SET SESSION storage_engine='InnoDB';
DROP VIEW IF EXISTS v1;

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
@ -62,7 +57,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -507,7 +502,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 2 Assignment of storage engine just after partition or subpartition
@ -526,7 +521,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -971,7 +966,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -991,7 +986,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -1438,7 +1433,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 3 Some but not all named partitions or subpartitions get a storage
@ -1457,7 +1452,7 @@ PARTITION part2
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -1902,7 +1897,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -1917,7 +1912,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -2362,7 +2357,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -2382,7 +2377,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -2829,7 +2824,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -2849,7 +2844,7 @@ SUBPARTITION subpart22 )
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -3296,7 +3291,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 4 Storage engine assignment after partition name + after name of
@ -3320,7 +3315,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -3767,7 +3762,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -3787,7 +3782,7 @@ SUBPARTITION subpart22)
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -4234,7 +4229,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 5 Precedence of storage engine assignments (if there is any)
@ -4254,7 +4249,7 @@ PARTITION part2 STORAGE ENGINE = 'MyISAM'
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -4699,7 +4694,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -4719,7 +4714,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -5166,7 +5161,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
# 6.2 Storage engine assignment after partition name + after
# subpartition name
@ -5188,7 +5183,7 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM')
);
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -5635,7 +5630,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
#------------------------------------------------------------------------
# 6 Session default engine differs from engine used within create table
@ -5651,7 +5646,7 @@ f_charbig VARCHAR(1000)
PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'MyISAM');
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -6094,7 +6089,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
@ -6110,7 +6105,7 @@ SUBPARTITION BY HASH(f_int1)
SUBPARTITION subpart12 STORAGE ENGINE = 'MyISAM'));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (include/partition_check.inc)
# Start usability test (inc/partition_check.inc)
create_command
SHOW CREATE TABLE t1;
Table Create Table
@ -6553,7 +6548,7 @@ TRUNCATE t1;
# check TRUNCATE success: 1
# check layout success: 1
# End usability test (include/partition_check.inc)
# End usability test (inc/partition_check.inc)
DROP TABLE t1;
SET SESSION storage_engine='MyISAM';
DROP VIEW IF EXISTS v1;

View file

@ -89,152 +89,6 @@ select count(*) from t2;
count(*)
3072
drop table t2;
create table t3 (a float not null, primary key(a)) engine='InnoDB'
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
partition pa1 values less than (3),
partition pa3 values less than (6),
partition pa10 values less than (10)
);
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` float NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */
9*3 inserts;
insert into t3 values (9);
insert into t3 values (9+0.33);
insert into t3 values (9+0.75);
insert into t3 values (8);
insert into t3 values (8+0.33);
insert into t3 values (8+0.75);
insert into t3 values (7);
insert into t3 values (7+0.33);
insert into t3 values (7+0.75);
insert into t3 values (6);
insert into t3 values (6+0.33);
insert into t3 values (6+0.75);
insert into t3 values (5);
insert into t3 values (5+0.33);
insert into t3 values (5+0.75);
insert into t3 values (4);
insert into t3 values (4+0.33);
insert into t3 values (4+0.75);
insert into t3 values (3);
insert into t3 values (3+0.33);
insert into t3 values (3+0.75);
insert into t3 values (2);
insert into t3 values (2+0.33);
insert into t3 values (2+0.75);
insert into t3 values (1);
insert into t3 values (1+0.33);
insert into t3 values (1+0.75);
select count(*) from t3;
count(*)
27
select * from t3;
a
1
1.33
1.75
2
2.33
2.75
3
3.33
3.75
4
4.33
4.75
5
5.33
5.75
6
6.33
6.75
7
7.33
7.75
8
8.33
8.75
9
9.33
9.75
drop table t3;
create table t4 (a float not null, primary key(a)) engine='InnoDB'
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
partition pa1 values in (1,2,3),
partition pa3 values in (4,5,6),
partition pa10 values in (7,8,9,10)
);
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` float NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION pa3 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = InnoDB) */
9*3 inserts;
insert into t4 values (9);
insert into t4 values (9+0.33);
insert into t4 values (9+0.75);
insert into t4 values (8);
insert into t4 values (8+0.33);
insert into t4 values (8+0.75);
insert into t4 values (7);
insert into t4 values (7+0.33);
insert into t4 values (7+0.75);
insert into t4 values (6);
insert into t4 values (6+0.33);
insert into t4 values (6+0.75);
insert into t4 values (5);
insert into t4 values (5+0.33);
insert into t4 values (5+0.75);
insert into t4 values (4);
insert into t4 values (4+0.33);
insert into t4 values (4+0.75);
insert into t4 values (3);
insert into t4 values (3+0.33);
insert into t4 values (3+0.75);
insert into t4 values (2);
insert into t4 values (2+0.33);
insert into t4 values (2+0.75);
insert into t4 values (1);
insert into t4 values (1+0.33);
insert into t4 values (1+0.75);
select count(*) from t4;
count(*)
27
select * from t4;
a
1
1.33
1.75
2
2.33
2.75
3
3.33
3.75
4
4.33
4.75
5
5.33
5.75
6
6.33
6.75
7
7.33
7.75
8
8.33
8.75
9
9.33
9.75
drop table t4;
create table t1 (a double not null, primary key(a)) engine='InnoDB'
partition by key (a) (
partition pa1 DATA DIRECTORY =
@ -318,149 +172,3 @@ select count(*) from t2;
count(*)
3072
drop table t2;
create table t3 (a double not null, primary key(a)) engine='InnoDB'
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
partition pa1 values less than (3),
partition pa3 values less than (6),
partition pa10 values less than (10)
);
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` double NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */
9*3 inserts;
insert into t3 values (9);
insert into t3 values (9+0.33);
insert into t3 values (9+0.75);
insert into t3 values (8);
insert into t3 values (8+0.33);
insert into t3 values (8+0.75);
insert into t3 values (7);
insert into t3 values (7+0.33);
insert into t3 values (7+0.75);
insert into t3 values (6);
insert into t3 values (6+0.33);
insert into t3 values (6+0.75);
insert into t3 values (5);
insert into t3 values (5+0.33);
insert into t3 values (5+0.75);
insert into t3 values (4);
insert into t3 values (4+0.33);
insert into t3 values (4+0.75);
insert into t3 values (3);
insert into t3 values (3+0.33);
insert into t3 values (3+0.75);
insert into t3 values (2);
insert into t3 values (2+0.33);
insert into t3 values (2+0.75);
insert into t3 values (1);
insert into t3 values (1+0.33);
insert into t3 values (1+0.75);
select count(*) from t3;
count(*)
27
select * from t3;
a
1
1.33
1.75
2
2.33
2.75
3
3.33
3.75
4
4.33
4.75
5
5.33
5.75
6
6.33
6.75
7
7.33
7.75
8
8.33
8.75
9
9.33
9.75
drop table t3;
create table t4 (a double not null, primary key(a)) engine='InnoDB'
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
partition pa1 values in (1,2,3),
partition pa3 values in (4,5,6),
partition pa10 values in (7,8,9,10)
);
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` double NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION pa3 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = InnoDB) */
9*3 inserts;
insert into t4 values (9);
insert into t4 values (9+0.33);
insert into t4 values (9+0.75);
insert into t4 values (8);
insert into t4 values (8+0.33);
insert into t4 values (8+0.75);
insert into t4 values (7);
insert into t4 values (7+0.33);
insert into t4 values (7+0.75);
insert into t4 values (6);
insert into t4 values (6+0.33);
insert into t4 values (6+0.75);
insert into t4 values (5);
insert into t4 values (5+0.33);
insert into t4 values (5+0.75);
insert into t4 values (4);
insert into t4 values (4+0.33);
insert into t4 values (4+0.75);
insert into t4 values (3);
insert into t4 values (3+0.33);
insert into t4 values (3+0.75);
insert into t4 values (2);
insert into t4 values (2+0.33);
insert into t4 values (2+0.75);
insert into t4 values (1);
insert into t4 values (1+0.33);
insert into t4 values (1+0.75);
select count(*) from t4;
count(*)
27
select * from t4;
a
1
1.33
1.75
2
2.33
2.75
3
3.33
3.75
4
4.33
4.75
5
5.33
5.75
6
6.33
6.75
7
7.33
7.75
8
8.33
8.75
9
9.33
9.75
drop table t4;

View file

@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` float NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1;
a
@ -108,7 +108,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
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

View file

@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
select * from t1;
a
@ -125,7 +125,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
select * from t1;
a
@ -233,7 +233,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(10) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
select * from t1;
a
@ -341,7 +341,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
select * from t1;
a
@ -449,7 +449,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!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 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) */
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
select * from t1;
a

View file

@ -20,7 +20,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(50) NOT NULL,
`d` enum('m','w') NOT NULL DEFAULT 'm',
PRIMARY KEY (`a`,`b`,`c`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 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) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m'),
('1983-12-31', 'cdef', 'srtbvsr', 'w'),
@ -65,7 +65,7 @@ t1 CREATE TABLE `t1` (
`h` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 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) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
@ -118,7 +118,7 @@ t1 CREATE TABLE `t1` (
`h1` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 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) */
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'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
@ -202,7 +202,7 @@ t1 CREATE TABLE `t1` (
`h3` tinyint(4) NOT NULL,
`i` char(255) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/' /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 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) */
insert into t1 values
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
@ -1058,6 +1053,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1.6;
ERROR 42000: Only integers allowed as number here near '1.6' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1.6
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1.6
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (21' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 (
@ -1127,6 +1145,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.2E+1;
ERROR 42000: Only integers allowed as number here near '0.2E+1' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 0.2E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.2E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0' at line 8
CREATE TABLE t1 (
@ -1150,6 +1191,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.16E+1;
ERROR 42000: Only integers allowed as number here near '0.16E+1' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 0.16E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.16E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 (
@ -1166,6 +1230,52 @@ PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1E+300;
ERROR 42000: Only integers allowed as number here near '1E+300' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1E-300;
ERROR 42000: Only integers allowed as number here near '1E-300' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1E-300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1E-300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
# 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 (
f_int1 INTEGER,

View file

@ -1,11 +1,6 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# There are several testcases disabled because of the open bugs
# #15890
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases
@ -1140,6 +1135,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1.6;
ERROR 42000: Only integers allowed as number here near '1.6' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1.6
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1.6
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (21' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 (
@ -1209,6 +1227,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.2E+1;
ERROR 42000: Only integers allowed as number here near '0.2E+1' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 0.2E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.2E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0' at line 8
CREATE TABLE t1 (
@ -1232,6 +1273,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.16E+1;
ERROR 42000: Only integers allowed as number here near '0.16E+1' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 0.16E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.16E+1
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 (
@ -1248,6 +1312,52 @@ PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1E+300;
ERROR 42000: Only integers allowed as number here near '1E+300' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1E+300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 1E-300;
ERROR 42000: Only integers allowed as number here near '1E-300' at line 8
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1E-300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483646));
ERROR 42000: Only integers allowed as number here near '1E-300
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN ' at line 9
# 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 (
f_int1 INTEGER,

View file

@ -12,9 +12,7 @@ partition_value_ndb : cannot create t1
partition_basic_ndb : cannot create t1
partition_alter1_ndb : timeout. Needs too much time.
partition_alter2_ndb : cannot create t1
partition_char_innodb : crash. Bug? More investigations
partition_sessions : needs system_3_init.inc
partition_engine_ndb : cannot create t1
part_supported_sql_func_ndb : cannot create t1
rpl_ndb_dd_partitions : cannot create t1
partition_float_innodb : Bug#30583 Partition on DOUBLE key + INNODB + count(*) == crash

View file

@ -14,11 +14,11 @@
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -40,5 +40,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc
# --source inc/part_blocked_sql_funcs_main.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -39,5 +39,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc
# --source inc/part_blocked_sql_funcs_main.inc

View file

@ -14,7 +14,7 @@
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# 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.
#
@ -38,5 +38,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
# --source inc/part_supported_sql_funcs_main.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -40,5 +40,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
# --source inc/part_supported_sql_funcs_main.inc

View file

@ -30,11 +30,9 @@ let $do_long_tests= 1;
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
--source include/have_ndb.inc
##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB';
#------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc
# --source inc/part_supported_sql_funcs_main.inc

View file

@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'ndbcluster';
--source include/have_ndb.inc
let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@ -67,7 +67,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
@ -76,7 +75,6 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc
# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -84,4 +82,3 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -48,8 +48,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'ndbcluster';
--source include/have_ndb.inc
let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@ -68,7 +68,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -76,7 +75,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter2.inc
# --source inc/partition_alter2.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -84,4 +82,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-24 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -46,8 +46,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter3.inc
# --source inc/partition_alter3.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -62,7 +62,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -70,7 +69,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter3.inc
# --source inc/partition_alter3.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -78,4 +76,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter4.inc
# --source inc/partition_alter4.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter4.inc
# --source inc/partition_alter4.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -6,7 +6,7 @@
# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -48,8 +48,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'ndbcluster';
--source include/have_ndb.inc
let $engine= 'ndbcluster';
##### Execute the test of "table" files
# NDB has no files per PK, UI, ...
@ -68,18 +68,16 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs
# Bug#18730 Partitions: NDB, crash on SELECT MIN(<unique column>)
let $fixed_bug18730= 0;
let $fixed_bug18730= 1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic.inc
# --source inc/partition_basic.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
@ -87,4 +85,3 @@ let $fixed_bug18735= 0;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -53,5 +53,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
# --source inc/partition_basic.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -52,5 +52,4 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
# --source inc/partition_basic.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -53,5 +53,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_bit.inc
# --source inc/partition_basic.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### max rows to be inserted
let $maxrows=65535;
@ -51,11 +51,3 @@ let $maxrows=65535;
--source suite/parts/inc/partition_set.inc
--source suite/parts/inc/partition_blob.inc
--source suite/parts/inc/partition_text.inc
# --source inc/partition_char.inc
# --source inc/partition_binary.inc
# --source inc/partition_varchar.inc
# --source inc/partition_varbinary.inc
# --source inc/partition_enum.inc
# --source inc/partition_set.inc
# --source inc/partition_blob.inc
# --source inc/partition_text.inc

View file

@ -1,9 +1,9 @@
################################################################################
# t/partition_special_myisam.test #
# t/partition_char_myisam.test #
# #
# Purpose: #
# different Tests #
# MYISAM branch #
# Tests around character types #
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -37,7 +37,16 @@ let $debug= 0;
##### Storage engine to be tested
let $engine= 'MyISAM';
##### max rows to be inserted
let $maxrows=65535;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_key_4col.inc
# --source inc/partition_key_4col.inc
--source suite/parts/inc/partition_char.inc
--source suite/parts/inc/partition_binary.inc
--source suite/parts/inc/partition_varchar.inc
--source suite/parts/inc/partition_varbinary.inc
--source suite/parts/inc/partition_enum.inc
--source suite/parts/inc/partition_set.inc
--source suite/parts/inc/partition_blob.inc
--source suite/parts/inc/partition_text.inc

View file

@ -18,7 +18,7 @@
# 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 include/partition.pre before changing
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
@ -35,8 +35,8 @@ let $debug= 0;
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### max rows to be inserted
let $maxrows=1024;
@ -48,8 +48,3 @@ let $maxrows=1024;
--source suite/parts/inc/partition_time.inc
--source suite/parts/inc/partition_datetime.inc
--source suite/parts/inc/partition_year.inc
# --source inc/partition_timestamp.inc
# --source inc/partition_date.inc
# --source inc/partition_time.inc
# --source inc/partition_datetime.inc
# --source inc/partition_year.inc

Some files were not shown because too many files have changed in this diff Show more