summaryrefslogtreecommitdiff
path: root/mysql-test/suite/heap
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-10-07 10:54:14 +0200
committerSergei Golubchik <sergii@pisem.net>2014-10-07 10:54:14 +0200
commite5bc21af37c7dc6f388fb89f27f812713d088aa5 (patch)
tree47f5d76a2fc68f71ef1ea11393f9b80817db935a /mysql-test/suite/heap
parentd2e808025aec75fbb0ee37935a862d137a03a9c3 (diff)
downloadmariadb-git-e5bc21af37c7dc6f388fb89f27f812713d088aa5.tar.gz
MDEV-4813 Replication fails on updating a MEMORY table with an index using btree
skip NULL VARCHAR key parts like it's done elsewhere
Diffstat (limited to 'mysql-test/suite/heap')
-rw-r--r--mysql-test/suite/heap/btree_varchar_null.result6
-rw-r--r--mysql-test/suite/heap/btree_varchar_null.test7
2 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/heap/btree_varchar_null.result b/mysql-test/suite/heap/btree_varchar_null.result
new file mode 100644
index 00000000000..9199cf6ef7d
--- /dev/null
+++ b/mysql-test/suite/heap/btree_varchar_null.result
@@ -0,0 +1,6 @@
+create table t1 (f1 varchar(128), f2 varchar(128), key (f2,f1) using btree) engine=memory;
+insert into t1 values (null,'not'),('one',null),('two',null),('three','');
+select * from t1 where f1 = 'one' and f2 is null;
+f1 f2
+one NULL
+drop table t1;
diff --git a/mysql-test/suite/heap/btree_varchar_null.test b/mysql-test/suite/heap/btree_varchar_null.test
new file mode 100644
index 00000000000..8e6625a2bfa
--- /dev/null
+++ b/mysql-test/suite/heap/btree_varchar_null.test
@@ -0,0 +1,7 @@
+#
+# MDEV-4813 Replication fails on updating a MEMORY table with an index using btree
+#
+create table t1 (f1 varchar(128), f2 varchar(128), key (f2,f1) using btree) engine=memory;
+insert into t1 values (null,'not'),('one',null),('two',null),('three','');
+select * from t1 where f1 = 'one' and f2 is null;
+drop table t1;