Skip to content

Commit b5615ef

Browse files
committed
Write information about restart in .result
Idea comes from MySQL which does something similar
1 parent 6fd7a4b commit b5615ef

File tree

231 files changed

+537
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+537
-45
lines changed

mysql-test/include/start_mysqld.inc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
# Include this script only after using shutdown_mysqld.inc
22
# where $_expect_file_name was initialized.
33
# Write file to make mysql-test-run.pl start up the server again
4+
5+
# restart_noprint defines how much is printed to the .result file
6+
# if 0 (default) then '# result' and restart_parameters are printed
7+
# if 1 then print #result but not the content of restart_parameters
8+
# if 2 then nothing is printed
9+
10+
if (!$restart_noprint)
11+
{
12+
--let $restart_noprint=0
13+
}
14+
415
if ($restart_parameters)
516
{
617
--exec echo "restart: $restart_parameters" > $_expect_file_name
18+
if (!$restart_noprint)
19+
{
20+
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
21+
--exec echo "# restart: $restart_parameters"
22+
}
23+
if ($restart_noprint == 1)
24+
{
25+
--exec echo "# restart: with restart_parameters"
26+
}
727
}
828
if (!$restart_parameters)
929
{
1030
--exec echo "restart" > $_expect_file_name
31+
if ($restart_noprint < 2)
32+
{
33+
--exec echo "# restart"
34+
}
1135
}
1236

1337
# Turn on reconnect
@@ -18,4 +42,3 @@ if (!$restart_parameters)
1842

1943
# Turn off reconnect again
2044
--disable_reconnect
21-

mysql-test/main/bootstrap.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
drop table if exists t1;
22
# Kill the server
3+
# restart
34
drop table t1;
45
# Kill the server
6+
# restart
57
drop table t1;
68
ERROR 42S02: Unknown table 'test.t1'
79
# Kill the server
10+
# restart
811
drop table t1;
912
End of 5.1 tests
1013
#
@@ -15,8 +18,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
1518
and SUPPORT='YES';
1619

1720
# Kill the server
21+
# restart
1822
End of 5.5 tests
1923
# Kill the server
24+
# restart
2025
flush tables;
2126
show create table t1;
2227
Table Create Table
@@ -29,3 +34,4 @@ name dl
2934
EXAMPLE ha_example.so
3035
truncate table mysql.plugin;
3136
# Kill the server
37+
# restart

mysql-test/main/events_restart.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ insert into event_like select * from mysql.event;
1515
alter table mysql.event
1616
change column body body longtext character set utf8 collate utf8_bin;
1717
"Now we restart the server"
18+
# restart
1819
use events_test;
1920
select @@event_scheduler;
2021
@@event_scheduler
@@ -75,6 +76,7 @@ events_test abc1 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1
7576
events_test abc2 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
7677
events_test abc3 root@localhost SYSTEM RECURRING # 1 SECOND # # ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
7778
Now let's restart the server again
79+
# restart
7880
use events_test;
7981
select @@event_scheduler;
8082
@@event_scheduler
@@ -95,6 +97,7 @@ SHOW EVENTS;
9597
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
9698
test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
9799
"Now we restart the server"
100+
# restart
98101
USE test;
99102
SELECT @@event_scheduler;
100103
@@event_scheduler

mysql-test/main/flush_ssl.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Kill the server
2+
# restart: --ssl-key=MYSQLTEST_VARDIR/tmp/ssl_key.pem --ssl-cert=MYSQLTEST_VARDIR/tmp/ssl_cert.pem
23
connect ssl_con,localhost,root,,,,,SSL;
34
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
45
# Use a different certificate ("Not after" certificate field changed)
@@ -24,3 +25,4 @@ SSL_ACCEPTS 0
2425
SSL_FINISHED_ACCEPTS 0
2526
# Cleanup
2627
# Kill the server
28+
# restart

mysql-test/main/mysql_install_db_win.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ Setting root password
55
Creating my.ini file
66
Creation of the database was successful
77
# Kill the server
8+
# restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir --loose-innodb
89
connect root,localhost,root,foo;
910
SELECT @@datadir;
1011
@@datadir
1112
DATADIR/
1213
# Kill the server
1314
connection default;
15+
# restart

mysql-test/main/mysql_upgrade.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ GRANT USAGE ON *.* TO 'user3'@'%';
581581
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
582582
alter table mysql.user drop column Delete_history_priv;
583583
alter table mysql.db drop column Delete_history_priv;
584+
# restart
584585
Run mysql_upgrade with all privileges on a user
585586
flush privileges;
586587
SHOW GRANTS FOR 'user3'@'%';

mysql-test/main/plugin_auth.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ DROP DATABASE shared;
292292
CALL mtr.add_suppression("Missing system table mysql.proxies_priv.");
293293
DROP TABLE mysql.proxies_priv;
294294
# Must come back with mysql.proxies_priv absent.
295+
# restart
295296
SELECT * FROM mysql.proxies_priv;
296297
ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist
297298
CREATE USER u1@localhost;

mysql-test/main/plugin_innodb.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ create table t1(a int) engine=example;
33
drop table t1;
44
alter table mysql.plugin engine=innodb;
55
restart
6+
# restart
67
create table t1(a int) engine=example;
78
select * from t1;
89
a

mysql-test/main/ps_error.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Warnings:
3131
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
3232
EXECUTE stmt;
3333
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
34+
# restart
3435
SELECT 'All done';
3536
All done
3637
All done

mysql-test/main/skip_grants.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ CREATE USER for baz@baz
111111
CREATE USER 'baz'@'baz' IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07'
112112
drop user bar@foo;
113113
drop user baz@baz;
114+
# restart

0 commit comments

Comments
 (0)