~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.h

  • Committer: Brian Aker
  • Date: 2011-11-04 21:06:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: brian@tangent.org-20111104210616-2at42agch94dkwb0
Additional fixes for libdrizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
class user_var_entry
29
29
{
30
 
public:
31
 
  user_var_entry(const char*, query_id_t id) :
32
 
    value(NULL),
 
30
 public:
 
31
  user_var_entry(const char *arg, query_id_t id) :
 
32
    value(0),
33
33
    length(0),
34
34
    size(0),
35
35
    update_query_id(0),
38
38
    unsigned_flag(false),
39
39
    collation(NULL, DERIVATION_IMPLICIT)
40
40
  { 
 
41
    name.assign(strdup(arg), strlen(arg));
41
42
  }
42
43
 
43
44
  ~user_var_entry()
44
45
  {
 
46
    free(const_cast<char*>(name.data()));
45
47
    free(value);
46
48
  }
47
49
 
48
 
  char* value;
 
50
  lex_string_t name;
 
51
  char *value;
49
52
  ulong length;
50
53
  size_t size;
51
54
  query_id_t update_query_id;
52
55
  query_id_t used_query_id;
53
56
  Item_result type;
54
57
  bool unsigned_flag;
 
58
 
 
59
  double val_real(bool *null_value);
 
60
  int64_t val_int(bool *null_value) const;
 
61
  String *val_str(bool *null_value, String *str, uint32_t decimals);
 
62
  type::Decimal *val_decimal(bool *null_value, type::Decimal *result);
55
63
  DTCollation collation;
56
64
 
57
 
  double val_real(bool *null_value) const;
58
 
  int64_t val_int(bool *null_value) const;
59
 
  String *val_str(bool *null_value, String*, uint32_t decimals) const;
60
 
  type::Decimal *val_decimal(bool *null_value, type::Decimal *result) const;
61
 
 
62
65
  void update_hash(bool set_null, data_ref, Item_result type, const charset_info_st* cs, Derivation dv, bool unsigned_arg);
63
66
};
64
67