~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/real.cc

  • Committer: Monty Taylor
  • Date: 2009-04-25 20:45:19 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425204519-lgrl7mz2r66v0jby
Blackhole.

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"
21
 
#include <math.h>
 
20
#include <drizzled/server_includes.h>
22
21
#include <drizzled/function/math/real.h>
23
22
 
24
 
namespace drizzled
25
 
{
26
 
 
27
23
 
28
24
String *Item_real_func::val_str(String *str)
29
25
{
30
26
  assert(fixed == 1);
31
27
  double nr= val_real();
32
28
  if (null_value)
33
 
    return 0;
 
29
    return 0; /* purecov: inspected */
34
30
  str->set_real(nr,decimals, &my_charset_bin);
35
31
  return str;
36
32
}
41
37
  assert(fixed);
42
38
  double nr= val_real();
43
39
  if (null_value)
44
 
    return 0;
 
40
    return 0; /* purecov: inspected */
45
41
  double2my_decimal(E_DEC_FATAL_ERROR, nr, decimal_value);
46
42
  return decimal_value;
47
43
}
58
54
  max_length= float_length(decimals);
59
55
}
60
56
 
61
 
} /* namespace drizzled */