Commit a2c26aa7 authored by unknown's avatar unknown
Browse files

Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug2-5.0

into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0


sql/item.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  merge
mysql-test/r/trigger.result:
  merge
mysql-test/t/sp.test:
  merge
mysql-test/t/trigger.test:
  merge
sql/item.cc:
  merge
sql/sp_rcontext.h:
  merge
parents 57e1c5aa 6574612d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -3667,4 +3667,21 @@ call bug14845()|
a
0
drop procedure bug14845|
drop procedure bug12589_1|
drop procedure bug12589_2|
drop procedure bug12589_3|
drop procedure if exists bug13549_1|
drop procedure if exists bug13549_2|
CREATE PROCEDURE `bug13549_2`()
begin
call bug13549_1();
end|
CREATE PROCEDURE `bug13549_1`()
begin
declare done int default 0;
set done= not done;
end|
CALL bug13549_2()|
drop procedure bug13549_2|
drop procedure bug13549_1|
drop table t1,t2;
+14 −0
Original line number Diff line number Diff line
@@ -763,3 +763,17 @@ ERROR HY000: Table 't3' was not locked with LOCK TABLES
deallocate prepare stmt1;
drop procedure p1;
drop table t1, t2, t3;
create table t1 (a int);
drop procedure if exists p2;
CREATE PROCEDURE `p2`()
begin
insert into t1 values (1);
end//
create trigger trg before insert on t1 for each row 
begin 
declare done int default 0;
set done= not done;
end//
CALL p2();
drop procedure p2;
drop table t1;
+28 −0
Original line number Diff line number Diff line
@@ -4291,6 +4291,9 @@ call bug12589_1()|
# No warnings here
call bug12589_2()|
call bug12589_3()|
drop procedure bug12589_1|
drop procedure bug12589_2|
drop procedure bug12589_3|

#
# BUG#7049: Stored procedure CALL errors are ignored
@@ -4594,6 +4597,31 @@ end|
call bug14845()|
drop procedure bug14845|

#
# BUG#13549 "Server crash with nested stored procedures".
# Server should not crash when during execution of stored procedure
# we have to parse trigger/function definition and this new trigger/
# function has more local variables declared than invoking stored
# procedure and last of these variables is used in argument of NOT
# operator.
#
--disable_warnings
drop procedure if exists bug13549_1|
drop procedure if exists bug13549_2|
--enable_warnings
CREATE PROCEDURE `bug13549_2`()
begin
  call bug13549_1();
end|
CREATE PROCEDURE `bug13549_1`()
begin
  declare done int default 0;
  set done= not done;
end|
CALL bug13549_2()|
drop procedure bug13549_2|
drop procedure bug13549_1|

#
# BUG#NNNN: New bug synopsis
#
+28 −0
Original line number Diff line number Diff line
@@ -914,3 +914,31 @@ call p1();
deallocate prepare stmt1;
drop procedure p1;
drop table t1, t2, t3;

#
# BUG#13549 "Server crash with nested stored procedures".
# Server should not crash when during execution of stored procedure
# we have to parse trigger/function definition and this new trigger/
# function has more local variables declared than invoking stored
# procedure and last of these variables is used in argument of NOT
# operator.
#
create table t1 (a int);
--disable_warnings
drop procedure if exists p2;
--enable_warnings
DELIMITER //;
CREATE PROCEDURE `p2`()
begin
  insert into t1 values (1);
end//
create trigger trg before insert on t1 for each row 
begin 
  declare done int default 0;
  set done= not done;
end//
DELIMITER ;//
CALL p2();
drop procedure p2;
drop table t1;
+7 −0
Original line number Diff line number Diff line
@@ -894,6 +894,7 @@ bool Item_splocal::is_null()
Item *
Item_splocal::this_item()
{
  DBUG_ASSERT(owner == thd->spcont->owner);
  return thd->spcont->get_item(m_offset);
}

@@ -901,12 +902,14 @@ Item_splocal::this_item()
Item **
Item_splocal::this_item_addr(THD *thd, Item **addr)
{
  DBUG_ASSERT(owner == thd->spcont->owner);
  return thd->spcont->get_item_addr(m_offset);
}

Item *
Item_splocal::this_const_item() const
{
  DBUG_ASSERT(owner == thd->spcont->owner);
  return thd->spcont->get_item(m_offset);
}

@@ -914,7 +917,11 @@ Item::Type
Item_splocal::type() const
{
  if (thd && thd->spcont)
  {
    DBUG_ASSERT(owner == thd->spcont->owner);
    return thd->spcont->get_item(m_offset)->type();
  }
  }
  return NULL_ITEM;		// Anything but SUBSELECT_ITEM
}

Loading