1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build

into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


mysql-test/lib/mtr_report.pl:
  merged
This commit is contained in:
unknown
2007-11-21 21:29:16 +01:00
141 changed files with 3643 additions and 7626 deletions

View File

@ -2207,33 +2207,26 @@ com_go(String *buffer,char *line __attribute__((unused)))
} }
#endif #endif
if (error)
{
executing_query= 0;
buffer->length(0); // Remove query on error
return error;
}
error=0;
buffer->length(0); buffer->length(0);
if (error)
goto end;
do do
{ {
if (quick) if (quick)
{ {
if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql)) if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql))
{ {
executing_query= 0; error= put_error(&mysql);
return put_error(&mysql); goto end;
} }
} }
else else
{ {
error= mysql_store_result_for_lazy(&result); error= mysql_store_result_for_lazy(&result);
if (error) if (error)
{ goto end;
executing_query= 0;
return error;
}
} }
if (verbose >= 3 || !opt_silent) if (verbose >= 3 || !opt_silent)
@ -2310,12 +2303,10 @@ com_go(String *buffer,char *line __attribute__((unused)))
if (err >= 1) if (err >= 1)
error= put_error(&mysql); error= put_error(&mysql);
end:
if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */ if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */
{
init_pager();
print_warnings(); print_warnings();
end_pager();
}
if (!error && !status.batch && if (!error && !status.batch &&
(mysql.server_status & SERVER_STATUS_DB_DROPPED)) (mysql.server_status & SERVER_STATUS_DB_DROPPED))
@ -2740,6 +2731,9 @@ static void print_warnings()
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW cur; MYSQL_ROW cur;
my_ulonglong num_rows; my_ulonglong num_rows;
/* Save current error before calling "show warnings" */
uint error= mysql_errno(&mysql);
/* Get the warnings */ /* Get the warnings */
query= "show warnings"; query= "show warnings";
@ -2748,16 +2742,28 @@ static void print_warnings()
/* Bail out when no warnings */ /* Bail out when no warnings */
if (!(num_rows= mysql_num_rows(result))) if (!(num_rows= mysql_num_rows(result)))
{ goto end;
mysql_free_result(result);
return; cur= mysql_fetch_row(result);
}
/*
Don't print a duplicate of the current error. It is possible for SHOW
WARNINGS to return multiple errors with the same code, but different
messages. To be safe, skip printing the duplicate only if it is the only
warning.
*/
if (!cur || num_rows == 1 && error == (uint) strtoul(cur[1], NULL, 10))
goto end;
/* Print the warnings */ /* Print the warnings */
while ((cur= mysql_fetch_row(result))) init_pager();
do
{ {
tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]); tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
} } while ((cur= mysql_fetch_row(result)));
end_pager();
end:
mysql_free_result(result); mysql_free_result(result);
} }

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;

View File

@ -338,7 +338,7 @@ sub mtr_report_stats ($) {
# test case for Bug#bug29807 copies a stray frm into database # test case for Bug#bug29807 copies a stray frm into database
/InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal/ or /InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal/ or
/Cannot find table test\/bug29807 from the internal data dictionary/ or /Cannot find or open table test\/bug29807 from/ or
# innodb foreign key tests that fail in ALTER or RENAME produce this # innodb foreign key tests that fail in ALTER or RENAME produce this
/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/ or /InnoDB: Error: in ALTER TABLE `test`.`t[12]`/ or

View File

@ -180,3 +180,10 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
1 1
End of 5.0 tests End of 5.0 tests
WARNING: --server-arg option not supported in this configuration. WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Error (Code 1050): Table 't2' already exists
drop tables t1, t2;
End of tests

File diff suppressed because it is too large Load Diff

View File

@ -199,7 +199,7 @@ select s.catalog_name, s.schema_name, s.default_character_set_name,
--source suite/funcs_1/datadict/datadict_bug_12777.inc --source suite/funcs_1/datadict/datadict_bug_12777.inc
select * from columns; select * from columns;
select * from character_sets; select * from character_sets;
select sum(id) from collations; select sum(id) from collations where collation_name <> 'utf8_general_cs';
select collation_name, character_set_name into @x,@y select collation_name, character_set_name into @x,@y
from collation_character_set_applicability limit 1; from collation_character_set_applicability limit 1;
select @x, @y; select @x, @y;
@ -1660,13 +1660,14 @@ connect (u_6_401017, localhost, u_6_401017, , test);
use information_schema; use information_schema;
select * from collation_character_set_applicability; select * from collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
select * from schemata; select * from schemata;
select table_name from tables; select table_name from tables;
--source suite/funcs_1/datadict/datadict_bug_12777.inc --source suite/funcs_1/datadict/datadict_bug_12777.inc
select table_name, column_name, column_type from columns; select table_name, column_name, column_type from columns;
select character_set_name from character_sets; select character_set_name from character_sets;
select collation_name from collations; select collation_name from collations where collation_name <> 'utf8_general_cs';
select routine_name, routine_type from routines; select routine_name, routine_type from routines;
select table_name, index_name from statistics; select table_name, index_name from statistics;
select table_name from views; select table_name from views;
@ -1926,7 +1927,7 @@ let $message= Testcase 3.2.3.2:;
# the USAGE privilege. # the USAGE privilege.
################################################################################ ################################################################################
SELECT * FROM collations; SELECT * FROM collations where collation_name <> 'utf8_general_cs';
# ------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------
let $message= Testcase 3.2.3.3:; let $message= Testcase 3.2.3.3:;
@ -1973,7 +1974,8 @@ let $message= Testcase 3.2.4.2:;
# and update with expected results afterwards. # and update with expected results afterwards.
################################################################################ ################################################################################
SELECT * FROM collation_character_set_applicability; SELECT * FROM collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
# ------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------
let $message= Testcase 3.2.4.3:; let $message= Testcase 3.2.4.3:;

View File

@ -35,8 +35,9 @@ eval select table_name, index_schema, index_name, index_type
where table_schema like '$dbname%'; where table_schema like '$dbname%';
--replace_result $SERVER_NAME <SERVER_NAME> --replace_result $SERVER_NAME <SERVER_NAME>
--sorted_result
eval select * eval select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
# where grantee="'u_6_401013'@'%'"; # where grantee="'u_6_401013'@'%'";
eval select * eval select *

View File

@ -28,8 +28,8 @@ eval $dd_part1 tables $dd_part2;
--source suite/funcs_1/datadict/datadict_bug_12777.inc --source suite/funcs_1/datadict/datadict_bug_12777.inc
eval $dd_part1 columns $dd_part2; eval $dd_part1 columns $dd_part2;
eval $dd_part1 character_sets $dd_part2; eval $dd_part1 character_sets $dd_part2;
eval $dd_part1 collations $dd_part2; eval $dd_part1 collations where collation_name <> 'utf8_general_cs' $dd_part2;
eval $dd_part1 collation_character_set_applicability $dd_part2; eval $dd_part1 collation_character_set_applicability where collation_name <> 'utf8_general_cs' $dd_part2;
--replace_column 16 <Created> 17 <Last_Altered> --replace_column 16 <Created> 17 <Last_Altered>
eval $dd_part1 routines $dd_part2; eval $dd_part1 routines $dd_part2;
eval $dd_part1 statistics $dd_part2; eval $dd_part1 statistics $dd_part2;

View File

@ -3139,7 +3139,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1 geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2 cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
select sum(id) from collations; select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id) sum(id)
10840 10840
select collation_name, character_set_name into @x,@y select collation_name, character_set_name into @x,@y
@ -3610,10 +3610,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1; SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2 big5 big5_chinese_ci Big5 Traditional Chinese 2
SELECT * FROM collations LIMIT 1; SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
SELECT * FROM collation_character_set_applicability LIMIT 1; SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
SELECT * FROM routines LIMIT 1; SELECT * FROM routines LIMIT 1;
@ -5596,10 +5596,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ; SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*) COUNT(*)
36 36
SELECT COUNT(*) FROM information_schema. collations ; SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
127 127
SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ; SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
128 128
SELECT COUNT(*) FROM information_schema. routines ; SELECT COUNT(*) FROM information_schema. routines ;
@ -7354,7 +7354,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7505,7 +7505,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 BTREE res_t_401013 db_datadict i_6_401013 BTREE
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7642,7 +7642,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7791,7 +7791,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7936,7 +7936,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8094,7 +8094,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE res_t_401015 db_datadict i_6_401015 BTREE
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8230,7 +8230,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8480,7 +8480,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema; use information_schema;
select * from collation_character_set_applicability; select * from collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5
@ -9262,7 +9263,7 @@ binary
geostd8 geostd8
cp932 cp932
eucjpms eucjpms
select collation_name from collations; select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name collation_name
big5_chinese_ci big5_chinese_ci
big5_bin big5_bin
@ -9627,7 +9628,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2: Testcase 3.2.3.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collations; SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1 big5_bin big5 84 Yes 1
@ -9789,7 +9790,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2: Testcase 3.2.4.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collation_character_set_applicability; SELECT * FROM collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5

View File

