~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-05-06 06:59:53 UTC
  • mfrom: (1003.1.20 merge)
  • Revision ID: brian@gaz-20090506065953-4mrfmaty42e0ixpq
Merge handler cleanup (and ALTER TABLE cleanup) We go from 1 and 2 half
thought out systems... to just 1.

This should all be changed when we finish the StorageEngine rewrite

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
  return julian_day_number;
127
127
}
128
128
 
129
 
/*
130
 
  Get information about this Item tree monotonicity
131
 
 
132
 
  SYNOPSIS
133
 
    Item_func_to_days::get_monotonicity_info()
134
 
 
135
 
  DESCRIPTION
136
 
  Get information about monotonicity of the function represented by this item
137
 
  tree.
138
 
 
139
 
  RETURN
140
 
    See enum_monotonicity_info.
141
 
*/
142
 
enum_monotonicity_info Item_func_to_days::get_monotonicity_info() const
143
 
{
144
 
  if (args[0]->type() == Item::FIELD_ITEM)
145
 
  {
146
 
    if (args[0]->field_type() == DRIZZLE_TYPE_DATE)
147
 
      return MONOTONIC_STRICT_INCREASING;
148
 
    if (args[0]->field_type() == DRIZZLE_TYPE_DATETIME)
149
 
      return MONOTONIC_INCREASING;
150
 
  }
151
 
  return NON_MONOTONIC;
152
 
}
153
 
 
154
129
int64_t Item_func_to_days::val_int_endpoint(bool left_endp, bool *incl_endp)
155
130
{
156
131
  assert(fixed);