summaryrefslogtreecommitdiff
path: root/mysql-test/main/compare.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/compare.test')
-rw-r--r--mysql-test/main/compare.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/compare.test b/mysql-test/main/compare.test
index d2b2a7e5523..38bda6754d8 100644
--- a/mysql-test/main/compare.test
+++ b/mysql-test/main/compare.test
@@ -94,3 +94,17 @@ DROP TABLE t1;
CREATE TABLE t1(a INT ZEROFILL);
SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2;
DROP TABLE t1;
+
+#
+# Check what happens when comparing to long string
+#
+
+CREATE TABLE t1 (a char(2), index (a));
+insert into t1 values ("aa"),("bb");
+select * from t1 where a="aa";
+select * from t1 where a="aaa";
+select * from t1 where a="aa ";
+select * from t1 where a>="aaa";
+explain select * from t1 where a="aaa";
+explain select * from t1 where a="aa ";
+drop table t1;