~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/microtime.cc

  • Committer: Mark Atwood
  • Date: 2011-07-07 02:23:07 UTC
  • mfrom: (2318.6.116 refactor18)
  • Revision ID: me@mark.atwood.name-20110707022307-4db00nqaaczzc3jv
mergeĀ lp:~olafvdspek/drizzle/refactor18

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
  long my_timezone;
91
91
  bool in_dst_time_gap;
92
92
 
93
 
  type::Time::epoch_t time_tmp;
 
93
  type::epoch_t time_tmp;
94
94
  ltime.convert(time_tmp, &my_timezone, &in_dst_time_gap, true);
95
95
  uint64_t tmp_seconds= time_tmp;
96
96
  uint32_t tmp_micro= ltime.second_part;
106
106
  ASSERT_COLUMN_MARKED_FOR_WRITE;
107
107
 
108
108
  uint64_t from_tmp= (uint64_t)from;
109
 
  type::Time::usec_t fractional_seconds= (type::Time::usec_t)((from - from_tmp) * type::Time::FRACTIONAL_DIGITS) % type::Time::FRACTIONAL_DIGITS;
 
109
  type::usec_t fractional_seconds= (type::usec_t)((from - from_tmp) * type::Time::FRACTIONAL_DIGITS) % type::Time::FRACTIONAL_DIGITS;
110
110
 
111
111
  MicroTimestamp temporal;
112
112
  if (not temporal.from_int64_t(from_tmp))
155
155
double Microtime::val_real(void) const
156
156
{
157
157
  uint64_t temp;
158
 
  type::Time::usec_t micro_temp;
 
158
  type::usec_t micro_temp;
159
159
 
160
160
  ASSERT_COLUMN_MARKED_FOR_READ;
161
161
 
204
204
String *Microtime::val_str(String *val_buffer, String *) const
205
205
{
206
206
  uint64_t temp= 0;
207
 
  type::Time::usec_t micro_temp= 0;
 
207
  type::usec_t micro_temp= 0;
208
208
 
209
209
  unpack_num(temp);
210
210
  unpack_num(micro_temp, ptr +8);
275
275
{
276
276
  Session *session= getTable() ? getTable()->in_use : current_session;
277
277
 
278
 
  type::Time::usec_t fractional_seconds= 0;
 
278
  type::usec_t fractional_seconds= 0;
279
279
  uint64_t epoch_seconds= session->times.getCurrentTimestampEpoch(fractional_seconds);
280
280
 
281
281
  set_notnull();