File: dictionary_tablespace.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 (136 lines) | stat: -rw-r--r-- 6,306 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--source include/have_debug.inc

#
--echo # Bug#26142776 : DIFFERENT MYSQL SCHEMA AFTER UPGRADE
#

# For data directory created in current 8.0 branch.
# Display contents of mysql schema
--LET $mysqld_datadir=`select @@DATADIR`
--echo #files in mysql schema
--replace_regex /_[0-9]+\.sdi/_XXX.sdi/
--list_files $MYSQLD_DATADIR/mysql/

SET debug='+d,skip_dd_table_access_check';
let $OUTFILE1 = $MYSQLTEST_VARDIR/tmp/mysql_schema.out;
# Display name, tablespace name for all tables in mysql schema
--replace_result $OUTFILE1 <OUTFILE1>
eval SELECT tables1.name, mysql.tablespaces.name INTO OUTFILE '$OUTFILE1' FROM
  (SELECT * FROM mysql.tables WHERE schema_id IN
    (SELECT id FROM mysql.schemata WHERE name='mysql')) AS tables1 LEFT JOIN
  mysql.tablespaces ON tables1.tablespace_id = tablespaces.id
  WHERE tables1.name NOT IN ('ndb_binlog_index') ORDER BY tables1.name;
--cat_file $OUTFILE1

# Display table names from mysql.tables that belong to mysql schema
# and mysql tablespace. It should be as same as displayed by upgrade.
let $OUTFILE2 = $MYSQLTEST_VARDIR/tmp/mysql_tablespace.out;
--replace_result $OUTFILE2 <OUTFILE2>
eval SELECT name INTO OUTFILE '$OUTFILE2' FROM mysql.tables WHERE
  tablespace_id IN (SELECT id FROM mysql.tablespaces WHERE name='mysql') AND
  name NOT IN ('ndb_binlog_index')
  ORDER BY name ASC;
--cat_file $OUTFILE2

# For data directory created in mysql-5.7 branch.
--source include/not_valgrind.inc
#Zipped data directory was created with default 16K page size
#Innodb does not recognizes partition table created in linux from windows
#due to difference in path format.
--source include/not_windows.inc

call mtr.add_suppression("Resizing redo log from");
call mtr.add_suppression("Redo log has been requested to resize");
call mtr.add_suppression("Upgrading redo log");
call mtr.add_suppression("Starting to delete and rewrite redo log files");
call mtr.add_suppression("New redo log files created");
call mtr.add_suppression("You need to use --log-bin to make --binlog-format work");
call mtr.add_suppression("Creating routine without parsing routine body");
call mtr.add_suppression("Storage engine '.*' does not support system tables. \\[mysql.*\\]");
call mtr.add_suppression("Table 'mysql.component' doesn't exist");
call mtr.add_suppression("is expected to be transactional");
call mtr.add_suppression("table is missing or has an incorrect definition");
call mtr.add_suppression("ACL DDLs will not work unless mysql_upgrade is executed");
call mtr.add_suppression(".* Native table .* has the wrong structure");
call mtr.add_suppression("Column count of mysql.* is wrong");
call mtr.add_suppression("The privilege system failed to initialize correctly.*");
call mtr.add_suppression(".*The system table mysql.global_grants is missing.*");
call mtr.add_suppression("ACL table mysql.[a-z_]* missing. Some operations may fail.");
call mtr.add_suppression("Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened");
call mtr.add_suppression("Error in checking mysql.slave_master_info repository info type of TABLE");
call mtr.add_suppression("Error creating connection metadata: Error checking repositories.");
call mtr.add_suppression("Replica: Failed to initialize the connection metadata structure for channel");
call mtr.add_suppression("Failed to create or recover replication info repositories.");
call mtr.add_suppression("Plugin mysqlx reported: 'Unable to use user mysql.session");
call mtr.add_suppression("Plugin mysqlx reported: 'Unable to switch context");

# Set different paths for --datadir
let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data57_partition;

--echo # Copy the remote tablespace & DB zip files from suite location to working location.
--copy_file $MYSQLTEST_VARDIR/std_data/data57_partition.zip $MYSQL_TMP_DIR/data57_partition.zip

--echo # Check that the file exists in the working folder.
--file_exists $MYSQL_TMP_DIR/data57_partition.zip

--echo # Unzip the zip file.
--exec unzip -qo $MYSQL_TMP_DIR/data57_partition.zip -d $MYSQL_TMP_DIR

--let $MYSQLD_DATADIR=`SELECT @@datadir`

--echo # Stop DB server which was created by MTR default
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc

# Create a bootstrap file in temp location
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--exec echo $MYSQL_TMP_DIR/bootstrap.log

--exec echo "restart: --loose-skip-log-bin --skip-log-replica-updates --datadir=$MYSQLD_DATADIR1" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--let $wait_counter= 10000
--enable_reconnect
--source include/wait_until_connected_again.inc

SHOW CREATE TABLE partitions.t1;

--echo #files in mysql schema
--replace_regex /_[0-9]+\.sdi/_XXX.sdi/
--list_files $MYSQLD_DATADIR1/mysql/

SET debug='+d,skip_dd_table_access_check';
let $OUTFILE3 = $MYSQLTEST_VARDIR/tmp/mysql_schema_upgrade.out;
# Display name, tablespace name for all tables in mysql schema
--replace_result $OUTFILE3 <OUTFILE3>
eval SELECT tables1.name, mysql.tablespaces.name INTO OUTFILE '$OUTFILE3' FROM
  (SELECT * FROM mysql.tables WHERE schema_id IN
    (SELECT id FROM mysql.schemata WHERE name='mysql')) AS tables1 LEFT JOIN
  mysql.tablespaces ON tables1.tablespace_id = tablespaces.id
  WHERE tables1.name NOT IN ('ndb_binlog_index') ORDER BY tables1.name;

# Display table names from mysql.tables that belong to mysql schema
# and mysql tablespace. It should be as same as displayed by upgrade.
let $OUTFILE4 = $MYSQLTEST_VARDIR/tmp/mysql_tablespace_upgrade.out;
--replace_result $OUTFILE4 <OUTFILE4>
eval SELECT name INTO OUTFILE '$OUTFILE4' FROM mysql.tables WHERE
  tablespace_id IN (SELECT id FROM mysql.tablespaces WHERE name='mysql') AND
  name NOT IN ('ndb_binlog_index')
  ORDER BY name ASC;

# The contents of the files should be identical
--echo # Difference between files from in-place upgrade and new data directory.
--diff_files $OUTFILE1 $OUTFILE3
--diff_files $OUTFILE2 $OUTFILE4
--echo # Stop the server
--source include/shutdown_mysqld.inc

#Remove copied files
--remove_file $MYSQL_TMP_DIR/data57_partition.zip
--remove_file $OUTFILE1
--remove_file $OUTFILE2
--remove_file $OUTFILE3
--remove_file $OUTFILE4
--force-rmdir $MYSQL_TMP_DIR/data57_partition

--echo # Restart the server with default options.
--source include/start_mysqld.inc