~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/int64_t.cc

  • Committer: Brian Aker
  • Date: 2010-11-22 00:16:44 UTC
  • mto: (1945.2.1 quick)
  • mto: This revision was merged to the branch mainline in revision 1947.
  • Revision ID: brian@tangent.org-20101122001644-pi6jv0d65e82xn38
Merge in lock refactor, this just encapsulates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
54
54
    error= 1;
55
55
  }
56
 
  else if (table->in_use->count_cuted_fields &&
 
56
  else if (getTable()->in_use->count_cuted_fields &&
57
57
           check_int(cs, from, len, end, error))
58
58
    error= 1;
59
59
  else
60
60
    error= 0;
61
61
#ifdef WORDS_BIGENDIAN
62
 
  if (table->s->db_low_byte_first)
 
62
  if (getTable()->getShare()->db_low_byte_first)
63
63
  {
64
64
    int8store(ptr,tmp);
65
65
  }
96
96
    set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
97
97
 
98
98
#ifdef WORDS_BIGENDIAN
99
 
  if (table->s->db_low_byte_first)
 
99
  if (getTable()->getShare()->db_low_byte_first)
100
100
  {
101
101
    int8store(ptr,res);
102
102
  }
114
114
  ASSERT_COLUMN_MARKED_FOR_WRITE;
115
115
 
116
116
#ifdef WORDS_BIGENDIAN
117
 
  if (table->s->db_low_byte_first)
 
117
  if (getTable()->getShare()->db_low_byte_first)
118
118
  {
119
119
    int8store(ptr,nr);
120
120
  }
132
132
  ASSERT_COLUMN_MARKED_FOR_READ;
133
133
 
134
134
#ifdef WORDS_BIGENDIAN
135
 
  if (table->s->db_low_byte_first)
 
135
  if (getTable()->getShare()->db_low_byte_first)
136
136
  {
137
137
    j=sint8korr(ptr);
138
138
  }
151
151
  ASSERT_COLUMN_MARKED_FOR_READ;
152
152
 
153
153
#ifdef WORDS_BIGENDIAN
154
 
  if (table->s->db_low_byte_first)
 
154
  if (getTable()->getShare()->db_low_byte_first)
155
155
    j=sint8korr(ptr);
156
156
  else
157
157
#endif
173
173
  ASSERT_COLUMN_MARKED_FOR_READ;
174
174
 
175
175
#ifdef WORDS_BIGENDIAN
176
 
  if (table->s->db_low_byte_first)
 
176
  if (getTable()->getShare()->db_low_byte_first)
177
177
    j=sint8korr(ptr);
178
178
  else
179
179
#endif
189
189
{
190
190
  int64_t a,b;
191
191
#ifdef WORDS_BIGENDIAN
192
 
  if (table->s->db_low_byte_first)
 
192
  if (getTable()->getShare()->db_low_byte_first)
193
193
  {
194
194
    a=sint8korr(a_ptr);
195
195
    b=sint8korr(b_ptr);
206
206
void Field_int64_t::sort_string(unsigned char *to,uint32_t )
207
207
{
208
208
#ifdef WORDS_BIGENDIAN
209
 
  if (!table->s->db_low_byte_first)
 
209
  if (!getTable()->getShare()->db_low_byte_first)
210
210
  {
211
211
    to[0] = (char) (ptr[0] ^ 128);              /* Revers signbit */
212
212
    to[1]   = ptr[1];
250
250
{
251
251
  int64_t val;
252
252
#ifdef WORDS_BIGENDIAN
253
 
  if (table->s->db_low_byte_first)
 
253
  if (getTable()->getShare()->db_low_byte_first)
254
254
     val = sint8korr(from);
255
255
  else
256
256
#endif
283
283
    int64_tget(val, from);
284
284
 
285
285
#ifdef WORDS_BIGENDIAN
286
 
  if (table->s->db_low_byte_first)
 
286
  if (getTable()->getShare()->db_low_byte_first)
287
287
    int8store(to, val);
288
288
  else
289
289
#endif