~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/time/to_days.cc

  • Committer: Monty Taylor
  • Date: 2008-11-15 17:58:57 UTC
  • mfrom: (575.5.1 drizzle)
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 586.
  • Revision ID: monty@inaugust.com-20081115175857-kxdeopxzbyyz5bkd
MergedĀ fromĀ David.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
{
50
50
  if (args[0]->type() == Item::FIELD_ITEM)
51
51
  {
52
 
    if (args[0]->field_type() == DRIZZLE_TYPE_NEWDATE)
 
52
    if (args[0]->field_type() == DRIZZLE_TYPE_DATE)
53
53
      return MONOTONIC_STRICT_INCREASING;
54
54
    if (args[0]->field_type() == DRIZZLE_TYPE_DATETIME)
55
55
      return MONOTONIC_INCREASING;
69
69
  }
70
70
  res=(int64_t) calc_daynr(ltime.year,ltime.month,ltime.day);
71
71
 
72
 
  if (args[0]->field_type() == DRIZZLE_TYPE_NEWDATE)
 
72
  if (args[0]->field_type() == DRIZZLE_TYPE_DATE)
73
73
  {
74
74
    // TO_DAYS() is strictly monotonic for dates, leave incl_endp intact
75
75
    return res;