~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 20:57:01 UTC
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818205701-rzeyd4qw4xj7wx7l
Refactoring of class Table

Show diffs side-by-side

added added

removed removed

Lines of Context:
730
730
  @details
731
731
  This function is called when:
732
732
  - Comparing items in the WHERE clause (when doing where optimization)
733
 
  - When trying to find an ORDER BY/GROUP BY item in the SELECT part
 
733
  - When trying to find an order_st BY/GROUP BY item in the SELECT part
734
734
*/
735
735
 
736
736
bool Item::eq(const Item *item, bool binary_cmp __attribute__((unused))) const
956
956
  Table *table= field->table;
957
957
  THD *thd= table->in_use;
958
958
  enum_check_fields tmp= thd->count_cuted_fields;
959
 
  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
960
959
  ulong sql_mode= thd->variables.sql_mode;
961
960
  thd->variables.sql_mode&= ~(MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE);
962
961
  thd->count_cuted_fields= CHECK_FIELD_IGNORE;
963
962
  res= save_in_field(field, no_conversions);
964
963
  thd->count_cuted_fields= tmp;
965
 
  dbug_tmp_restore_column_map(table->write_set, old_map);
966
964
  thd->variables.sql_mode= sql_mode;
967
965
  return res;
968
966
}
3008
3006
    - NULL if find_item is not in group_list
3009
3007
*/
3010
3008
 
3011
 
static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
 
3009
static Item** find_field_in_group_list(Item *find_item, order_st *group_list)
3012
3010
{
3013
3011
  const char *db_name;
3014
3012
  const char *table_name;
3015
3013
  const char *field_name;
3016
 
  ORDER      *found_group= NULL;
 
3014
  order_st      *found_group= NULL;
3017
3015
  int         found_match_degree= 0;
3018
3016
  Item_ident *cur_field;
3019
3017
  int         cur_match_degree= 0;
3039
3037
 
3040
3038
  assert(field_name != 0);
3041
3039
 
3042
 
  for (ORDER *cur_group= group_list ; cur_group ; cur_group= cur_group->next)
 
3040
  for (order_st *cur_group= group_list ; cur_group ; cur_group= cur_group->next)
3043
3041
  {
3044
3042
    if ((*(cur_group->item))->real_item()->type() == Item::FIELD_ITEM)
3045
3043
    {
3140
3138
{
3141
3139
  Item **group_by_ref= NULL;
3142
3140
  Item **select_ref= NULL;
3143
 
  ORDER *group_list= (ORDER*) select->group_list.first;
 
3141
  order_st *group_list= (order_st*) select->group_list.first;
3144
3142
  bool ambiguous_fields= false;
3145
3143
  uint counter;
3146
3144
  enum_resolution_type resolution;