~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/epoch.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 18:00:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2064.
  • Revision ID: brian@tangent.org-20110106180047-0l214nvry9x1lkxo
Merge in fixes for microtimestamp,

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
               const char *field_name_arg,
89
89
               drizzled::TableShare *share) :
90
90
  Field_str(ptr_arg,
91
 
            MicroTimestamp::MAX_STRING_LENGTH - 1 /* no \0 */,
 
91
            MicroTimestamp::MAX_STRING_LENGTH - 1, /* no \0 */
92
92
            null_ptr_arg,
93
93
            null_bit_arg,
94
94
            field_name_arg,
108
108
Epoch::Epoch(bool maybe_null_arg,
109
109
             const char *field_name_arg) :
110
110
  Field_str((unsigned char*) NULL,
111
 
            MicroTimestamp::MAX_STRING_LENGTH - 1 /* no \0 */,
 
111
            MicroTimestamp::MAX_STRING_LENGTH - 1, /* no \0 */
112
112
            maybe_null_arg ? (unsigned char*) "": 0,
113
113
            0,
114
114
            field_name_arg,
342
342
void Epoch::set_time()
343
343
{
344
344
  Session *session= getTable() ? getTable()->in_use : current_session;
345
 
  uint64_t tmp= session->query_start();
 
345
  time_t tmp= session->getCurrentTimestampEpoch();
 
346
 
346
347
  set_notnull();
347
 
  pack_num(tmp);
 
348
  pack_num(static_cast<uint32_t>(tmp));
348
349
}
349
350
 
350
351
void Epoch::set_default()