summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-11-22 21:16:11 +0100
committerunknown <serg@serg.mylan>2005-11-22 21:16:11 +0100
commit16213b21e0bba2998b428c0dd38ee82f0b7ed0c9 (patch)
tree8b0c93084a2c03c2877eb9a5d259f1a4bd559b2b /mysql-test
parent57e1c5aa9a56bbe75f3a0bc8344b3a1346438bbb (diff)
parent3a84f6e258941330ab726a055cb194bc951f2045 (diff)
downloadmariadb-git-16213b21e0bba2998b428c0dd38ee82f0b7ed0c9.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0 sql/share/errmsg.txt: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/csv.result24
-rw-r--r--mysql-test/t/csv.test32
2 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index 2e3d11ad461..3c87c1f4b92 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -4976,3 +4976,27 @@ c1
4
5
DROP TABLE bug14672;
+create table t1 (a int) engine=csv;
+insert t1 values (1);
+delete from t1;
+affected rows: 1
+delete from t1;
+affected rows: 0
+insert t1 values (1),(2);
+delete from t1;
+affected rows: 2
+insert t1 values (1),(2),(3);
+flush tables;
+delete from t1;
+affected rows: 3
+insert t1 values (1),(2),(3),(4);
+flush tables;
+select count(*) from t1;
+count(*)
+4
+delete from t1;
+affected rows: 4
+insert t1 values (1),(2),(3),(4),(5);
+truncate table t1;
+affected rows: 0
+drop table t1;
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 5b693335a43..a028f6ced6d 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1352,3 +1352,35 @@ SELECT * FROM bug14672;
DROP TABLE bug14672;
# End of 4.1 tests
+
+#
+# BUG#13406 - incorrect amount of "records deleted"
+#
+
+create table t1 (a int) engine=csv;
+insert t1 values (1);
+--enable_info
+delete from t1; -- delete_row
+delete from t1; -- delete_all_rows
+--disable_info
+insert t1 values (1),(2);
+--enable_info
+delete from t1; -- delete_all_rows
+--disable_info
+insert t1 values (1),(2),(3);
+flush tables;
+--enable_info
+delete from t1; -- delete_row
+--disable_info
+insert t1 values (1),(2),(3),(4);
+flush tables;
+select count(*) from t1;
+--enable_info
+delete from t1; -- delete_all_rows
+--disable_info
+insert t1 values (1),(2),(3),(4),(5);
+--enable_info
+truncate table t1; -- truncate
+--disable_info
+drop table t1;
+