Commit 176f36fa authored by unknown's avatar unknown
Browse files

Merge mysql.com:/usr/local/bk/mysql-5.0

into  mysql.com:/usr/home/pem/mysql-5.1-new


mysql-test/r/sp.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
parents 5c025e3f 110b887c
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ set @precision=10000000000;
select rand(), 
cast(rand(10)*@precision as unsigned integer) from t1;
rand()	cast(rand(10)*@precision as unsigned integer)
-	6570515219
-	6570515220
-	1282061302
-	6698761160
-	9647622201
@@ -348,23 +348,23 @@ prepare stmt from
set @var=1;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	-
-	6570515220	-
-	1282061302	-
-	6698761160	-
-	9647622201	-
set @var=2;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	6555866465
-	1282061302	1223466192
-	6698761160	6449731873
-	6570515220	6555866465
-	1282061302	1223466193
-	6698761160	6449731874
-	9647622201	8578261098
set @var=3;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	9057697559
-	6570515220	9057697560
-	1282061302	3730790581
-	6698761160	1480860534
-	6698761160	1480860535
-	9647622201	6211931236
drop table t1;
deallocate prepare stmt;
+29 −0
Original line number Diff line number Diff line
@@ -4070,4 +4070,33 @@ a
3
drop procedure bug14304|
drop table t3, t4|
drop procedure if exists bug14376|
create procedure bug14376()
begin
declare x int default x;
end|
call bug14376()|
ERROR 42S22: Unknown column 'x' in 'field list'
drop procedure bug14376|
create procedure bug14376()
begin
declare x int default 42;
begin
declare x int default x;
select x;
end;
end|
call bug14376()|
x
42
drop procedure bug14376|
create procedure bug14376(x int)
begin
declare x int default x;
select x;
end|
call bug14376(4711)|
x
4711
drop procedure bug14376|
drop table t1,t2;
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ while ($1)
  SET @rnd= RAND();
  SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
  SET @id_rev= @rnd_max - @id;
  SET @grp= CAST(128.0 * @rnd AS UNSIGNED); 
  SET @grp= CAST(127.0 * @rnd AS UNSIGNED); 
  INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev); 
  dec $1;
}
+45 −0
Original line number Diff line number Diff line
@@ -4855,6 +4855,51 @@ call bug14304()|
drop procedure bug14304|
drop table t3, t4|

#
# BUG#14376: MySQL crash on scoped variable (re)initialization
#
--disable_warnings
drop procedure if exists bug14376|
--enable_warnings

create procedure bug14376()
begin
  declare x int default x;
end|

# Not the error we want, but that's what we got for now...
--error ER_BAD_FIELD_ERROR
call bug14376()|
drop procedure bug14376|

create procedure bug14376()
begin
  declare x int default 42;

  begin
    declare x int default x;

    select x;
  end;
end|

call bug14376()|

drop procedure bug14376|

create procedure bug14376(x int)
begin
  declare x int default x;

  select x;
end|

call bug14376(4711)|

drop procedure bug14376|



#
# BUG#NNNN: New bug synopsis
#
+2 −2
Original line number Diff line number Diff line
@@ -3958,7 +3958,7 @@ longlong Field_float::val_int(void)
  else
#endif
    memcpy_fixed((byte*) &j,ptr,sizeof(j));
  return ((longlong) j);
  return (longlong) rint(j);
}


@@ -4246,7 +4246,7 @@ longlong Field_double::val_int(void)
  else
#endif
    doubleget(j,ptr);
  return ((longlong) j);
  return (longlong) rint(j);
}


Loading