~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/subselect.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-21 18:18:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2346.
  • Revision ID: olafvdspek@gmail.com-20110621181814-4wsfwjgbw49tzq1e
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
1122
1122
 
1123
1123
  if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards)
1124
1124
  {
1125
 
    if (!(pushed_cond_guards= (bool*)join->session->getMemRoot()->allocate(sizeof(bool))))
1126
 
      return(RES_ERROR);
 
1125
    pushed_cond_guards= (bool*)join->session->mem.alloc(sizeof(bool));
1127
1126
    pushed_cond_guards[0]= true;
1128
1127
  }
1129
1128
 
1391
1390
 
1392
1391
    if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards)
1393
1392
    {
1394
 
      if (!(pushed_cond_guards= (bool*)join->session->getMemRoot()->allocate(sizeof(bool) *
1395
 
                                                        left_expr->cols())))
1396
 
        return(RES_ERROR);
 
1393
      pushed_cond_guards= (bool*)join->session->mem.alloc(sizeof(bool) * left_expr->cols());
1397
1394
      for (uint32_t i= 0; i < cols_num; i++)
1398
1395
        pushed_cond_guards[i]= true;
1399
1396
    }
3060
3057
    - here we initialize only those members that are used by
3061
3058
      subselect_uniquesubquery_engine, so these objects are incomplete.
3062
3059
  */
3063
 
  tab= (JoinTable*) session->getMemRoot()->allocate(sizeof(JoinTable));
 
3060
  tab= (JoinTable*) session->mem.alloc(sizeof(JoinTable));
3064
3061
  new (tab) JoinTable();
3065
3062
  tab->table= tmp_table;
3066
3063
  tab->ref.key= 0; /* The only temp table index. */
3067
3064
  tab->ref.key_length= tmp_key->key_length;
3068
3065
  tab->ref.key_buff= (unsigned char*) session->mem.calloc(ALIGN_SIZE(tmp_key->key_length) * 2);
3069
 
  tab->ref.key_copy= (StoredKey**) session->getMemRoot()->allocate((sizeof(StoredKey*) * (tmp_key_parts + 1)));
3070
 
  tab->ref.items= (Item**) session->getMemRoot()->allocate(sizeof(Item*) * tmp_key_parts);
 
3066
  tab->ref.key_copy= (StoredKey**) session->mem.alloc((sizeof(StoredKey*) * (tmp_key_parts + 1)));
 
3067
  tab->ref.items= (Item**) session->mem.alloc(sizeof(Item*) * tmp_key_parts);
3071
3068
 
3072
3069
  KeyPartInfo *cur_key_part= tmp_key->key_part;
3073
3070
  StoredKey **ref_key= tab->ref.key_copy;