~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.cc

  • Committer: Brian Aker
  • Date: 2010-04-19 17:51:52 UTC
  • Revision ID: brian@gaz-20100419175152-lar9fncw9vhhav0d
Updates to confine memroot

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    on this->table->mem_root and we will not be able to reclaim that memory
81
81
    when the clone Cursor object is destroyed.
82
82
  */
83
 
  if (!(new_handler->ref= (unsigned char*) alloc_root(mem_root, ALIGN_SIZE(ref_length)*2)))
 
83
  if (!(new_handler->ref= (unsigned char*) mem_root->alloc_root(ALIGN_SIZE(ref_length)*2)))
84
84
    return NULL;
85
85
  if (new_handler && !new_handler->ha_open(table,
86
86
                                           table->s->normalized_path.str,
248
248
    (void) extra(HA_EXTRA_NO_READCHECK);        // Not needed in SQL
249
249
 
250
250
    /* ref is already allocated for us if we're called from Cursor::clone() */
251
 
    if (!ref && !(ref= (unsigned char*) alloc_root(&table->mem_root,
252
 
                                          ALIGN_SIZE(ref_length)*2)))
 
251
    if (!ref && !(ref= (unsigned char*) table->mem_root.alloc_root(ALIGN_SIZE(ref_length)*2)))
253
252
    {
254
253
      close();
255
254
      error=HA_ERR_OUT_OF_MEM;