~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tmp_table_param.h

  • Committer: Monty Taylor
  • Date: 2009-04-25 20:45:19 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425204519-lgrl7mz2r66v0jby
Blackhole.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_TMP_TABLE_PARAM_H
22
22
#define DRIZZLED_TMP_TABLE_PARAM_H
23
23
 
24
 
namespace drizzled
25
 
{
26
 
 
27
24
/*
28
25
  Param to create temporary tables when doing SELECT:s
29
26
  NOTE
30
27
    This structure is copied using memcpy as a part of JOIN.
31
28
*/
32
29
 
33
 
class Tmp_Table_Param :public memory::SqlAlloc
 
30
class Tmp_Table_Param :public Sql_alloc
34
31
{
35
32
private:
36
33
  /* Prevent use of these (not safe because of lists and copy_field) */
38
35
  void operator=(Tmp_Table_Param &);
39
36
 
40
37
public:
41
 
  KEY *keyinfo;
42
38
  List<Item> copy_funcs;
43
39
  List<Item> save_copy_funcs;
44
 
  CopyField *copy_field, *copy_field_end;
45
 
  CopyField *save_copy_field, *save_copy_field_end;
 
40
  Copy_field *copy_field, *copy_field_end;
 
41
  Copy_field *save_copy_field, *save_copy_field_end;
46
42
  unsigned char     *group_buff;
47
43
  Item      **items_to_copy;                    /* Fields in tmp table */
48
44
  MI_COLUMNDEF *recinfo,*start_recinfo;
 
45
  KEY *keyinfo;
49
46
  ha_rows end_write_records;
50
 
  uint32_t      field_count;
51
 
  uint32_t      sum_func_count;
52
 
  uint32_t      func_count;
 
47
  uint  field_count,sum_func_count,func_count;
53
48
  uint32_t  hidden_field_count;
54
 
  uint32_t      group_parts,group_length,group_null_parts;
55
 
  uint32_t      quick_group;
56
 
  bool using_indirect_summary_function;
 
49
  uint  group_parts,group_length,group_null_parts;
 
50
  uint  quick_group;
 
51
  bool  using_indirect_summary_function;
 
52
  /* If >0 convert all blob fields to varchar(convert_blob_length) */
 
53
  uint32_t  convert_blob_length;
 
54
  const CHARSET_INFO *table_charset;
57
55
  bool schema_table;
58
 
 
59
56
  /*
60
57
    True if GROUP BY and its aggregate functions are already computed
61
58
    by a table access method (e.g. by loose index scan). In this case
63
60
    aggregate functions as normal functions.
64
61
  */
65
62
  bool precomputed_group_by;
66
 
 
67
63
  bool force_copy_fields;
68
 
 
69
 
  /* If >0 convert all blob fields to varchar(convert_blob_length) */
70
 
  uint32_t  convert_blob_length;
71
 
 
72
 
  const CHARSET_INFO *table_charset;
 
64
  /*
 
65
    If true, create_tmp_field called from create_tmp_table will convert
 
66
    all BIT fields to 64-bit longs. This is a workaround the limitation
 
67
    that MEMORY tables cannot index BIT columns.
 
68
  */
 
69
  bool bit_fields_as_long;
73
70
 
74
71
  Tmp_Table_Param()
75
 
    :copy_field(0),
76
 
    group_parts(0),
77
 
    group_length(0),
78
 
    group_null_parts(0),
79
 
    schema_table(false),
80
 
    precomputed_group_by(false),
81
 
    force_copy_fields(false),
82
 
    convert_blob_length(0)
 
72
    :copy_field(0), group_parts(0),
 
73
     group_length(0), group_null_parts(0), convert_blob_length(0),
 
74
     schema_table(0), precomputed_group_by(0), force_copy_fields(0),
 
75
     bit_fields_as_long(0)
83
76
  {}
84
77
  ~Tmp_Table_Param()
85
78
  {
89
82
  void cleanup(void);
90
83
};
91
84
 
92
 
} /* namespace drizzled */
93
 
 
94
85
#endif /* DRIZZLED_TMP_TABLE_PARAM_H */