Browse Source

Add back testcase for lp:817966 (was lost in the merge)

pull/843/head
Sergey Petrunya 14 years ago
parent
commit
f8f65accf9
  1. 13
      mysql-test/r/func_in.result
  2. 18
      mysql-test/t/func_in.test

13
mysql-test/r/func_in.result

@ -789,6 +789,19 @@ DROP TABLE t1;
# End of test BUG#13012483
#
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
select * from t1 where b in ('2.1');
a b
select * from t1 where a='2.1';
a b
select * from t1 where b='2.1';
a b
select * from t1 where IF(1,a,a)='2.1';
a b
drop table t1;
#
# LP bug#992380 Crash when creating PS for a query with
# subquery in WHERE (see also mysql bug#13012483)

18
mysql-test/t/func_in.test

@ -577,6 +577,24 @@ DROP TABLE t1;
--echo #
--echo End of 5.1 tests
#
# lp:817966 int_column IN (string_constant)
#
# rather illogically, when BIGINT field is compared to a string,
# the string is converted to an integer, not to a double.
# When some other integer field (not BIGINT) is compared to a string,
# or when the BIGINT is not a field, but an expression, both
# operands are compared as doubles. The latter behavior is correct,
# according to the manual.
#
create table t1 (a bigint, b int);
insert t1 values (1,1),(2,2),(3,3);
select * from t1 where a in ('2.1');
select * from t1 where b in ('2.1');
select * from t1 where a='2.1';
select * from t1 where b='2.1';
select * from t1 where IF(1,a,a)='2.1';
drop table t1;
--echo #
--echo # LP bug#992380 Crash when creating PS for a query with
--echo # subquery in WHERE (see also mysql bug#13012483)

Loading…
Cancel
Save