~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/year.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:
89
89
  return (int64_t) temporal.years();
90
90
}
91
91
 
92
 
/* information about this Item tree monotonicity
93
 
 
94
 
  SYNOPSIS
95
 
    Item_func_year::get_monotonicity_info()
96
 
 
97
 
  DESCRIPTION
98
 
  Get information about monotonicity of the function represented by this item
99
 
  tree.
100
 
 
101
 
  RETURN
102
 
    See enum_monotonicity_info.
103
 
*/
104
 
 
105
 
enum_monotonicity_info Item_func_year::get_monotonicity_info() const
106
 
{
107
 
  if (args[0]->type() == Item::FIELD_ITEM &&
108
 
      (args[0]->field_type() == DRIZZLE_TYPE_DATE ||
109
 
       args[0]->field_type() == DRIZZLE_TYPE_DATETIME))
110
 
    return MONOTONIC_INCREASING;
111
 
  return NON_MONOTONIC;
112
 
}
113
 
 
114
92
int64_t Item_func_year::val_int_endpoint(bool left_endp, bool *incl_endp)
115
93
{
116
94
  assert(fixed == 1);