~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: Andrew Hutchings
  • Date: 2011-01-04 11:36:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2057.
  • Revision ID: andrew@linuxjedi.co.uk-20110104113601-diiveyfl32dgaa6f
Refix using placement new for join code, vector for join cache buffer.
Also refix a bug in COND_CMP properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
1587
1587
      if (sort_table_cond)
1588
1588
      {
1589
1589
        if (!curr_table->select)
1590
 
          if (!(curr_table->select= new optimizer::SqlSelect))
 
1590
          if (!(curr_table->select= new optimizer::SqlSelect()))
1591
1591
            return;
1592
1592
        if (!curr_table->select->cond)
1593
1593
          curr_table->select->cond= sort_table_cond;
3220
3220
  (JoinTable*) session->alloc(sizeof(JoinTable)*table_count)))
3221
3221
    return(true);
3222
3222
 
 
3223
  for (i= 0; i < table_count; i++)
 
3224
    new (join_tab+i) JoinTable();
 
3225
 
3223
3226
  join->full_join=0;
3224
3227
 
3225
3228
  used_tables= OUTER_REF_TABLE_BIT;   // Outer row is already read
4382
4385
    if (!(join->join_tab_reexec=
4383
4386
          (JoinTable*) join->session->alloc(sizeof(JoinTable))))
4384
4387
      return(true);
 
4388
    new (join->join_tab_reexec) JoinTable();
4385
4389
    if (join->tmp_join)
4386
4390
      join->tmp_join->join_tab_reexec= join->join_tab_reexec;
4387
4391
  }
4402
4406
  join->row_limit=join->unit->select_limit_cnt;
4403
4407
  join->do_send_rows = (join->row_limit) ? 1 : 0;
4404
4408
 
4405
 
  join_tab->cache.buff=0;                       /* No caching */
4406
4409
  join_tab->table=tmp_table;
4407
4410
  join_tab->select=0;
4408
4411
  join_tab->select_cond=0;