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 | 558aeb0f0bfd83726ffe84f5739c0317df48980c (patch) | |
tree | 3f66f5e61fc025c642ab1bd7a6ce7d6e83813072 /mysql-test/r/csv.result | |
parent | bd8b9746bfbb620b0f37d030169e2ae459aec4de (diff) | |
download | mariadb-git-558aeb0f0bfd83726ffe84f5739c0317df48980c.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/r/csv.result')
-rw-r--r-- | mysql-test/r/csv.result | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 5076220f74b..6335d890a95 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -4945,8 +4945,6 @@ SELECT * FROM bug13894; val 6 6 -5 -11 DROP TABLE bug13894; DROP TABLE IF EXISTS bug14672; CREATE TABLE bug14672 (c1 integer) engine = CSV; @@ -5291,4 +5289,20 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1(a int) engine=csv; +insert into t1 values (0), (1), (2); +delete from t1 limit 2; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1; +a +2 +delete from t1; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1; +a +drop table t1; End of 5.1 tests |