summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-09-11 15:41:53 +0400
committerAlexander Barkov <bar@mariadb.org>2015-09-11 15:41:53 +0400
commit9158212a276cc7cef7907d38ac754773a320a1ec (patch)
treed789f5ca882a7478a09c28808c302251b43eaef5 /mysql-test/t/func_str.test
parentdf9b8aee5879fa2b6e47ed02fff4e6fbb45f720f (diff)
downloadmariadb-git-9158212a276cc7cef7907d38ac754773a320a1ec.tar.gz
MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
Disable IDENTITY_SUBST propagation for ZEROFILL columns, as discussed with Sergei.
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 726397bc2a7..14af10b0320 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1750,3 +1750,24 @@ set global max_allowed_packet=default;
--echo #
--echo # End of 5.6 tests
--echo #
+
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
+--echo #
+CREATE TABLE t1 (a BIGINT(20) ZEROFILL);
+INSERT INTO t1 VALUES (18446744073709551615),(0);
+SELECT * FROM t1 WHERE a=18446744073709551615;
+SELECT * FROM t1 WHERE FORMAT(a,0)='18,446,744,073,709,551,615';
+SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
+# This should not propagate the equality into FORMAT()
+EXPLAIN EXTENDED
+SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.1 tests
+--echo #