3
drop table if exists t1,t2;
7
# Testing of the <=> operator
11
# First some simple tests
14
select 0<=>0,0.0<=>0.0,0E0=0E0,"A"<=>"A",NULL<=>NULL;
15
select 1<=>0,0<=>NULL,NULL<=>0;
16
select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0;
17
select "A"<=>"B","A"<=>NULL,NULL<=>"A";
18
select 0<=>0.0, 0.0<=>0E0, 0E0<=>"0", 10.0<=>1E1, 10<=>10.0, 10<=>1E1;
19
select 1.0<=>0E1,10<=>NULL,NULL<=>0.0, NULL<=>0E0;
25
create table t1 (id int, value int);
26
create table t2 (id int, value int);
28
insert into t1 values (1,null);
29
insert into t2 values (1,null);
31
select t1.*, t2.*, t1.value<=>t2.value from t1, t2 where t1.id=t2.id and t1.id=1;
32
select * from t1 where id <=>id;
33
select * from t1 where value <=> value;
34
select * from t1 where id <=> value or value<=>id;
38
# Bug #12612: quoted bigint unsigned value and the use of "in" in where clause
40
create table t1 (a bigint unsigned);
41
insert into t1 values (4828532208463511553);
42
select * from t1 where a = '4828532208463511553';
43
select * from t1 where a in ('4828532208463511553');