~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.cc

  • Committer: Brian Aker
  • Date: 2010-10-09 04:44:38 UTC
  • mto: (1827.1.1 trunk-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1828.
  • Revision ID: brian@tangent.org-20101009044438-inypezfli460whto
First pass on moving show create schema out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
  {
101
101
    /* This timestamp has auto-update */
102
102
    share->setTimestampField(this);
103
 
    flags|= FUNCTION_DEFAULT_FLAG;
 
103
    flags|= TIMESTAMP_FLAG;
104
104
    if (unireg_check != TIMESTAMP_DN_FIELD)
105
105
      flags|= ON_UPDATE_NOW_FLAG;
106
106
  }
233
233
  ASSERT_COLUMN_MARKED_FOR_READ;
234
234
 
235
235
#ifdef WORDS_BIGENDIAN
236
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
236
  if (getTable() && getTable()->s->db_low_byte_first)
237
237
    temp= uint8korr(ptr);
238
238
  else
239
239
#endif
258
258
  to= (char *) val_buffer->ptr();
259
259
 
260
260
#ifdef WORDS_BIGENDIAN
261
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
261
  if (getTable() && getTable()->s->db_low_byte_first)
262
262
    temp= uint8korr(ptr);
263
263
  else
264
264
#endif
282
282
  uint64_t temp;
283
283
 
284
284
#ifdef WORDS_BIGENDIAN
285
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
285
  if (getTable() && getTable()->s->db_low_byte_first)
286
286
    temp= uint8korr(ptr);
287
287
  else
288
288
#endif
315
315
{
316
316
  int64_t a,b;
317
317
#ifdef WORDS_BIGENDIAN
318
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
318
  if (getTable() && getTable()->s->db_low_byte_first)
319
319
  {
320
320
    a=sint8korr(a_ptr);
321
321
    b=sint8korr(b_ptr);
333
333
void Field_timestamp::sort_string(unsigned char *to,uint32_t )
334
334
{
335
335
#ifdef WORDS_BIGENDIAN
336
 
  if (!getTable() || !getTable()->getShare()->db_low_byte_first)
 
336
  if (!getTable() || !getTable()->s->db_low_byte_first)
337
337
  {
338
338
    to[0] = ptr[0];
339
339
    to[1] = ptr[1];
385
385
  if ((*null_value= is_null()))
386
386
    return 0;
387
387
#ifdef WORDS_BIGENDIAN
388
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
388
  if (getTable() && getTable()->s->db_low_byte_first)
389
389
    return sint8korr(ptr);
390
390
#endif
391
391
  int64_t tmp;
396
396
void Field_timestamp::store_timestamp(int64_t timestamp)
397
397
{
398
398
#ifdef WORDS_BIGENDIAN
399
 
  if (getTable() && getTable()->getShare()->db_low_byte_first)
 
399
  if (getTable() && getTable()->s->db_low_byte_first)
400
400
  {
401
401
    int8store(ptr, timestamp);
402
402
  }