~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/sql_base.cc

  • Committer: Monty Taylor
  • Date: 2008-07-09 15:52:52 UTC
  • mto: (77.6.1 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: monty@inaugust.com-20080709155252-lnzmxxje1g40z3a7
Warning fixes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
466
466
     that the table is deleted or the thread is killed.
467
467
*/
468
468
 
469
 
void release_table_share(TABLE_SHARE *share, enum release_type type)
 
469
void release_table_share(TABLE_SHARE *share,
 
470
                         enum release_type type __attribute__((__unused__)))
470
471
{
471
472
  bool to_be_deleted= 0;
472
473
  DBUG_ENTER("release_table_share");
609
610
    #           Pointer to list of names of open tables.
610
611
*/
611
612
 
612
 
OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild)
 
613
OPEN_TABLE_LIST *list_open_tables(THD *thd __attribute__((__unused__)),
 
614
                                  const char *db, const char *wild)
613
615
{
614
616
  int result = 0;
615
617
  OPEN_TABLE_LIST **start_list, *open_list;
1239
1241
 
1240
1242
 
1241
1243
/* close_temporary_tables' internal, 4 is due to uint4korr definition */
1242
 
static inline uint  tmpkeyval(THD *thd, TABLE *table)
 
1244
static inline uint  tmpkeyval(THD *thd __attribute__((__unused__)),
 
1245
                              TABLE *table)
1243
1246
{
1244
1247
  return uint4korr(table->s->table_cache_key.str + table->s->table_cache_key.length - 4);
1245
1248
}
1532
1535
*/
1533
1536
 
1534
1537
void update_non_unique_table_error(TABLE_LIST *update,
1535
 
                                   const char *operation,
1536
 
                                   TABLE_LIST *duplicate)
 
1538
                                   const char *operation __attribute__((__unused__)),
 
1539
                                   TABLE_LIST *duplicate __attribute__((__unused__)))
1537
1540
{
1538
1541
  my_error(ER_UPDATE_TABLE_USED, MYF(0), update->alias);
1539
1542
}
3297
3300
static int open_unireg_entry(THD *thd, TABLE *entry, TABLE_LIST *table_list,
3298
3301
                             const char *alias,
3299
3302
                             char *cache_key, uint cache_key_length,
3300
 
                             MEM_ROOT *mem_root, uint flags)
 
3303
                             MEM_ROOT *mem_root __attribute__((__unused__)),
 
3304
                             uint flags __attribute__((__unused__)))
3301
3305
{
3302
3306
  int error;
3303
3307
  TABLE_SHARE *share;
4318
4322
 
4319
4323
static Field *
4320
4324
find_field_in_view(THD *thd, TABLE_LIST *table_list,
4321
 
                   const char *name, uint length,
4322
 
                   const char *item_name, Item **ref,
4323
 
                   bool register_tree_change)
 
4325
                   const char *name, uint length __attribute__((__unused__)),
 
4326
                   const char *item_name __attribute__((__unused__)),
 
4327
                   Item **ref,
 
4328
                   bool register_tree_change __attribute__((__unused__)))
4324
4329
{
4325
4330
  DBUG_ENTER("find_field_in_view");
4326
4331
  DBUG_PRINT("enter",
4398
4403
 
4399
4404
static Field *
4400
4405
find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
4401
 
                           uint length, Item **ref, bool register_tree_change,
 
4406
                           uint length __attribute__((__unused__)),
 
4407
                           Item **ref, bool register_tree_change,
4402
4408
                           TABLE_LIST **actual_table)
4403
4409
{
4404
4410
  List_iterator_fast<Natural_join_column>
5595
5601
*/
5596
5602
 
5597
5603
static bool
5598
 
store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join,
 
5604
store_natural_using_join_columns(THD *thd __attribute__((__unused__)),
 
5605
                                 TABLE_LIST *natural_using_join,
5599
5606
                                 TABLE_LIST *table_ref_1,
5600
5607
                                 TABLE_LIST *table_ref_2,
5601
5608
                                 List<String> *using_fields,
5926
5933
** Expand all '*' in given fields
5927
5934
****************************************************************************/
5928
5935
 
5929
 
int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
5930
 
               List<Item> *sum_func_list,
5931
 
               uint wild_num)
 
5936
int setup_wild(THD *thd,
 
5937
               TABLE_LIST *tables __attribute__((__unused__)),
 
5938
               List<Item> &fields,
 
5939
               List<Item> *sum_func_list,
 
5940
               uint wild_num)
5932
5941
{
5933
5942
  if (!wild_num)
5934
5943
    return(0);
6265
6274
 
6266
6275
bool
6267
6276
insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
6268
 
              const char *table_name, List_iterator<Item> *it,
6269
 
              bool any_privileges)
 
6277
              const char *table_name, List_iterator<Item> *it,
 
6278
              bool any_privileges __attribute__((__unused__)))
6270
6279
{
6271
6280
  Field_iterator_table_ref field_iterator;
6272
6281
  bool found;
6416
6425
    false if all is OK
6417
6426
*/
6418
6427
 
6419
 
int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
 
6428
int setup_conds(THD *thd, TABLE_LIST *tables __attribute__((__unused__)),
 
6429
                TABLE_LIST *leaves,
6420
6430
                COND **conds)
6421
6431
{
6422
6432
  SELECT_LEX *select_lex= thd->lex->current_select;
6590
6600
*/
6591
6601
 
6592
6602
bool
6593
 
fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
 
6603
fill_record(THD *thd, Field **ptr, List<Item> &values,
 
6604
            bool ignore_errors __attribute__((__unused__)))
6594
6605
{
6595
6606
  List_iterator_fast<Item> v(values);
6596
6607
  Item *value;