summaryrefslogtreecommitdiff
path: root/mysql-test/t/loaddata.test
diff options
context:
space:
mode:
authorSven Sandberg <sven@mysql.com>2008-07-04 11:33:34 +0200
committerSven Sandberg <sven@mysql.com>2008-07-04 11:33:34 +0200
commitfb17cbe42e9cb2e4a783bf6584a0ad887b782df4 (patch)
tree248c9874596778a4ce859f43860ce1b93a1109fb /mysql-test/t/loaddata.test
parent43e396c8d58035e98afd3942dc893766bd2a60dd (diff)
downloadmariadb-git-fb17cbe42e9cb2e4a783bf6584a0ad887b782df4.tar.gz
BUG#37858: loaddata,rpl_slave_skip,rpl_innodb_mixed_dml fail if datafile not world-readable
Problem 1: main.loaddata tried to trigger an error caused by reading files outside the vardir, by reading itself. However, if loaddata.test is not world-readable (e.g., umask=0077), then another error is triggered. Fix 1: allow the other error too. Problem 2: rpl_slave_skip and rpl_innodb_mixed_dml tried to copy a file from mysql-test/suite/rpl/data to mysql-test/var and then read it. That failed too if umask=0077, since the file would not become world-readable. Fix 2: move the files from mysql-test/suite/rpl/data to mysql-test/std_data and update tests accordingly. Remove the directory mysql-test/suite/rpl/data. mysql-test/r/loaddata.result: Updated result file. mysql-test/std_data/rpl_bug28618.dat: Moved this file to std_data. mysql-test/std_data/rpl_mixed.dat: Moved this file to std_data. mysql-test/suite/rpl/data: Removed directory that is now unused. mysql-test/suite/rpl/include/rpl_mixed_dml.inc: The rpl_mixed.dat file has been moved. Updated the test to use the new location. mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Updated result file. mysql-test/suite/rpl/r/rpl_slave_skip.result: Updated result file. mysql-test/suite/rpl/t/rpl_slave_skip.test: The rpl_bug28618.dat file has been moved. Updated the test to use the new location. mysql-test/t/loaddata.test: Allow more error messages. ER_TEXTFILE_NOT_READABLE may happen if the file is not world-readable (which may happen, e.g., if the user has umask=0077).
Diffstat (limited to 'mysql-test/t/loaddata.test')
-rw-r--r--mysql-test/t/loaddata.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 9d319d4820c..bc35b652f57 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -163,7 +163,7 @@ set @@secure_file_priv= 0;
# Test "load data"
truncate table t1;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---error 1290
+--error ER_OPTION_PREVENTS_STATEMENT, ER_TEXTFILE_NOT_READABLE
eval load data infile '$MYSQL_TEST_DIR/t/loaddata.test' into table t1;
select * from t1;