File: case_insensitive_fs.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (92 lines) | stat: -rw-r--r-- 3,240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
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
--echo #
--echo # Show that two locations in --innodb-directories that differ by only by case
--echo # are recognized as the same on case insensitive file systems.
--echo #

--source include/have_case_insensitive_file_system.inc

--disable_query_log
LET $MYSQLD_DATADIR=`select @@datadir`;
LET $MYSQLD_DATADIR_UC=../DATA;
LET $KNOWN_DIR_LC=$MYSQL_TMP_DIR/known_dir;
LET $KNOWN_DIR_UC=$MYSQL_TMP_DIR/KNOWN_DIR;
LET $KNOWN_DIR_MC=$MYSQL_TMP_DIR/Known_Dir;
LET $INNODB_PAGE_SIZE=`select @@innodb_page_size`;

--source include/shutdown_mysqld.inc

--mkdir $KNOWN_DIR_MC
--enable_query_log

--echo ##########
--echo # Restart with the data_home_dir the same as the datadir except for case.
--echo # On case insensitive file systems they should be recognized as the same location.
--echo ##########
LET $restart_parameters = restart: --innodb-directories='$KNOWN_DIR_MC'  --innodb-data-home-dir=$MYSQLD_DATADIR_UC;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--source include/start_mysqld.inc

SET default_storage_engine=InnoDB;
SHOW VARIABLES LIKE 'lower_case_file_system';

--echo # Create a table in a known directory.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLE t1(c1 INT) DATA DIRECTORY='$KNOWN_DIR_MC';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1;

--echo # Create a general tablespace in a known directory.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLESPACE ts1 ADD DATAFILE '$KNOWN_DIR_MC/ts1.ibd';

--echo ##########
--echo # Restart with two identical known directories except for Case.
--echo # On case insensitive file systems they should be recognized as the same location.
--echo ##########

LET $restart_parameters = restart: --innodb-directories='$KNOWN_DIR_LC;$KNOWN_DIR_MC;$KNOWN_DIR_UC';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--source include/restart_mysqld.inc

--echo # Show these tablespaces in information_schema.
--source suite/innodb/include/show_i_s_tablespaces.inc

--echo # Create an inplicit tablespace using UPPER case for a MIXED case folder.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLE t2(c1 INT) DATA DIRECTORY='$KNOWN_DIR_UC';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t2;

--echo # Create an inplicit tablespace using LOWER case for a MIXED case folder.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLE t3(c1 INT) DATA DIRECTORY='$KNOWN_DIR_LC';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t3;

--echo # Create a general tablespace using UPPER case for a MIXED case folder.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLESPACE ts2 ADD DATAFILE '$KNOWN_DIR_UC/ts2.ibd';

--echo # Create a general tablespace using LOWER case for a MIXED case folder.
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLESPACE ts3 ADD DATAFILE '$KNOWN_DIR_LC/ts3.ibd';

--echo # Show these tablespaces in information_schema.
--source suite/innodb/include/show_i_s_tablespaces.inc

--echo #
--echo # Cleanup
--echo #

DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLESPACE ts1;
DROP TABLESPACE ts2;
DROP TABLESPACE ts3;

let $restart_parameters = restart:;
--source include/restart_mysqld_no_echo.inc
--rmdir $KNOWN_DIR_LC/test
--rmdir $KNOWN_DIR_LC