~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/hex_string.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 04:19:44 UTC
  • mto: (2192.1.1 drizzle-staging)
  • mto: This revision was merged to the branch mainline in revision 2193.
  • Revision ID: brian@tangent.org-20110222041944-furz1h252ecz7mpd
Merge in modifications such that we check both schema and table for
replication option.

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
 
#include "config.h"
 
20
#include <config.h>
21
21
 
22
22
#include <drizzled/error.h>
 
23
#include <drizzled/field.h>
 
24
#include <drizzled/item/hex_string.h>
23
25
#include <drizzled/item/string.h>
24
 
#include <drizzled/item/hex_string.h>
 
26
#include <drizzled/type/decimal.h>
25
27
 
26
28
#include <algorithm>
27
29
 
75
77
}
76
78
 
77
79
 
78
 
my_decimal *Item_hex_string::val_decimal(my_decimal *decimal_value)
 
80
type::Decimal *Item_hex_string::val_decimal(type::Decimal *decimal_value)
79
81
{
80
82
  // following assert is redundant, because fixed=1 assigned in constructor
81
83
  assert(fixed == 1);
82
84
  uint64_t value= (uint64_t)val_int();
83
 
  int2my_decimal(E_DEC_FATAL_ERROR, value, true, decimal_value);
 
85
  int2_class_decimal(E_DEC_FATAL_ERROR, value, true, decimal_value);
84
86
  return (decimal_value);
85
87
}
86
88