Commit 6e53d8f7 authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-wl2278
parents 27538f49 c32fc957
...@@ -554,89 +554,6 @@ select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; ...@@ -554,89 +554,6 @@ select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59';
count(*)-9 count(*)-9
0 0
drop table t1; drop table t1;
create table t1 (
a int primary key,
s decimal(12),
t decimal(12, 5),
u decimal(12) unsigned,
v decimal(12, 5) unsigned,
key (s),
key (t),
key (u),
key (v)
) engine=ndb;
insert into t1 values
( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042),
( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003),
( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488),
( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013),
( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002),
( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018),
( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001),
( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374),
( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000),
( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008);
select count(*)- 5 from t1 use index (s) where s < -000000000007;
count(*)- 5
0
select count(*)- 7 from t1 use index (s) where s <= -000000000007;
count(*)- 7
0
select count(*)- 2 from t1 use index (s) where s = -000000000007;
count(*)- 2
0
select count(*)- 5 from t1 use index (s) where s >= -000000000007;
count(*)- 5
0
select count(*)- 3 from t1 use index (s) where s > -000000000007;
count(*)- 3
0
select count(*)- 4 from t1 use index (t) where t < -0000061.00003;
count(*)- 4
0
select count(*)- 5 from t1 use index (t) where t <= -0000061.00003;
count(*)- 5
0
select count(*)- 1 from t1 use index (t) where t = -0000061.00003;
count(*)- 1
0
select count(*)- 6 from t1 use index (t) where t >= -0000061.00003;
count(*)- 6
0
select count(*)- 5 from t1 use index (t) where t > -0000061.00003;
count(*)- 5
0
select count(*)- 2 from t1 use index (u) where u < 000000000061;
count(*)- 2
0
select count(*)- 4 from t1 use index (u) where u <= 000000000061;
count(*)- 4
0
select count(*)- 2 from t1 use index (u) where u = 000000000061;
count(*)- 2
0
select count(*)- 8 from t1 use index (u) where u >= 000000000061;
count(*)- 8
0
select count(*)- 6 from t1 use index (u) where u > 000000000061;
count(*)- 6
0
select count(*)- 5 from t1 use index (v) where v < 0000965.00042;
count(*)- 5
0
select count(*)- 6 from t1 use index (v) where v <= 0000965.00042;
count(*)- 6
0
select count(*)- 1 from t1 use index (v) where v = 0000965.00042;
count(*)- 1
0
select count(*)- 5 from t1 use index (v) where v >= 0000965.00042;
count(*)- 5
0
select count(*)- 4 from t1 use index (v) where v > 0000965.00042;
count(*)- 4
0
drop table t1;
create table t1(a int primary key, b int not null, index(b)); create table t1(a int primary key, b int not null, index(b));
insert into t1 values (1,1), (2,2); insert into t1 values (1,1), (2,2);
set autocommit=0; set autocommit=0;
......
...@@ -2059,6 +2059,16 @@ call bug6029()| ...@@ -2059,6 +2059,16 @@ call bug6029()|
1136 1136
drop procedure bug6029| drop procedure bug6029|
drop table t3| drop table t3|
drop procedure if exists bug8540|
create procedure bug8540()
begin
declare x int default 1;
select x as y, x+0 as z;
end|
call bug8540()|
y z
1 1
drop procedure bug8540|
drop table if exists fac| drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)| create table fac (n int unsigned not null primary key, f bigint unsigned)|
drop procedure if exists ifac| drop procedure if exists ifac|
......
...@@ -282,55 +282,55 @@ drop table t1; ...@@ -282,55 +282,55 @@ drop table t1;
# decimal (not the new 5.0 thing) # decimal (not the new 5.0 thing)
create table t1 ( #create table t1 (
a int primary key, # a int primary key,
s decimal(12), # s decimal(12),
t decimal(12, 5), # t decimal(12, 5),
u decimal(12) unsigned, # u decimal(12) unsigned,
v decimal(12, 5) unsigned, # v decimal(12, 5) unsigned,
key (s), # key (s),
key (t), # key (t),
key (u), # key (u),
key (v) # key (v)
) engine=ndb; #) engine=ndb;
# ##
insert into t1 values #insert into t1 values
( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), # ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042),
( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), # ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003),
( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), # ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488),
( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), # ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013),
( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), # ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002),
( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), # ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018),
( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), # ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001),
( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), # ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374),
( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), # ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000),
( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); # ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008);
# ##
select count(*)- 5 from t1 use index (s) where s < -000000000007; #select count(*)- 5 from t1 use index (s) where s < -000000000007;
select count(*)- 7 from t1 use index (s) where s <= -000000000007; #select count(*)- 7 from t1 use index (s) where s <= -000000000007;
select count(*)- 2 from t1 use index (s) where s = -000000000007; #select count(*)- 2 from t1 use index (s) where s = -000000000007;
select count(*)- 5 from t1 use index (s) where s >= -000000000007; #select count(*)- 5 from t1 use index (s) where s >= -000000000007;
select count(*)- 3 from t1 use index (s) where s > -000000000007; #select count(*)- 3 from t1 use index (s) where s > -000000000007;
##
#select count(*)- 4 from t1 use index (t) where t < -0000061.00003;
#select count(*)- 5 from t1 use index (t) where t <= -0000061.00003;
#select count(*)- 1 from t1 use index (t) where t = -0000061.00003;
#select count(*)- 6 from t1 use index (t) where t >= -0000061.00003;
#select count(*)- 5 from t1 use index (t) where t > -0000061.00003;
##
#select count(*)- 2 from t1 use index (u) where u < 000000000061;
#select count(*)- 4 from t1 use index (u) where u <= 000000000061;
#select count(*)- 2 from t1 use index (u) where u = 000000000061;
#select count(*)- 8 from t1 use index (u) where u >= 000000000061;
#select count(*)- 6 from t1 use index (u) where u > 000000000061;
##
#select count(*)- 5 from t1 use index (v) where v < 0000965.00042;
#select count(*)- 6 from t1 use index (v) where v <= 0000965.00042;
#select count(*)- 1 from t1 use index (v) where v = 0000965.00042;
#select count(*)- 5 from t1 use index (v) where v >= 0000965.00042;
#select count(*)- 4 from t1 use index (v) where v > 0000965.00042;
# #
select count(*)- 4 from t1 use index (t) where t < -0000061.00003; #drop table t1;
select count(*)- 5 from t1 use index (t) where t <= -0000061.00003;
select count(*)- 1 from t1 use index (t) where t = -0000061.00003;
select count(*)- 6 from t1 use index (t) where t >= -0000061.00003;
select count(*)- 5 from t1 use index (t) where t > -0000061.00003;
#
select count(*)- 2 from t1 use index (u) where u < 000000000061;
select count(*)- 4 from t1 use index (u) where u <= 000000000061;
select count(*)- 2 from t1 use index (u) where u = 000000000061;
select count(*)- 8 from t1 use index (u) where u >= 000000000061;
select count(*)- 6 from t1 use index (u) where u > 000000000061;
#
select count(*)- 5 from t1 use index (v) where v < 0000965.00042;
select count(*)- 6 from t1 use index (v) where v <= 0000965.00042;
select count(*)- 1 from t1 use index (v) where v = 0000965.00042;
select count(*)- 5 from t1 use index (v) where v >= 0000965.00042;
select count(*)- 4 from t1 use index (v) where v > 0000965.00042;
drop table t1;
# bug#7798 # bug#7798
create table t1(a int primary key, b int not null, index(b)); create table t1(a int primary key, b int not null, index(b));
......
...@@ -2520,6 +2520,22 @@ call bug6029()| ...@@ -2520,6 +2520,22 @@ call bug6029()|
drop procedure bug6029| drop procedure bug6029|
drop table t3| drop table t3|
#
# BUG#8540: Local variable overrides an alias
#
--disable_warnings
drop procedure if exists bug8540|
--enable_warnings
create procedure bug8540()
begin
declare x int default 1;
select x as y, x+0 as z;
end|
call bug8540()|
drop procedure bug8540|
# #
# Some "real" examples # Some "real" examples
......
...@@ -460,7 +460,10 @@ class Item_splocal : public Item ...@@ -460,7 +460,10 @@ class Item_splocal : public Item
{ {
Item *it= this_item(); Item *it= this_item();
it->set_name(m_name.str, m_name.length, system_charset_info); if (name)
it->set_name(name, strlen(name), system_charset_info);
else
it->set_name(m_name.str, m_name.length, system_charset_info);
it->make_field(field); it->make_field(field);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment