Commit 5cf29b3b authored by unknown's avatar unknown
Browse files

Fixed bug detected by sp-tests

Cleanup during reviews of new pushed code


BUILD/compile-pentium-debug-max:
  Use --debug=full as default
BUILD/compile-pentium-debug:
  Use --debug=full as default
mysys/my_alloc.c:
  More debugging
sql/item_func.cc:
  Cleanup new code
  Don't call insert_id() for last_insert_id(value) to avoid side effects
sql/item_subselect.cc:
  Fixed DBUG output
sql/sp_head.cc:
  Simple cleanup
sql/sql_lex.cc:
  Moved usage of arguments first in lex_start to make their usage clearer
  Remove sl->expr_list.deleete_elements() becasue:
  - It didn't do anything (delete_elements on a list of list is a no-op operation)
  - The deleted for loop used SELECT_LEX elements that was allocated in mysql_new_select() in sp-head, but freed
  when sphead->mem_root was freed. (delete sphead doesn't remove used SELECT_LEX elements from the global all_selects_list)
sql/sql_parse.cc:
  More DBUG entries
parent c1d06b3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#! /bin/sh

path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full

extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
+1 −1
Original line number Diff line number Diff line
#! /bin/sh

path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full

extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
+4 −2
Original line number Diff line number Diff line
@@ -166,7 +166,8 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size)
  gptr point;
  reg1 USED_MEM *next= 0;
  reg2 USED_MEM **prev;

  DBUG_ENTER("alloc_root");
  DBUG_PRINT("enter",("root: 0x%lx", mem_root));
  DBUG_ASSERT(alloc_root_inited(mem_root));

  Size= ALIGN_SIZE(Size);
@@ -213,7 +214,8 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size)
    mem_root->used= next;
    mem_root->first_block_usage= 0;
  }
  return(point);
  DBUG_PRINT("exit",("ptr: 0x%lx", (ulong) point));
  DBUG_RETURN(point);
#endif
}

+7 −6
Original line number Diff line number Diff line
@@ -2377,16 +2377,17 @@ longlong Item_func_release_lock::val_int()

longlong Item_func_last_insert_id::val_int()
{
  THD *thd= current_thd;
  DBUG_ASSERT(fixed == 1);
  if (arg_count)
  {
    longlong value= args[0]->val_int();
    current_thd->insert_id(value);
    thd->insert_id(value);
    null_value= args[0]->null_value;
    return value;                       // Avoid side effect of insert_id()
  }
  else
    current_thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
  return current_thd->insert_id();
  thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
  return thd->insert_id();
}

/* This function is just used to test speed of different functions */
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ void Item_subselect::init(st_select_lex *select_lex,
{

  DBUG_ENTER("Item_subselect::init");
  DBUG_PRINT("subs", ("select_lex 0x%xl", (ulong) select_lex));
  DBUG_PRINT("enter", ("select_lex: 0x%x", (ulong) select_lex));
  unit= select_lex->master_unit();

  if (unit->item)
Loading