~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cached_item.h

  • Committer: Mark Atwood
  • Date: 2011-12-28 02:50:31 UTC
  • Revision ID: me@mark.atwood.name-20111228025031-eh4h1zwv4ig88g0i
fix tests/r/basic.result

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_CACHED_ITEM_H
21
 
#define DRIZZLED_CACHED_ITEM_H
 
20
#pragma once
22
21
 
23
 
#include <drizzled/sql_alloc.h>
 
22
#include <drizzled/memory/sql_alloc.h>
24
23
#include <drizzled/sql_string.h>
25
 
 
26
 
class Item;
27
 
class Session;
28
 
 
29
 
class Cached_item :public Sql_alloc
 
24
#include <drizzled/type/decimal.h>
 
25
 
 
26
namespace drizzled {
 
27
 
 
28
class Cached_item :public memory::SqlAlloc
30
29
{
31
30
public:
32
31
  bool null_value;
68
67
class Cached_item_decimal :public Cached_item
69
68
{
70
69
  Item *item;
71
 
  my_decimal value;
 
70
  type::Decimal value;
72
71
public:
73
72
  Cached_item_decimal(Item *item_par);
74
73
  bool cmp(void);
81
80
  uint32_t length;
82
81
 
83
82
public:
84
 
  Cached_item_field(Field *arg_field) : field(arg_field)
85
 
  {
86
 
    field= arg_field;
87
 
    /* TODO: take the memory allocation below out of the constructor. */
88
 
    buff= (unsigned char*) sql_calloc(length=field->pack_length());
89
 
  }
 
83
  Cached_item_field(Field *arg_field);
90
84
  bool cmp(void);
91
85
};
92
86
 
93
 
Cached_item *new_Cached_item(Session *session, Item *item,
94
 
                             bool use_result_field);
95
 
 
96
 
#endif /* DRIZZLED_CACHED_ITEM_H */
 
87
Cached_item *new_Cached_item(Session *session, Item *item);
 
88
 
 
89
} /* namespace drizzled */
 
90