1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field

Disable IDENTITY_SUBST propagation for ZEROFILL columns,
as discussed with Sergei.
This commit is contained in:
Alexander Barkov
2015-09-11 15:41:53 +04:00
parent df9b8aee58
commit 9158212a27
12 changed files with 201 additions and 38 deletions

View File

@ -4535,3 +4535,30 @@ set global max_allowed_packet=default;
#
# End of 5.6 tests
#
#
# Start of 10.1 tests
#
#
# MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
#
CREATE TABLE t1 (a BIGINT(20) ZEROFILL);
INSERT INTO t1 VALUES (18446744073709551615),(0);
SELECT * FROM t1 WHERE a=18446744073709551615;
a
18446744073709551615
SELECT * FROM t1 WHERE FORMAT(a,0)='18,446,744,073,709,551,615';
a
18446744073709551615
SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
a
18446744073709551615
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 18446744073709551615) and (format(`test`.`t1`.`a`,0) = '18,446,744,073,709,551,615'))
DROP TABLE t1;
#
# End of 10.1 tests
#