@ -3122,7 +3122,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1 geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2 cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
select sum(id) from collations; select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id) sum(id)
10840 10840
select collation_name, character_set_name into @x,@y select collation_name, character_set_name into @x,@y
@ -3593,10 +3593,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1; SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2 big5 big5_chinese_ci Big5 Traditional Chinese 2
SELECT * FROM collations LIMIT 1; SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
SELECT * FROM collation_character_set_applicability LIMIT 1; SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
SELECT * FROM routines LIMIT 1; SELECT * FROM routines LIMIT 1;
@ -5579,10 +5579,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ; SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*) COUNT(*)
36 36
SELECT COUNT(*) FROM information_schema. collations ; SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
127 127
SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ; SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
128 128
SELECT COUNT(*) FROM information_schema. routines ; SELECT COUNT(*) FROM information_schema. routines ;
@ -7337,7 +7337,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7488,7 +7488,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 HASH res_t_401013 db_datadict i_6_401013 HASH
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7625,7 +7625,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7774,7 +7774,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7919,7 +7919,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8077,7 +8077,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE res_t_401015 db_datadict i_6_401015 BTREE
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8213,7 +8213,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8463,7 +8463,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema; use information_schema;
select * from collation_character_set_applicability; select * from collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5
@ -9230,7 +9231,7 @@ binary
geostd8 geostd8
cp932 cp932
eucjpms eucjpms
select collation_name from collations; select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name collation_name
big5_chinese_ci big5_chinese_ci
big5_bin big5_bin
@ -9595,7 +9596,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2: Testcase 3.2.3.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collations; SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1 big5_bin big5 84 Yes 1
@ -9757,7 +9758,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2: Testcase 3.2.4.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collation_character_set_applicability; SELECT * FROM collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5

View File

@ -3192,7 +3192,7 @@ binary binary Binary pseudo charset 1
geostd8 geostd8_general_ci GEOSTD8 Georgian 1 geostd8 geostd8_general_ci GEOSTD8 Georgian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2 cp932 cp932_japanese_ci SJIS for Windows Japanese 2
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
select sum(id) from collations; select sum(id) from collations where collation_name <> 'utf8_general_cs';
sum(id) sum(id)
10840 10840
select collation_name, character_set_name into @x,@y select collation_name, character_set_name into @x,@y
@ -3663,10 +3663,10 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 N
SELECT * FROM character_sets LIMIT 1; SELECT * FROM character_sets LIMIT 1;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
big5 big5_chinese_ci Big5 Traditional Chinese 2 big5 big5_chinese_ci Big5 Traditional Chinese 2
SELECT * FROM collations LIMIT 1; SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
SELECT * FROM collation_character_set_applicability LIMIT 1; SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1;
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
SELECT * FROM routines LIMIT 1; SELECT * FROM routines LIMIT 1;
@ -5649,10 +5649,10 @@ COUNT(*)
SELECT COUNT(*) FROM information_schema. character_sets ; SELECT COUNT(*) FROM information_schema. character_sets ;
COUNT(*) COUNT(*)
36 36
SELECT COUNT(*) FROM information_schema. collations ; SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
127 127
SELECT COUNT(*) FROM information_schema. collation_character_set_applicability ; SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ;
COUNT(*) COUNT(*)
128 128
SELECT COUNT(*) FROM information_schema. routines ; SELECT COUNT(*) FROM information_schema. routines ;
@ -7407,7 +7407,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7558,7 +7558,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401013 db_datadict i_6_401013 BTREE res_t_401013 db_datadict i_6_401013 BTREE
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7695,7 +7695,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7844,7 +7844,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -7989,7 +7989,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8147,7 +8147,7 @@ where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
res_t_401015 db_datadict i_6_401015 BTREE res_t_401015 db_datadict i_6_401015 BTREE
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8283,7 +8283,7 @@ from information_schema.statistics
where table_schema like 'db_datadict%'; where table_schema like 'db_datadict%';
table_name index_schema index_name index_type table_name index_schema index_name index_type
select * select *
from information_schema.user_privileges order by grantee, privilege_type; from information_schema.user_privileges;
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
'root'@'127.0.0.1' NULL ALTER YES 'root'@'127.0.0.1' NULL ALTER YES
'root'@'127.0.0.1' NULL ALTER ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES
@ -8533,7 +8533,8 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK);
use information_schema; use information_schema;
select * from collation_character_set_applicability; select * from collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5
@ -9332,7 +9333,7 @@ binary
geostd8 geostd8
cp932 cp932
eucjpms eucjpms
select collation_name from collations; select collation_name from collations where collation_name <> 'utf8_general_cs';
collation_name collation_name
big5_chinese_ci big5_chinese_ci
big5_bin big5_bin
@ -9697,7 +9698,7 @@ NULL information_schema collations SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NUL
Testcase 3.2.3.2: Testcase 3.2.3.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collations; SELECT * FROM collations where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
big5_bin big5 84 Yes 1 big5_bin big5 84 Yes 1
@ -9859,7 +9860,8 @@ NULL information_schema collation_character_set_applicability CHARACTER_SET_NAME
Testcase 3.2.4.2: Testcase 3.2.4.2:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SELECT * FROM collation_character_set_applicability; SELECT * FROM collation_character_set_applicability
where collation_name <> 'utf8_general_cs';
COLLATION_NAME CHARACTER_SET_NAME COLLATION_NAME CHARACTER_SET_NAME
big5_chinese_ci big5 big5_chinese_ci big5
big5_bin big5 big5_bin big5

View File

@ -75,7 +75,7 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
NOT YET IMPLEMENTED: cursor tests NOT YET IMPLEMENTED: cursor tests

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.3: Testcase 3.5.3:

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5: Testcase: 3.5:

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5: Testcase: 3.5:

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.9.1/2: Testcase 3.5.9.1/2:

View File

@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1 Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1 Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1477 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:

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

View File

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

View File

