~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tmp_table_param.h

  • Committer: Brian Aker
  • Date: 2009-08-03 06:08:05 UTC
  • mfrom: (1106.1.5 memory-fix)
  • Revision ID: brian@gaz-20090803060805-fqaa2t3jejgwhwu2
Collection of Valgrind fixes.

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
 
#include <deque>
25
 
 
26
24
/*
27
25
  Param to create temporary tables when doing SELECT:s
28
26
  NOTE
29
27
    This structure is copied using memcpy as a part of JOIN.
30
28
*/
31
29
 
32
 
class Tmp_Table_Param
 
30
class Tmp_Table_Param :public Sql_alloc
33
31
{
34
32
private:
35
33
  /* Prevent use of these (not safe because of lists and copy_field) */
38
36
 
39
37
public:
40
38
  KEY *keyinfo;
41
 
  std::deque<Item*> copy_funcs;
 
39
  List<Item> copy_funcs;
 
40
  List<Item> save_copy_funcs;
42
41
  CopyField *copy_field, *copy_field_end;
43
42
  CopyField *save_copy_field, *save_copy_field_end;
44
43
  unsigned char     *group_buff;
76
75
  bool bit_fields_as_long;
77
76
 
78
77
  Tmp_Table_Param()
79
 
    : keyinfo(NULL),
80
 
      copy_field(NULL),
81
 
      copy_field_end(NULL),
82
 
      save_copy_field(NULL),
83
 
      save_copy_field_end(NULL),
84
 
      group_buff(NULL),
85
 
      items_to_copy(0),
86
 
      recinfo(NULL),
87
 
      start_recinfo(NULL),
88
 
      end_write_records(0),
89
 
      field_count(0),
90
 
      sum_func_count(0),
91
 
      func_count(0),
92
 
      hidden_field_count(0),
93
 
      group_parts(0),
94
 
      group_length(0),
95
 
      group_null_parts(0),
96
 
      quick_group(1),
97
 
      using_indirect_summary_function(false),
98
 
      schema_table(false),
99
 
      precomputed_group_by(false),
100
 
      force_copy_fields(false),
101
 
      convert_blob_length(0),
102
 
      table_charset(NULL),
103
 
      bit_fields_as_long(false)
 
78
    :copy_field(0),
 
79
    group_parts(0),
 
80
    group_length(0),
 
81
    group_null_parts(0),
 
82
    schema_table(false),
 
83
    precomputed_group_by(false),
 
84
    force_copy_fields(false),
 
85
    convert_blob_length(0),
 
86
    bit_fields_as_long(false)
104
87
  {}
105
 
 
106
88
  ~Tmp_Table_Param()
107
89
  {
108
 
    delete [] copy_field;
 
90
    cleanup();
109
91
  }
 
92
  void init(void);
 
93
  void cleanup(void);
110
94
};
111
95
 
112
96
#endif /* DRIZZLED_TMP_TABLE_PARAM_H */