~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_derived.cc

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
  Derived tables
18
18
  These were introduced by Sinisa <sinisa@mysql.com>
19
19
*/
20
 
#include "config.h"
 
20
#include "drizzled/server_includes.h"
21
21
#include "drizzled/sql_select.h"
22
22
 
23
 
namespace drizzled
24
 
{
25
 
 
26
23
/*
27
24
  Call given derived table processor (preparing or filling tables)
28
25
 
123
120
    */
124
121
    if ((res= derived_result->create_result_table(session, &unit->types, false,
125
122
                                                  create_options,
126
 
                                                  orig_table_list->alias)))
 
123
                                                  orig_table_list->alias,
 
124
                                                  false)))
127
125
      goto exit;
128
126
 
129
127
    table= derived_result->table;
152
150
      orig_table_list->table_name=        table->s->table_name.str;
153
151
      orig_table_list->table_name_length= table->s->table_name.length;
154
152
      table->derived_select_number= first_select->select_number;
155
 
      table->s->tmp_table= message::Table::TEMPORARY;
 
153
      table->s->tmp_table= NON_TRANSACTIONAL_TMP_TABLE;
156
154
      orig_table_list->db= (char *)"";
157
155
      orig_table_list->db_length= 0;
158
156
      /* Force read of table stats in the optimizer */
159
 
      table->cursor->info(HA_STATUS_VARIABLE);
 
157
      table->file->info(HA_STATUS_VARIABLE);
160
158
      /* Add new temporary table to list of open derived tables */
161
159
      table->next= session->derived_tables;
162
160
      session->derived_tables= table;
243
241
  }
244
242
  return res;
245
243
}
246
 
 
247
 
} /* namespace drizzled */