~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/item_subselect.cc

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
604
604
  }
605
605
}
606
606
 
607
 
longlong Item_singlerow_subselect::val_int()
 
607
int64_t Item_singlerow_subselect::val_int()
608
608
{
609
609
  assert(fixed == 1);
610
610
  if (!exec() && !value->null_value)
754
754
  return (double) value;
755
755
}
756
756
 
757
 
longlong Item_exists_subselect::val_int()
 
757
int64_t Item_exists_subselect::val_int()
758
758
{
759
759
  assert(fixed == 1);
760
760
  if (exec())
773
773
    reset();
774
774
    return 0;
775
775
  }
776
 
  str->set((ulonglong)value,&my_charset_bin);
 
776
  str->set((uint64_t)value,&my_charset_bin);
777
777
  return str;
778
778
}
779
779
 
824
824
}
825
825
 
826
826
 
827
 
longlong Item_in_subselect::val_int()
 
827
int64_t Item_in_subselect::val_int()
828
828
{
829
829
  /*
830
830
    As far as Item_in_subselect called only from Item_in_optimizer this
831
831
    method should not be used
832
832
  */
833
 
  assert(0);
834
833
  assert(fixed == 1);
835
834
  null_value= 0;
836
835
  if (exec())
865
864
    null_value= 1;
866
865
    return 0;
867
866
  }
868
 
  str->set((ulonglong)value, &my_charset_bin);
 
867
  str->set((uint64_t)value, &my_charset_bin);
869
868
  return str;
870
869
}
871
870
 
1182
1181
      Item *having= item, *orig_item= item;
1183
1182
      select_lex->item_list.empty();
1184
1183
      select_lex->item_list.push_back(new Item_int("Not_used",
1185
 
                                                   (longlong) 1,
 
1184
                                                   (int64_t) 1,
1186
1185
                                                   MY_INT64_NUM_DECIMAL_DIGITS));
1187
1186
      select_lex->ref_pointer_array[0]= select_lex->item_list.head();
1188
1187