~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/from_unixtime.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-30 22:44:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2362.
  • Revision ID: olafvdspek@gmail.com-20110630224416-hw5qqjvub0nmncwd
Move type::Time typedefs to common_fwd

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
bool Item_func_from_unixtime::get_date(type::Time &ltime, uint32_t)
76
76
{
77
77
  uint64_t tmp= 0;
78
 
  type::Time::usec_t fractional_tmp= 0;
 
78
  type::usec_t fractional_tmp= 0;
79
79
 
80
80
  switch (args[0]->result_type()) {
81
81
  case REAL_RESULT:
86
86
      double double_tmp= args[0]->val_real();
87
87
 
88
88
      tmp= (uint64_t)(double_tmp);
89
 
      fractional_tmp=  (type::Time::usec_t)((uint64_t)((double_tmp - tmp) * type::Time::FRACTIONAL_DIGITS) % type::Time::FRACTIONAL_DIGITS);
 
89
      fractional_tmp=  (type::usec_t)((uint64_t)((double_tmp - tmp) * type::Time::FRACTIONAL_DIGITS) % type::Time::FRACTIONAL_DIGITS);
90
90
 
91
91
      break;
92
92
    }