~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Monty Taylor
  • Date: 2008-11-04 13:22:55 UTC
  • mto: (575.1.7 fix-headers)
  • mto: This revision was merged to the branch mainline in revision 577.
  • Revision ID: monty@inaugust.com-20081104132255-l9dhglk4ix6vd3u7
Changed a bunch of __attribute__((unused)) to removing the parameter name instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4572
4572
 
4573
4573
static bool
4574
4574
update_ref_and_keys(Session *session, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
4575
 
                    uint32_t tables, COND *cond,
4576
 
                    COND_EQUAL *cond_equal __attribute__((unused)),
 
4575
                    uint32_t tables, COND *cond, COND_EQUAL *,
4577
4576
                    table_map normal_tables, SELECT_LEX *select_lex,
4578
4577
                    SARGABLE_PARAM **sargables)
4579
4578
{
4923
4922
                 table_map remaining_tables,
4924
4923
                 uint32_t      idx,
4925
4924
                 double    record_count,
4926
 
                 double    read_time __attribute__((unused)))
 
4925
                 double)
4927
4926
{
4928
4927
  KEYUSE *best_key=         0;
4929
4928
  uint32_t best_max_key_part=   0;
6230
6229
  Find how much space the prevous read not const tables takes in cache.
6231
6230
*/
6232
6231
 
6233
 
static void calc_used_field_length(Session *session __attribute__((unused)),
6234
 
                                   JOIN_TAB *join_tab)
 
6232
static void calc_used_field_length(Session *, JOIN_TAB *join_tab)
6235
6233
{
6236
6234
  uint32_t null_fields,blobs,fields,rec_length;
6237
6235
  Field **f_ptr,*field;
8371
8369
  {
8372
8370
    return (void*) sql_alloc((uint) size);
8373
8371
  }
8374
 
  static void operator delete(void *ptr __attribute__((unused)),
8375
 
                              size_t size __attribute__((unused)))
 
8372
  static void operator delete(void *, size_t)
8376
8373
  { TRASH(ptr, size); }
8377
8374
 
8378
8375
  Item *and_level;
11590
11587
 
11591
11588
        /* ARGSUSED */
11592
11589
static int
11593
 
join_no_more_records(READ_RECORD *info __attribute__((unused)))
 
11590
join_no_more_records(READ_RECORD *)
11594
11591
{
11595
11592
  return -1;
11596
11593
}
11890
11887
 
11891
11888
/* ARGSUSED */
11892
11889
static enum_nested_loop_state
11893
 
end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
11894
 
         bool end_of_records)
 
11890
end_send(JOIN *join, JOIN_TAB *,
 
11891
         bool end_of_records)
11895
11892
{
11896
11893
  if (!end_of_records)
11897
11894
  {
11955
11952
}
11956
11953
 
11957
11954
 
11958
 
        /* ARGSUSED */
 
11955
/* ARGSUSED */
11959
11956
enum_nested_loop_state
11960
 
end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
11961
 
               bool end_of_records)
 
11957
end_send_group(JOIN *join, JOIN_TAB *, bool end_of_records)
11962
11958
{
11963
11959
  int idx= -1;
11964
11960
  enum_nested_loop_state ok_code= NESTED_LOOP_OK;
11966
11962
  if (!join->first_record || end_of_records ||
11967
11963
      (idx=test_if_item_cache_changed(join->group_fields)) >= 0)
11968
11964
  {
11969
 
    if (join->first_record || 
 
11965
    if (join->first_record ||
11970
11966
        (end_of_records && !join->group && !join->group_optimized_away))
11971
11967
    {
11972
11968
      if (idx < (int) join->send_group_parts)
12048
12044
}
12049
12045
 
12050
12046
 
12051
 
        /* ARGSUSED */
 
12047
/* ARGSUSED */
12052
12048
enum_nested_loop_state
12053
 
end_write(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
12054
 
          bool end_of_records)
 
12049
end_write(JOIN *join, JOIN_TAB *,
 
12050
          bool end_of_records)
12055
12051
{
12056
12052
  Table *table=join->tmp_table;
12057
12053
 
12098
12094
/** Group by searching after group record and updating it if possible. */
12099
12095
 
12100
12096
static enum_nested_loop_state
12101
 
end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
12102
 
           bool end_of_records)
 
12097
end_update(JOIN *join, JOIN_TAB *,
 
12098
           bool end_of_records)
12103
12099
{
12104
12100
  Table *table=join->tmp_table;
12105
12101
  order_st   *group;
12174
12170
/** Like end_update, but this is done with unique constraints instead of keys.  */
12175
12171
 
12176
12172
static enum_nested_loop_state
12177
 
end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
12178
 
                  bool end_of_records)
 
12173
end_unique_update(JOIN *join, JOIN_TAB *,
 
12174
                  bool end_of_records)
12179
12175
{
12180
12176
  Table *table=join->tmp_table;
12181
12177
  int     error;
12219
12215
}
12220
12216
 
12221
12217
 
12222
 
        /* ARGSUSED */
 
12218
/* ARGSUSED */
12223
12219
enum_nested_loop_state
12224
 
end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
12225
 
                bool end_of_records)
 
12220
end_write_group(JOIN *join, JOIN_TAB *,
 
12221
                bool end_of_records)
12226
12222
{
12227
12223
  Table *table=join->tmp_table;
12228
12224
  int     idx= -1;
14369
14365
static order_st *
14370
14366
create_distinct_group(Session *session, Item **ref_pointer_array,
14371
14367
                      order_st *order_list, List<Item> &fields,
14372
 
                      List<Item> &all_fields __attribute__((unused)),
14373
 
                      bool *all_order_by_fields_used)
 
14368
                      List<Item> &, bool *all_order_by_fields_used)
14374
14369
{
14375
14370
  List_iterator<Item> li(fields);
14376
14371
  Item *item;
15147
15142
/** Update record 0 in tmp_table from record 1. */
15148
15143
 
15149
15144
static void
15150
 
update_tmptable_sum_func(Item_sum **func_ptr,
15151
 
                         Table *tmp_table __attribute__((unused)))
 
15145
update_tmptable_sum_func(Item_sum **func_ptr, Table *)
15152
15146
{
15153
15147
  Item_sum *func;
15154
15148
  while ((func= *(func_ptr++)))
15254
15248
  @param select   pointer to st_select_lex which subselects joins we will free
15255
15249
*/
15256
15250
 
15257
 
void free_underlaid_joins(Session *session __attribute__((unused)),
15258
 
                          SELECT_LEX *select)
 
15251
void free_underlaid_joins(Session *, SELECT_LEX *select)
15259
15252
{
15260
15253
  for (SELECT_LEX_UNIT *unit= select->first_inner_unit();
15261
15254
       unit;
16277
16270
  @query_type    type of the query is being generated
16278
16271
*/
16279
16272
 
16280
 
static void print_join(Session *session,
16281
 
                       String *str,
16282
 
                       List<TableList> *tables,
16283
 
                       enum_query_type query_type __attribute__((unused)))
 
16273
static void print_join(Session *session, String *str,
 
16274
                       List<TableList> *tables, enum_query_type)
16284
16275
{
16285
16276
  /* List is reversed => we should reverse it before using */
16286
16277
  List_iterator_fast<TableList> ti(*tables);