mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bugs
This commit is contained in:
commit
69a1579af0
3 changed files with 79 additions and 0 deletions
|
@ -87,3 +87,42 @@ drop table t1;
|
|||
SELECT '0x8000000000000001'+0;
|
||||
'0x8000000000000001'+0
|
||||
0
|
||||
create table t1 (
|
||||
value64 bigint unsigned not null,
|
||||
value32 integer not null,
|
||||
primary key(value64, value32)
|
||||
);
|
||||
create table t2 (
|
||||
value64 bigint unsigned not null,
|
||||
value32 integer not null,
|
||||
primary key(value64, value32)
|
||||
);
|
||||
insert into t1 values(17156792991891826145, 1);
|
||||
insert into t1 values( 9223372036854775807, 2);
|
||||
insert into t2 values(17156792991891826145, 3);
|
||||
insert into t2 values( 9223372036854775807, 4);
|
||||
select * from t1;
|
||||
value64 value32
|
||||
9223372036854775807 2
|
||||
17156792991891826145 1
|
||||
select * from t2;
|
||||
value64 value32
|
||||
9223372036854775807 4
|
||||
17156792991891826145 3
|
||||
select * from t1, t2 where t1.value64=17156792991891826145 and
|
||||
t2.value64=17156792991891826145;
|
||||
value64 value32 value64 value32
|
||||
17156792991891826145 1 17156792991891826145 3
|
||||
select * from t1, t2 where t1.value64=17156792991891826145 and
|
||||
t2.value64=t1.value64;
|
||||
value64 value32 value64 value32
|
||||
17156792991891826145 1 17156792991891826145 3
|
||||
select * from t1, t2 where t1.value64= 9223372036854775807 and
|
||||
t2.value64=9223372036854775807;
|
||||
value64 value32 value64 value32
|
||||
9223372036854775807 2 9223372036854775807 4
|
||||
select * from t1, t2 where t1.value64= 9223372036854775807 and
|
||||
t2.value64=t1.value64;
|
||||
value64 value32 value64 value32
|
||||
9223372036854775807 2 9223372036854775807 4
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -71,3 +71,36 @@ drop table t1;
|
|||
# atof() behaviour is different of different systems. to be fixed in 4.1
|
||||
SELECT '0x8000000000000001'+0;
|
||||
|
||||
# Test for BUG#8562: joins over BIGINT UNSIGNED value + constant propagation
|
||||
create table t1 (
|
||||
value64 bigint unsigned not null,
|
||||
value32 integer not null,
|
||||
primary key(value64, value32)
|
||||
);
|
||||
|
||||
create table t2 (
|
||||
value64 bigint unsigned not null,
|
||||
value32 integer not null,
|
||||
primary key(value64, value32)
|
||||
);
|
||||
|
||||
insert into t1 values(17156792991891826145, 1);
|
||||
insert into t1 values( 9223372036854775807, 2);
|
||||
insert into t2 values(17156792991891826145, 3);
|
||||
insert into t2 values( 9223372036854775807, 4);
|
||||
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
select * from t1, t2 where t1.value64=17156792991891826145 and
|
||||
t2.value64=17156792991891826145;
|
||||
select * from t1, t2 where t1.value64=17156792991891826145 and
|
||||
t2.value64=t1.value64;
|
||||
|
||||
select * from t1, t2 where t1.value64= 9223372036854775807 and
|
||||
t2.value64=9223372036854775807;
|
||||
select * from t1, t2 where t1.value64= 9223372036854775807 and
|
||||
t2.value64=t1.value64;
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
|
|
|
@ -997,6 +997,8 @@ public:
|
|||
The following class is used to optimize comparing of date and bigint columns
|
||||
We need to save the original item, to be able to set the field to the
|
||||
original value in 'opt_range'.
|
||||
An instance of Item_int_with_ref may refer to a signed or an unsigned
|
||||
integer.
|
||||
*/
|
||||
|
||||
class Item_int_with_ref :public Item_int
|
||||
|
@ -1011,6 +1013,11 @@ public:
|
|||
{
|
||||
return ref->save_in_field(field, no_conversions);
|
||||
}
|
||||
Item *new_item()
|
||||
{
|
||||
return (ref->unsigned_flag)? new Item_uint(ref->name, ref->max_length) :
|
||||
new Item_int(ref->name, ref->max_length);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue