summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/compare.result3
-rw-r--r--mysql-test/t/compare.test3
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result
index bf8a5106044..49ec2dd85cc 100644
--- a/mysql-test/r/compare.result
+++ b/mysql-test/r/compare.result
@@ -36,3 +36,6 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
6109 -1 -1
61 0 0
DROP TABLE t1;
+SELECT CHAR(31) = '', '' = CHAR(31);
+CHAR(31) = '' '' = CHAR(31)
+0 0
diff --git a/mysql-test/t/compare.test b/mysql-test/t/compare.test
index b0cef48dd3f..e3c042e608a 100644
--- a/mysql-test/t/compare.test
+++ b/mysql-test/t/compare.test
@@ -30,3 +30,6 @@ CREATE TABLE t1 (a char(10) not null);
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
DROP TABLE t1;
+
+# Bug #8134: Comparison against CHAR(31) at end of string
+SELECT CHAR(31) = '', '' = CHAR(31);