1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-15 08:21:24 +03:00

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.
This commit is contained in:
Sven Sandberg
2008-07-04 11:33:34 +02:00
parent 079fa90b8d
commit eb05cd9e4f
8 changed files with 10 additions and 11 deletions

View File

@@ -51,9 +51,8 @@ DELETE FROM t2 WHERE a = 2;
--echo
--echo ******************** LOAD DATA INFILE ********************
--copy_file suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
SELECT * FROM t1 ORDER BY a;
--source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc
@@ -329,6 +328,7 @@ DROP VIEW v2;
--echo ******************** SHOW BINLOG EVENTS ********************
--replace_column 2 # 5 #
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show binlog events from 1;
sync_slave_with_master;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID