~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/instance.cc

  • Committer: Brian Aker
  • Date: 2010-10-14 18:32:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1855.
  • Revision ID: brian@tangent.org-20101014183209-884iivwn1og2v3yd
Committing refactor of table out (this is part of the concurrency work).

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
namespace drizzled
34
34
{
35
35
 
 
36
namespace table
 
37
{
36
38
 
37
 
bool TableShareInstance::open_tmp_table()
 
39
bool Instance::open_tmp_table()
38
40
{
39
41
  int error;
40
42
  
82
84
     true  - Error
83
85
*/
84
86
 
85
 
bool TableShareInstance::create_myisam_tmp_table(KeyInfo *keyinfo,
 
87
bool Instance::create_myisam_tmp_table(KeyInfo *keyinfo,
86
88
                                                 MI_COLUMNDEF *start_recinfo,
87
89
                                                 MI_COLUMNDEF **recinfo,
88
90
                                                 uint64_t options)
184
186
}
185
187
 
186
188
 
187
 
void TableShareInstance::free_tmp_table(Session *session)
 
189
void Instance::free_tmp_table(Session *session)
188
190
{
189
191
  const char *save_proc_info;
190
192
 
218
220
  session->set_proc_info(save_proc_info);
219
221
}
220
222
 
221
 
 
 
223
/*
 
224
  Set up column usage bitmaps for a temporary table
 
225
 
 
226
  IMPLEMENTATION
 
227
    For temporary tables, we need one bitmap with all columns set and
 
228
    a tmp_set bitmap to be used by things like filesort.
 
229
*/
 
230
 
 
231
void Instance::setup_tmp_table_column_bitmaps()
 
232
{
 
233
  uint32_t field_count= getShare()->sizeFields();
 
234
 
 
235
  this->def_read_set.resize(field_count);
 
236
  this->def_write_set.resize(field_count);
 
237
  this->tmp_set.resize(field_count);
 
238
  this->getMutableShare()->all_set.resize(field_count);
 
239
  this->getMutableShare()->all_set.set();
 
240
  this->def_write_set.set();
 
241
  this->def_read_set.set();
 
242
  default_column_bitmaps();
 
243
}
 
244
 
 
245
 
 
246
} /* namespace table */
222
247
} /* namespace drizzled */