~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/long.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 18:24:58 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108182458-twv4hyix43ojno80
Merge in changes such that lock is now broken out into its own directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
  error= get_int(cs, from, len, &rnd, UINT32_MAX, INT32_MIN, INT32_MAX);
50
50
  store_tmp= (long) rnd;
51
51
#ifdef WORDS_BIGENDIAN
52
 
  if (table->s->db_low_byte_first)
 
52
  if (getTable()->getShare()->db_low_byte_first)
53
53
  {
54
54
    int4store(ptr, store_tmp);
55
55
  }
85
85
    set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
86
86
 
87
87
#ifdef WORDS_BIGENDIAN
88
 
  if (table->s->db_low_byte_first)
 
88
  if (getTable()->getShare()->db_low_byte_first)
89
89
  {
90
90
    int4store(ptr,res);
91
91
  }
122
122
    set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
123
123
 
124
124
#ifdef WORDS_BIGENDIAN
125
 
  if (table->s->db_low_byte_first)
 
125
  if (getTable()->getShare()->db_low_byte_first)
126
126
  {
127
127
    int4store(ptr,res);
128
128
  }
140
140
  ASSERT_COLUMN_MARKED_FOR_READ;
141
141
 
142
142
#ifdef WORDS_BIGENDIAN
143
 
  if (table->s->db_low_byte_first)
 
143
  if (getTable()->getShare()->db_low_byte_first)
144
144
    j=sint4korr(ptr);
145
145
  else
146
146
#endif
155
155
  ASSERT_COLUMN_MARKED_FOR_READ;
156
156
 
157
157
  /* See the comment in Field_long::store(int64_t) */
158
 
  assert(table->in_use == current_session);
159
158
#ifdef WORDS_BIGENDIAN
160
 
  if (table->s->db_low_byte_first)
 
159
  if (getTable()->getShare()->db_low_byte_first)
161
160
    j=sint4korr(ptr);
162
161
  else
163
162
#endif
178
177
  ASSERT_COLUMN_MARKED_FOR_READ;
179
178
 
180
179
#ifdef WORDS_BIGENDIAN
181
 
  if (table->s->db_low_byte_first)
 
180
  if (getTable()->getShare()->db_low_byte_first)
182
181
    j=sint4korr(ptr);
183
182
  else
184
183
#endif
194
193
{
195
194
  int32_t a,b;
196
195
#ifdef WORDS_BIGENDIAN
197
 
  if (table->s->db_low_byte_first)
 
196
  if (getTable()->getShare()->db_low_byte_first)
198
197
  {
199
198
    a=sint4korr(a_ptr);
200
199
    b=sint4korr(b_ptr);
212
211
void Field_long::sort_string(unsigned char *to,uint32_t )
213
212
{
214
213
#ifdef WORDS_BIGENDIAN
215
 
  if (!table->s->db_low_byte_first)
 
214
  if (!getTable()->getShare()->db_low_byte_first)
216
215
  {
217
216
    to[0] = (char) (ptr[0] ^ 128);              /* Revers signbit */
218
217
    to[1]   = ptr[1];
247
246
{
248
247
  int32_t val;
249
248
#ifdef WORDS_BIGENDIAN
250
 
  if (table->s->db_low_byte_first)
 
249
  if (getTable()->getShare()->db_low_byte_first)
251
250
    val = sint4korr(from);
252
251
  else
253
252
#endif
280
279
    longget(val, from);
281
280
 
282
281
#ifdef WORDS_BIGENDIAN
283
 
  if (table->s->db_low_byte_first)
 
282
  if (getTable()->getShare()->db_low_byte_first)
284
283
    int4store(to, val);
285
284
  else
286
285
#endif