~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Monty Taylor
  • Date: 2010-10-30 01:19:00 UTC
  • mto: (1892.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1893.
  • Revision ID: mordred@inaugust.com-20101030011900-2tdt8w9vt7a6pbk0
Fixed things to make things compile with clang

Show diffs side-by-side

added added

removed removed

Lines of Context:
764
764
*/
765
765
 
766
766
enum Arg_comparator::enum_date_cmp_type
767
 
Arg_comparator::can_compare_as_dates(Item *a, Item *b, uint64_t *const_value)
 
767
Arg_comparator::can_compare_as_dates(Item *in_a, Item *in_b,
 
768
                                     uint64_t *const_value)
768
769
{
769
770
  enum enum_date_cmp_type cmp_type= CMP_DATE_DFLT;
770
771
  Item *str_arg= 0, *date_arg= 0;
771
772
 
772
 
  if (a->type() == Item::ROW_ITEM || b->type() == Item::ROW_ITEM)
 
773
  if (in_a->type() == Item::ROW_ITEM || in_b->type() == Item::ROW_ITEM)
773
774
    return CMP_DATE_DFLT;
774
775
 
775
 
  if (a->is_datetime())
 
776
  if (in_a->is_datetime())
776
777
  {
777
 
    if (b->is_datetime())
 
778
    if (in_b->is_datetime())
778
779
      cmp_type= CMP_DATE_WITH_DATE;
779
 
    else if (b->result_type() == STRING_RESULT)
 
780
    else if (in_b->result_type() == STRING_RESULT)
780
781
    {
781
782
      cmp_type= CMP_DATE_WITH_STR;
782
 
      date_arg= a;
783
 
      str_arg= b;
 
783
      date_arg= in_a;
 
784
      str_arg= in_b;
784
785
    }
785
786
  }
786
 
  else if (b->is_datetime() && a->result_type() == STRING_RESULT)
 
787
  else if (in_b->is_datetime() && in_a->result_type() == STRING_RESULT)
787
788
  {
788
789
    cmp_type= CMP_STR_WITH_DATE;
789
 
    date_arg= b;
790
 
    str_arg= a;
 
790
    date_arg= in_b;
 
791
    str_arg= in_a;
791
792
  }
792
793
 
793
794
  if (cmp_type != CMP_DATE_DFLT)