~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/temporal_interval.h

  • Committer: Prafulla Tekawade
  • Date: 2010-08-06 11:21:12 UTC
  • mto: (1711.1.21 build) (1725.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: prafulla_t@users.sourceforge.net-20100806112112-7w5u0s3nx9u67nzt
Fix for Bug 586051

1. test_if_ref method which checks whether predicate is already evaluated
   due to ref/eq_ref access or not was incorrectly removing a predicate 
   that was not implicitly evaluated due to ref access (due to presence of filesort ?)
   It was field=NULL predicate.
   Such predicate should be kept and execution engine will filter out rows
   correctly. Removal of such predicate led to returning of rows which had
   NULL for join/predicate columns.
2. field COMP_OP NULL will always false for all fields except when COMP_OP
   is NULL-safe equality operator. Modified range optimizer to return zero
   row count in such cases.
   Query now does not even run. It returns zero result. As such Fix(1) is not
   required but we might hit that case in some other query (I have not tried it
   yet)
3. Fixed Field::val_str to print "NULL" for literal NULL instead of "0". It
   added lot of confusion while debugging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    return neg;
96
96
  }
97
97
 
98
 
  inline uint32_t  get_year() { return year; }
99
 
  inline void set_year(uint32_t new_year) { year = new_year; }
100
 
 
101
 
  inline uint32_t  get_month(){ return month; }
102
 
  inline void set_month(uint32_t new_month) { month = new_month; }
103
 
 
104
 
  inline uint32_t  get_day(){ return day; }
105
 
  inline void set_day(uint32_t new_day) { day = new_day; }
106
 
 
107
 
  inline uint32_t  get_hour(){ return hour; }
108
 
  inline void set_hour(uint32_t new_hour) { hour = new_hour; }
109
 
 
110
 
  inline uint64_t  get_minute(){ return minute; }
111
 
  inline void set_minute(uint32_t new_minute) { minute = new_minute; }
112
 
 
113
 
  inline uint64_t  get_second(){ return second; }
114
 
  inline void set_second(uint32_t new_second) { second = new_second; }
115
 
 
116
 
  inline uint64_t  get_second_part(){ return second_part; }
117
 
  inline void set_second_part(uint32_t new_second_part) { second_part = new_second_part; }
 
98
  inline uint32_t  get_year() { return year; };
 
99
  inline void set_year(uint32_t new_year) { year = new_year; };
 
100
 
 
101
  inline uint32_t  get_month(){ return month; };
 
102
  inline void set_month(uint32_t new_month) { month = new_month; };
 
103
 
 
104
  inline uint32_t  get_day(){ return day; };
 
105
  inline void set_day(uint32_t new_day) { day = new_day; };
 
106
 
 
107
  inline uint32_t  get_hour(){ return hour; };
 
108
  inline void set_hour(uint32_t new_hour) { hour = new_hour; };
 
109
 
 
110
  inline uint64_t  get_minute(){ return minute; };
 
111
  inline void set_minute(uint32_t new_minute) { minute = new_minute; };
 
112
 
 
113
  inline uint64_t  get_second(){ return second; };
 
114
  inline void set_second(uint32_t new_second) { second = new_second; };
 
115
 
 
116
  inline uint64_t  get_second_part(){ return second_part; };
 
117
  inline void set_second_part(uint32_t new_second_part) { second_part = new_second_part; };
118
118
 
119
119
  /**
120
120
   * Populate this TemporalInterval from a string value