1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

cherry picking fix for Bug #39542 from 6.0-runtime

This commit is contained in:
Bjorn Munch
2009-05-27 22:54:40 +02:00
parent f7a645c9cc
commit 444bbe56f5
3 changed files with 92 additions and 1 deletions

View File

@ -545,6 +545,8 @@ mysqltest: At line 1: Failed to open file 'non_existing_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'from_file' to command 'move_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'move_file'
mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode

View File

@ -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
# ----------------------------------------------------------------------------