Commit 385b4bf7 authored by Marc Alff's avatar Marc Alff
Browse files

Manual merge of mysql-5.0-bugteam -> mysql-5.1-bugteam

Note: NULL merge of sql/sql_yacc.yy, the fix for bug#38296 will be provided separately for 5.1
parents cf43a69a e087c05d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ class Field
  Field(const Item &);				/* Prevent use of these */
  void operator=(Field &);
public:
  static void *operator new(size_t size) {return sql_alloc(size); }
  static void *operator new(size_t size) throw ()
  { return sql_alloc(size); }
  static void operator delete(void *ptr_arg, size_t size) { TRASH(ptr_arg, size); }

  uchar		*ptr;			// Position to field in record
+2 −2
Original line number Diff line number Diff line
@@ -467,9 +467,9 @@ class Item {
  Item(const Item &);			/* Prevent use of these */
  void operator=(Item &);
public:
  static void *operator new(size_t size)
  static void *operator new(size_t size) throw ()
  { return sql_alloc(size); }
  static void *operator new(size_t size, MEM_ROOT *mem_root)
  static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
  { return alloc_root(mem_root, size); }
  static void operator delete(void *ptr,size_t size) { TRASH(ptr, size); }
  static void operator delete(void *ptr, MEM_ROOT *mem_root) {}
+1 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ sp_head::operator new(size_t size) throw()
  init_sql_alloc(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC);
  sp= (sp_head *) alloc_root(&own_root, size);
  if (sp == NULL)
    return NULL;
    DBUG_RETURN(NULL);
  sp->main_mem_root= own_root;
  DBUG_PRINT("info", ("mem_root 0x%lx", (ulong) &sp->mem_root));
  DBUG_RETURN(sp);
+2 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result,
  if (! (sensitive_cursor= new (thd->mem_root) Sensitive_cursor(thd, result)))
  {
    delete result_materialize;
    result_materialize= NULL;
    return 1;
  }

@@ -212,6 +213,7 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result,
    if ((rc= materialized_cursor->open(0)))
    {
      delete materialized_cursor;
      materialized_cursor= NULL;
      goto err_open;
    }

+2 −2
Original line number Diff line number Diff line
@@ -417,11 +417,11 @@ class st_select_lex_node {
  bool no_table_names_allowed; /* used for global order by */
  bool no_error; /* suppress error message (convert it to warnings) */

  static void *operator new(size_t size)
  static void *operator new(size_t size) throw ()
  {
    return sql_alloc(size);
  }
  static void *operator new(size_t size, MEM_ROOT *mem_root)
  static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
  { return (void*) alloc_root(mem_root, (uint) size); }
  static void operator delete(void *ptr,size_t size) { TRASH(ptr, size); }
  static void operator delete(void *ptr, MEM_ROOT *mem_root) {}
Loading