~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2008-12-05 07:03:50 UTC
  • Revision ID: brian@tangent.org-20081205070350-gvef0krbqgx3kv08
More solaris bits

Show diffs side-by-side

added added

removed removed

Lines of Context:
825
825
*/
826
826
 
827
827
uint64_t
828
 
get_time_value(Session *session __attribute__((unused)),
 
828
get_time_value(Session *,
829
829
               Item ***item_arg, Item **cache_arg,
830
 
               Item *warn_item __attribute__((unused)),
831
 
               bool *is_null)
 
830
               Item *, bool *is_null)
832
831
{
833
832
  uint64_t value;
834
833
  Item *item= **item_arg;
1487
1486
}
1488
1487
 
1489
1488
 
1490
 
bool Item_in_optimizer::fix_left(Session *session, Item **ref __attribute__((unused)))
 
1489
bool Item_in_optimizer::fix_left(Session *session, Item **)
1491
1490
{
1492
1491
  if ((!args[0]->fixed && args[0]->fix_fields(session, args)) ||
1493
1492
      (!cache && !(cache= Item_cache::get_cache(args[0]))))
2596
2595
           failed
2597
2596
*/
2598
2597
 
2599
 
Item *Item_func_case::find_item(String *str __attribute__((unused)))
 
2598
Item *Item_func_case::find_item(String *)
2600
2599
{
2601
2600
  uint32_t value_added_map= 0;
2602
2601
 
3046
3045
    0           left argument is equal to the right argument.
3047
3046
    1           left argument is greater than the right argument.
3048
3047
*/
3049
 
int cmp_int64_t(void *cmp_arg __attribute__((unused)),
3050
 
                 in_int64_t::packed_int64_t *a,
3051
 
                 in_int64_t::packed_int64_t *b)
 
3048
int cmp_int64_t(void *, in_int64_t::packed_int64_t *a,
 
3049
                in_int64_t::packed_int64_t *b)
3052
3050
{
3053
3051
  if (a->unsigned_flag != b->unsigned_flag)
3054
3052
  { 
3071
3069
    return cmp_longs (a->val, b->val);
3072
3070
}
3073
3071
 
3074
 
static int cmp_double(void *cmp_arg __attribute__((unused)), double *a,double *b)
 
3072
static int cmp_double(void *, double *a, double *b)
3075
3073
{
3076
3074
  return *a < *b ? -1 : *a == *b ? 0 : 1;
3077
3075
}
3078
3076
 
3079
 
static int cmp_row(void *cmp_arg __attribute__((unused)), cmp_item_row *a, cmp_item_row *b)
 
3077
static int cmp_row(void *, cmp_item_row *a, cmp_item_row *b)
3080
3078
{
3081
3079
  return a->compare(b);
3082
3080
}
3083
3081
 
3084
3082
 
3085
 
static int cmp_decimal(void *cmp_arg __attribute__((unused)), my_decimal *a, my_decimal *b)
 
3083
static int cmp_decimal(void *, my_decimal *a, my_decimal *b)
3086
3084
{
3087
3085
  /*
3088
3086
    We need call of fixing buffer pointer, because fast sort just copy
3159
3157
  return (unsigned char*) item->val_str(&tmp);
3160
3158
}
3161
3159
 
3162
 
in_row::in_row(uint32_t elements, Item * item __attribute__((unused)))
 
3160
in_row::in_row(uint32_t elements, Item *)
3163
3161
{
3164
3162
  base= (char*) new cmp_item_row[count= elements];
3165
3163
  size= sizeof(cmp_item_row);
3914
3912
 
3915
3913
 
3916
3914
bool
3917
 
Item_cond::fix_fields(Session *session, Item **ref __attribute__((unused)))
 
3915
Item_cond::fix_fields(Session *session, Item **)
3918
3916
{
3919
3917
  assert(fixed == 0);
3920
3918
  List_iterator<Item> li(list);
3991
3989
}
3992
3990
 
3993
3991
 
3994
 
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref __attribute__((unused)))
 
3992
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **)
3995
3993
{
3996
3994
  List_iterator<Item> li(list);
3997
3995
  Item *item;
4834
4832
    NULL if we cannot apply NOT transformation (see Item::neg_transformer()).
4835
4833
*/
4836
4834
 
4837
 
Item *Item_func_not::neg_transformer(Session *session __attribute__((unused)))  /* NOT(x)  ->  x */
 
4835
Item *Item_func_not::neg_transformer(Session *) /* NOT(x)  ->  x */
4838
4836
{
4839
4837
  return args[0];
4840
4838
}
4841
4839
 
4842
4840
 
4843
 
Item *Item_bool_rowready_func2::neg_transformer(Session *session __attribute__((unused)))
 
4841
Item *Item_bool_rowready_func2::neg_transformer(Session *)
4844
4842
{
4845
4843
  Item *item= negated_item();
4846
4844
  return item;
4850
4848
/**
4851
4849
  a IS NULL  ->  a IS NOT NULL.
4852
4850
*/
4853
 
Item *Item_func_isnull::neg_transformer(Session *session __attribute__((unused)))
 
4851
Item *Item_func_isnull::neg_transformer(Session *)
4854
4852
{
4855
4853
  Item *item= new Item_func_isnotnull(args[0]);
4856
4854
  return item;
4860
4858
/**
4861
4859
  a IS NOT NULL  ->  a IS NULL.
4862
4860
*/
4863
 
Item *Item_func_isnotnull::neg_transformer(Session *session __attribute__((unused)))
 
4861
Item *Item_func_isnotnull::neg_transformer(Session *)
4864
4862
{
4865
4863
  Item *item= new Item_func_isnull(args[0]);
4866
4864
  return item;
4885
4883
}
4886
4884
 
4887
4885
 
4888
 
Item *Item_func_nop_all::neg_transformer(Session *session __attribute__((unused)))
 
4886
Item *Item_func_nop_all::neg_transformer(Session *)
4889
4887
{
4890
4888
  /* "NOT (e $cmp$ ANY (SELECT ...)) -> e $rev_cmp$" ALL (SELECT ...) */
4891
4889
  Item_func_not_all *new_item= new Item_func_not_all(args[0]);
4896
4894
  return new_item;
4897
4895
}
4898
4896
 
4899
 
Item *Item_func_not_all::neg_transformer(Session *session __attribute__((unused)))
 
4897
Item *Item_func_not_all::neg_transformer(Session *)
4900
4898
{
4901
4899
  /* "NOT (e $cmp$ ALL (SELECT ...)) -> e $rev_cmp$" ANY (SELECT ...) */
4902
4900
  Item_func_nop_all *new_item= new Item_func_nop_all(args[0]);
5136
5134
  }
5137
5135
}
5138
5136
 
5139
 
bool Item_equal::fix_fields(Session *session __attribute__((unused)), Item **ref __attribute__((unused)))
 
5137
bool Item_equal::fix_fields(Session *, Item **)
5140
5138
{
5141
5139
  List_iterator_fast<Item_field> li(fields);
5142
5140
  Item *item;