mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
3df9f94f35
mysql-test/suite/parts/r/ndb_blob_partition.result: Rename: mysql-test/suite/partitions/r/ndb_blob_partition.result -> mysql-test/suite/parts/r/ndb_blob_partition.result mysql-test/suite/parts/r/ndb_dd_backuprestore.result: Rename: mysql-test/suite/partitions/r/ndb_dd_backuprestore.result -> mysql-test/suite/parts/r/ndb_dd_backuprestore.result mysql-test/suite/parts/r/ndb_partition_error.result: Rename: mysql-test/suite/partitions/r/ndb_partition_error.result -> mysql-test/suite/parts/r/ndb_partition_error.result mysql-test/suite/parts/r/ndb_partition_list.result: Rename: mysql-test/suite/partitions/r/ndb_partition_list.result -> mysql-test/suite/parts/r/ndb_partition_list.result mysql-test/suite/parts/r/ndb_partition_range.result: Rename: mysql-test/suite/partitions/r/ndb_partition_range.result -> mysql-test/suite/parts/r/ndb_partition_range.result mysql-test/suite/parts/r/partition_alter1_innodb.result: Rename: mysql-test/suite/partitions/r/partition_alter1_innodb.result -> mysql-test/suite/parts/r/partition_alter1_innodb.result mysql-test/suite/parts/r/partition_alter1_myisam.result: Rename: mysql-test/suite/partitions/r/partition_alter1_myisam.result -> mysql-test/suite/parts/r/partition_alter1_myisam.result mysql-test/suite/parts/r/partition_alter2_innodb.result: Rename: mysql-test/suite/partitions/r/partition_alter2_innodb.result -> mysql-test/suite/parts/r/partition_alter2_innodb.result mysql-test/suite/parts/r/partition_alter2_myisam.result: Rename: mysql-test/suite/partitions/r/partition_alter2_myisam.result -> mysql-test/suite/parts/r/partition_alter2_myisam.result mysql-test/suite/parts/r/partition_alter3_innodb.result: Rename: mysql-test/suite/partitions/r/partition_alter3_innodb.result -> mysql-test/suite/parts/r/partition_alter3_innodb.result mysql-test/suite/parts/r/partition_alter3_myisam.result: Rename: mysql-test/suite/partitions/r/partition_alter3_myisam.result -> mysql-test/suite/parts/r/partition_alter3_myisam.result mysql-test/suite/parts/r/partition_alter4_innodb.result: Rename: mysql-test/suite/partitions/r/partition_alter4_innodb.result -> mysql-test/suite/parts/r/partition_alter4_innodb.result mysql-test/suite/parts/r/partition_alter4_myisam.result: Rename: mysql-test/suite/partitions/r/partition_alter4_myisam.result -> mysql-test/suite/parts/r/partition_alter4_myisam.result mysql-test/suite/parts/r/partition_basic_innodb.result: Rename: mysql-test/suite/partitions/r/partition_basic_innodb.result -> mysql-test/suite/parts/r/partition_basic_innodb.result mysql-test/suite/parts/r/partition_basic_myisam.result: Rename: mysql-test/suite/partitions/r/partition_basic_myisam.result -> mysql-test/suite/parts/r/partition_basic_myisam.result mysql-test/suite/parts/r/partition_bit_innodb.result: Rename: mysql-test/suite/partitions/r/partition_bit_innodb.result -> mysql-test/suite/parts/r/partition_bit_innodb.result mysql-test/suite/parts/r/partition_bit_myisam.result: Rename: mysql-test/suite/partitions/r/partition_bit_myisam.result -> mysql-test/suite/parts/r/partition_bit_myisam.result mysql-test/suite/parts/r/partition_bit_ndb.result: Rename: mysql-test/suite/partitions/r/partition_bit_ndb.result -> mysql-test/suite/parts/r/partition_bit_ndb.result mysql-test/suite/parts/r/partition_char_innodb.result: Rename: mysql-test/suite/partitions/r/partition_char_innodb.result -> mysql-test/suite/parts/r/partition_char_innodb.result mysql-test/suite/parts/r/partition_char_myisam.result: Rename: mysql-test/suite/partitions/r/partition_char_myisam.result -> mysql-test/suite/parts/r/partition_char_myisam.result mysql-test/suite/parts/r/partition_datetime_innodb.result: Rename: mysql-test/suite/partitions/r/partition_datetime_innodb.result -> mysql-test/suite/parts/r/partition_datetime_innodb.result mysql-test/suite/parts/r/partition_datetime_myisam.result: Rename: mysql-test/suite/partitions/r/partition_datetime_myisam.result -> mysql-test/suite/parts/r/partition_datetime_myisam.result mysql-test/suite/parts/r/partition_decimal_innodb.result: Rename: mysql-test/suite/partitions/r/partition_decimal_innodb.result -> mysql-test/suite/parts/r/partition_decimal_innodb.result mysql-test/suite/parts/r/partition_decimal_myisam.result: Rename: mysql-test/suite/partitions/r/partition_decimal_myisam.result -> mysql-test/suite/parts/r/partition_decimal_myisam.result mysql-test/suite/parts/r/partition_engine_innodb.result: Rename: mysql-test/suite/partitions/r/partition_engine_innodb.result -> mysql-test/suite/parts/r/partition_engine_innodb.result mysql-test/suite/parts/r/partition_engine_myisam.result: Rename: mysql-test/suite/partitions/r/partition_engine_myisam.result -> mysql-test/suite/parts/r/partition_engine_myisam.result mysql-test/suite/parts/r/partition_engine_ndb.result: Rename: mysql-test/suite/partitions/r/partition_engine_ndb.result -> mysql-test/suite/parts/r/partition_engine_ndb.result mysql-test/suite/parts/r/partition_float_innodb.result: Rename: mysql-test/suite/partitions/r/partition_float_innodb.result -> mysql-test/suite/parts/r/partition_float_innodb.result mysql-test/suite/parts/r/partition_float_myisam.result: Rename: mysql-test/suite/partitions/r/partition_float_myisam.result -> mysql-test/suite/parts/r/partition_float_myisam.result mysql-test/suite/parts/r/partition_int_innodb.result: Rename: mysql-test/suite/partitions/r/partition_int_innodb.result -> mysql-test/suite/parts/r/partition_int_innodb.result mysql-test/suite/parts/r/partition_int_myisam.result: Rename: mysql-test/suite/partitions/r/partition_int_myisam.result -> mysql-test/suite/parts/r/partition_int_myisam.result mysql-test/suite/parts/r/partition_int_ndb.result: Rename: mysql-test/suite/partitions/r/partition_int_ndb.result -> mysql-test/suite/parts/r/partition_int_ndb.result mysql-test/suite/parts/r/partition_special_innodb.result: Rename: mysql-test/suite/partitions/r/partition_special_innodb.result -> mysql-test/suite/parts/r/partition_special_innodb.result mysql-test/suite/parts/r/partition_special_myisam.result: Rename: mysql-test/suite/partitions/r/partition_special_myisam.result -> mysql-test/suite/parts/r/partition_special_myisam.result mysql-test/suite/parts/r/partition_syntax_innodb.result: Rename: mysql-test/suite/partitions/r/partition_syntax_innodb.result -> mysql-test/suite/parts/r/partition_syntax_innodb.result mysql-test/suite/parts/r/partition_syntax_myisam.result: Rename: mysql-test/suite/partitions/r/partition_syntax_myisam.result -> mysql-test/suite/parts/r/partition_syntax_myisam.result mysql-test/suite/parts/r/partition_syntax_ndb.result: Rename: mysql-test/suite/partitions/r/partition_syntax_ndb.result -> mysql-test/suite/parts/r/partition_syntax_ndb.result mysql-test/suite/parts/r/partition_t55.out: Rename: mysql-test/suite/partitions/r/partition_t55.out -> mysql-test/suite/parts/r/partition_t55.out mysql-test/suite/parts/r/partition_value_innodb.result: Rename: mysql-test/suite/partitions/r/partition_value_innodb.result -> mysql-test/suite/parts/r/partition_value_innodb.result mysql-test/suite/parts/r/partition_value_myisam.result: Rename: mysql-test/suite/partitions/r/partition_value_myisam.result -> mysql-test/suite/parts/r/partition_value_myisam.result mysql-test/suite/parts/r/partition_value_ndb.result: Rename: mysql-test/suite/partitions/r/partition_value_ndb.result -> mysql-test/suite/parts/r/partition_value_ndb.result mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result: Rename: mysql-test/suite/partitions/r/rpl_ndb_dd_partitions.result -> mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result mysql-test/suite/parts/t/disabled.def: Rename: mysql-test/suite/partitions/t/disabled.def -> mysql-test/suite/parts/t/disabled.def mysql-test/suite/parts/t/ndb_blob_partition.test: Rename: mysql-test/suite/partitions/t/ndb_blob_partition.test -> mysql-test/suite/parts/t/ndb_blob_partition.test mysql-test/suite/parts/t/ndb_dd_backuprestore.test: Rename: mysql-test/suite/partitions/t/ndb_dd_backuprestore.test -> mysql-test/suite/parts/t/ndb_dd_backuprestore.test mysql-test/suite/parts/t/ndb_partition_error.test: Rename: mysql-test/suite/partitions/t/ndb_partition_error.test -> mysql-test/suite/parts/t/ndb_partition_error.test mysql-test/suite/parts/t/ndb_partition_key.test: Rename: mysql-test/suite/partitions/t/ndb_partition_key.test -> mysql-test/suite/parts/t/ndb_partition_key.test mysql-test/suite/parts/t/ndb_partition_list.test: Rename: mysql-test/suite/partitions/t/ndb_partition_list.test -> mysql-test/suite/parts/t/ndb_partition_list.test mysql-test/suite/parts/t/ndb_partition_range.test: Rename: mysql-test/suite/partitions/t/ndb_partition_range.test -> mysql-test/suite/parts/t/ndb_partition_range.test mysql-test/suite/parts/t/partition_sessions.test: Rename: mysql-test/suite/partitions/t/partition_sessions.test -> mysql-test/suite/parts/t/partition_sessions.test mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test: Rename: mysql-test/suite/partitions/t/rpl_ndb_dd_partitions.test -> mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test mysql-test/suite/parts/inc/partition.pre: Rename: mysql-test/suite/parts/include/partition.pre -> mysql-test/suite/parts/inc/partition.pre mysql-test/suite/parts/inc/partition_20.inc: Rename: mysql-test/suite/parts/include/partition_20.inc -> mysql-test/suite/parts/inc/partition_20.inc mysql-test/suite/parts/inc/partition_bigint.inc: Rename: mysql-test/suite/parts/include/partition_bigint.inc -> mysql-test/suite/parts/inc/partition_bigint.inc mysql-test/suite/parts/inc/partition_binary.inc: Rename: mysql-test/suite/parts/include/partition_binary.inc -> mysql-test/suite/parts/inc/partition_binary.inc mysql-test/suite/parts/inc/partition_bit.inc: Rename: mysql-test/suite/parts/include/partition_bit.inc -> mysql-test/suite/parts/inc/partition_bit.inc mysql-test/suite/parts/inc/partition_blob.inc: Rename: mysql-test/suite/parts/include/partition_blob.inc -> mysql-test/suite/parts/inc/partition_blob.inc mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc: Rename: mysql-test/suite/parts/include/partition_blocked_sql_funcs.inc -> mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc mysql-test/suite/parts/inc/partition_char.inc: Rename: mysql-test/suite/parts/include/partition_char.inc -> mysql-test/suite/parts/inc/partition_char.inc mysql-test/suite/parts/inc/partition_check_drop.inc: Rename: mysql-test/suite/parts/include/partition_check_drop.inc -> mysql-test/suite/parts/inc/partition_check_drop.inc mysql-test/suite/parts/inc/partition_check_read.inc: Rename: mysql-test/suite/parts/include/partition_check_read.inc -> mysql-test/suite/parts/inc/partition_check_read.inc mysql-test/suite/parts/inc/partition_check_read1.inc: Rename: mysql-test/suite/parts/include/partition_check_read1.inc -> mysql-test/suite/parts/inc/partition_check_read1.inc mysql-test/suite/parts/inc/partition_check_read2.inc: Rename: mysql-test/suite/parts/include/partition_check_read2.inc -> mysql-test/suite/parts/inc/partition_check_read2.inc mysql-test/suite/parts/inc/partition_cleanup.inc: Rename: mysql-test/suite/parts/include/partition_cleanup.inc -> mysql-test/suite/parts/inc/partition_cleanup.inc mysql-test/suite/parts/inc/partition_date.inc: Rename: mysql-test/suite/parts/include/partition_date.inc -> mysql-test/suite/parts/inc/partition_date.inc mysql-test/suite/parts/inc/partition_datetime.inc: Rename: mysql-test/suite/parts/include/partition_datetime.inc -> mysql-test/suite/parts/inc/partition_datetime.inc mysql-test/suite/parts/inc/partition_decimal.inc: Rename: mysql-test/suite/parts/include/partition_decimal.inc -> mysql-test/suite/parts/inc/partition_decimal.inc mysql-test/suite/parts/inc/partition_double.inc: Rename: mysql-test/suite/parts/include/partition_double.inc -> mysql-test/suite/parts/inc/partition_double.inc mysql-test/suite/parts/inc/partition_enum.inc: Rename: mysql-test/suite/parts/include/partition_enum.inc -> mysql-test/suite/parts/inc/partition_enum.inc mysql-test/suite/parts/inc/partition_float.inc: Rename: mysql-test/suite/parts/include/partition_float.inc -> mysql-test/suite/parts/inc/partition_float.inc mysql-test/suite/parts/inc/partition_int.inc: Rename: mysql-test/suite/parts/include/partition_int.inc -> mysql-test/suite/parts/inc/partition_int.inc mysql-test/suite/parts/inc/partition_key_16col.inc: Rename: mysql-test/suite/parts/include/partition_key_16col.inc -> mysql-test/suite/parts/inc/partition_key_16col.inc mysql-test/suite/parts/inc/partition_key_32col.inc: Rename: mysql-test/suite/parts/include/partition_key_32col.inc -> mysql-test/suite/parts/inc/partition_key_32col.inc mysql-test/suite/parts/inc/partition_key_4col.inc: Rename: mysql-test/suite/parts/include/partition_key_4col.inc -> mysql-test/suite/parts/inc/partition_key_4col.inc mysql-test/suite/parts/inc/partition_key_8col.inc: Rename: mysql-test/suite/parts/include/partition_key_8col.inc -> mysql-test/suite/parts/inc/partition_key_8col.inc mysql-test/suite/parts/inc/partition_layout_check1.inc: Rename: mysql-test/suite/parts/include/partition_layout_check1.inc -> mysql-test/suite/parts/inc/partition_layout_check1.inc mysql-test/suite/parts/inc/partition_layout_check2.inc: Rename: mysql-test/suite/parts/include/partition_layout_check2.inc -> mysql-test/suite/parts/inc/partition_layout_check2.inc mysql-test/suite/parts/inc/partition_mediumint.inc: Rename: mysql-test/suite/parts/include/partition_mediumint.inc -> mysql-test/suite/parts/inc/partition_mediumint.inc mysql-test/suite/parts/inc/partition_set.inc: Rename: mysql-test/suite/parts/include/partition_set.inc -> mysql-test/suite/parts/inc/partition_set.inc mysql-test/suite/parts/inc/partition_smallint.inc: Rename: mysql-test/suite/parts/include/partition_smallint.inc -> mysql-test/suite/parts/inc/partition_smallint.inc mysql-test/suite/parts/inc/partition_text.inc: Rename: mysql-test/suite/parts/include/partition_text.inc -> mysql-test/suite/parts/inc/partition_text.inc mysql-test/suite/parts/inc/partition_time.inc: Rename: mysql-test/suite/parts/include/partition_time.inc -> mysql-test/suite/parts/inc/partition_time.inc mysql-test/suite/parts/inc/partition_timestamp.inc: Rename: mysql-test/suite/parts/include/partition_timestamp.inc -> mysql-test/suite/parts/inc/partition_timestamp.inc mysql-test/suite/parts/inc/partition_tinyint.inc: Rename: mysql-test/suite/parts/include/partition_tinyint.inc -> mysql-test/suite/parts/inc/partition_tinyint.inc mysql-test/suite/parts/inc/partition_trigg1.inc: Rename: mysql-test/suite/parts/include/partition_trigg1.inc -> mysql-test/suite/parts/inc/partition_trigg1.inc mysql-test/suite/parts/inc/partition_trigg2.inc: Rename: mysql-test/suite/parts/include/partition_trigg2.inc -> mysql-test/suite/parts/inc/partition_trigg2.inc mysql-test/suite/parts/inc/partition_trigg3.inc: Rename: mysql-test/suite/parts/include/partition_trigg3.inc -> mysql-test/suite/parts/inc/partition_trigg3.inc mysql-test/suite/parts/inc/partition_value.inc: Rename: mysql-test/suite/parts/include/partition_value.inc -> mysql-test/suite/parts/inc/partition_value.inc mysql-test/suite/parts/inc/partition_varbinary.inc: Rename: mysql-test/suite/parts/include/partition_varbinary.inc -> mysql-test/suite/parts/inc/partition_varbinary.inc mysql-test/suite/parts/inc/partition_varchar.inc: Rename: mysql-test/suite/parts/include/partition_varchar.inc -> mysql-test/suite/parts/inc/partition_varchar.inc mysql-test/suite/parts/inc/partition_year.inc: Rename: mysql-test/suite/parts/include/partition_year.inc -> mysql-test/suite/parts/inc/partition_year.inc mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc: Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_ch1.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc: Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_date.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc: Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_float.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc: Rename: mysql-test/suite/parts/inc/partition_supported_sql_funcs_int_int.in -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result: Rename: mysql-test/suite/parts/r/partition_blocked_sql_func_innodb.result -> mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result: Rename: mysql-test/suite/parts/r/partition_blocked_sql_func_myisam.result -> mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result mysql-test/suite/parts/r/part_supported_sql_func_ndb.result: Rename: mysql-test/suite/parts/r/partition_supported_sql_func_ndb.result -> mysql-test/suite/parts/r/part_supported_sql_func_ndb.result mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc: Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.cin -> mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc
202 lines
7.4 KiB
PHP
202 lines
7.4 KiB
PHP
################################################################################
|
|
# include/partition_alter_11.inc #
|
|
# #
|
|
# Purpose: #
|
|
# Check ALTER partitioned table and the state of the table afterwards #
|
|
# The partitioning function use the column f_int1 #
|
|
# #
|
|
# For all partitioning methods #
|
|
# PARTITION BY HASH/KEY/LIST/RANGE #
|
|
# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... #
|
|
# do #
|
|
# 1. Create the partitioned table #
|
|
# 2. Execute include/partition_alter_1.inc, which will #
|
|
# - Insert the first half of the table t0_template into t1 #
|
|
# - Execute the ALTER TABLE statement #
|
|
# - Insert the second half of the table t0_template into t1 #
|
|
# - Execute the usability test include/partition_check.inc #
|
|
# - Drop the table t1 #
|
|
# done #
|
|
# #
|
|
# The parameters #
|
|
# $unique -- PRIMARY KEY or UNIQUE INDEXes to be created within the #
|
|
# CREATE TABLE STATEMENT #
|
|
# $alter -- ALTER TABLE statement, which has to be executed #
|
|
# have to be set before sourcing this routine. #
|
|
# Example: #
|
|
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
|
|
# let $alter= ALTER TABLE t1 DROP UNIQUE INDEX uidx1; #
|
|
# include/partition_alter1.inc #
|
|
# #
|
|
# Attention: The routine include/partition_alter_13.inc is very similar #
|
|
# to this one. So if something has to be changed here it #
|
|
# might be necessary to do it also there #
|
|
# #
|
|
#------------------------------------------------------------------------------#
|
|
# Original Author: ML #
|
|
# Original Date: 2006-03-05 #
|
|
# Change Author: #
|
|
# Change Date: #
|
|
# Change: #
|
|
################################################################################
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
|
|
let $partitioning= ;
|
|
#----------- PARTITION BY HASH
|
|
if ($with_partitioning)
|
|
{
|
|
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY KEY
|
|
if ($with_partitioning)
|
|
{
|
|
let $partitioning= PARTITION BY KEY(f_int1) PARTITIONS 5;
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY LIST
|
|
if ($with_partitioning)
|
|
{
|
|
let $partitioning= PARTITION BY LIST(MOD(f_int1,4))
|
|
(PARTITION part_3 VALUES IN (-3),
|
|
PARTITION part_2 VALUES IN (-2),
|
|
PARTITION part_1 VALUES IN (-1),
|
|
PARTITION part_N VALUES IN (NULL),
|
|
PARTITION part0 VALUES IN (0),
|
|
PARTITION part1 VALUES IN (1),
|
|
PARTITION part2 VALUES IN (2),
|
|
PARTITION part3 VALUES IN (3));
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY RANGE
|
|
if ($with_partitioning)
|
|
{
|
|
--disable_query_log
|
|
eval SET @aux = 'PARTITION BY RANGE(f_int1)
|
|
(PARTITION parta VALUES LESS THAN (0),
|
|
PARTITION partb VALUES LESS THAN ($max_row_div4),
|
|
PARTITION partc VALUES LESS THAN ($max_row_div2),
|
|
PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4),
|
|
PARTITION parte VALUES LESS THAN ($max_row),
|
|
PARTITION partf VALUES LESS THAN $MAX_VALUE)';
|
|
let $partitioning= `SELECT @aux`;
|
|
--enable_query_log
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
|
|
if ($with_partitioning)
|
|
{
|
|
--disable_query_log
|
|
eval SET @aux =
|
|
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
|
|
(PARTITION parta VALUES LESS THAN (0),
|
|
PARTITION partb VALUES LESS THAN ($max_row_div4),
|
|
PARTITION partc VALUES LESS THAN ($max_row_div2),
|
|
PARTITION partd VALUES LESS THAN $MAX_VALUE)';
|
|
let $partitioning= `SELECT @aux`;
|
|
--enable_query_log
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
|
|
if ($with_partitioning)
|
|
{
|
|
--disable_query_log
|
|
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
|
|
(PARTITION part1 VALUES LESS THAN (0)
|
|
(SUBPARTITION subpart11, SUBPARTITION subpart12),
|
|
PARTITION part2 VALUES LESS THAN ($max_row_div4)
|
|
(SUBPARTITION subpart21, SUBPARTITION subpart22),
|
|
PARTITION part3 VALUES LESS THAN ($max_row_div2)
|
|
(SUBPARTITION subpart31, SUBPARTITION subpart32),
|
|
PARTITION part4 VALUES LESS THAN $MAX_VALUE
|
|
(SUBPARTITION subpart41, SUBPARTITION subpart42))';
|
|
let $partitioning= `SELECT @aux`;
|
|
--enable_query_log
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
|
|
if ($with_partitioning)
|
|
{
|
|
let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
|
|
(PARTITION part1 VALUES IN (0)
|
|
(SUBPARTITION sp11, SUBPARTITION sp12),
|
|
PARTITION part2 VALUES IN (1)
|
|
(SUBPARTITION sp21, SUBPARTITION sp22),
|
|
PARTITION part3 VALUES IN (2)
|
|
(SUBPARTITION sp31, SUBPARTITION sp32),
|
|
PARTITION part4 VALUES IN (NULL)
|
|
(SUBPARTITION sp41, SUBPARTITION sp42));
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|
|
|
|
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
|
|
if ($with_partitioning)
|
|
{
|
|
--disable_query_log
|
|
eval SET @aux =
|
|
'PARTITION BY LIST(ABS(MOD(f_int1,2)))
|
|
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
|
|
(PARTITION part1 VALUES IN (0),
|
|
PARTITION part2 VALUES IN (1),
|
|
PARTITION part3 VALUES IN (NULL))';
|
|
let $partitioning= `SELECT @aux`;
|
|
--enable_query_log
|
|
}
|
|
eval CREATE TABLE t1 (
|
|
$column_list
|
|
$unique
|
|
)
|
|
$partitioning;
|
|
--source suite/parts/inc/partition_alter_1.inc
|
|
# --source include/partition_alter_1.inc
|