mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -1,3 +1,7 @@
|
||||
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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
use mysql;
|
||||
Running bootstrap
|
||||
Creating my.ini file
|
||||
Removing default user
|
||||
@ -12,3 +13,4 @@ DATADIR/
|
||||
# Kill the server
|
||||
connection default;
|
||||
# restart
|
||||
use test;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--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;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
use mysql;
|
||||
# run mysql_install_db with --service parameter
|
||||
# Start service
|
||||
# Connect with root user password=password
|
||||
|
@ -1,3 +1,4 @@
|
||||
use mysql;
|
||||
# run mysql_install_db with --service parameter
|
||||
# Start service
|
||||
# Connect with root user password=パスワード
|
||||
|
Reference in New Issue
Block a user