Debian Codegraph @

mysql-test/suite/perfschema/t/bad_option.test

raw
1 # Tests for PERFORMANCE_SCHEMA
2 # Check error handling for invalid server start options and values
3
4 # The current test unites and replaces all suite/perfschema/t/bad_option_*.test
5 # which were developed by Marc.
6
7 #Plugin 'MEMORY' has ref_count=1 after shutdown
8 call mtr.add_suppression("Plugin \'MEMORY\'");
9
10 let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
11 --error 0,1
12 --remove_file $error_log
13 let SEARCH_FILE= $error_log;
14 # Stop the server
15 let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
16 --exec echo "wait" > $restart_file
17 --shutdown_server
18 --source include/wait_until_disconnected.inc
19 --error 1
20 --exec $MYSQLD_CMD --loose-console --performance-schema-enabled=maybe > $error_log 2>&1
21 # The server restart aborts
22 # [ERROR] unknown variable 'performance-schema-enabled=maybe'
23 let SEARCH_PATTERN= \[ERROR\] \[[^]]*\] \[[^]]*\] unknown variable 'performance-schema-enabled=maybe';
24 --source include/search_pattern.inc
25 --echo # Server start with invalid startup option value 'performance-schema-enabled=maybe' : pass
26
27 --remove_file $error_log
28 --error 1
29 --exec $MYSQLD_CMD --loose-console --performance-schema-max_=12 > $error_log 2>&1
30 # The server restart aborts
31 # [ERROR] unknown variable 'performance-schema-max_=12'
32 let SEARCH_PATTERN= \[ERROR\] \[[^]]*\] \[[^]]*\] unknown variable 'performance-schema-max_=12';
33 --source include/search_pattern.inc
34 --echo # Server start with ambigous startup option 'performance-schema-max_=12' : pass
35 # The important points is here:
36 # 1. There is no option 'performance-schema-max_' or 'performance-schema-max-' at all.
37 # 2. But we have many options where the name starts exact with this pattern.
38 # 3. There is a value assigned.
39 # 4. The server criticizes "variable" and not "option"!
40 # This seems to be caused by 3. because "--performance-schema-unknown=ON" gets
41 # a similar reaction.
42
43 --remove_file $error_log
44 --error 1
45 --exec $MYSQLD_CMD --loose-console --performance-schema-unknown_99 > $error_log 2>&1
46 # The server restart aborts
47 let SEARCH_PATTERN= \[ERROR\] \[[^]]*\] \[[^]]*\] unknown option '--performance-schema-unknown_99';
48 --source include/search_pattern.inc
49 --echo # Server start with invalid startup option '--performance-schema-unknown_99' : pass
50
51 --remove_file $error_log
52 --error 1
53 --exec $MYSQLD_CMD --loose-console --datadir=bad_option_h_param > $error_log 2>&1
54 # The server restart aborts
55 # [ERROR] Failed to set datadir to /work/repo1/mysql-trunk2/bad_option_h_param/
56 let SEARCH_PATTERN= \[ERROR\] \[[^]]*\] \[[^]]*\] Failed to set datadir to \'.*bad_option_h_param;
57 --source include/search_pattern.inc
58 --echo # Server start with invalid startup option value '--datadir=bad_option_h_param' : pass
59 # The important point is here:
60 # There is no directory "bad_option_h_param".
61
62 --remove_file $error_log
63 # Write file to make mysql-test-run.pl start up the server again
64 --exec echo "restart" > $restart_file
65
66 # Turn on reconnect
67 --enable_reconnect
68
69 # Call script that will poll the server waiting for it to be back online again
70 --source include/wait_until_connected_again.inc
71
72 # Turn off reconnect again
73 --disable_reconnect
74