diff options
author | unknown <guilhem@mysql.com> | 2003-09-25 00:14:46 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-09-25 00:14:46 +0200 |
commit | dae13b541540953f11397d70f482b77d07699f77 (patch) | |
tree | 5d0a4646226c2ebce870b175a81f47d772220f12 /mysql-test/t/rpl_loaddata.test | |
parent | 699f3175fe5e28b5e017dbd73a6dafa21d8a410b (diff) | |
download | mariadb-git-dae13b541540953f11397d70f482b77d07699f77.tar.gz |
Fix for BUG#1391:
"If LOAD DATA INFILE 'small_file' fails on master, slave leaves temp files"
(the bug is in the master)
mysql-test/r/rpl_loaddata.result:
result update
mysql-test/std_data/rpl_loaddata2.dat:
change to introduce a unique key violation
mysql-test/t/rpl_loaddata.test:
testcase for bug#1391.
sql/sql_load.cc:
fix for bug#1391:
for a small file, we had in the binlog only the Create_file, not the Delete_file
(the Create_file was written when the READ_INFO was destroyed).
Diffstat (limited to 'mysql-test/t/rpl_loaddata.test')
-rw-r--r-- | mysql-test/t/rpl_loaddata.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 4c4ff6a093e..a3bb8c9aec9 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -112,3 +112,18 @@ stop slave; reset slave; --replace_result $MASTER_MYPORT MASTER_PORT show slave status; + +# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE + +connection master; +reset master; +create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), +unique(day)); +--error 1062; +load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +# To test that there is Create_file & Delete_file, we test if the binlog is as +# long as expected (can't do SHOW BINLOG EVENTS because of varying file_id). +show master status; +drop table t2; |