~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/microtime.cc

  • Committer: Brian Aker
  • Date: 2011-01-11 00:57:46 UTC
  • mto: (2082.4.1 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2072.
  • Revision ID: brian@tangent.org-20110111005746-xdu3ql70zp1s1vlb
Fix issue with now() not storing fractional seconds in timestamp(6)

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
  return 0;
91
91
}
92
92
 
 
93
int Microtime::store_time(type::Time *ltime, enum enum_drizzle_timestamp_type )
 
94
{
 
95
  long my_timezone;
 
96
  bool in_dst_time_gap;
 
97
 
 
98
  time_t time_tmp= my_system_gmt_sec(ltime, &my_timezone, &in_dst_time_gap, true);
 
99
  uint64_t tmp_seconds= time_tmp;
 
100
  uint32_t tmp_micro= ltime->second_part;
 
101
 
 
102
  pack_num(tmp_seconds);
 
103
  pack_num(tmp_micro, ptr +8);
 
104
 
 
105
  return 0;
 
106
}
 
107
 
93
108
int Microtime::store(double from)
94
109
{
95
110
  ASSERT_COLUMN_MARKED_FOR_WRITE;