~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.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:
54
54
#include <drizzled/item/null.h>
55
55
#include <drizzled/temporal.h>
56
56
 
57
 
#include "drizzled/table_share_instance.h"
 
57
#include "drizzled/table/instance.h"
58
58
 
59
59
#include "drizzled/table_proto.h"
60
60
 
326
326
}
327
327
 
328
328
 
329
 
/*
330
 
  Set up column usage bitmaps for a temporary table
331
 
 
332
 
  IMPLEMENTATION
333
 
    For temporary tables, we need one bitmap with all columns set and
334
 
    a tmp_set bitmap to be used by things like filesort.
335
 
*/
336
 
 
337
 
void TableShareInstance::setup_tmp_table_column_bitmaps()
338
 
{
339
 
  uint32_t field_count= getShare()->sizeFields();
340
 
 
341
 
  this->def_read_set.resize(field_count);
342
 
  this->def_write_set.resize(field_count);
343
 
  this->tmp_set.resize(field_count);
344
 
  this->getMutableShare()->all_set.resize(field_count);
345
 
  this->getMutableShare()->all_set.set();
346
 
  this->def_write_set.set();
347
 
  this->def_read_set.set();
348
 
  default_column_bitmaps();
349
 
}
350
 
 
351
 
 
352
329
int rename_file_ext(const char * from,const char * to,const char * ext)
353
330
{
354
331
  string from_s, to_s;
877
854
    copy_func_count+= param->sum_func_count;
878
855
  }
879
856
 
880
 
  TableShareInstance *table;
 
857
  table::Instance *table;
881
858
  table= session->getTemporaryShare(message::Table::INTERNAL); // This will not go into the tableshare cache, so no key is used.
882
859
 
883
860
  if (not table->getMemRoot()->multi_alloc_root(0,
1471
1448
  uint32_t null_count= 0;                 /* number of columns which may be null */
1472
1449
  uint32_t null_pack_length;              /* NULL representation array length */
1473
1450
 
1474
 
  TableShareInstance *table= getTemporaryShare(message::Table::INTERNAL); // This will not go into the tableshare cache, so no key is used.
 
1451
  table::Instance *table= getTemporaryShare(message::Table::INTERNAL); // This will not go into the tableshare cache, so no key is used.
1475
1452
  table->getMutableShare()->setFields(field_count + 1);
1476
1453
  table->setFields(table->getMutableShare()->getFields(true));
1477
1454
  field= table->getMutableShare()->getFields(true);