@ -38,7 +38,6 @@ let $val2 = 13 ;
let $val3 = 17 ; let $val3 = 17 ;
let $val4 = 15 ; let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = ceiling(col1); let $sqlfunc = ceiling(col1);
@ -51,7 +50,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ; let $val4 = 15.654 ;
# DISABLED due to bug 30577 # DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc #--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = floor(col1); let $sqlfunc = floor(col1);
let $valsqlfunc = floor(15.123); let $valsqlfunc = floor(15.123);
@ -63,7 +61,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ; let $val4 = 15.654 ;
# DISABLED due to bug 30577 # DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc #--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = mod(col1,10); let $sqlfunc = mod(col1,10);
let $valsqlfunc = mod(15,10); let $valsqlfunc = mod(15,10);
@ -74,7 +71,6 @@ let $val2 = 19;
let $val3 = 17; let $val3 = 17;
let $val4 = 15 ; let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = day(col1); let $sqlfunc = day(col1);
let $valsqlfunc = day('2006-12-21'); let $valsqlfunc = day('2006-12-21');
@ -85,7 +81,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-05'; let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofmonth(col1); let $sqlfunc = dayofmonth(col1);
let $valsqlfunc = dayofmonth('2006-12-24'); let $valsqlfunc = dayofmonth('2006-12-24');
@ -96,7 +91,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-05'; let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofweek(col1); let $sqlfunc = dayofweek(col1);
let $valsqlfunc = dayofweek('2006-12-24'); let $valsqlfunc = dayofweek('2006-12-24');
@ -107,7 +101,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-05'; let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofyear(col1); let $sqlfunc = dayofyear(col1);
let $valsqlfunc = dayofyear('2006-12-25'); let $valsqlfunc = dayofyear('2006-12-25');
@ -118,10 +111,8 @@ let $val2 = '2006-01-17';
let $val3 = '2006-02-25'; let $val3 = '2006-02-25';
let $val4 = '2006-02-05'; let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30); let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = extract(month from col1); let $sqlfunc = extract(month from col1);
let $valsqlfunc = extract(year from '1998-11-23'); let $valsqlfunc = extract(year from '1998-11-23');
@ -132,7 +123,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-05'; let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = hour(col1); let $sqlfunc = hour(col1);
let $valsqlfunc = hour('18:30'); let $valsqlfunc = hour('18:30');
@ -143,7 +133,6 @@ let $val2 = '14:30';
let $val3 = '21:59'; let $val3 = '21:59';
let $val4 = '10:30'; let $val4 = '10:30';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = microsecond(col1); let $sqlfunc = microsecond(col1);
let $valsqlfunc = microsecond('10:30:10.000010'); let $valsqlfunc = microsecond('10:30:10.000010');
@ -154,7 +143,6 @@ let $val2 = '04:30:01.000018';
let $val3 = '00:59:22.000024'; let $val3 = '00:59:22.000024';
let $val4 = '05:30:34.000037'; let $val4 = '05:30:34.000037';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = minute(col1); let $sqlfunc = minute(col1);
let $valsqlfunc = minute('18:30'); let $valsqlfunc = minute('18:30');
@ -164,7 +152,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22'; let $val3 = '21:59:22';
let $val4 = '10:24:23'; let $val4 = '10:24:23';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = second(col1); let $sqlfunc = second(col1);
let $valsqlfunc = second('18:30:14'); let $valsqlfunc = second('18:30:14');
@ -175,10 +162,8 @@ let $val2 = '14:30:20';
let $val3 = '21:59:22'; let $val3 = '21:59:22';
let $val4 = '10:22:33'; let $val4 = '10:22:33';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30); let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = month(col1); let $sqlfunc = month(col1);
let $valsqlfunc = month('2006-10-14'); let $valsqlfunc = month('2006-10-14');
@ -189,7 +174,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-05-25'; let $val3 = '2006-05-25';
let $val4 = '2006-11-06'; let $val4 = '2006-11-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = quarter(col1); let $sqlfunc = quarter(col1);
let $valsqlfunc = quarter('2006-10-14'); let $valsqlfunc = quarter('2006-10-14');
@ -200,7 +184,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-09-25'; let $val3 = '2006-09-25';
let $val4 = '2006-07-30'; let $val4 = '2006-07-30';
--source suite/parts/inc/partition_supported_sql_funcs.inc --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 $sqlfunc = time_to_sec(col1)-(time_to_sec(col1)-20);
let $valsqlfunc = time_to_sec('18:30:14')-(time_to_sec('17:59:59')); 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 $val3 = '21:59:22';
let $val4 = '10:33:11'; let $val4 = '10:33:11';
--source suite/parts/inc/partition_supported_sql_funcs.inc --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 $sqlfunc = to_days(col1)-to_days('2006-01-01');
let $valsqlfunc = to_days('2006-02-02')-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 $val3 = '2006-01-25';
let $val4 = '2006-02-06'; let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --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)) # DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
let $sqlfunc = datediff(col1, '2006-01-01'); let $sqlfunc = datediff(col1, '2006-01-01');
@ -234,7 +215,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-06'; let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekday(col1); let $sqlfunc = weekday(col1);
let $valsqlfunc = weekday('2006-10-14'); let $valsqlfunc = weekday('2006-10-14');
@ -245,7 +225,6 @@ let $val2 = '2006-11-17';
let $val3 = '2006-05-25'; let $val3 = '2006-05-25';
let $val4 = '2006-02-06'; let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = year(col1)-1990; let $sqlfunc = year(col1)-1990;
let $valsqlfunc = year('2005-10-14')-1990; let $valsqlfunc = year('2005-10-14')-1990;
@ -256,7 +235,6 @@ let $val2 = '2000-02-17';
let $val3 = '2004-05-25'; let $val3 = '2004-05-25';
let $val4 = '2002-02-15'; let $val4 = '2002-02-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = yearweek(col1)-200600; let $sqlfunc = yearweek(col1)-200600;
let $valsqlfunc = yearweek('2006-10-14')-200600; let $valsqlfunc = yearweek('2006-10-14')-200600;
@ -267,4 +245,3 @@ let $val2 = '2006-08-17';
let $val3 = '2006-03-25'; let $val3 = '2006-03-25';
let $val4 = '2006-11-15'; let $val4 = '2006-11-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc --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: # # Purpose: #
# Auxiliary script creating prerequisites needed by the partitioning tests # # Auxiliary script creating prerequisites needed by the partitioning tests #
@ -26,27 +26,21 @@
eval SET @@session.storage_engine = $engine; eval SET @@session.storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs ##### ##### Disabled/affected testcases, because of open bugs #####
--echo # --echo
--echo #------------------------------------------------------------------------ # --echo #------------------------------------------------------------------------
--echo # There are several testcases disabled because of the open bugs # --echo # There are several testcases disabled because of the open bugs
--echo # #15890 # if (`SELECT @@session.storage_engine IN('ndbcluster')`)
if (`SELECT @@session.storage_engine IN('ndbcluster')`) # {
{ # --echo # #18730
--echo # #18730, Bug#18735 # }
} # --echo #------------------------------------------------------------------------
--echo #------------------------------------------------------------------------ # # Attention: Only bugs appearing in all storage engines should be mentioned above.
# Attention: Only bugs appearing in all storage engines should be mentioned above. # # The top level test wrapper (example: t/partition_basic_ndb.test)
# The top level test wrapper (example: t/partition_basic_ndb.test) # # may set the $fixed_bug<nnnnn> variable to 0 after sourcing
# may set the $fixed_bug<nnnnn> variable to 0 after sourcing # # this file.
# this file. # # Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
# Bug#15890 Partitions: Strange interpretation of partition number # # Attention: NDB testcases set this variable later to 0
let $fixed_bug15890= 0; # let $fixed_bug18730= 1;
# 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 #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -66,6 +60,17 @@ if ($debug)
--echo # It is to be expected, that we get huge differences. --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 # Set the variable $engine_other to a storage engine <> $engine
--disable_query_log --disable_query_log
@ -308,23 +313,23 @@ if (0)
# (t/partition_<feature>_<engine>.test) # (t/partition_<feature>_<engine>.test)
# a) General not engine specific settings and requirements # a) General not engine specific settings and requirements
# $debug, $ls, @max_row, $more_trigger_tests, ..... # $debug, $ls, @max_row, $more_trigger_tests, .....
# --source include/have_partition.inc # --source inc/have_partition.inc
# b) Engine specific settings and requirements # b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine # $do_pk_tests, $MAX_VALUE, $engine
# SET SESSION storage_engine # SET SESSION storage_engine
# $engine_other # $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed # c) Generate the prerequisites ($variables, @variables, tables) needed
# via # via
# --source include/partition.pre # --source inc/partition.pre
# d) Set "fixed_bug<number>" variables to 1 if there are open engine # d) Set "fixed_bug<number>" variables to 1 if there are open engine
# specific bugs which need worarounds. # specific bugs which need worarounds.
# e) Execute the feature specific testscript via # 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 # 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 # 2.2. script generating the prerequisites needed in all tests
# (include/partition.pre) # (inc/partition.pre)
# a) Message about open bugs causing that # a) Message about open bugs causing that
# - some testcases are disabled # - some testcases are disabled
# - it cannot be avoided that the file with expected results suffers # - it cannot be avoided that the file with expected results suffers
@ -340,36 +345,70 @@ if (0)
# c) Setting of auxiliary variables # c) Setting of auxiliary variables
# d) Creation of auxiliary tables .... # d) Creation of auxiliary tables ....
# #
# 3. script checking a feature # 2.3. script checking a feature
# (include/partition_<feature.inc>.inc) # (inc/partition_<feature.inc>.inc)
# Example: # Example:
# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement # a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
# b) CREATE TABLE t1 ... # b) CREATE TABLE t1 ...
# c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ... # c) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The first 50 % of all t0_template rows will be inserted into t1. # The first 50 % of all t0_template rows will be inserted into t1.
# d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX) # d) ALTER TABLE t1 (Example: ADD/DROP UNIQUE INDEX)
# e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ... # e) INSERT INTO t1 (.....) SELECT .... FROM t0_template WHERE ...
# The second 50 % of all t0_template rows will be inserted into t1. # The second 50 % of all t0_template rows will be inserted into t1.
# Now t1 and t0_template should have the same content. # Now t1 and t0_template should have the same content.
# f) Check the "usability" of the current table t1 # f) Check the "usability" of the current table t1
# via # via
# --source include/partition_check.pre # --source inc/partition_check.pre
# g) DROP TABLE t1 # g) DROP TABLE t1
# Switch to other CREATE and ALTER statements and run sequence a)-g) again # 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 # 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 # a) crash -- use the file var/master-data/mysql/general_log.CSV
# b) no crash, but unexpected server response (there is no "reject file) # b) no crash, but unexpected server response (there is no "reject file)
@ -382,19 +421,19 @@ if (0)
# protocolling of some queries. # protocolling of some queries.
# In most cases you will find that the r/<testcase>.<log/reject> contains at # In most cases you will find that the r/<testcase>.<log/reject> contains at
# least a line "# # check <something>: 0". # 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. # expected result.
# A good start for a replay script would be # A good start for a replay script would be
# 1. Copy t/partition_<feature>_<engine>.test to t/my_test.test # 1. Copy t/partition_<feature>_<engine>.test to t/my_test.test
# 2. Edit t/my_test.test # 2. Edit t/my_test.test
# - set $debug to 1 # - set $debug to 1
# - replace the line # - replace the line
# "--source include/partition_<feature>.inc" # "--source inc/partition_<feature>.inc"
# with all statements between the last # with all statements between the last
# CREATE TABLE t1 statement (included this) # CREATE TABLE t1 statement (included this)
# and the line # and the line
# "# Start usability test (include/partition_check.inc)" # "# Start usability test (inc/partition_check.inc)"
# - add the content of include/partition_check.inc at the end. # - add the content of inc/partition_check.inc at the end.
# #
# Please excuse that the partitioning tests generate such huge protocols which # 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 # 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. # Do some basic checks on a table.
# #
@ -10,7 +10,7 @@
# is like expected. # is like expected.
# #
--source include/partition_layout.inc --source suite/parts/inc/partition_layout.inc
####### Variations with multiple records ####### Variations with multiple records
# Select on empty table # Select on empty table
@ -50,20 +50,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######'; WHERE f1 = 0 AND f2 = '#######';
# Select # Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ'; 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) # Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ' eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######'; WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select # Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ'; SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete # Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ'; 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'; DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select # Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; 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 # 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 this operation was successfull, check + drop this table
if ($run) if ($run)
{ {
--source include/partition_10.inc --source suite/parts/inc/partition_10.inc
eval DROP TABLE t1; eval DROP TABLE t1;
} }
#### Try to create a table with the given subpartition number #### 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 this operation was successfull, check + drop this table
if ($run) if ($run)
{ {
--source include/partition_10.inc --source suite/parts/inc/partition_10.inc
eval DROP TABLE t1; 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 # Do some basic things on a table, if the SQL command executed just before
# sourcing this file was successful. # sourcing this file was successful.
# #
--source include/partition_layout.inc --source suite/parts/inc/partition_layout.inc
####### Variations with multiple records ####### Variations with multiple records
# (mass) Insert max_row_div2 + 1 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 = '#######'; WHERE f1 = 0 AND f2 = '#######';
# Select # Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ'; 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) # Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ' eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######'; WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select # Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ'; SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete # Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ'; 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'; DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select # Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; 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: # # 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 # # records was #
# - inserted # # - inserted #
# - updated or deleted+inserted # # - updated or deleted+inserted #
@ -17,19 +18,13 @@
# must be set before sourcing this routine. # # must be set before sourcing this routine. #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
# Change: # # 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) if ($no_debug)
{ {
--disable_query_log --disable_query_log

View File

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

View File

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

View File

@ -1,11 +1,11 @@
################################################################################ ################################################################################
# include/partition_alter3.inc # # inc/partition_alter3.inc #
# # # #
# Purpose: # # Purpose: #
# Tests for partition management commands for HASH and KEY partitioning # # Tests for partition management commands for HASH and KEY partitioning #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-04-11 # # Original Date: 2006-04-11 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -32,7 +32,7 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
INTO @exp_row_count; INTO @exp_row_count;
# DEBUG SELECT @exp_row_count; # DEBUG SELECT @exp_row_count;
# 4. Print the layout, check Readability # 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -44,16 +44,16 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
# #
--echo # 1.1.2 Assign HASH partitioning --echo # 1.1.2 Assign HASH partitioning
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.1.3 Assign other HASH partitioning to already partitioned table --echo # 1.1.3 Assign other HASH partitioning to already partitioned table
--echo # + test and switch back + test --echo # + test and switch back + test
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date)); 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 --source suite/parts/inc/partition_check_read1.inc
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.1.4 Add PARTITIONS not fitting to HASH --> must fail --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 --echo # 1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7); 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.1.6 Add two named partitions, name clash --> must fail --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 --echo # 1.1.7 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2); 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.1.8 Add four not named partitions + test --echo # 1.1.8 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4; 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 --source suite/parts/inc/partition_check_read1.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -89,7 +89,7 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
ALTER TABLE t1 DROP PARTITION part1; ALTER TABLE t1 DROP PARTITION part1;
# #
--echo # 1.2.2 COALESCE PARTITION partitionname is not supported --echo # 1.2.2 COALESCE PARTITION partitionname is not supported
--error 1064 --error ER_PARSE_ERROR
ALTER TABLE t1 COALESCE PARTITION part1; ALTER TABLE t1 COALESCE PARTITION part1;
# #
--echo # 1.2.3 Decrease by 0 is non sense --> must fail --echo # 1.2.3 Decrease by 0 is non sense --> must fail
@ -101,7 +101,7 @@ let $loop= 7;
while ($loop) while ($loop)
{ {
ALTER TABLE t1 COALESCE PARTITION 1; 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 --source suite/parts/inc/partition_check_read1.inc
dec $loop; dec $loop;
} }
@ -111,14 +111,13 @@ ALTER TABLE t1 COALESCE PARTITION 1;
# #
--echo # 1.2.6 Remove partitioning --echo # 1.2.6 Remove partitioning
ALTER TABLE t1 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 --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.2.7 Remove partitioning from not partitioned table --> ???? --echo # 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING; ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
# --source suite/parts/inc/partition_check_drop.inc
--echo --echo
--echo #======================================================================== --echo #========================================================================
@ -134,7 +133,7 @@ $column_list
# 2. Fill the table t1 with some records # 2. Fill the table t1 with some records
eval $insert_all; eval $insert_all;
# 4. Print the layout, check Readability # 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 --source suite/parts/inc/partition_check_read2.inc
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -143,7 +142,7 @@ eval $insert_all;
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 2.1.1 Assign KEY partitioning --echo # 2.1.1 Assign KEY partitioning
ALTER TABLE t1 PARTITION BY KEY(f_int1); 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 --source suite/parts/inc/partition_check_read2.inc
# #
--echo # 2.1.2 Add PARTITIONS not fitting to KEY --> must fail --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 --echo # 2.1.3 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7); 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 --source suite/parts/inc/partition_check_read2.inc
# #
--echo # 2.1.4 Add one named partition + test --echo # 2.1.4 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2); 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 --source suite/parts/inc/partition_check_read2.inc
# #
--echo # 2.1.5 Add four not named partitions + test --echo # 2.1.5 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4; 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 --source suite/parts/inc/partition_check_read2.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -180,7 +179,7 @@ let $loop= 7;
while ($loop) while ($loop)
{ {
ALTER TABLE t1 COALESCE PARTITION 1; 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 --source suite/parts/inc/partition_check_read2.inc
dec $loop; dec $loop;
} }
@ -190,12 +189,11 @@ ALTER TABLE t1 COALESCE PARTITION 1;
# #
--echo # 2.2.6 Remove partitioning --echo # 2.2.6 Remove partitioning
ALTER TABLE t1 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 --source suite/parts/inc/partition_check_read2.inc
# #
--echo # 2.2.7 Remove partitioning from not partitioned table --> ???? --echo # 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING; ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --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: # # Purpose: #
# Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) # # Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) #
@ -22,19 +22,15 @@
--echo # 1.1 ALTER ... ANALYZE PARTITION part_1; --echo # 1.1 ALTER ... ANALYZE PARTITION part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1; let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2; --echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 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 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; --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; 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 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; --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; let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 2 ALTER ... CHECK PARTITION --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; --echo # 2.1 ALTER ... CHECK PARTITION part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1; let $alter= ALTER TABLE t1 CHECK PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2; --echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 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 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; --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; 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 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; --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; let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 3 ALTER ... OPTIMIZE PARTITION --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; --echo # 3.1 ALTER ... OPTIMIZE PARTITION part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1; let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2; --echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 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 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; --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; 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 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; --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; let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 4 ALTER ... REBUILD PARTITION --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; --echo # 4.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1; let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2; --echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 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 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; --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; 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 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; --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; let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION --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; --echo # 5.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1; let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2; --echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 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 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; --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; 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 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; --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; let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc --source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 6 ALTER ... REMOVE PARTITIONING --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; --echo # 6.1 ALTER ... REMOVE PARTITIONING;
let $alter= ALTER TABLE t1 REMOVE PARTITIONING; let $alter= ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_alter_41.inc --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: # # Purpose: #
# Alter a partioned table and check the usability afterwards # # Alter a partioned table and check the usability afterwards #
# This script is only usefule when sourced by # # 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 # # 0. Expect there is a table t1 #
# 1. Insert the first half of the table t0_template into t1 # # 1. Insert the first half of the table t0_template into t1 #
# 2. Execute the ALTER TABLE statement within the variable $alter # # 2. Execute the ALTER TABLE statement within the variable $alter #
# Case SQL code in # # Case SQL code in #
# 0: 1. Insert the second half of the table t0_template into t1 # # 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, but expected: nothing #
# >0 and unexpected: abort # # >0 and unexpected: abort #
# 3. DROP the table t1 # # 3. DROP the table t1 #
@ -20,10 +20,10 @@
# Example: # # Example: #
# CREATE TABLE t1 (f_int1 INT,f_int2 INT, .... ); # # CREATE TABLE t1 (f_int1 INT,f_int2 INT, .... ); #
# let $alter= ALTER TABLE t1 ADD PRIMARY KEY(f_int2); # # 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 # # 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 # # Original Author: mleich #
@ -50,13 +50,15 @@ if ($no_debug)
} }
eval SET @my_errno = $mysql_errno; eval SET @my_errno = $mysql_errno;
let $run_test= `SELECT @my_errno = 0`; let $run_test= `SELECT @my_errno = 0`;
let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1502,1506)`; if (`SELECT @my_errno NOT IN (0,$ER_GET_ERRNO,
if ($unexpected_error) $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,
$ER_DROP_PARTITION_NON_EXISTENT)`);
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
--echo # Please check the error name to number mapping in inc/partition.pre.
exit; exit;
--echo --echo
} }
@ -66,6 +68,5 @@ if ($run_test)
{ {
eval $insert_second_half; eval $insert_second_half;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
} }
DROP TABLE t1; DROP TABLE t1;

View File

@ -1,5 +1,5 @@
################################################################################ ################################################################################
# include/partition_alter_11.inc # # inc/partition_alter_11.inc #
# # # #
# Purpose: # # Purpose: #
# Check ALTER partitioned table and the state of the table afterwards # # Check ALTER partitioned table and the state of the table afterwards #
@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... # # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do # # do #
# 1. Create the partitioned table # # 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 # # - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement # # - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 # # - Insert the second half of the table t0_template into t1 #
@ -26,14 +26,14 @@
# Example: # # Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); # # let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; # # 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 include/partition_alter_13.inc is very similar #
# to this one. So if something has to be changed here it # # to this one. So if something has to be changed here it #
# might be necessary to do it also there # # might be necessary to do it also there #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -56,7 +56,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
if ($with_partitioning) if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
if ($with_partitioning) if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --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: # # Purpose: #
# Check ALTER partitioned table and the state of the table afterwards # # Check ALTER partitioned table and the state of the table afterwards #
@ -10,7 +10,7 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... # # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do # # do #
# 1. Create the partitioned table # # 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 # # - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement # # - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 # # - Insert the second half of the table t0_template into t1 #
@ -26,14 +26,14 @@
# Example: # # Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); # # let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; # # 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 # # Attention: The routine include/partition_alter_11.inc is very similar #
# to this one. So if something has to be changed here it # # to this one. So if something has to be changed here it #
# might be necessary to do it also there # # might be necessary to do it also there #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -56,7 +56,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
if ($with_partitioning) if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
if ($with_partitioning) if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --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: # # Purpose: #
# Check ALTER partitioned table and the state of the table afterwards # # Check ALTER partitioned table and the state of the table afterwards #
@ -10,11 +10,11 @@
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... # # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
# do # # do #
# 1. Create the partitioned table # # 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 # # - Insert the first half of the table t0_template into t1 #
# - Execute the ALTER TABLE statement # # - Execute the ALTER TABLE statement #
# - Insert the second half of the table t0_template into t1 # # - 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 # # - Drop the table t1 #
# done # # done #
# # # #
@ -26,14 +26,14 @@
# Example: # # Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); # # let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; # # 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 # # to this one. So if something has to be changed here it #
# might be necessary to do it also there # # might be necessary to do it also there #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -56,7 +56,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -69,7 +68,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
if ($with_partitioning) if ($with_partitioning)
@ -90,7 +88,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
if ($with_partitioning) if ($with_partitioning)
@ -112,7 +109,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -133,7 +129,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -157,7 +152,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
@ -178,7 +172,6 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --source suite/parts/inc/partition_alter_1.inc
# --source include/partition_alter_1.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
@ -199,4 +192,3 @@ $unique
) )
$partitioning; $partitioning;
--source suite/parts/inc/partition_alter_1.inc --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: # # Purpose: #
# Basic tests around create partitioned table with/without PRIMARY KEY and # # Basic tests around create partitioned table with/without PRIMARY KEY and #
# /or UNIQUE INDEX # # /or UNIQUE INDEX #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -29,7 +29,6 @@
--echo # 1.1 The partitioning function contains one column. --echo # 1.1 The partitioning function contains one column.
let $unique= ; let $unique= ;
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
# #
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY --echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
# #
@ -50,16 +49,13 @@ let $unique= ;
let $with_directories= 1; let $with_directories= 1;
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
--source suite/parts/inc/partition_directory.inc --source suite/parts/inc/partition_directory.inc
# --source include/partition_methods1.inc
let $with_directories= 0; let $with_directories= 0;
--enable_query_log --enable_query_log
# #
--echo # 1.2 The partitioning function contains two columns. --echo # 1.2 The partitioning function contains two columns.
let $unique= ; let $unique= ;
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes --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 --echo # 2.1 PRIMARY KEY consisting of one column
let $unique= , PRIMARY KEY(f_int1); let $unique= , PRIMARY KEY(f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
} }
--echo # 2.2 UNIQUE INDEX consisting of one column --echo # 2.2 UNIQUE INDEX consisting of one column
let $unique= , UNIQUE INDEX uidx1 (f_int1); let $unique= , UNIQUE INDEX uidx1 (f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY --echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
# #
@ -98,7 +92,6 @@ if ($more_pk_ui_tests)
let $with_directories= TRUE; let $with_directories= TRUE;
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
let $with_directories= FALSE; let $with_directories= FALSE;
--enable_query_log --enable_query_log
# #
@ -107,19 +100,15 @@ if ($more_pk_ui_tests)
--echo # 2.3 PRIMARY KEY consisting of two columns --echo # 2.3 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2); let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
let $unique= , PRIMARY KEY(f_int2,f_int1); let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
} }
# #
--echo # 2.4 UNIQUE INDEX consisting of two columns --echo # 2.4 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1); let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
# #
} }
--echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns --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); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc --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); let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods1.inc --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); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods1.inc --source suite/parts/inc/partition_methods1.inc
# --source include/partition_methods1.inc
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes --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 --echo # 3.1 PRIMARY KEY consisting of two columns
let $unique= , PRIMARY KEY(f_int1,f_int2); let $unique= , PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
let $unique= , PRIMARY KEY(f_int2,f_int1); let $unique= , PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
} }
# #
--echo # 3.2 UNIQUE INDEX consisting of two columns --echo # 3.2 UNIQUE INDEX consisting of two columns
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1); let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc --source suite/parts/inc/partition_methods2.inc
# --source include/partition_methods2.inc
} }
# #
--echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns --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); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc --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); let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
--source suite/parts/inc/partition_methods2.inc --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); let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
--source suite/parts/inc/partition_methods2.inc --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 --disable_query_log
# DATA DIRECTORY # DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY = eval SET @data_dir = 'DATA DIRECTORY =
@ -43,6 +45,9 @@ select count(*) from t2;
select hex(a) from t2; select hex(a) from t2;
drop table 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 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 by range (ascii(a)) subpartition by key (a) subpartitions 4 (
partition pa16 values less than (16), partition pa16 values less than (16),
@ -66,6 +71,7 @@ select count(*) from t3;
select hex(a) from t3; select hex(a) from t3;
drop table t3; drop table t3;
eval create table t4 (a binary(255) not null, primary key(a)) engine=$engine 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 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 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; dec $count;
inc $letter; inc $letter;
} }
select count(*) from t4; select count(*) from t4;
select hex(a) from t4; select hex(a) from t4;
drop table 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; drop table if exists t1;
--enable_warnings --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(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); 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 --disable_query_log
# DATA DIRECTORY # DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY = eval SET @data_dir = 'DATA DIRECTORY =

View File

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

View File

@ -1,5 +1,5 @@
################################################################################ ################################################################################
# include/partition_check_drop.inc # # inc/partition_check_drop.inc #
# # # #
# Purpose: # # Purpose: #
# Check that a drop table removes all files belonging to this table. # # 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. # # This routine is only useful for the partition_<feature>_<engine> tests. #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-05-12 # # Original Date: 2006-05-12 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -52,7 +52,7 @@ if ($found_garbage)
if ($ls) if ($ls)
{ {
--echo # Attention: There are unused files. --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 # <alter partitioning> worked incomplete.
--echo # We found: --echo # We found:
# Print the list of files into the protocol # 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: # # Purpose: #
# Read table t1 row by row # # Read table t1 row by row #
@ -10,7 +10,7 @@
# - the table contains all expected rows # # - the table contains all expected rows #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -80,7 +80,7 @@ if ($no_debug)
--disable_query_log --disable_query_log
} }
--echo # check read via $col_to_check success: $success --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) # (@max_row time the success message)
if (0) if (0)
{ {

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
################################################################################ ################################################################################
# include/partition_rectory.inc # # inc/partition_directory.inc #
# # # #
# Purpose: # # Purpose: #
# Create and check partitioned tables # # Create and check partitioned tables #
@ -9,7 +9,7 @@
# do # # do #
# 1. Create the partitioned table # # 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 # # 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 # # 4. Drop the table t1 #
# done # # done #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
@ -49,7 +49,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -86,7 +85,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -122,7 +120,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -153,7 +150,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -181,7 +177,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -212,7 +207,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
@ -256,7 +250,6 @@ $partitioning;
--enable_query_log --enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; 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_engine.inc # # inc/partition_engine.inc #
# # # #
# Purpose: # # Purpose: #
# Tests around Create/Alter partitioned tables and storage engine settings # # Tests around Create/Alter partitioned tables and storage engine settings #
@ -17,7 +17,7 @@
# storage engine to use. # # storage engine to use. #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -45,7 +45,6 @@ $column_list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -62,7 +61,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -79,7 +77,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -96,7 +93,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -108,7 +104,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -125,7 +120,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -142,7 +136,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -164,7 +157,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -181,7 +173,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -199,7 +190,6 @@ PARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1)
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--echo # 6.2 Storage engine assignment after partition name + after --echo # 6.2 Storage engine assignment after partition name + after
--echo # subpartition name --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) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--echo #------------------------------------------------------------------------ --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) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
# Bug#15966 Partitions: crash if session default engine <> engine used in create table # Bug#15966 Partitions: crash if session default engine <> engine used in create table
eval CREATE TABLE t1 ( 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) 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; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
eval SET SESSION storage_engine=$engine; eval SET SESSION storage_engine=$engine;

View File

@ -1,3 +1,5 @@
--echo ---- Partitioning and enum data type
--disable_query_log --disable_query_log
# DATA DIRECTORY # DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY = eval SET @data_dir = 'DATA DIRECTORY =
@ -47,6 +49,9 @@ select count(*) from t2;
select * from t2; select * from t2;
drop table t2; drop table t2;
# mleich: Several partitioning functions are no more allowed.
if (0)
{
eval create table t3 (a enum ( eval create table t3 (a enum (
'1','2','3','4','5','6','7','8','9','0', '1','2','3','4','5','6','7','8','9','0',
'A','B','C','D','E','F','G','H','I','J','K','L', 'A','B','C','D','E','F','G','H','I','J','K','L',
@ -71,4 +76,5 @@ dec $letter;
select count(*) from t3; select count(*) from t3;
select * from t3; select * from t3;
drop table 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 # 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: # # Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to # # Store the SHOW CREATE TABLE output and the list of files belonging to #
# this table + print this into the protocol # # this table + print this into the protocol #
# This script is only usefule when sourced within the partitioning tests. # # 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 # # to this one. So if something has to be changed here it #
# might be necessary to do it also there # # might be necessary to do it also there #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #

View File

@ -1,18 +1,18 @@
################################################################################ ################################################################################
# include/partition_layout_check2.inc # # inc/partition_layout_check2.inc #
# # # #
# Purpose: # # Purpose: #
# Store the SHOW CREATE TABLE output and the list of files belonging to # # 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 # # 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. # # 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 # # to this one. So if something has to be changed here it #
# might be necessary to do it also there # # might be necessary to do it also there #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,11 @@
################################################################################ ################################################################################
# include/partition_syntax.inc # # inc/partition_syntax.inc #
# # # #
# Purpose: # # Purpose: #
# Tests around Create partitioned tables syntax # # Tests around Create partitioned tables syntax #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -107,17 +107,13 @@ let $unique_index= UNIQUE INDEX (f_int2);
#----------- PARTITION BY HASH #----------- PARTITION BY HASH
let $partition_scheme= PARTITION BY HASH(f_int1) PARTITIONS 2; let $partition_scheme= PARTITION BY HASH(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc --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; let $partition_scheme= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
let $partition_scheme= PARTITION BY KEY(f_int1) PARTITIONS 2; let $partition_scheme= PARTITION BY KEY(f_int1) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc --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; let $partition_scheme= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2;
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3)) let $partition_scheme= PARTITION BY LIST(MOD(f_int1,3))
(PARTITION partN VALUES IN (NULL), (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 part1 VALUES IN (1),
PARTITION part2 VALUES IN (2)); PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc --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)) let $partition_scheme= PARTITION BY LIST(MOD(f_int1 + f_int2,3))
(PARTITION partN VALUES IN (NULL), (PARTITION partN VALUES IN (NULL),
PARTITION part0 VALUES IN (0), PARTITION part0 VALUES IN (0),
PARTITION part1 VALUES IN (1), PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2)); PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
let $partition_scheme= PARTITION BY RANGE(f_int1) let $partition_scheme= PARTITION BY RANGE(f_int1)
(PARTITION part1 VALUES LESS THAN (1), (PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646)); PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
let $partition_scheme= PARTITION BY RANGE(f_int1 + f_int2) let $partition_scheme= PARTITION BY RANGE(f_int1 + f_int2)
(PARTITION part1 VALUES LESS THAN (1), (PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646)); PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
# #
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -200,14 +192,12 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1), (PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646)); PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY RANGE(f_int2) let $partition_scheme= PARTITION BY RANGE(f_int2)
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES LESS THAN (1), (PARTITION part1 VALUES LESS THAN (1),
PARTITION part2 VALUES LESS THAN (2147483646)); PARTITION part2 VALUES LESS THAN (2147483646));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3)) let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
@ -216,7 +206,6 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1), PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2)); PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3)) let $partition_scheme= PARTITION BY LIST(MOD(f_int2,3))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2 SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
@ -225,7 +214,6 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2
PARTITION part1 VALUES IN (1), PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2)); PARTITION part2 VALUES IN (2));
--source suite/parts/inc/partition_syntax_2.inc --source suite/parts/inc/partition_syntax_2.inc
# --source include/partition_syntax_2.inc
--echo --echo
--echo #======================================================================== --echo #========================================================================
@ -359,7 +347,6 @@ PARTITION BY LIST(MOD(f_int1,2))
( PARTITION part1 VALUES IN (NULL), ( PARTITION part1 VALUES IN (NULL),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
--echo # 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0) --echo # 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0)
# Bug#15447: Partitions: NULL is treated as zero # 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 part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
# FIXME Implement some non integer constant tests # FIXME Implement some non integer constant tests
@ -395,7 +381,6 @@ $column_list
) )
PARTITION BY HASH(f_int1); PARTITION BY HASH(f_int1);
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
--echo # 4.1.2 no partition number, named partitions --echo # 4.1.2 no partition number, named partitions
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
@ -403,7 +388,6 @@ $column_list
) )
PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2); PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2);
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
# Attention: Several combinations are impossible # Attention: Several combinations are impossible
# If subpartitioning exists # 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_N ;
eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_Y ; eval $part01 $column_list $part02 $part1_Y $part2_Y $part3_Y ;
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
--echo #------------------------------------------------------------------------ --echo #------------------------------------------------------------------------
@ -480,163 +463,119 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
--echo # 4.2.1 partition/subpartition numbers INTEGER notation --echo # 4.2.1 partition/subpartition numbers INTEGER notation
# ML: "positive/negative" is my private judgement. It need no to correspond # mleich: "positive/negative" is my private judgement. It need not to
# with the server response. # correspond with the server response.
# (positive) number = 2 # (positive) number = 2
let $part_number= 2; let $part_number= 2;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (positive) special case number = 1 # (positive) special case number = 1
let $part_number= 1; let $part_number= 1;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 0 is non sense # (negative) 0 is non sense
let $part_number= 0; let $part_number= 0;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) -1 is non sense # (negative) -1 is non sense
let $part_number= -1; let $part_number= -1;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 1000000 is too huge # (negative) 1000000 is too huge
let $part_number= 1000000; let $part_number= 1000000;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.2 partition/subpartition numbers DECIMAL notation --echo # 4.2.2 partition/subpartition numbers DECIMAL notation
# (positive) number = 2.0 # (positive) number = 2.0
let $part_number= 2.0; let $part_number= 2.0;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) -2.0 is non sense # (negative) -2.0 is non sense
let $part_number= -2.0; let $part_number= -2.0;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) case number = 0.0 is non sense # (negative) case number = 0.0 is non sense
let $part_number= 0.0; let $part_number= 0.0;
--source suite/parts/inc/partition_syntax_1.inc --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 # Bug#15890 Partitions: Strange interpretation of partition number
# (negative) number = 1.6 is non sense # (negative) number = 1.6 is non sense
let $part_number= 1.6; let $part_number= 1.6;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) number is too huge # (negative) number is too huge
let $part_number= 999999999999999999999999999999.999999999999999999999999999999; let $part_number= 999999999999999999999999999999.999999999999999999999999999999;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) number is nearly zero # (negative) number is nearly zero
let $part_number= 0.000000000000000000000000000001; let $part_number= 0.000000000000000000000000000001;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.3 partition/subpartition numbers FLOAT notation --echo # 4.2.3 partition/subpartition numbers FLOAT notation
##### FLOAT notation ##### FLOAT notation
# (positive) number = 2.0E+0 # (positive) number = 2.0E+0
let $part_number= 2.0E+0; let $part_number= 2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc --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 # Bug#15890 Partitions: Strange interpretation of partition number
# (positive) number = 0.2E+1 # (positive) number = 0.2E+1
let $part_number= 0.2E+1; let $part_number= 0.2E+1;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) -2.0E+0 is non sense # (negative) -2.0E+0 is non sense
let $part_number= -2.0E+0; let $part_number= -2.0E+0;
--source suite/parts/inc/partition_syntax_1.inc --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 # Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 0.16E+1 is non sense # (negative) 0.16E+1 is non sense
let $part_number= 0.16E+1; let $part_number= 0.16E+1;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
# (negative) 0.0E+300 is zero # (negative) 0.0E+300 is zero
let $part_number= 0.0E+300; let $part_number= 0.0E+300;
--source suite/parts/inc/partition_syntax_1.inc --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 # Bug#15890 Partitions: Strange interpretation of partition number
# (negative) 1E+300 is too huge # (negative) 1E+300 is too huge
let $part_number= 1E+300; let $part_number= 1E+300;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) 1E-300 is nearly zero # (negative) 1E-300 is nearly zero
let $part_number= 1E-300; let $part_number= 1E-300;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
}
--echo # 4.2.4 partition/subpartition numbers STRING notation --echo # 4.2.4 partition/subpartition numbers STRING notation
##### STRING notation ##### STRING notation
# (negative?) case number = '2' # (negative?) case number = '2'
let $part_number= '2'; let $part_number= '2';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) case number = '2.0' # (negative?) case number = '2.0'
let $part_number= '2.0'; let $part_number= '2.0';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) case number = '0.2E+1' # (negative?) case number = '0.2E+1'
let $part_number= '0.2E+1'; let $part_number= '0.2E+1';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows # (negative) Strings starts with digit, but 'A' follows
let $part_number= '2A'; let $part_number= '2A';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows # (negative) Strings starts with 'A', but digit follows
let $part_number= 'A2'; let $part_number= 'A2';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) empty string # (negative) empty string
let $part_number= ''; let $part_number= '';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits # (negative) string without any digits
let $part_number= 'GARBAGE'; let $part_number= 'GARBAGE';
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.5 partition/subpartition numbers other notations --echo # 4.2.5 partition/subpartition numbers other notations
# (negative) Strings starts with digit, but 'A' follows # (negative) Strings starts with digit, but 'A' follows
let $part_number= 2A; let $part_number= 2A;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows # (negative) Strings starts with 'A', but digit follows
let $part_number= A2; let $part_number= A2;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits # (negative) string without any digits
let $part_number= GARBAGE; let $part_number= GARBAGE;
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative?) double quotes # (negative?) double quotes
let $part_number= "2"; let $part_number= "2";
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with digit, but 'A' follows # (negative) Strings starts with digit, but 'A' follows
let $part_number= "2A"; let $part_number= "2A";
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) Strings starts with 'A', but digit follows # (negative) Strings starts with 'A', but digit follows
let $part_number= "A2"; let $part_number= "A2";
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
# (negative) string without any digits # (negative) string without any digits
let $part_number= "GARBAGE"; let $part_number= "GARBAGE";
--source suite/parts/inc/partition_syntax_1.inc --source suite/parts/inc/partition_syntax_1.inc
# --source include/partition_syntax_1.inc
--echo # 4.2.6 (negative) partition/subpartition numbers per @variables --echo # 4.2.6 (negative) partition/subpartition numbers per @variables
SET @aux = 5; SET @aux = 5;
@ -665,7 +604,6 @@ $column_list
) )
PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ;
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
@ -678,7 +616,6 @@ SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(SUBPARTITION subpart21, SUBPARTITION subpart22) (SUBPARTITION subpart21, SUBPARTITION subpart22)
); );
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
DROP TABLE t1; DROP TABLE t1;
--echo # 4.3.2 (positive) number of partition/subpartition , --echo # 4.3.2 (positive) number of partition/subpartition ,
--echo # 0 (= no) named 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: # # 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 # # Try to create a table with number of partitions/subpartitions #
# = $part_number. Print the layout of the table and drop it. # # = $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 ; eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`; let $run= `SELECT @my_errno = 0`;
# Expected error codes are # Expected error codes are
# 0 # 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
# 1064 ER_PARSE_ERROR # and ER_NO_PARTS_ERROR
# Reason: assign -1 partitions if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
# 1498 ER_TOO_MANY_PARTITIONS_ERROR $ER_NO_PARTS_ERROR)`)
# 1503 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
@ -50,7 +47,6 @@ if ($unexpected_error)
if ($run) if ($run)
{ {
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
eval DROP TABLE t1; eval DROP TABLE t1;
} }
#### Try to create a table with the given subpartition number #### Try to create a table with the given subpartition number
@ -67,16 +63,13 @@ SUBPARTITIONS $part_number
eval SET @my_errno= $mysql_errno ; eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`; let $run= `SELECT @my_errno = 0`;
# Expected error codes are # Expected error codes are
# 0 # 0, ER_PARSE_ERROR (Reason: assign -1 partitions), ER_TOO_MANY_PARTITIONS_ERROR
# 1064 ER_PARSE_ERROR # and ER_NO_PARTS_ERROR
# Reason: assign -1 partitions if (`SELECT @my_errno NOT IN (0,$ER_PARSE_ERROR,$ER_TOO_MANY_PARTITIONS_ERROR,
# 1498 ER_TOO_MANY_PARTITIONS_ERROR $ER_NO_PARTS_ERROR)`)
# 1503 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1498,1503)`;
if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
@ -88,6 +81,5 @@ if ($unexpected_error)
if ($run) if ($run)
{ {
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc
eval DROP TABLE t1; eval DROP TABLE t1;
} }

View File

@ -1,11 +1,11 @@
################################################################################ ################################################################################
# include/partition_syntax_2.inc # # inc/partition_syntax_2.inc #
# # # #
# Purpose: # # 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 # # Original Date: 2006-05-11 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -35,11 +35,7 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
) )
$partition_scheme; $partition_scheme;
eval $insert_all; eval $insert_all;
if ($fixed_bug18735)
{
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
}
DROP TABLE t1; DROP TABLE t1;
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list, $column_list,
@ -47,10 +43,6 @@ if (`SELECT @@session.storage_engine IN('ndbcluster')`)
) )
$partition_scheme; $partition_scheme;
eval $insert_all; eval $insert_all;
if ($fixed_bug18735)
{
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
}
DROP TABLE t1; DROP TABLE t1;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,5 @@
--echo ---- Partitioning and varchar data type
--disable_query_log --disable_query_log
# DATA DIRECTORY # DATA DIRECTORY
eval SET @data_dir = '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 @max_row = 20;
SET @@session.storage_engine = 'InnoDB'; 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 # 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases # 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; ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. # 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. # <alter partitioning> worked incomplete.
# We found: # We found:
unified filelist 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; ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. # 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. # <alter partitioning> worked incomplete.
# We found: # We found:
unified filelist unified filelist

