1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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
This commit is contained in:
Vladislav Vaintroub
2022-08-26 00:38:00 +02:00
parent 125e172a2b
commit f97c8f7ece
7 changed files with 15 additions and 3 deletions

View File

@ -1,4 +1,6 @@
--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;