~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 03:55:31 UTC
  • mto: This revision was merged to the branch mainline in revision 479.
  • Revision ID: brian@gir.tangent.org-20081006035531-ade3cc3kfwutd35g
uint cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* - mode: c++ c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
4
 *  Copyright (C) 2008 MySQL
69
69
  exception is different behavior of old/new timestamps during ALTER TABLE.
70
70
 */
71
71
 
72
 
Field_timestamp::Field_timestamp(unsigned char *ptr_arg,
 
72
Field_timestamp::Field_timestamp(uchar *ptr_arg,
73
73
                                 uint32_t len_arg __attribute__((unused)),
74
 
                                 unsigned char *null_ptr_arg, unsigned char null_bit_arg,
 
74
                                 uchar *null_ptr_arg, uchar null_bit_arg,
75
75
                                 enum utype unireg_check_arg,
76
76
                                 const char *field_name_arg,
77
77
                                 TABLE_SHARE *share,
95
95
Field_timestamp::Field_timestamp(bool maybe_null_arg,
96
96
                                 const char *field_name_arg,
97
97
                                 const CHARSET_INFO * const cs)
98
 
  :Field_str((unsigned char*) 0, MAX_DATETIME_WIDTH,
99
 
             maybe_null_arg ? (unsigned char*) "": 0, 0,
 
98
  :Field_str((uchar*) 0, MAX_DATETIME_WIDTH,
 
99
             maybe_null_arg ? (uchar*) "": 0, 0,
100
100
             NONE, field_name_arg, cs)
101
101
{
102
102
  /* For 4.0 MYD and 4.0 InnoDB compatibility */
142
142
 
143
143
 
144
144
int Field_timestamp::store(const char *from,
145
 
                           uint32_t len,
 
145
                           uint len,
146
146
                           const CHARSET_INFO * const cs __attribute__((unused)))
147
147
{
148
148
  DRIZZLE_TIME l_time;
347
347
}
348
348
 
349
349
 
350
 
bool Field_timestamp::get_date(DRIZZLE_TIME *ltime, uint32_t fuzzydate)
 
350
bool Field_timestamp::get_date(DRIZZLE_TIME *ltime, uint fuzzydate)
351
351
{
352
352
  long temp;
353
353
  THD *thd= table ? table->in_use : current_thd;
385
385
}
386
386
 
387
387
 
388
 
int Field_timestamp::cmp(const unsigned char *a_ptr, const unsigned char *b_ptr)
 
388
int Field_timestamp::cmp(const uchar *a_ptr, const uchar *b_ptr)
389
389
{
390
390
  int32_t a,b;
391
391
#ifdef WORDS_BIGENDIAN
404
404
}
405
405
 
406
406
 
407
 
void Field_timestamp::sort_string(unsigned char *to,uint32_t length __attribute__((unused)))
 
407
void Field_timestamp::sort_string(uchar *to,uint length __attribute__((unused)))
408
408
{
409
409
#ifdef WORDS_BIGENDIAN
410
410
  if (!table || !table->s->db_low_byte_first)