View File

@ -1,11 +1,6 @@
SET @max_row = 20; SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM'; 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 # 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases # 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` ( t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0', `a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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; drop table t1;
create table t1 (a bit(64), primary key (a)) engine='MyISAM' create table t1 (a bit(64), primary key (a)) engine='MyISAM'
partition by key (a) partitions 2; partition by key (a) partitions 2;
@ -66,7 +66,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0', `a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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 insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'), (b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'), (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' create table t1 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -12,14 +13,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` char(255) NOT NULL, `a` char(255) NOT NULL,
PRIMARY KEY (`a`) 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)); insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select * from t1; select * from t1;
a a
@ -40,14 +39,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1; drop table t1;
create table t2 (a char(255) not null, primary key(a)) engine='InnoDB' create table t2 (a char(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27; partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` char(255) NOT NULL, `a` char(255) NOT NULL,
PRIMARY KEY (`a`) 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; 26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54)); 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')+1),25+54));
@ -107,6 +104,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
drop table t2; drop table t2;
---- Partitioning and binary data type
create table t1 (a binary(255) not null, primary key(a)) engine='InnoDB' create table t1 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -121,14 +119,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` binary(255) NOT NULL, `a` binary(255) NOT NULL,
PRIMARY KEY (`a`) 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)); insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
select hex(a) from t1; select hex(a) from t1;
hex(a) hex(a)
@ -152,14 +148,12 @@ hex(a)
drop table t1; drop table t1;
create table t2 (a binary(255) not null, primary key(a)) engine='InnoDB' create table t2 (a binary(255) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27; partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` binary(255) NOT NULL, `a` binary(255) NOT NULL,
PRIMARY KEY (`a`) 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; 26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26+54)); 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')+1),25+54));
@ -219,157 +213,7 @@ hex(a)
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t2; drop table t2;
create table t3 (a binary(255) not null, primary key(a)) engine='InnoDB' ---- Partitioning and varchar data type
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;
create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB' create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -384,14 +228,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(767) NOT NULL, `a` varchar(767) NOT NULL,
PRIMARY KEY (`a`) 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)); insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1; select * from t1;
a a
@ -412,14 +254,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1; drop table t1;
create table t2 (a varchar(767) not null, primary key(a)) engine='InnoDB' create table t2 (a varchar(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27; partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` varchar(767) NOT NULL, `a` varchar(767) NOT NULL,
PRIMARY KEY (`a`) 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; 26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26)); 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')+1),25*25));
@ -479,6 +319,7 @@ xxxxxxxxx
yyyy yyyy
z z
drop table t2; drop table t2;
---- Partitioning and varbinary data type
create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB' create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -493,14 +334,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varbinary(767) NOT NULL, `a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`) 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)); insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
select * from t1; select * from t1;
a a
@ -521,14 +360,12 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1; drop table t1;
create table t2 (a varbinary(767) not null, primary key(a)) engine='InnoDB' create table t2 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 30; partition by key (a) partitions 30;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` varbinary(767) NOT NULL, `a` varbinary(767) NOT NULL,
PRIMARY KEY (`a`) 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; 26 inserts;
insert into t2 values (repeat(char(ascii('a')+0),26*26)); 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')+1),25*25));
@ -588,6 +425,7 @@ xxxxxxxxx
yyyy yyyy
z z
drop table t2; 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' 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 by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -602,14 +440,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL, `a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`) 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'); insert into t1 values ('A'),('D'),('L'),('G');
select * from t1; select * from t1;
a a
@ -641,14 +477,12 @@ create table t2 (a enum (
'Y','Z' 'Y','Z'
) not null, primary key(a)) engine='InnoDB' ) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27; partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( 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, `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`) 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; 0 inserts;
insert into t2 values (char(ascii('A')+26)); insert into t2 values (char(ascii('A')+26));
Warnings: Warnings:
@ -721,60 +555,7 @@ X
Y Y
Z Z
drop table t2; drop table t2;
create table t3 (a enum ( ---- Partitioning and set data type
'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;
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB' 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 by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -789,14 +570,12 @@ partition pa3 DATA DIRECTORY =
partition pa4 DATA DIRECTORY = partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2); '/tmp' max_rows=40 min_rows=2);
Warnings:
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL, `a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
PRIMARY KEY (`a`) 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'); insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
select * from t1 order by a; select * from t1 order by a;
a a
@ -828,14 +607,12 @@ create table t2 (a set (
'Y','Z' 'Y','Z'
) not null, primary key(a)) engine='InnoDB' ) not null, primary key(a)) engine='InnoDB'
partition by key (a) partitions 27; partition by key (a) partitions 27;
Warnings:
Warning 1266 Using storage engine MyISAM for table 't2'
show create table t2; show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( 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, `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`) 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'),('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'),('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 ('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 A,Y,Z
X,Y,Z X,Y,Z
drop table t2; drop table t2;
create table t3 (a set ( ---- Partitioning and blob data type
'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;
create table t1 (a blob not null, primary key(a(767))) engine='InnoDB' create table t1 (a blob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = 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' create table t2 (a longblob not null, primary key(a(767))) engine='InnoDB'
partition by key (a) partitions 30; partition by key (a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function 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' create table t1 (a text not null, primary key(a(767))) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = 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' ---- Partitioning and char data type
partition by key (a,b,c,d) ( create table t1 (a char(255) not null, primary key(a)) engine='MyISAM'
partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY = '/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2, '/tmp' max_rows=20 min_rows=2,
@ -15,26 +16,764 @@ partition pa4 DATA DIRECTORY =
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` date NOT NULL, `a` char(255) NOT NULL,
`b` varchar(50) NOT NULL, PRIMARY KEY (`a`)
`c` varchar(50) NOT NULL, ) 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) */
`d` enum('m','w') NOT NULL DEFAULT 'm', insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
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');
select * from t1; select * from t1;
a b c d a
1975-01-01 abcde abcde m aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1980-10-14 fgbbd dtzndtz w aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1983-12-31 cdef srtbvsr w b
2000-06-15 jukg zikhuk m bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
select * from t1 where a<19851231; select * from t1 where a='b';
a b c d a
1975-01-01 abcde abcde m b
1980-10-14 fgbbd dtzndtz w update t1 set a='bb' where a='b';
1983-12-31 cdef srtbvsr w delete from t1 where a='bb';
select * from t1;
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
drop table t1; 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` ( t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
@ -298,7 +298,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` date NOT NULL, `a` date NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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'); insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
select * from t1; select * from t1;
a a
@ -625,7 +625,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` time NOT NULL, `a` time NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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'); insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
select * from t1; select * from t1;
a a
@ -1090,7 +1090,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` datetime NOT NULL, `a` datetime NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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'); insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
select * from t1; select * from t1;
a a
@ -1367,7 +1367,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` year(4) NOT NULL, `a` year(4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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'); insert into t1 values ('1975'), (2020), ('1980'), ('2000');
select * from t1; select * from t1;
a a

View File

@ -17,7 +17,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` decimal(10,4) NOT NULL, `a` decimal(10,4) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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); insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
select * from t1; select * from t1;
a a

View File

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

View File

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

View File

@ -89,152 +89,6 @@ select count(*) from t2;
count(*) count(*)
3072 3072
drop table t2; 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' create table t1 (a double not null, primary key(a)) engine='InnoDB'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
@ -318,149 +172,3 @@ select count(*) from t2;
count(*) count(*)
3072 3072
drop table t2; 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` ( t1 CREATE TABLE `t1` (
`a` float NOT NULL, `a` float NOT NULL,
PRIMARY KEY (`a`) 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); insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
select * from t1; select * from t1;
a a
@ -108,7 +108,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` double NOT NULL, `a` double NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 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); insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
select * from t1; select * from t1;
a a

View File

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

View File

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

View File

@ -1,11 +1,6 @@
SET @max_row = 20; SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB'; 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 # 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases # needed in many testcases
@ -1058,6 +1053,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8 ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 ( CREATE TABLE t1 (
@ -1127,6 +1145,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; 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 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 ( CREATE TABLE t1 (
@ -1150,6 +1191,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8 ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 ( 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 ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10), (PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9 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 # 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,

View File

@ -1,11 +1,6 @@
SET @max_row = 20; SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM'; 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 # 0. Setting of auxiliary variables + Creation of an auxiliary tables
# needed in many testcases # needed in many testcases
@ -1140,6 +1135,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999;
ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8 ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999' at line 8
CREATE TABLE t1 ( CREATE TABLE t1 (
@ -1209,6 +1227,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; 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 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 ( CREATE TABLE t1 (
@ -1232,6 +1273,29 @@ f_char1 CHAR(20),
f_char2 CHAR(20), f_char2 CHAR(20),
f_charbig VARCHAR(1000) 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; PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300;
ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8 ERROR 42000: Only integers allowed as number here near '0.0E+300' at line 8
CREATE TABLE t1 ( 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 ERROR 42000: Only integers allowed as number here near '0.0E+300
(PARTITION part1 VALUES LESS THAN (10), (PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THA' at line 9 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 # 4.2.4 partition/subpartition numbers STRING notation
CREATE TABLE t1 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,

View File

@ -12,9 +12,7 @@ partition_value_ndb : cannot create t1
partition_basic_ndb : cannot create t1 partition_basic_ndb : cannot create t1
partition_alter1_ndb : timeout. Needs too much time. partition_alter1_ndb : timeout. Needs too much time.
partition_alter2_ndb : cannot create t1 partition_alter2_ndb : cannot create t1
partition_char_innodb : crash. Bug? More investigations
partition_sessions : needs system_3_init.inc partition_sessions : needs system_3_init.inc
partition_engine_ndb : cannot create t1 partition_engine_ndb : cannot create t1
part_supported_sql_func_ndb : cannot create t1 part_supported_sql_func_ndb : cannot create t1
rpl_ndb_dd_partitions : 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 # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # 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. # any of the variables.
# #
@ -40,5 +40,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc --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 # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # 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. # any of the variables.
# #
@ -39,5 +39,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
--source suite/parts/inc/part_blocked_sql_funcs_main.inc --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 # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # THE SOURCED FILES ONLY.
# #
@ -38,5 +38,3 @@ let $engine= 'INNODB';
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc --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 # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # 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. # any of the variables.
# #
@ -40,5 +40,3 @@ let $engine= 'MYISAM';
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc --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 # Engine specific settings and requirements
--source include/have_ndb.inc
##### Storage engine to be tested ##### Storage engine to be tested
--source include/have_ndb.inc
let $engine= 'NDB'; let $engine= 'NDB';
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
--source suite/parts/inc/part_supported_sql_funcs_main.inc --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 # # InnoDB branch #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # 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. # any of the variables.
# #
@ -47,8 +47,8 @@ let $more_pk_ui_tests= 0;
# Engine specific settings and requirements # Engine specific settings and requirements
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc --source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files ##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ... # InnoDB has no files per PK, UI, ...
@ -64,7 +64,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed # Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre --source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs ##### Workarounds for known open engine specific bugs
# none # none
@ -72,7 +71,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines # Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc --source suite/parts/inc/partition_alter1.inc
# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Execute storage engine specific tests # Execute storage engine specific tests
@ -80,4 +78,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Cleanup # Cleanup
--source suite/parts/inc/partition_cleanup.inc --source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View File

@ -6,7 +6,7 @@
# MyISAM branch # # MyISAM branch #
# # # #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: ML # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: # # Change Author: #
# Change Date: # # Change Date: #
@ -18,7 +18,7 @@
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY. # 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. # any of the variables.
# #
@ -63,7 +63,6 @@ let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed # Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre --source suite/parts/inc/partition.pre
# --source inc/partition.pre
##### Workarounds for known open engine specific bugs ##### Workarounds for known open engine specific bugs
# none # none
@ -71,7 +70,6 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines # Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_alter1.inc --source suite/parts/inc/partition_alter1.inc
# --source inc/partition_alter1.inc
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Execute storage engine specific tests # Execute storage engine specific tests
@ -79,4 +77,3 @@ let $MAX_VALUE= (2147483646);
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Cleanup # Cleanup
--source suite/parts/inc/partition_cleanup.inc --source suite/parts/inc/partition_cleanup.inc
# --source inc/partition_cleanup.inc

View File

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

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