| 1 |
--echo # |
| 2 |
--echo # Show that two locations in --innodb-directories that differ by only by case |
| 3 |
--echo # are recognized as the same on case insensitive file systems. |
| 4 |
--echo # |
| 5 |
|
| 6 |
--source include/have_case_insensitive_file_system.inc |
| 7 |
|
| 8 |
--disable_query_log |
| 9 |
LET $MYSQLD_DATADIR=`select @@datadir`; |
| 10 |
LET $MYSQLD_DATADIR_UC=../DATA; |
| 11 |
LET $KNOWN_DIR_LC=$MYSQL_TMP_DIR/known_dir; |
| 12 |
LET $KNOWN_DIR_UC=$MYSQL_TMP_DIR/KNOWN_DIR; |
| 13 |
LET $KNOWN_DIR_MC=$MYSQL_TMP_DIR/Known_Dir; |
| 14 |
LET $INNODB_PAGE_SIZE=`select @@innodb_page_size`; |
| 15 |
|
| 16 |
--source include/shutdown_mysqld.inc |
| 17 |
|
| 18 |
--mkdir $KNOWN_DIR_MC |
| 19 |
--enable_query_log |
| 20 |
|
| 21 |
--echo ########## |
| 22 |
--echo # Restart with the data_home_dir the same as the datadir except for case. |
| 23 |
--echo # On case insensitive file systems they should be recognized as the same location. |
| 24 |
--echo ########## |
| 25 |
LET $restart_parameters = restart: --innodb-directories='$KNOWN_DIR_MC' --innodb-data-home-dir=$MYSQLD_DATADIR_UC; |
| 26 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 27 |
--source include/start_mysqld.inc |
| 28 |
|
| 29 |
SET default_storage_engine=InnoDB; |
| 30 |
SHOW VARIABLES LIKE 'lower_case_file_system'; |
| 31 |
|
| 32 |
--echo # Create a table in a known directory. |
| 33 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 34 |
eval CREATE TABLE t1(c1 INT) DATA DIRECTORY='$KNOWN_DIR_MC'; |
| 35 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 36 |
SHOW CREATE TABLE t1; |
| 37 |
|
| 38 |
--echo # Create a general tablespace in a known directory. |
| 39 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 40 |
eval CREATE TABLESPACE ts1 ADD DATAFILE '$KNOWN_DIR_MC/ts1.ibd'; |
| 41 |
|
| 42 |
--echo ########## |
| 43 |
--echo # Restart with two identical known directories except for Case. |
| 44 |
--echo # On case insensitive file systems they should be recognized as the same location. |
| 45 |
--echo ########## |
| 46 |
|
| 47 |
LET $restart_parameters = restart: --innodb-directories='$KNOWN_DIR_LC;$KNOWN_DIR_MC;$KNOWN_DIR_UC'; |
| 48 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 49 |
--source include/restart_mysqld.inc |
| 50 |
|
| 51 |
--echo # Show these tablespaces in information_schema. |
| 52 |
--source suite/innodb/include/show_i_s_tablespaces.inc |
| 53 |
|
| 54 |
--echo # Create an inplicit tablespace using UPPER case for a MIXED case folder. |
| 55 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 56 |
eval CREATE TABLE t2(c1 INT) DATA DIRECTORY='$KNOWN_DIR_UC'; |
| 57 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 58 |
SHOW CREATE TABLE t2; |
| 59 |
|
| 60 |
--echo # Create an inplicit tablespace using LOWER case for a MIXED case folder. |
| 61 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 62 |
eval CREATE TABLE t3(c1 INT) DATA DIRECTORY='$KNOWN_DIR_LC'; |
| 63 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 64 |
SHOW CREATE TABLE t3; |
| 65 |
|
| 66 |
--echo # Create a general tablespace using UPPER case for a MIXED case folder. |
| 67 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 68 |
eval CREATE TABLESPACE ts2 ADD DATAFILE '$KNOWN_DIR_UC/ts2.ibd'; |
| 69 |
|
| 70 |
--echo # Create a general tablespace using LOWER case for a MIXED case folder. |
| 71 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 72 |
eval CREATE TABLESPACE ts3 ADD DATAFILE '$KNOWN_DIR_LC/ts3.ibd'; |
| 73 |
|
| 74 |
--echo # Show these tablespaces in information_schema. |
| 75 |
--source suite/innodb/include/show_i_s_tablespaces.inc |
| 76 |
|
| 77 |
--echo # |
| 78 |
--echo # Cleanup |
| 79 |
--echo # |
| 80 |
|
| 81 |
DROP TABLE t1; |
| 82 |
DROP TABLE t2; |
| 83 |
DROP TABLE t3; |
| 84 |
DROP TABLESPACE ts1; |
| 85 |
DROP TABLESPACE ts2; |
| 86 |
DROP TABLESPACE ts3; |
| 87 |
|
| 88 |
let $restart_parameters = restart:; |
| 89 |
--source include/restart_mysqld_no_echo.inc |
| 90 |
--rmdir $KNOWN_DIR_LC/test |
| 91 |
--rmdir $KNOWN_DIR_LC |
| 92 |
|