File: upgrade_cs.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 (97 lines) | stat: -rw-r--r-- 3,978 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
--echo ########################################################################
--echo # This test scripts covers meta data related aspects of upgrade
--echo # after 8.0.
--echo ########################################################################

--source include/have_case_sensitive_file_system.inc
--source include/not_valgrind.inc

--echo #-----------------------------------------------------------------------
--echo # WL#10895: INFORMATION_SCHEMA views for Roles
--echo # Test case to verify that new I_S tables introduced by this WL
--echo # are present after upgrade.
--echo #-----------------------------------------------------------------------

--let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/save_dd_upgrade_1.log

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

--echo # Check that the file exists in the working folder.
--file_exists $MYSQL_TMP_DIR/data_80014.zip
--exec unzip -qo $MYSQL_TMP_DIR/data_80014.zip -d $MYSQL_TMP_DIR

--echo # Set different paths for --datadir
--let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data_80014/

--echo # Check that the file exits after unzip
--file_exists $MYSQL_TMP_DIR/data_80014

--echo # Stop / restart DB server which was created by MTR default
--let $shutdown_server_timeout= 300
--let $wait_counter= 10000
--let $restart_parameters=  restart: --datadir=$MYSQLD_DATADIR1 --log-error=$MYSQLD_LOG
--replace_result $MYSQLD_DATADIR1 MYSQLD_DATADIR1 $MYSQLD_LOG MYSQLD_LOG
--source include/restart_mysqld.inc

SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ADMINISTRABLE_ROLE_AUTHORIZATIONS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ENABLED_ROLES;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_TABLE_GRANTS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_COLUMN_GRANTS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_ROUTINE_GRANTS;

--echo # Stop the server and do cleanup
--source include/shutdown_mysqld.inc
--echo # Remove copied files
--remove_file $MYSQL_TMP_DIR/data_80014.zip
--force-rmdir $MYSQL_TMP_DIR/data_80014
--echo # Restart the server with default options.
--let $restart_parameters= restart:
--source include/start_mysqld.inc

--echo #
--echo # WL#10895 Upgrade from 5.7->8.0 should show I_S tables.
--echo #
--echo #

let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/save_dd_upgrade_4.log;

--echo # Copy zip files from suite location to working location.
--copy_file $MYSQLTEST_VARDIR/std_data/upgrade/data_57022.zip $MYSQL_TMP_DIR/data_57022.zip

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

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

--echo # Set different paths for --datadir
let $MYSQLD_DATADIR3 = $MYSQL_TMP_DIR/data_57022;

--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

--echo # Start the DB server to do upgrade.
--exec echo "restart: --datadir=$MYSQLD_DATADIR3 --log-error=$MYSQLD_LOG" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--let $wait_counter= 3000
--source include/wait_until_connected_again.inc

SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ADMINISTRABLE_ROLE_AUTHORIZATIONS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ENABLED_ROLES;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_TABLE_GRANTS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_COLUMN_GRANTS;
SELECT COUNT(*) < 0 FROM INFORMATION_SCHEMA.ROLE_ROUTINE_GRANTS;

--echo # Stop the server
--source include/shutdown_mysqld.inc
--echo # Remove copied files
--remove_file $MYSQL_TMP_DIR/data_57022.zip
--force-rmdir $MYSQLD_DATADIR3
--echo # Restart the server with default options.
--source include/start_mysqld.inc