Commit 1b6d9589 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime

into  alik.:/mnt/raid/alik/MySQL/devel/5.0-rt-bug16899

parents 2f0a610f 5d37fce9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
44d03f27qNdqJmARzBoP3Is_cN5e0w
44ec850ac2k4y2Omgr92GiWPBAVKGQ
44edb86b1iE5knJ97MbliK_3lCiAXA
+7 −0
Original line number Diff line number Diff line
@@ -5387,4 +5387,11 @@ BEGIN
RETURN 1;
END|
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
drop procedure if exists bug21416|
create procedure bug21416() show create procedure bug21416|
call bug21416()|
Procedure	sql_mode	Create Procedure
bug21416		CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
show create procedure bug21416
drop procedure bug21416|
drop table t1,t2;
+10 −0
Original line number Diff line number Diff line
@@ -6312,6 +6312,16 @@ BEGIN
END|


#
# BUG#21416: SP: Recursion level higher than zero needed for non-recursive call
#
--disable_warnings
drop procedure if exists bug21416|
--enable_warnings
create procedure bug21416() show create procedure bug21416|
call bug21416()|
drop procedure bug21416|

#
# BUG#NNNN: New bug synopsis
#
+7 −7
Original line number Diff line number Diff line
@@ -421,11 +421,10 @@ void Item::rename(char *new_name)


/*
  transform() - traverse item tree possibly transforming it (replacing
                items)
  Traverse item tree possibly transforming it (replacing items).

  SYNOPSIS
    transform()
    Item::transform()
      transformer    functor that performs transformation of a subtree
      arg            opaque argument passed to the functor

@@ -450,9 +449,9 @@ void Item::rename(char *new_name)
    it, please use Item::walk() instead.


  RETURN
  RETURN VALUE
    Returns pointer to the new subtree root.  THD::change_item_tree()
    should be called for it if transformation took place, i.e. if
    should be called for it if transformation took place, i.e. if a
    pointer to newly allocated item is returned.
*/

@@ -5339,9 +5338,10 @@ int Item_default_value::save_in_field(Field *field_arg, bool no_conversions)


/* 
   This method like the walk method traverses the item tree, but at
   the same time it can replace some nodes in the tree
  This method like the walk method traverses the item tree, but at the
  same time it can replace some nodes in the tree
*/ 

Item *Item_default_value::transform(Item_transformer transformer, byte *args)
{
  DBUG_ASSERT(!current_thd->is_stmt_prepare());
+15 −6
Original line number Diff line number Diff line
@@ -1006,6 +1006,12 @@ sp_find_routine(THD *thd, int type, sp_name *name, sp_cache **cp,
      }
      DBUG_RETURN(sp->m_first_free_instance);
    }
    /*
      Actually depth could be +1 than the actual value in case a SP calls
      SHOW CREATE PROCEDURE. Hence, the linked list could hold up to one more
      instance.
    */

    level= sp->m_last_cached_sp->m_recursion_level + 1;
    if (level > depth)
    {
@@ -1175,21 +1181,24 @@ sp_update_procedure(THD *thd, sp_name *name, st_sp_chistics *chistics)
int
sp_show_create_procedure(THD *thd, sp_name *name)
{
  int ret= SP_KEY_NOT_FOUND;
  sp_head *sp;
  DBUG_ENTER("sp_show_create_procedure");
  DBUG_PRINT("enter", ("name: %.*s", name->m_name.length, name->m_name.str));

  /*
    Increase the recursion limit for this statement. SHOW CREATE PROCEDURE
    does not do actual recursion.  
  */
  thd->variables.max_sp_recursion_depth++;
  if ((sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name,
                           &thd->sp_proc_cache, FALSE)))
  {
    int ret= sp->show_create_procedure(thd);
    ret= sp->show_create_procedure(thd);

  thd->variables.max_sp_recursion_depth--;
  DBUG_RETURN(ret);
}

  DBUG_RETURN(SP_KEY_NOT_FOUND);
}


int
sp_show_status_procedure(THD *thd, const char *wild)