~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_union.cc

  • Committer: Stewart Smith
  • Date: 2008-09-25 10:04:06 UTC
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080925100406-hld92f4dr4nuar3a
Move compression functions (compress, uncompress and compressed_length) out into modules and fix test

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg) 
165
165
{
166
166
  thd_arg->lex->current_select= fake_select_lex;
167
 
  fake_select_lex->table_list.link_in_list((unsigned char *)&result_table_list,
168
 
                                           (unsigned char **)
 
167
  fake_select_lex->table_list.link_in_list((uchar *)&result_table_list,
 
168
                                           (uchar **)
169
169
                                           &result_table_list.next_local);
170
170
  fake_select_lex->context.table_list= 
171
171
    fake_select_lex->context.first_name_resolution_table= 
172
172
    fake_select_lex->get_table_list();
173
 
 
174
 
  for (order_st *order= (order_st *) global_parameters->order_list.first;
175
 
       order;
176
 
       order= order->next)
177
 
    order->item= &order->item_ptr;
178
 
 
 
173
  if (!fake_select_lex->first_execution)
 
174
  {
 
175
    for (order_st *order= (order_st *) global_parameters->order_list.first;
 
176
         order;
 
177
         order= order->next)
 
178
      order->item= &order->item_ptr;
 
179
  }
179
180
  for (order_st *order= (order_st *)global_parameters->order_list.first;
180
181
       order;
181
182
       order=order->next)
182
183
  {
183
184
    (*order->item)->walk(&Item::change_context_processor, 0,
184
 
                         (unsigned char*) &fake_select_lex->context);
 
185
                         (uchar*) &fake_select_lex->context);
185
186
  }
186
187
}
187
188
 
371
372
    }
372
373
    else
373
374
    {
 
375
      assert(thd->stmt_arena->is_conventional() == false);
374
376
      /*
375
377
        We're in execution of a prepared statement or stored procedure:
376
378
        reset field items to point at fields from the created temporary table.
377
379
      */
378
 
      assert(1);
 
380
      table->reset_item_list(&item_list);
379
381
    }
380
382
  }
381
383