summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-11-21 10:33:09 +0000
committerSergei Petrunia <psergey@askmonty.org>2016-11-21 10:33:09 +0000
commit6fb94c3e430df86e8b585599a28f3208c5615081 (patch)
tree07662354975cac635d4fb1ded99430996e586a8e /mysql-test/r
parent3876f461a8baa4e878baf4604543c14b938905a6 (diff)
downloadmariadb-git-6fb94c3e430df86e8b585599a28f3208c5615081.tar.gz
MDEV-11320: MariaRocks: rocksdb.type_text_indexes fails
Backport the fix for BUG#81810 from facebook/mysql-5.6 tree. Added the original testcase. rocksdb.type_text_indexes still fails due to another problem.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ctype_collate.result35
-rw-r--r--mysql-test/r/myisam.result2
2 files changed, 36 insertions, 1 deletions
diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result
index f84613e086f..8ddc4e9a80a 100644
--- a/mysql-test/r/ctype_collate.result
+++ b/mysql-test/r/ctype_collate.result
@@ -719,3 +719,38 @@ DROP FUNCTION getText;
DROP DATABASE test1;
USE test;
SET NAMES latin1;
+#
+# MDEV-11320, MySQL BUG#81810: Inconsistent sort order for blob/text between InnoDB and filesort
+#
+CREATE TABLE t1 (
+b LONGTEXT CHARACTER SET "latin1" COLLATE "latin1_bin",
+KEY b (b(32))
+);
+INSERT INTO t1 (b) VALUES ('a'), (_binary 0x1), (_binary 0x0), ('');
+drop table t1;
+CREATE TABLE t1 (
+b LONGTEXT CHARACTER SET "latin1" COLLATE "latin1_bin",
+PRIMARY KEY b (b(32))
+);
+INSERT INTO t1 (b) VALUES ('a'), (_binary 0x1), (_binary 0x0), ('');
+explain
+select hex(b) from t1 force index (PRIMARY) where b<'zzz';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 34 NULL 4 Using where
+select hex(b) from t1 force index (PRIMARY) where b<'zzz';
+hex(b)
+00
+01
+
+61
+explain
+select hex(b) from t1 where b<'zzz' order by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using where; Using filesort
+select hex(b) from t1 where b<'zzz' order by b;
+hex(b)
+00
+01
+
+61
+drop table t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 898609e1ec2..c47a9b9fc06 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1108,8 +1108,8 @@ length(c1) c1
0
SELECT DISTINCT length(c1), c1 FROM t1 ORDER BY c1;
length(c1) c1
-0
2 A
+0
2 B
DROP TABLE t1;
End of 4.1 tests