diff options
Diffstat (limited to 'mysql-test/suite/parts/t/partition_exch_qa_14.test')
-rw-r--r-- | mysql-test/suite/parts/t/partition_exch_qa_14.test | 142 |
1 files changed, 57 insertions, 85 deletions
diff --git a/mysql-test/suite/parts/t/partition_exch_qa_14.test b/mysql-test/suite/parts/t/partition_exch_qa_14.test index 7c6699a0a72..8d9f201f1db 100644 --- a/mysql-test/suite/parts/t/partition_exch_qa_14.test +++ b/mysql-test/suite/parts/t/partition_exch_qa_14.test @@ -1,94 +1,66 @@ # Author: Horst Hunger # Created: 2010-07-13 ---source include/not_windows.inc ---source include/have_partition.inc ---source include/have_symlink.inc +source include/not_windows.inc; +source include/have_partition.inc; +source include/have_symlink.inc; let $engine_table= MYISAM; let $engine_part= MYISAM; let $engine_subpart= MYISAM; - -# DATA DIRECTORY -# Make directory for partition data -let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir; ---mkdir $data_dir_path -let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; -let $data_directory= DATA DIRECTORY = '$data_dir_path'; - -# INDEX DIRECTORY -# Make directory for partition index -let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir; ---mkdir $idx_dir_path -let $p_index_directory= INDEX DIRECTORY = '$idx_dir_path'; -let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; - -use test; - ---disable_result_log ---disable_query_log ---source suite/parts/inc/part_exch_tabs.inc ---enable_result_log ---enable_query_log - ---error ER_TABLES_DIFFERENT_METADATA -ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; - ---source suite/parts/inc/part_exch_drop_tabs.inc ---rmdir $data_dir_path ---rmdir $idx_dir_path - -# DATA DIRECTORY -# Make directory for partition data let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir; ---mkdir $data_dir_path -let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; - -# INDEX DIRECTORY -# Make directory for partition index let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir; ---mkdir $idx_dir_path -let $p_index_directory= INDEX DIRECTORY = '$idx_dir_path'; - -use test; - ---disable_result_log ---disable_query_log ---source suite/parts/inc/part_exch_tabs.inc ---enable_result_log ---enable_query_log - ---error ER_TABLES_DIFFERENT_METADATA -ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; - ---source suite/parts/inc/part_exch_drop_tabs.inc ---rmdir $data_dir_path ---rmdir $idx_dir_path - -# DATA DIRECTORY -# Make directory for partition data -let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir; ---mkdir $data_dir_path -let $data_directory= DATA DIRECTORY = '$data_dir_path'; - -# INDEX DIRECTORY -# Make directory for partition index -let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir; ---mkdir $idx_dir_path -let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; - -use test; - ---disable_result_log ---disable_query_log ---source suite/parts/inc/part_exch_tabs.inc ---enable_result_log ---enable_query_log - ---error ER_TABLES_DIFFERENT_METADATA -ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; - ---source suite/parts/inc/part_exch_drop_tabs.inc ---rmdir $data_dir_path ---rmdir $idx_dir_path - +mkdir $data_dir_path; +mkdir $idx_dir_path; + +echo # === Data/Index directories are identical; + let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; + let $data_directory= DATA DIRECTORY = '$data_dir_path'; + let $p_index_directory= INDEX DIRECTORY = '$idx_dir_path'; + let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; + source suite/parts/inc/part_exch_tabs.inc; + ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; + source suite/parts/inc/part_exch_drop_tabs.inc; + +echo # === partition has directories, the table does not; + let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; + let $data_directory= ; + let $p_index_directory= INDEX DIRECTORY = '$idx_dir_path'; + let $index_directory= ; + source suite/parts/inc/part_exch_tabs.inc; + error ER_TABLES_DIFFERENT_METADATA; + ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; + source suite/parts/inc/part_exch_drop_tabs.inc; + +echo # === the table has directories, partition does not; + let $p_data_directory= ; + let $data_directory= DATA DIRECTORY = '$data_dir_path'; + let $p_index_directory= ; + let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; + source suite/parts/inc/part_exch_tabs.inc; + error ER_TABLES_DIFFERENT_METADATA; + ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; + source suite/parts/inc/part_exch_drop_tabs.inc; + +echo # === data directory differs; + let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; + let $data_directory= DATA DIRECTORY = '$idx_dir_path'; + let $p_index_directory= INDEX DIRECTORY = '$idx_dir_path'; + let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; + source suite/parts/inc/part_exch_tabs.inc; + error ER_TABLES_DIFFERENT_METADATA; + ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; + source suite/parts/inc/part_exch_drop_tabs.inc; + +echo # === index directory differs; + let $p_data_directory= DATA DIRECTORY = '$data_dir_path'; + let $data_directory= DATA DIRECTORY = '$data_dir_path'; + let $p_index_directory= DATA DIRECTORY = '$data_dir_path'; + let $index_directory= DATA DIRECTORY = '$idx_dir_path'; + source suite/parts/inc/part_exch_tabs.inc; + error ER_TABLES_DIFFERENT_METADATA; + ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; + source suite/parts/inc/part_exch_drop_tabs.inc; + +rmdir $idx_dir_path; +rmdir $data_dir_path; |