Commit f97c8f7e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-26715 Fix mysql_install_db_win tests.

It looks like  C/C reconnect retains the database. It is correct behavior
However there is a problem that mysql_install_db.exe does not create
'test' database, thus using mysql_install_db to create datadir,
then restarting server and reconnecting does not succeed, if 'test' was
current db before reconnect.

The problem became apparent with MDEV-26715. Why it worked before,
with a simpler 'root' definition is a mystery.

Fix is to switch current connection to 'mysql' database, prior to
reconnect to the instance created via mysql_install_db.exe
parent 125e172a
select database();
database()
test
use mysql;
Running bootstrap
Creating my.ini file
Removing default user
......@@ -29,3 +33,4 @@ skip-name-resolve
[client]
port=3307
# restart
use test;
--source include/windows.inc
select database();
use mysql;
# Create database in tmp directory using mysql_install_db.exe,
# and start server from this directory.
......@@ -87,4 +89,5 @@ perl;
EOF
rmdir $_BASEDIR;
--source include/start_mysqld.inc
use test;
use mysql;
Running bootstrap
Creating my.ini file
Removing default user
......@@ -12,3 +13,4 @@ DATADIR/
# Kill the server
connection default;
# restart
use test;
--source include/windows.inc
--source include/check_utf8_cli.inc
use mysql;
# Create database in tmp directory using mysql_install_db.exe,
# and start server from this directory.
let $ddir= $MYSQLTEST_VARDIR/tmp/датадир;
......@@ -32,4 +32,5 @@ rmdir $ddir;
connection default;
--source include/start_mysqld.inc
use test;
......@@ -9,7 +9,7 @@ let $sc_exe= C:\Windows\System32\sc.exe;
let $ddir= $MYSQLTEST_VARDIR/tmp/$datadir_name;
let $service_name=$service_name_prefix$MASTER_MYPORT;
use mysql;
error 0,1;
rmdir $ddir;
......@@ -72,4 +72,3 @@ rmdir $ddir;
#restart original server
connection default;
source include/start_mysqld.inc;
use mysql;
# run mysql_install_db with --service parameter
# Start service
# Connect with root user password=password
......
use mysql;
# run mysql_install_db with --service parameter
# Start service
# Connect with root user password=パスワード
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment