Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
59c999fc
Commit
59c999fc
authored
Jun 30, 2020
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-23052 - add mysql_install_db.exe test with existing directory.
parent
17ce75b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
mysql-test/main/mysql_install_db_win.result
mysql-test/main/mysql_install_db_win.result
+2
-0
mysql-test/main/mysql_install_db_win.test
mysql-test/main/mysql_install_db_win.test
+24
-0
No files found.
mysql-test/main/mysql_install_db_win.result
View file @
59c999fc
...
...
@@ -11,5 +11,7 @@ SELECT @@datadir;
@@datadir
DATADIR/
# Kill the server
1
FOUND 1 /is not empty. Only new or empty existing directories are accepted for --datadir/ in install.log
connection default;
# restart
mysql-test/main/mysql_install_db_win.test
View file @
59c999fc
...
...
@@ -18,6 +18,30 @@ SELECT @@datadir;
# restart in the original datadir again
--
source
include
/
kill_mysqld
.
inc
rmdir
$ddir
;
# MDEV-23052
# 1. mysql_install_db works on existing, empty directory
mkdir
$ddir
;
exec
$MYSQL_INSTALL_DB_EXE
--
datadir
=
$ddir
--
password
=
foo
-
R
>
/
dev
/
null
;
rmdir
$ddir
;
# 2. mysql_install_db rejects existing, non-empty directory, and does not
# remove it.
mkdir
$ddir
;
write_file
$ddir
/
1
;
EOF
error
1
;
exec
$MYSQL_INSTALL_DB_EXE
--
datadir
=
$ddir
--
password
=
foo
-
R
>
$MYSQLTEST_VARDIR
/
tmp
/
install
.
log
2
>&
1
;
list_files
$ddir
;
let
$log
=
$MYSQLTEST_VARDIR
/
tmp
/
install
.
log
;
let
SEARCH_FILE
=
$log
;
let
SEARCH_PATTERN
=
is
not
empty
.
Only
new
or
empty
existing
directories
are
accepted
for
--
datadir
;
--
source
include
/
search_pattern_in_file
.
inc
remove_file
$log
;
rmdir
$ddir
;
let
$restart_parameters
=
;
connection
default
;
--
source
include
/
start_mysqld
.
inc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment