~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/copy_string.cc

  • Committer: Monty Taylor
  • Date: 2008-12-18 07:42:01 UTC
  • mto: This revision was merged to the branch mainline in revision 714.
  • Revision ID: monty@inaugust.com-20081218074201-4m7d63t72qfuplwx
Fixed max() problem for solaris

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, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
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>
21
 
 
22
 
#include <drizzled/type/decimal.h>
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
23
22
#include <drizzled/item/copy_string.h>
24
23
 
25
 
namespace drizzled
26
 
{
27
 
 
28
24
void Item_copy_string::copy()
29
25
{
30
26
  String *res=item->val_str(&str_value);
43
39
}
44
40
 
45
41
 
46
 
type::Decimal *Item_copy_string::val_decimal(type::Decimal *decimal_value)
 
42
my_decimal *Item_copy_string::val_decimal(my_decimal *decimal_value)
47
43
{
48
44
  // Item_copy_string is used without fix_fields call
49
45
  if (null_value)
50
46
    return 0;
51
 
  decimal_value->store(E_DEC_FATAL_ERROR, &str_value);
52
 
 
 
47
  string2my_decimal(E_DEC_FATAL_ERROR, &str_value, decimal_value);
53
48
  return (decimal_value);
54
49
}
55
50
 
56
 
 
57
 
} /* namespace drizzled */