~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_derived.cc

  • Committer: Joe Daly
  • Date: 2010-06-08 03:11:13 UTC
  • mto: This revision was merged to the branch mainline in revision 1614.
  • Revision ID: skinny.moey@gmail.com-20100608031113-wt8o9k2bbyawwazs
add missing guard in header

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
    if (res)
138
138
    {
139
139
      if (table)
140
 
        table->free_tmp_table(session);
 
140
      {
 
141
        table= 0;
 
142
      }
141
143
      delete derived_result;
142
144
    }
143
145
    else
149
151
      }
150
152
      orig_table_list->derived_result= derived_result;
151
153
      orig_table_list->table= table;
152
 
      orig_table_list->table_name=        table->s->table_name.str;
153
 
      orig_table_list->table_name_length= table->s->table_name.length;
 
154
      orig_table_list->table_name=        const_cast<char *>(table->getShare()->getTableName());
 
155
      orig_table_list->table_name_length= table->getShare()->getTableNameSize();
154
156
      table->derived_select_number= first_select->select_number;
155
 
      table->s->tmp_table= message::Table::TEMPORARY;
 
157
      table->getMutableShare()->tmp_table= message::Table::TEMPORARY;
156
158
      orig_table_list->db= (char *)"";
157
159
      orig_table_list->db_length= 0;
158
160
      /* Force read of table stats in the optimizer */