~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_range.cc

Merge Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1136
1136
  save_read_set= head->read_set;
1137
1137
  save_write_set= head->write_set;
1138
1138
 
1139
 
  /* Allocate a bitmap for used columns (Q: why not on MEM_ROOT?) */
1140
 
  if (! (bitmap= (my_bitmap_map*) malloc(head->s->column_bitmap_size)))
 
1139
  /* Allocate a bitmap for used columns. Using sql_alloc instead of malloc
 
1140
     simply as a "fix" to the MySQL 6.0 code that also free()s it at the
 
1141
     same time we destroy the mem_root.
 
1142
   */
 
1143
 
 
1144
  bitmap= reinterpret_cast<my_bitmap_map*>(sql_alloc(head->s->column_bitmap_size));
 
1145
  if (! bitmap)
1141
1146
  {
1142
1147
    column_bitmap.setBitmap(NULL);
1143
1148
    *create_error= 1;