mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
7a22a8a965
Have changed the DATA/INDEX dir to not be a database dir. (and made some changes for better result files.) mysql-test/suite/parts/inc/partition_basic_symlink.inc: Bug#35306: partition_basic_symlink test failures after bug 32167 it is not allowed with DATA/INDEX DIR in any database directory. remade the inc-files to make better use of each other (less duplicate tests) mysql-test/suite/parts/inc/partition_directory.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_layout_check1.inc: changed DATA/INDEX DIR mysql-test/suite/parts/inc/partition_layout_check2.inc: added check with_directories mysql-test/suite/parts/inc/partition_methods1.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_methods2.inc: Removed disable/enable_query_log for better result files Added with_directories for testing of DATA/INDEX DIR mysql-test/suite/parts/r/partition_basic_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/t/disabled.def: Bug#35306: parts.partition_basic_symlink test failures Enable the test again since the have been fixed mysql-test/suite/parts/t/partition_basic_innodb.test: Added check for table files. mysql-test/suite/parts/t/partition_basic_myisam.test: removing dependency of symlink (test exists now in parts.partition_basic_symlink_myisam) mysql-test/suite/parts/t/partition_basic_symlink_innodb.test: Bug#35306: partition_basic_symlink test failures Removed old test (since DATA/INDEX DIRECTORY is not supported in InnoDB) and replaced it with a simple test that altering a partitioned innodb with DATA/INDEX DIR to MyISAM, would use the DATA/INDEX DIR.
163 lines
6.7 KiB
Text
163 lines
6.7 KiB
Text
################################################################################
|
|
# t/partition_basic_innodb.test #
|
|
# #
|
|
# Purpose: #
|
|
# Tests around Create Partitioned table using DATA/INDEX DIR #
|
|
# InnoDB branch #
|
|
# #
|
|
#------------------------------------------------------------------------------#
|
|
# Original Author: mleich #
|
|
# Original Date: 2006-03-05 #
|
|
# Change Author: mattiasj #
|
|
# Change Date: 2008-02-05 #
|
|
# Change: copied it from partition_basic_innodb.test and kept DATA DIR #
|
|
# Change Author: mattiasj #
|
|
# Change Date: 2008-03-16 #
|
|
# Change: Replaced all test with alter -> myisam, since innodb does not support#
|
|
# DATA/INDEX DIRECTORY #
|
|
################################################################################
|
|
|
|
# NOTE: Until InnoDB supports DATA/INDEX DIR, test that a partitioned table
|
|
# remembers the DATA/INDEX DIR and it is used if altered to MyISAM
|
|
#
|
|
--echo # Will not run partition_basic_symlink on InnoDB, since it is the same
|
|
--echo # as partition_basic, since InnoDB does not support DATA/INDEX DIR
|
|
--echo # Will only verify that the DATA/INDEX DIR is stored and used if
|
|
--echo # ALTER to MyISAM.
|
|
--source include/have_innodb.inc
|
|
# The server must support partitioning.
|
|
--source include/have_partition.inc
|
|
# The server must support symlink for DATA/INDEX DIRECTORY.
|
|
--source include/have_symlink.inc
|
|
# windows does not support symlink for DATA/INDEX DIRECTORY.
|
|
--source include/not_windows.inc
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
|
|
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
|
eval CREATE TABLE t1 (c1 INT)
|
|
ENGINE = InnoDB
|
|
PARTITION BY HASH (c1)
|
|
(PARTITION p0
|
|
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
|
|
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir',
|
|
PARTITION p1
|
|
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
|
|
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
|
|
);
|
|
--echo # Verifying .frm and .par files
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
|
--echo # Verifying that there are no MyISAM files
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
|
|
--error 1
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
|
|
FLUSH TABLES;
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
|
SHOW CREATE TABLE t1;
|
|
ALTER TABLE t1 ENGINE = MyISAM;
|
|
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
|
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
|
|
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
|
|
FLUSH TABLES;
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
|
|
--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
|
|
--exit
|
|
# here is the old test, which is tested by partition_basic_innodb
|
|
|
|
#
|
|
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
|
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
|
# THE SOURCED FILES ONLY.
|
|
#
|
|
# Please read the README at the end of inc/partition.pre before changing
|
|
# any of the variables.
|
|
#
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# General not engine specific settings and requirements
|
|
|
|
##### Options, for debugging support #####
|
|
let $debug= 0;
|
|
let $with_partitioning= 1;
|
|
|
|
##### Option, for displaying files #####
|
|
let $ls= 1;
|
|
|
|
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
|
|
# on partioned tables
|
|
SET @max_row = 20;
|
|
|
|
##### Execute more tests #####
|
|
let $more_trigger_tests= 0;
|
|
let $more_pk_ui_tests= 0;
|
|
|
|
# The server must support partitioning.
|
|
--source include/have_partition.inc
|
|
# The server must support symlink for DATA/INDEX DIRECTORY.
|
|
--source include/have_symlink.inc
|
|
# windows does not support symlink for DATA/INDEX DIRECTORY.
|
|
--source include/not_windows.inc
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# Engine specific settings and requirements
|
|
|
|
##### Storage engine to be tested
|
|
--source include/have_innodb.inc
|
|
let $engine= 'InnoDB';
|
|
|
|
##### Execute the test of "table" files
|
|
# InnoDB has no files per PK, UI, ...
|
|
let $do_file_tests= 0;
|
|
|
|
##### Execute PRIMARY KEY tests #####
|
|
# AFAIK InnoDB clusters the table around PRIMARY KEYs.
|
|
let $do_pk_tests= 1;
|
|
|
|
##### Assign a big number smaller than the maximum value for partitions #####
|
|
# and smaller than the maximum value of SIGNED INTEGER
|
|
let $MAX_VALUE= (2147483646);
|
|
|
|
# Generate the prerequisites ($variables, @variables, tables) needed
|
|
--source suite/parts/inc/partition.pre
|
|
|
|
##### Workarounds for known open engine specific bugs
|
|
# none
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# Execute the tests to be applied to all storage engines
|
|
--source suite/parts/inc/partition_basic_symlink.inc
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# Execute storage engine specific tests
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# Cleanup
|
|
--source suite/parts/inc/partition_cleanup.inc
|