1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -190,3 +190,21 @@ insert into t1 values (null,'contraction\'s');
insert into t1 values (-15818,'requirement\'s');
select encrypt(f1,f2) as a from t1,(select encrypt(f1,f2) as b from t1) a;
drop table t1;
#
# Start of 10.1 tests
#
#
# MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
#
CREATE TABLE t1 (a INT(6) ZEROFILL);
INSERT INTO t1 VALUES (1),(2);
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE a=1 AND DES_ENCRYPT('test',a)=_latin1 'abc' COLLATE latin1_bin;
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` = 1) and (des_encrypt('test',`test`.`t1`.`a`) = 'abc'))
DROP TABLE t1;
#
# End of 10.1 tests
#