~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cache_str.cc

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
21
21
 
22
22
#include <drizzled/item/cache_str.h>
 
23
#include <drizzled/field.h>
23
24
 
24
 
namespace drizzled
25
 
{
 
25
namespace drizzled {
26
26
 
27
27
Item_cache_str::Item_cache_str(const Item *item) :
28
28
  Item_cache(), value(0),
73
73
    return my_strntoll(value->charset(), value->ptr(),
74
74
                       value->length(), 10, (char**) 0, &err);
75
75
  else
76
 
    return (int64_t)0;
 
76
    return 0;
77
77
}
78
78
 
79
 
my_decimal *Item_cache_str::val_decimal(my_decimal *decimal_val)
 
79
type::Decimal *Item_cache_str::val_decimal(type::Decimal *decimal_val)
80
80
{
81
81
  assert(fixed == 1);
82
82
  if (value)
83
 
    string2my_decimal(E_DEC_FATAL_ERROR, value, decimal_val);
 
83
    decimal_val->store(E_DEC_FATAL_ERROR, value);
84
84
  else
85
85
    decimal_val= 0;
86
86
  return decimal_val;
88
88
 
89
89
int Item_cache_str::save_in_field(Field *field, bool no_conversions)
90
90
{
91
 
  int res= Item_cache::save_in_field(field, no_conversions);
92
 
 
93
 
  return res;
 
91
  return Item_cache::save_in_field(field, no_conversions);
94
92
}
95
93
 
96
94
} /* namespace drizzled */