File: component-upgrade.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 (52 lines) | stat: -rw-r--r-- 1,964 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
--source include/have_example_component.inc
--source include/not_valgrind.inc

# Save timestamp to restore tables
--let $PWCHANGED= `SELECT password_last_changed FROM mysql.user WHERE user LIKE 'mysql.sys';`
--let $TIMESTAMP= `SELECT timestamp FROM mysql.tables_priv WHERE user LIKE 'mysql.sys';`

--echo #
--echo # Bug #24453571  SERVER CRASHES WHEN INSTALL COMPONENT IS ISSUED,
--echo # AFTER MYSQL_UPGRADE
--echo #

--echo # Checking MYSQL_UPGRADE creates the missing mysql.component table
--echo # when upgrading from 5.7. Simulating the senario by deleting the
--echo # component table.

CALL mtr.add_suppression("Table 'mysql.component' doesn't exis");
CALL mtr.add_suppression("The mysql.component table is missing or has an incorrect definition.");

--echo # Dropping component table.
DROP TABLE mysql.component;
--echo # shutdown the server from mtr.
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc

--echo # restart the server.
--exec echo "restart:" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--echo # running mysql_upgrade
# Filter out ndb_binlog_index to mask differences due to running with or without
# ndb.
--let $restart_parameters = restart:--upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc

--source include/have_example_component.inc
INSTALL COMPONENT "file://component_example_component1";
--echo # a component should present
SELECT COUNT(*) FROM mysql.component;
UNINSTALL COMPONENT "file://component_example_component1";

# Restore user tables
--disable_query_log
--eval UPDATE mysql.user SET password_last_changed = '$PWCHANGED' WHERE user LIKE 'mysql.sys'
--eval UPDATE mysql.tables_priv SET timestamp = '$TIMESTAMP' WHERE user LIKE 'mysql.sys'
--enable_query_log

# restore default options in .opt
--let $restart_parameters = restart:
--source include/restart_mysqld.inc