mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Remove file before writing to it.
This commit is contained in:
parent
5e4b4ca6ab
commit
a5eab2c65f
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue