~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

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