mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 17:14:30 +02:00
cherry picking fix for Bug #39542 from 6.0-runtime
This commit is contained in:
parent
f7a645c9cc
commit
444bbe56f5
3 changed files with 92 additions and 1 deletions
|
|
@ -1780,6 +1780,56 @@ remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
|||
--error 1
|
||||
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# test for move_file
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# - Check that if source file does not exist, nothing will be created.
|
||||
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
--error 1
|
||||
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
|
||||
# - Check that if source file exists, everything works properly.
|
||||
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
|
||||
file1
|
||||
EOF
|
||||
|
||||
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
|
||||
# - Check that if destination file exists, everything works properly.
|
||||
# (file2.tmp exists from the previous check; file1.tmp needs to be created)
|
||||
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
|
||||
file1
|
||||
EOF
|
||||
|
||||
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
--error 1
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
|
||||
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||
|
||||
# - Check usage.
|
||||
|
||||
--error 1
|
||||
--exec echo "move_file ;" | $MYSQL_TEST 2>&1
|
||||
|
||||
--error 1
|
||||
--exec echo "move_file from_file;" | $MYSQL_TEST 2>&1
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# test for chmod
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue