~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.h

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#ifndef DRIZZLED_USER_VAR_ENTRY_H
22
 
#define DRIZZLED_USER_VAR_ENTRY_H
23
 
 
24
 
#include "drizzled/query_id.h"
25
 
 
26
 
namespace drizzled
27
 
{
28
 
 
29
 
// this is needed for user_vars hash
 
21
#pragma once
 
22
 
 
23
#include <drizzled/dtcollation.h>
 
24
#include <drizzled/item_result.h>
 
25
 
 
26
namespace drizzled {
 
27
 
30
28
class user_var_entry
31
29
{
32
30
 public:
46
44
 
47
45
  ~user_var_entry()
48
46
  {
49
 
    if (name.str) 
50
 
      free(name.str);
 
47
    free(const_cast<char*>(name.str));
 
48
    free(value);
 
49
  }
51
50
 
52
 
    if (value) 
53
 
      free(value);
54
 
  }
55
 
  LEX_STRING name;
 
51
  lex_string_t name;
56
52
  char *value;
57
53
  ulong length;
58
54
  size_t size;
67
63
  type::Decimal *val_decimal(bool *null_value, type::Decimal *result);
68
64
  DTCollation collation;
69
65
 
70
 
  bool update_hash(bool set_null, void *ptr, uint32_t length,
71
 
                   Item_result type, const CHARSET_INFO * const cs, Derivation dv,
 
66
  void update_hash(bool set_null, void *ptr, uint32_t length,
 
67
                   Item_result type, const charset_info_st * const cs, Derivation dv,
72
68
                   bool unsigned_arg);
73
69
};
74
70
 
75
71
} /* namespace drizzled */
76
72
 
77
 
#endif /* DRIZZLED_USER_VAR_ENTRY_H */