mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/timka/mysql/src/4.1-virgin
into mysql.com:/home/timka/mysql/src/4.1-bug-11185
This commit is contained in:
@ -556,11 +556,42 @@ count(*)
|
||||
0
|
||||
select count(*) from t1 where x > -16;
|
||||
count(*)
|
||||
1
|
||||
2
|
||||
select count(*) from t1 where x = 18446744073709551601;
|
||||
count(*)
|
||||
1
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned);
|
||||
create index t1i on t1(a);
|
||||
insert into t1 select 18446744073709551615;
|
||||
insert into t1 select 18446744073709551614;
|
||||
explain select * from t1 where a <> -1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index
|
||||
select * from t1 where a <> -1;
|
||||
a
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
explain select * from t1 where a > -1 or a < -1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index
|
||||
select * from t1 where a > -1 or a < -1;
|
||||
a
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
explain select * from t1 where a > -1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index t1i t1i 9 NULL 2 Using where; Using index
|
||||
select * from t1 where a > -1;
|
||||
a
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
explain select * from t1 where a < -1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
select * from t1 where a < -1;
|
||||
a
|
||||
drop table t1;
|
||||
set names latin1;
|
||||
create table t1 (a char(10), b text, key (a)) character set latin1;
|
||||
INSERT INTO t1 (a) VALUES
|
||||
|
@ -423,14 +423,30 @@ select count(*) from t1 where x=0;
|
||||
select count(*) from t1 where x<0;
|
||||
select count(*) from t1 where x < -16;
|
||||
select count(*) from t1 where x = -16;
|
||||
# The following query returns wrong value because the range optimizer can't
|
||||
# handle search on a signed value for an unsigned parameter. This will be fixed in
|
||||
# 5.0
|
||||
select count(*) from t1 where x > -16;
|
||||
select count(*) from t1 where x = 18446744073709551601;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #11185 incorrect comparison of unsigned int to signed constant
|
||||
#
|
||||
create table t1 (a bigint unsigned);
|
||||
create index t1i on t1(a);
|
||||
insert into t1 select 18446744073709551615;
|
||||
insert into t1 select 18446744073709551614;
|
||||
|
||||
explain select * from t1 where a <> -1;
|
||||
select * from t1 where a <> -1;
|
||||
explain select * from t1 where a > -1 or a < -1;
|
||||
select * from t1 where a > -1 or a < -1;
|
||||
explain select * from t1 where a > -1;
|
||||
select * from t1 where a > -1;
|
||||
explain select * from t1 where a < -1;
|
||||
select * from t1 where a < -1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6045: Binary Comparison regression in MySQL 4.1
|
||||
# Binary searches didn't use a case insensitive index.
|
||||
|
Reference in New Issue
Block a user