summaryrefslogtreecommitdiff
path: root/mysql-test/t/compare.test
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-09-23 13:47:52 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-09-23 14:11:48 +0530
commitab9f378b0bed85f67cdaf5868af19f814e6bdfe1 (patch)
tree073c779b3bcbc03088e419b5bb67125b6fc3ba92 /mysql-test/t/compare.test
parent2931fd2917cc130e34e5f3d9d6c571a2b013e49c (diff)
downloadmariadb-git-ab9f378b0bed85f67cdaf5868af19f814e6bdfe1.tar.gz
Backporting 273d8eb12c40a6dcd05a8148bdfba3f1fd96e764 Proper fix for disabling warnings in read_statistics_for_table()
Diffstat (limited to 'mysql-test/t/compare.test')
-rw-r--r--mysql-test/t/compare.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/compare.test b/mysql-test/t/compare.test
index d2b2a7e5523..38bda6754d8 100644
--- a/mysql-test/t/compare.test
+++ b/mysql-test/t/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;