~jaypipes/drizzle/item-class-file-reorg

« back to all changes in this revision

Viewing changes to server/item_cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2008-07-26 18:39:33 UTC
  • mfrom: (212.1.3 codestyle)
  • Revision ID: brian@tangent.org-20080726183933-hueup0fcy2zs1hug
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
*/
801
801
 
802
802
uint64_t
803
 
get_time_value(THD *thd __attribute__((__unused__)),
 
803
get_time_value(THD *thd __attribute__((unused)),
804
804
               Item ***item_arg, Item **cache_arg,
805
 
               Item *warn_item __attribute__((__unused__)),
 
805
               Item *warn_item __attribute__((unused)),
806
806
               bool *is_null)
807
807
{
808
808
  uint64_t value;
1462
1462
}
1463
1463
 
1464
1464
 
1465
 
bool Item_in_optimizer::fix_left(THD *thd, Item **ref __attribute__((__unused__)))
 
1465
bool Item_in_optimizer::fix_left(THD *thd, Item **ref __attribute__((unused)))
1466
1466
{
1467
1467
  if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) ||
1468
1468
      (!cache && !(cache= Item_cache::get_cache(args[0]))))
2571
2571
           failed
2572
2572
*/
2573
2573
 
2574
 
Item *Item_func_case::find_item(String *str __attribute__((__unused__)))
 
2574
Item *Item_func_case::find_item(String *str __attribute__((unused)))
2575
2575
{
2576
2576
  uint value_added_map= 0;
2577
2577
 
3021
3021
    0           left argument is equal to the right argument.
3022
3022
    1           left argument is greater than the right argument.
3023
3023
*/
3024
 
int cmp_int64_t(void *cmp_arg __attribute__((__unused__)),
 
3024
int cmp_int64_t(void *cmp_arg __attribute__((unused)),
3025
3025
                 in_int64_t::packed_int64_t *a,
3026
3026
                 in_int64_t::packed_int64_t *b)
3027
3027
{
3046
3046
    return cmp_longs (a->val, b->val);
3047
3047
}
3048
3048
 
3049
 
static int cmp_double(void *cmp_arg __attribute__((__unused__)), double *a,double *b)
 
3049
static int cmp_double(void *cmp_arg __attribute__((unused)), double *a,double *b)
3050
3050
{
3051
3051
  return *a < *b ? -1 : *a == *b ? 0 : 1;
3052
3052
}
3053
3053
 
3054
 
static int cmp_row(void *cmp_arg __attribute__((__unused__)), cmp_item_row *a, cmp_item_row *b)
 
3054
static int cmp_row(void *cmp_arg __attribute__((unused)), cmp_item_row *a, cmp_item_row *b)
3055
3055
{
3056
3056
  return a->compare(b);
3057
3057
}
3058
3058
 
3059
3059
 
3060
 
static int cmp_decimal(void *cmp_arg __attribute__((__unused__)), my_decimal *a, my_decimal *b)
 
3060
static int cmp_decimal(void *cmp_arg __attribute__((unused)), my_decimal *a, my_decimal *b)
3061
3061
{
3062
3062
  /*
3063
3063
    We need call of fixing buffer pointer, because fast sort just copy
3134
3134
  return (uchar*) item->val_str(&tmp);
3135
3135
}
3136
3136
 
3137
 
in_row::in_row(uint elements, Item * item __attribute__((__unused__)))
 
3137
in_row::in_row(uint elements, Item * item __attribute__((unused)))
3138
3138
{
3139
3139
  base= (char*) new cmp_item_row[count= elements];
3140
3140
  size= sizeof(cmp_item_row);
3889
3889
 
3890
3890
 
3891
3891
bool
3892
 
Item_cond::fix_fields(THD *thd, Item **ref __attribute__((__unused__)))
 
3892
Item_cond::fix_fields(THD *thd, Item **ref __attribute__((unused)))
3893
3893
{
3894
3894
  assert(fixed == 0);
3895
3895
  List_iterator<Item> li(list);
3966
3966
}
3967
3967
 
3968
3968
 
3969
 
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref __attribute__((__unused__)))
 
3969
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref __attribute__((unused)))
3970
3970
{
3971
3971
  List_iterator<Item> li(list);
3972
3972
  Item *item;
4813
4813
    NULL if we cannot apply NOT transformation (see Item::neg_transformer()).
4814
4814
*/
4815
4815
 
4816
 
Item *Item_func_not::neg_transformer(THD *thd __attribute__((__unused__)))      /* NOT(x)  ->  x */
 
4816
Item *Item_func_not::neg_transformer(THD *thd __attribute__((unused)))  /* NOT(x)  ->  x */
4817
4817
{
4818
4818
  return args[0];
4819
4819
}
4820
4820
 
4821
4821
 
4822
 
Item *Item_bool_rowready_func2::neg_transformer(THD *thd __attribute__((__unused__)))
 
4822
Item *Item_bool_rowready_func2::neg_transformer(THD *thd __attribute__((unused)))
4823
4823
{
4824
4824
  Item *item= negated_item();
4825
4825
  return item;
4829
4829
/**
4830
4830
  a IS NULL  ->  a IS NOT NULL.
4831
4831
*/
4832
 
Item *Item_func_isnull::neg_transformer(THD *thd __attribute__((__unused__)))
 
4832
Item *Item_func_isnull::neg_transformer(THD *thd __attribute__((unused)))
4833
4833
{
4834
4834
  Item *item= new Item_func_isnotnull(args[0]);
4835
4835
  return item;
4839
4839
/**
4840
4840
  a IS NOT NULL  ->  a IS NULL.
4841
4841
*/
4842
 
Item *Item_func_isnotnull::neg_transformer(THD *thd __attribute__((__unused__)))
 
4842
Item *Item_func_isnotnull::neg_transformer(THD *thd __attribute__((unused)))
4843
4843
{
4844
4844
  Item *item= new Item_func_isnull(args[0]);
4845
4845
  return item;
4864
4864
}
4865
4865
 
4866
4866
 
4867
 
Item *Item_func_nop_all::neg_transformer(THD *thd __attribute__((__unused__)))
 
4867
Item *Item_func_nop_all::neg_transformer(THD *thd __attribute__((unused)))
4868
4868
{
4869
4869
  /* "NOT (e $cmp$ ANY (SELECT ...)) -> e $rev_cmp$" ALL (SELECT ...) */
4870
4870
  Item_func_not_all *new_item= new Item_func_not_all(args[0]);
4875
4875
  return new_item;
4876
4876
}
4877
4877
 
4878
 
Item *Item_func_not_all::neg_transformer(THD *thd __attribute__((__unused__)))
 
4878
Item *Item_func_not_all::neg_transformer(THD *thd __attribute__((unused)))
4879
4879
{
4880
4880
  /* "NOT (e $cmp$ ALL (SELECT ...)) -> e $rev_cmp$" ANY (SELECT ...) */
4881
4881
  Item_func_nop_all *new_item= new Item_func_nop_all(args[0]);
5115
5115
  }
5116
5116
}
5117
5117
 
5118
 
bool Item_equal::fix_fields(THD *thd __attribute__((__unused__)), Item **ref __attribute__((__unused__)))
 
5118
bool Item_equal::fix_fields(THD *thd __attribute__((unused)), Item **ref __attribute__((unused)))
5119
5119
{
5120
5120
  List_iterator_fast<Item_field> li(fields);
5121
5121
  Item *item;