~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 05:17:09 UTC
  • Revision ID: brian@tangent.org-20110106051709-oa0se8ur02uc6i9o
Added native functions into the function table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3880
3880
  void *orig_session_marker= session->session_marker;
3881
3881
  unsigned char buff[sizeof(char*)];                    // Max local vars in function
3882
3882
  not_null_tables_cache= used_tables_cache= 0;
3883
 
  const_item_cache= 1;
 
3883
  const_item_cache= true;
3884
3884
 
3885
3885
  if (functype() == COND_OR_FUNC)
3886
3886
    session->session_marker= 0;
3955
3955
  Item *item;
3956
3956
 
3957
3957
  used_tables_cache=0;
3958
 
  const_item_cache=1;
 
3958
  const_item_cache= true;
3959
3959
 
3960
3960
  and_tables_cache= ~(table_map) 0; // Here and below we do as fix_fields does
3961
3961
  not_null_tables_cache= 0;
4144
4144
  Item *item;
4145
4145
 
4146
4146
  used_tables_cache=0;
4147
 
  const_item_cache=1;
 
4147
  const_item_cache= true;
4148
4148
  while ((item=li++))
4149
4149
  {
4150
4150
    item->update_used_tables();
4888
4888
Item_equal::Item_equal(Item_field *f1, Item_field *f2)
4889
4889
  : item::function::Boolean(), const_item(0), eval_item(0), cond_false(0)
4890
4890
{
4891
 
  const_item_cache= 0;
 
4891
  const_item_cache= false;
4892
4892
  fields.push_back(f1);
4893
4893
  fields.push_back(f2);
4894
4894
}
4896
4896
Item_equal::Item_equal(Item *c, Item_field *f)
4897
4897
  : item::function::Boolean(), eval_item(0), cond_false(0)
4898
4898
{
4899
 
  const_item_cache= 0;
 
4899
  const_item_cache= false;
4900
4900
  fields.push_back(f);
4901
4901
  const_item= c;
4902
4902
}
4905
4905
Item_equal::Item_equal(Item_equal *item_equal)
4906
4906
  : item::function::Boolean(), eval_item(0), cond_false(0)
4907
4907
{
4908
 
  const_item_cache= 0;
 
4908
  const_item_cache= false;
4909
4909
  List_iterator_fast<Item_field> li(item_equal->fields);
4910
4910
  Item_field *item;
4911
4911
  while ((item= li++))
4929
4929
  func->set_cmp_func();
4930
4930
  func->quick_fix_field();
4931
4931
  if ((cond_false= !func->val_int()))
4932
 
    const_item_cache= 1;
 
4932
    const_item_cache= true;
4933
4933
}
4934
4934
 
4935
4935
void Item_equal::add(Item_field *f)
5075
5075
  List_iterator_fast<Item_field> li(fields);
5076
5076
  Item *item;
5077
5077
  not_null_tables_cache= used_tables_cache= 0;
5078
 
  const_item_cache= 0;
 
5078
  const_item_cache= false;
5079
5079
  while ((item= li++))
5080
5080
  {
5081
5081
    table_map tmp_table_map;