~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_union.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "sql_select.h"
25
25
 
26
26
bool mysql_union(THD *thd,
27
 
                 LEX *lex __attribute__((__unused__)),
 
27
                 LEX *lex __attribute__((unused)),
28
28
                 select_result *result,
29
29
                 SELECT_LEX_UNIT *unit, ulong setup_tables_done_option)
30
30
{
42
42
** store records in temporary table for UNION
43
43
***************************************************************************/
44
44
 
45
 
int select_union::prepare(List<Item> &list __attribute__((__unused__)),
 
45
int select_union::prepare(List<Item> &list __attribute__((unused)),
46
46
                          SELECT_LEX_UNIT *u)
47
47
{
48
48
  unit= u;
190
190
 
191
191
 
192
192
bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
193
 
                                 ulong additional_options)
 
193
                                 uint32_t additional_options)
194
194
{
195
195
  SELECT_LEX *lex_select_save= thd_arg->lex->current_select;
196
196
  SELECT_LEX *sl, *first_sl= first_select();
360
360
    if (union_result->create_result_table(thd, &types, test(union_distinct),
361
361
                                          create_options, "", false))
362
362
      goto err;
363
 
    bzero((char*) &result_table_list, sizeof(result_table_list));
 
363
    memset((char*) &result_table_list, 0, sizeof(result_table_list));
364
364
    result_table_list.db= (char*) "";
365
365
    result_table_list.table_name= result_table_list.alias= (char*) "union";
366
366
    result_table_list.table= table= union_result->table;