~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2011-01-19 18:03:32 UTC
  • mfrom: (2088.8.12 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110119180332-acfk5i8oofp63s40
Merge in time code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
  if (Item_date_add_interval::get_date(&ltime, TIME_NO_ZERO_DATE))
114
114
    return 0;
115
115
 
116
 
  if (ltime.time_type == DRIZZLE_TIMESTAMP_DATE)
 
116
  if (ltime.time_type == type::DRIZZLE_TIMESTAMP_DATE)
117
117
  {
118
 
    make_date(&ltime, str);
 
118
    ltime.convert(*str, type::DRIZZLE_TIMESTAMP_DATE);
119
119
  }
120
120
  else if (ltime.second_part)
121
121
  {
135
135
  }
136
136
  else
137
137
  {
138
 
    make_datetime(&ltime, str);
 
138
    ltime.convert(*str);
139
139
  }
140
140
 
141
141
  return str;
149
149
  if (Item_date_add_interval::get_date(&ltime, TIME_NO_ZERO_DATE))
150
150
    return (int64_t) 0;
151
151
  date = (ltime.year*100L + ltime.month)*100L + ltime.day;
152
 
  return ltime.time_type == DRIZZLE_TIMESTAMP_DATE ? date :
 
152
  return ltime.time_type == type::DRIZZLE_TIMESTAMP_DATE ? date :
153
153
    ((date*100L + ltime.hour)*100L+ ltime.minute)*100L + ltime.second;
154
154
}
155
155