summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2005-11-05 15:08:15 +0300
committerunknown <petr@mysql.com>2005-11-05 15:08:15 +0300
commit1b65c7041383073eee99deebe8569399f06e83ee (patch)
treea6335f069379fe5794cf0e612aec3dac43c25755 /mysql-test
parent57923440f3711dd6287df9d8f54e94b9031c7ec0 (diff)
downloadmariadb-git-1b65c7041383073eee99deebe8569399f06e83ee.tar.gz
Fix Bug#13894 Server crashes on update of CSV table
mysql-test/r/csv.result: update result file mysql-test/t/csv.test: Add test for a bug sql/examples/ha_tina.cc: sort function should return reverted values for chains to be sorted in the right orded. don't do a strange memmove
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/csv.result20
-rw-r--r--mysql-test/t/csv.test18
2 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index ea0d34271b5..78a1f34636c 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -4929,3 +4929,23 @@ Warnings:
Note 1051 Unknown table 't2'
Note 1051 Unknown table 't3'
Note 1051 Unknown table 't4'
+DROP TABLE IF EXISTS bug13894;
+CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+INSERT INTO bug13894 VALUES (5);
+INSERT INTO bug13894 VALUES (10);
+INSERT INTO bug13894 VALUES (11);
+INSERT INTO bug13894 VALUES (10);
+SELECT * FROM bug13894;
+val
+5
+10
+11
+10
+UPDATE bug13894 SET val=6 WHERE val=10;
+SELECT * FROM bug13894;
+val
+5
+11
+6
+6
+DROP TABLE bug13894;
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 2ac46d75f9a..61b4f9607a5 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1314,4 +1314,22 @@ select period from t1;
drop table if exists t1,t2,t3,t4;
+#
+# Bug #13894 Server crashes on update of CSV table
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS bug13894;
+--enable_warnings
+
+CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
+INSERT INTO bug13894 VALUES (5);
+INSERT INTO bug13894 VALUES (10);
+INSERT INTO bug13894 VALUES (11);
+INSERT INTO bug13894 VALUES (10);
+SELECT * FROM bug13894;
+UPDATE bug13894 SET val=6 WHERE val=10;
+SELECT * FROM bug13894;
+DROP TABLE bug13894;
+
# End of 4.1 tests