summaryrefslogtreecommitdiff
path: root/mysql-test/t/csv.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/csv.test')
-rw-r--r--mysql-test/t/csv.test49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index c7c7f3e13ab..4aff4b27976 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1674,3 +1674,52 @@ CREATE TABLE `bug21328` (
insert into bug21328 values (1,NULL,NULL);
alter table bug21328 engine=myisam;
drop table bug21328;
+
+#
+# BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table make server
+# crash
+#
+create table t1(a blob, b int) engine=csv;
+insert into t1 values('a', 1);
+flush tables;
+update t1 set b=2;
+select * from t1;
+drop table t1;
+
+#
+# Bug #29353: negative values
+#
+create table t1(a int) engine=csv;
+insert into t1 values(-1), (-123.34), (2), (-23);
+select * from t1;
+check table t1;
+drop table t1;
+
+create table t1(a int, b int) engine=csv;
+--write_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV
+1, 1E-2
+-2E2, .9
+-10E-1, -.9
+-1, -100.1
+1a, -2b
+EOF
+repair table t1;
+check table t1;
+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