~stewart/drizzle/bug600635-table-proto-default-null-false

« back to all changes in this revision

Viewing changes to drizzled/field/long.cc

  • Committer: Stewart Smith
  • Date: 2010-07-20 16:36:00 UTC
  • mfrom: (1647.1.4)
  • Revision ID: stewart@flamingspork.com-20100720163600-7vdgjfbjkwg3d0vs
Merged bug600088-multibyte-comments-in-show-create into bug600635-table-proto-default-null-false.

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()->s->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()->s->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()->s->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()->s->db_low_byte_first)
144
144
    j=sint4korr(ptr);
145
145
  else
146
146
#endif
156
156
 
157
157
  /* See the comment in Field_long::store(int64_t) */
158
158
#ifdef WORDS_BIGENDIAN
159
 
  if (table->s->db_low_byte_first)
 
159
  if (getTable()->s->db_low_byte_first)
160
160
    j=sint4korr(ptr);
161
161
  else
162
162
#endif
177
177
  ASSERT_COLUMN_MARKED_FOR_READ;
178
178
 
179
179
#ifdef WORDS_BIGENDIAN
180
 
  if (table->s->db_low_byte_first)
 
180
  if (getTable()->s->db_low_byte_first)
181
181
    j=sint4korr(ptr);
182
182
  else
183
183
#endif
193
193
{
194
194
  int32_t a,b;
195
195
#ifdef WORDS_BIGENDIAN
196
 
  if (table->s->db_low_byte_first)
 
196
  if (getTable()->s->db_low_byte_first)
197
197
  {
198
198
    a=sint4korr(a_ptr);
199
199
    b=sint4korr(b_ptr);
211
211
void Field_long::sort_string(unsigned char *to,uint32_t )
212
212
{
213
213
#ifdef WORDS_BIGENDIAN
214
 
  if (!table->s->db_low_byte_first)
 
214
  if (!getTable()->s->db_low_byte_first)
215
215
  {
216
216
    to[0] = (char) (ptr[0] ^ 128);              /* Revers signbit */
217
217
    to[1]   = ptr[1];
246
246
{
247
247
  int32_t val;
248
248
#ifdef WORDS_BIGENDIAN
249
 
  if (table->s->db_low_byte_first)
 
249
  if (getTable()->s->db_low_byte_first)
250
250
    val = sint4korr(from);
251
251
  else
252
252
#endif
279
279
    longget(val, from);
280
280
 
281
281
#ifdef WORDS_BIGENDIAN
282
 
  if (table->s->db_low_byte_first)
 
282
  if (getTable()->s->db_low_byte_first)
283
283
    int4store(to, val);
284
284
  else
285
285
#endif