~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/real.cc

  • Committer: Stewart Smith
  • Date: 2009-10-08 06:16:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: stewart@flamingspork.com-20091008061639-p37e93j3h3hapwyj
don't even think of mucking around with opt_range.cc it burns like... burny things

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <drizzled/server_includes.h>
22
22
#include <drizzled/field/real.h>
23
23
#include <drizzled/error.h>
24
24
#include <drizzled/table.h>
25
25
 
26
 
#include <math.h>
27
 
 
28
26
#include <limits>
29
27
 
30
28
using namespace std;
31
29
 
32
 
namespace drizzled
33
 
{
34
 
 
35
 
extern const double log_10[309];
36
 
 
37
30
/*
38
31
  Floating-point numbers
39
32
 */
44
37
{
45
38
  assert(max_length >= pack_length());
46
39
#ifdef WORDS_BIGENDIAN
47
 
  if (low_byte_first != getTable()->getShare()->db_low_byte_first)
 
40
  if (low_byte_first != table->s->db_low_byte_first)
48
41
  {
49
42
    const unsigned char *dptr= from + pack_length();
50
43
    while (dptr-- > from)
61
54
                   uint32_t param_data, bool low_byte_first)
62
55
{
63
56
#ifdef WORDS_BIGENDIAN
64
 
  if (low_byte_first != getTable()->getShare()->db_low_byte_first)
 
57
  if (low_byte_first != table->s->db_low_byte_first)
65
58
  {
66
59
    const unsigned char *dptr= from + pack_length();
67
60
    while (dptr-- > from)
143
136
  double2my_decimal(E_DEC_FATAL_ERROR, val_real(), decimal_value);
144
137
  return decimal_value;
145
138
}
146
 
 
147
 
} /* namespace drizzled */