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

lp:817966 int_column IN (string_constant)

restore the status quo from before the microsecond patch
This commit is contained in:
Sergei Golubchik
2011-10-13 13:44:50 +02:00
parent 76e9131fbe
commit 9f6e24a05a
8 changed files with 64 additions and 23 deletions

View File

@ -544,9 +544,15 @@ id select_type table type possible_keys key key_len ref rows Extra
select f2 from t2 where f2 in ('a','b');
f2
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
explain select f2 from t2 where f2 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
select f2 from t2 where f2 in (1,'b');
f2
0
@ -771,3 +777,18 @@ SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
1
#
End of 5.1 tests
create table t1 (a bigint, b int);
insert t1 values (1,1),(2,2),(3,3);
select * from t1 where a in ('2.1');
a b
2 2
select * from t1 where b in ('2.1');
a b
select * from t1 where a='2.1';
a b
2 2
select * from t1 where b='2.1';
a b
select * from t1 where IF(1,a,a)='2.1';
a b
drop table t1;