diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-07-05 11:55:06 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-07-05 11:55:06 +0500 |
commit | 10738fa6882c48fa5eb5305a71c2ffb2799da9a4 (patch) | |
tree | 3f66f5e61fc025c642ab1bd7a6ce7d6e83813072 /mysql-test/t/csv.test | |
parent | 0b4373916f7c974c3dc361620c44383a6eb555fc (diff) | |
download | mariadb-git-10738fa6882c48fa5eb5305a71c2ffb2799da9a4.tar.gz |
Fix for bug #29411: deleting from a csv table leads to the table corruption
Problem: we don't adjust share->rows_recorded and local_saved_data_file_length
deleting rows from a CSV table, so following table check may fail.
Fix: properly adjust those values.
mysql-test/r/csv.result:
Fix for bug #29411: deleting from a csv table leads to the table corruption
- test result.
mysql-test/t/csv.test:
Fix for bug #29411: deleting from a csv table leads to the table corruption
- test case.
storage/csv/ha_tina.cc:
Fix for bug #29411: deleting from a csv table leads to the table corruption
- decrement share->rows_recorded in the ha_tina::delete_row().
- set share->rows_recorded and local_saved_data_file_length to 0 in the
ha_tina::delete_all_rows().
- adjust local_saved_data_file_length after cleaning up in the
ha_tina::rnd_end().
Diffstat (limited to 'mysql-test/t/csv.test')
-rw-r--r-- | mysql-test/t/csv.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 6d24b38ee10..26051da24aa 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1698,4 +1698,17 @@ select * from t1; check table t1; drop table t1; +# +# Bug #29411: deleting from a csv table leads to the table corruption +# +create table t1(a int) engine=csv; +insert into t1 values (0), (1), (2); +delete from t1 limit 2; +check table t1; +select * from t1; +delete from t1; +check table t1; +select * from t1; +drop table t1; + --echo End of 5.1 tests |