~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.h

  • Committer: Brian Aker
  • Date: 2009-07-11 05:59:19 UTC
  • mfrom: (1089.1.9 merge)
  • Revision ID: brian@gaz-20090711055919-m4px3crrdgta5lie
Collection of patches from new-cleanup (includes asserts for field in debug)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
class user_var_entry
27
27
{
28
28
 public:
29
 
  user_var_entry() {}                         /* Remove gcc warning */
 
29
  user_var_entry(const char *arg, query_id_t id) :
 
30
    value(0),
 
31
    length(0),
 
32
    size(0),
 
33
    update_query_id(0),
 
34
    used_query_id(id),
 
35
    type(STRING_RESULT),
 
36
    unsigned_flag(false),
 
37
    collation(NULL, DERIVATION_IMPLICIT)
 
38
  { 
 
39
    name.str= strdup(arg);
 
40
    name.length= strlen(arg);
 
41
  };
 
42
 
 
43
  ~user_var_entry()
 
44
  {
 
45
    if (name.str) 
 
46
      free(name.str);
 
47
 
 
48
    if (value) 
 
49
      free(value);
 
50
  }
30
51
  LEX_STRING name;
31
52
  char *value;
32
53
  ulong length;
33
 
  query_id_t update_query_id, used_query_id;
 
54
  size_t size;
 
55
  query_id_t update_query_id;
 
56
  query_id_t used_query_id;
34
57
  Item_result type;
35
58
  bool unsigned_flag;
36
59
 
39
62
  String *val_str(bool *null_value, String *str, uint32_t decimals);
40
63
  my_decimal *val_decimal(bool *null_value, my_decimal *result);
41
64
  DTCollation collation;
 
65
 
 
66
  bool update_hash(bool set_null, void *ptr, uint32_t length,
 
67
                   Item_result type, const CHARSET_INFO * const cs, Derivation dv,
 
68
                   bool unsigned_arg);
42
69
};
43
70
 
44
71
#endif /* DRIZZLED_USER_VAR_ENTRY_H */