Debian Codegraph @

mysql-test/suite/innodb/t/innodb_temporary_file_path.test

raw
1 #######################################################################
2 # Bug#32840635: WRONG FILE_NAME OF INNODB_TEMPORARY TABLESPACE IN
3 # INFORMATION_SCHEMA.FILES TABLE
4 #######################################################################
5 --source include/not_windows.inc
6
7 # This test verifies that the value of innodb_temp_data_file_path and
8 # the value of FILE_NAME of innodb_temporary tablespace in
9 # INFORMATION_SCHEMA.FILES match
10
11 SELECT @@innodb_temp_data_file_path;
12
13 SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES
14 WHERE TABLESPACE_NAME='innodb_temporary';
15
16 # Restart the server with a non-default value of innodb-temp-data-file-path
17 --let $restart_parameters = restart: --innodb-temp-data-file-path=mytemp:12M:autoextend
18 --source include/restart_mysqld.inc
19
20 # Verify that the new temp data file path is reflect correctly
21 SELECT @@innodb_temp_data_file_path;
22
23 SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES
24 WHERE TABLESPACE_NAME='innodb_temporary';
25
26 # Restart the server with a relative path for innodb-temp-data-file-path
27 --let $restart_parameters = restart: --innodb-temp-data-file-path=./mytemp:12M:autoextend
28 --source include/restart_mysqld.inc
29
30 # Verify that the new temp data file path is reflect correctly
31 SELECT @@innodb_temp_data_file_path;
32
33 SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES
34 WHERE TABLESPACE_NAME='innodb_temporary';
35
36 # Restart the server with a non-default innodb-temp-data-file-path and read only mode
37 --let $restart_parameters = restart: --innodb-temp-data-file-path=newtemp:12M:autoextend
38 --source include/restart_innodb_read_only.inc
39
40 # Since the server is started in read only mode, the filepath is not updated and hence
41 # innodb_temp_data_file_path variable and file_name in information_schema.files will
42 # be different
43 SELECT @@innodb_temp_data_file_path;
44 SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES
45 WHERE TABLESPACE_NAME='innodb_temporary';
46
47 # Restart the server with an absolute path for innodb-temp-data-file-path
48 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
49 --let $restart_parameters = restart: --innodb-temp-data-file-path=$MYSQL_TMP_DIR/mytemp:12M:autoextend
50 --source include/restart_mysqld.inc
51
52 # Verify that the new temp data file path is reflect correctly
53 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
54 SELECT @@innodb_temp_data_file_path;
55
56 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
57 SELECT FILE_NAME FROM INFORMATION_SCHEMA.FILES
58 WHERE TABLESPACE_NAME='innodb_temporary';
59
60 # Restart the server with the default innodb-temp-data-file-path
61 --let $restart_parameters = restart:
62 --source include/restart_mysqld.inc