From a5eab2c65f83f8e559024598e462300c1d7819d4 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.(none)" <> Date: Wed, 8 Aug 2007 16:39:13 +0200 Subject: [PATCH] Remove file before writing to it. --- mysql-test/t/csv.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 4aff4b27976..5c877557dfc 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1424,6 +1424,7 @@ DROP TABLE test_repair_table2; # Corrupt csv file and see if we can repair it CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV; +--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV --write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV "1" "4" @@ -1476,6 +1477,7 @@ CREATE TABLE test_repair_table5 ( ) ENGINE = CSV; # Corrupt a table -- put a file with wrong # of columns +--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV --write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV "1","101","IBM" EOF @@ -1629,6 +1631,7 @@ insert into bug22080_1 values(2,'string'); insert into bug22080_1 values(3,'string'); # Create first corrupt file as described in bug report +--remove_file $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV --write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV 1,"string" 2","string" @@ -1636,6 +1639,7 @@ insert into bug22080_1 values(3,'string'); EOF # Create second corrupt file as described in bug report +--remove_file $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV --write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV 1,"string" "2",string" @@ -1696,6 +1700,7 @@ check table t1; drop table t1; create table t1(a int, b int) engine=csv; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV --write_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV 1, 1E-2 -2E2, .9