Skip to content

Commit 57d5265

Browse files
vaintroubvuvova
authored andcommitted
MDEV-26713 UTF8 support on Windows , add mysql_install_db tests
Add mysql_install_db test with some i18n, for data dir and root password
1 parent 825f9c7 commit 57d5265

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Running bootstrap
2+
Creating my.ini file
3+
Removing default user
4+
Allowing remote access for user root
5+
Setting root password
6+
Creation of the database was successful
7+
# Kill the server
8+
connect con1,localhost,root,パスワード,mysql;
9+
SELECT @@datadir;
10+
@@datadir
11+
DATADIR/
12+
# Kill the server
13+
connection default;
14+
# restart
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--source include/windows.inc
2+
--source include/check_utf8_cli.inc
3+
4+
# Create database in tmp directory using mysql_install_db.exe,
5+
# and start server from this directory.
6+
let $ddir= $MYSQLTEST_VARDIR/tmp/датадир;
7+
--error 0,1
8+
rmdir $ddir;
9+
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=パスワード -R;
10+
--source include/kill_mysqld.inc
11+
12+
# Note "restart" via MTR does not work, if server's command line has
13+
# non-ASCII characters used (or, characters outside of ANSI codepage).
14+
# This is a perl limitation, which is worked around in this test -
15+
# the server started in background, via exec $MYSQLD
16+
17+
--replace_result $MYSQLD MYSQLD $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
18+
exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --datadir=$ddir --loose-innodb > NUL 2>&1 &;
19+
--enable_reconnect
20+
--source include/wait_until_connected_again.inc
21+
--disable_reconnect
22+
23+
connect (con1,localhost,root,パスワード,mysql);
24+
25+
# Smoke test - check that we're actually using datadir
26+
# we've created (i.e restart_parameters worked)
27+
--replace_result $ddir DATADIR
28+
SELECT @@datadir;
29+
# restart in the original datadir again
30+
--source include/kill_mysqld.inc
31+
rmdir $ddir;
32+
33+
connection default;
34+
--source include/start_mysqld.inc
35+

0 commit comments

Comments
 (0)