Skip to content

Commit a4ac987

Browse files
committed
more tests for mysql_install_db.exe
1 parent 7af62f8 commit a4ac987

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

mysql-test/include/wait_until_connected_again.inc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,26 @@ let $counter= 5000;
1111
let $mysql_errno= 9999;
1212
while ($mysql_errno)
1313
{
14-
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
14+
--error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
1515
show status;
1616

1717
dec $counter;
1818
if (!$counter)
1919
{
2020
--die Server failed to restart
2121
}
22+
if (!$mysql_errno)
23+
{
24+
# WSREP: SHOW STATUS queries are allowed even if wsrep
25+
# is not ready. Make sure wsrep is ready before
26+
# returning from this script
27+
source include/wait_wsrep_ready.inc;
28+
}
29+
if ($mysql_errno == 1045)
30+
{
31+
let $mysql_errno=0;
32+
}
2233
--sleep 0.1
2334
}
2435
--enable_query_log
2536
--enable_result_log
26-
27-
# WSREP: SHOW STATUS queries are allowed even if wsrep
28-
# is not ready. Make sure wsrep is ready before
29-
# returning from this script
30-
31-
--source include/wait_wsrep_ready.inc
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
Running bootstrap
22
Removing default user
3+
Allowing remote access for user root
4+
Setting root password
35
Creating my.ini file
46
Creation of the database was successful
57
# Kill the server
8+
connect root,localhost,root,foo;
69
SELECT @@datadir;
710
@@datadir
811
DATADIR/
912
# Kill the server
13+
connection default;

mysql-test/main/mysql_install_db_win.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
# Create database in tmp directory using mysql_install_db.exe,
44
# and start server from this directory.
55
let $ddir= $MYSQLTEST_VARDIR/tmp/ddir;
6-
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir;
6+
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R;
77

88
--source include/kill_mysqld.inc
99
let $restart_parameters=--datadir=$ddir --loose-innodb;
1010
--source include/start_mysqld.inc
1111

12+
connect root,localhost,root,foo;
1213
# Smoke test - check that we're actually using datadir
1314
# we've created (i.e restart_parameters worked)
1415
--replace_result $ddir DATADIR
@@ -18,5 +19,6 @@ SELECT @@datadir;
1819
--source include/kill_mysqld.inc
1920
rmdir $ddir;
2021
let $restart_parameters=;
22+
connection default;
2123
--source include/start_mysqld.inc
2224

0 commit comments

Comments
 (0)