~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/num.cc

mergeĀ lp:~linuxjedi/drizzle/trunk-remove-drizzleadmin

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
 
22
 
#include "config.h"
 
22
#include <config.h>
23
23
#include <drizzled/field/num.h>
24
24
#include <drizzled/error.h>
25
25
#include <drizzled/table.h>
26
26
#include <drizzled/session.h>
27
 
#include "drizzled/internal/my_sys.h"
 
27
#include <drizzled/internal/my_sys.h>
 
28
#include <drizzled/util/test.h>
28
29
 
29
 
namespace drizzled
30
 
{
 
30
namespace drizzled {
31
31
 
32
32
/**
33
33
  Numeric fields base class constructor.
76
76
    2   error: garbage at the end of string.
77
77
*/
78
78
 
79
 
int Field_num::check_int(const CHARSET_INFO * const cs, const char *str, int length,
 
79
int Field_num::check_int(const charset_info_st * const cs, const char *str, int length,
80
80
                         const char *int_end, int error)
81
81
{
82
82
  /* Test if we get an empty string or wrong integer */
83
 
  if (str == int_end || error == MY_ERRNO_EDOM)
 
83
  if (str == int_end || error == EDOM)
84
84
  {
85
85
    char buff[128];
86
86
    String tmp(buff, (uint32_t) sizeof(buff), system_charset_info);
124
124
    1   error
125
125
*/
126
126
 
127
 
bool Field_num::get_int(const CHARSET_INFO * const cs, const char *from, uint32_t len,
 
127
bool Field_num::get_int(const charset_info_st * const cs, const char *from, uint32_t len,
128
128
                        int64_t *rnd, uint64_t ,
129
129
                        int64_t signed_min, int64_t signed_max)
130
130
{
189
189
    pointer to decimal buffer with value of field
190
190
*/
191
191
 
192
 
type::Decimal* Field_num::val_decimal(type::Decimal *decimal_value)
 
192
type::Decimal* Field_num::val_decimal(type::Decimal *decimal_value) const
193
193
{
194
194
  assert(result_type() == INT_RESULT);
195
195