components/mysql-5-6/patches/bug22932576.patch
branchs11u3-sru
changeset 6285 8e22d153c3d9
parent 6284 71199f3a4dcd
child 6296 7bc41d30dd23
equal deleted inserted replaced
6284:71199f3a4dcd 6285:8e22d153c3d9
     1 Developed in-house, not fed back.
       
     2 Solaris-specific
       
     3 stlport is no longer supported/maintained, so we had to switch to std=c++03
       
     4 For Sun Studio we must build with -std=c++03 flag
       
     5 Since Sun Studio depends on seeing __attribute__ ((__weakref__)) in order to generate correct code.
       
     6 Introduced MY_ATTRIBUTE:  sed -i -e 's/__attribute__/MY_ATTRIBUTE/g' `cat <all srouce files>`
       
     7 
       
     8 --- a/client/mysql.cc
       
     9 +++ b/client/mysql.cc
       
    10 @@ -1819,7 +1819,7 @@ static void usage(int version)
       
    11  
       
    12  
       
    13  my_bool
       
    14 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
    15 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
    16  	       char *argument)
       
    17  {
       
    18    switch(optid) {
       
    19 @@ -2755,8 +2755,8 @@ static void initialize_readline (char *name)
       
    20  */
       
    21  
       
    22  static char **new_mysql_completion(const char *text,
       
    23 -                                   int start __attribute__((unused)),
       
    24 -                                   int end __attribute__((unused)))
       
    25 +                                   int start MY_ATTRIBUTE((unused)),
       
    26 +                                   int end MY_ATTRIBUTE((unused)))
       
    27  {
       
    28    if (!status.batch && !quick)
       
    29  #if defined(USE_NEW_READLINE_INTERFACE)
       
    30 @@ -3166,8 +3166,8 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las
       
    31  }
       
    32  
       
    33  
       
    34 -static int com_server_help(String *buffer __attribute__((unused)),
       
    35 -			   char *line __attribute__((unused)), char *help_arg)
       
    36 +static int com_server_help(String *buffer MY_ATTRIBUTE((unused)),
       
    37 +			   char *line MY_ATTRIBUTE((unused)), char *help_arg)
       
    38  {
       
    39    MYSQL_ROW cur;
       
    40    const char *server_cmd;
       
    41 @@ -3273,8 +3273,8 @@ err:
       
    42  }
       
    43  
       
    44  static int
       
    45 -com_help(String *buffer __attribute__((unused)),
       
    46 -	 char *line __attribute__((unused)))
       
    47 +com_help(String *buffer MY_ATTRIBUTE((unused)),
       
    48 +	 char *line MY_ATTRIBUTE((unused)))
       
    49  {
       
    50    reg1 int i, j;
       
    51    char * help_arg= strchr(line,' '), buff[32], *end;
       
    52 @@ -3313,7 +3313,7 @@ com_help(String *buffer __attribute__((unused)),
       
    53  
       
    54  	/* ARGSUSED */
       
    55  static int
       
    56 -com_clear(String *buffer,char *line __attribute__((unused)))
       
    57 +com_clear(String *buffer,char *line MY_ATTRIBUTE((unused)))
       
    58  {
       
    59  #ifdef HAVE_READLINE
       
    60    if (status.add_to_history)
       
    61 @@ -3325,7 +3325,7 @@ com_clear(String *buffer,char *line __attribute__((unused)))
       
    62  
       
    63  	/* ARGSUSED */
       
    64  static int
       
    65 -com_charset(String *buffer __attribute__((unused)), char *line)
       
    66 +com_charset(String *buffer MY_ATTRIBUTE((unused)), char *line)
       
    67  {
       
    68    char buff[256], *param;
       
    69    const CHARSET_INFO *new_cs;
       
    70 @@ -3357,7 +3357,7 @@ com_charset(String *buffer __attribute__((unused)), char *line)
       
    71  
       
    72  
       
    73  static int
       
    74 -com_go(String *buffer,char *line __attribute__((unused)))
       
    75 +com_go(String *buffer,char *line MY_ATTRIBUTE((unused)))
       
    76  {
       
    77    char		buff[200]; /* about 110 chars used so far */
       
    78    char		time_buff[52+3+1]; /* time max + space&parens + NUL */
       
    79 @@ -4118,8 +4118,8 @@ print_tab_data(MYSQL_RES *result)
       
    80  }
       
    81  
       
    82  static int
       
    83 -com_tee(String *buffer __attribute__((unused)),
       
    84 -        char *line __attribute__((unused)))
       
    85 +com_tee(String *buffer MY_ATTRIBUTE((unused)),
       
    86 +        char *line MY_ATTRIBUTE((unused)))
       
    87  {
       
    88    char file_name[FN_REFLEN], *end, *param;
       
    89  
       
    90 @@ -4161,8 +4161,8 @@ com_tee(String *buffer __attribute__((unused)),
       
    91  
       
    92  
       
    93  static int
       
    94 -com_notee(String *buffer __attribute__((unused)),
       
    95 -	  char *line __attribute__((unused)))
       
    96 +com_notee(String *buffer MY_ATTRIBUTE((unused)),
       
    97 +	  char *line MY_ATTRIBUTE((unused)))
       
    98  {
       
    99    if (opt_outfile)
       
   100      end_tee();
       
   101 @@ -4176,8 +4176,8 @@ com_notee(String *buffer __attribute__((unused)),
       
   102  
       
   103  #ifdef USE_POPEN
       
   104  static int
       
   105 -com_pager(String *buffer __attribute__((unused)),
       
   106 -          char *line __attribute__((unused)))
       
   107 +com_pager(String *buffer MY_ATTRIBUTE((unused)),
       
   108 +          char *line MY_ATTRIBUTE((unused)))
       
   109  {
       
   110    char pager_name[FN_REFLEN], *end, *param;
       
   111  
       
   112 @@ -4220,8 +4220,8 @@ com_pager(String *buffer __attribute__((unused)),
       
   113  
       
   114  
       
   115  static int
       
   116 -com_nopager(String *buffer __attribute__((unused)),
       
   117 -	    char *line __attribute__((unused)))
       
   118 +com_nopager(String *buffer MY_ATTRIBUTE((unused)),
       
   119 +	    char *line MY_ATTRIBUTE((unused)))
       
   120  {
       
   121    strmov(pager, "stdout");
       
   122    opt_nopager=1;
       
   123 @@ -4238,7 +4238,7 @@ com_nopager(String *buffer __attribute__((unused)),
       
   124  
       
   125  #ifdef USE_POPEN
       
   126  static int
       
   127 -com_edit(String *buffer,char *line __attribute__((unused)))
       
   128 +com_edit(String *buffer,char *line MY_ATTRIBUTE((unused)))
       
   129  {
       
   130    char	filename[FN_REFLEN],buff[160];
       
   131    int	fd,tmp;
       
   132 @@ -4282,16 +4282,16 @@ err:
       
   133  /* If arg is given, exit without errors. This happens on command 'quit' */
       
   134  
       
   135  static int
       
   136 -com_quit(String *buffer __attribute__((unused)),
       
   137 -	 char *line __attribute__((unused)))
       
   138 +com_quit(String *buffer MY_ATTRIBUTE((unused)),
       
   139 +	 char *line MY_ATTRIBUTE((unused)))
       
   140  {
       
   141    status.exit_status=0;
       
   142    return 1;
       
   143  }
       
   144  
       
   145  static int
       
   146 -com_rehash(String *buffer __attribute__((unused)),
       
   147 -	 char *line __attribute__((unused)))
       
   148 +com_rehash(String *buffer MY_ATTRIBUTE((unused)),
       
   149 +	 char *line MY_ATTRIBUTE((unused)))
       
   150  {
       
   151  #ifdef HAVE_READLINE
       
   152    build_completion_hash(1, 0);
       
   153 @@ -4302,8 +4302,8 @@ com_rehash(String *buffer __attribute__((unused)),
       
   154  
       
   155  #ifdef USE_POPEN
       
   156  static int
       
   157 -com_shell(String *buffer __attribute__((unused)),
       
   158 -          char *line __attribute__((unused)))
       
   159 +com_shell(String *buffer MY_ATTRIBUTE((unused)),
       
   160 +          char *line MY_ATTRIBUTE((unused)))
       
   161  {
       
   162    char *shell_cmd;
       
   163  
       
   164 @@ -4330,7 +4330,7 @@ com_shell(String *buffer __attribute__((unused)),
       
   165  
       
   166  
       
   167  static int
       
   168 -com_print(String *buffer,char *line __attribute__((unused)))
       
   169 +com_print(String *buffer,char *line MY_ATTRIBUTE((unused)))
       
   170  {
       
   171    tee_puts("--------------", stdout);
       
   172    (void) tee_fputs(buffer->c_ptr(), stdout);
       
   173 @@ -4395,7 +4395,7 @@ com_connect(String *buffer, char *line)
       
   174  }
       
   175  
       
   176  
       
   177 -static int com_source(String *buffer __attribute__((unused)),
       
   178 +static int com_source(String *buffer MY_ATTRIBUTE((unused)),
       
   179                        char *line)
       
   180  {
       
   181    char source_name[FN_REFLEN], *end, *param;
       
   182 @@ -4450,7 +4450,7 @@ static int com_source(String *buffer __attribute__((unused)),
       
   183  
       
   184  	/* ARGSUSED */
       
   185  static int
       
   186 -com_delimiter(String *buffer __attribute__((unused)), char *line)
       
   187 +com_delimiter(String *buffer MY_ATTRIBUTE((unused)), char *line)
       
   188  {
       
   189    char buff[256], *tmp;
       
   190  
       
   191 @@ -4479,7 +4479,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
       
   192  
       
   193  	/* ARGSUSED */
       
   194  static int
       
   195 -com_use(String *buffer __attribute__((unused)), char *line)
       
   196 +com_use(String *buffer MY_ATTRIBUTE((unused)), char *line)
       
   197  {
       
   198    char *tmp, buff[FN_REFLEN + 1];
       
   199    int select_db;
       
   200 @@ -4624,8 +4624,8 @@ normalize_dbname(const char *line, char *buff, uint buff_size)
       
   201  }
       
   202  
       
   203  static int
       
   204 -com_warnings(String *buffer __attribute__((unused)),
       
   205 -   char *line __attribute__((unused)))
       
   206 +com_warnings(String *buffer MY_ATTRIBUTE((unused)),
       
   207 +   char *line MY_ATTRIBUTE((unused)))
       
   208  {
       
   209    show_warnings = 1;
       
   210    put_info("Show warnings enabled.",INFO_INFO);
       
   211 @@ -4633,8 +4633,8 @@ com_warnings(String *buffer __attribute__((unused)),
       
   212  }
       
   213  
       
   214  static int
       
   215 -com_nowarnings(String *buffer __attribute__((unused)),
       
   216 -   char *line __attribute__((unused)))
       
   217 +com_nowarnings(String *buffer MY_ATTRIBUTE((unused)),
       
   218 +   char *line MY_ATTRIBUTE((unused)))
       
   219  {
       
   220    show_warnings = 0;
       
   221    put_info("Show warnings disabled.",INFO_INFO);
       
   222 @@ -4914,8 +4914,8 @@ sql_connect(char *host,char *database,char *user,char *password,uint silent)
       
   223  
       
   224  
       
   225  static int
       
   226 -com_status(String *buffer __attribute__((unused)),
       
   227 -	   char *line __attribute__((unused)))
       
   228 +com_status(String *buffer MY_ATTRIBUTE((unused)),
       
   229 +	   char *line MY_ATTRIBUTE((unused)))
       
   230  {
       
   231    const char *status_str;
       
   232    char buff[40];
       
   233 @@ -5555,7 +5555,7 @@ static void init_username()
       
   234    }
       
   235  }
       
   236  
       
   237 -static int com_prompt(String *buffer __attribute__((unused)),
       
   238 +static int com_prompt(String *buffer MY_ATTRIBUTE((unused)),
       
   239                        char *line)
       
   240  {
       
   241    char *ptr=strchr(line, ' ');
       
   242 --- a/client/mysql_config_editor.cc
       
   243 +++ b/client/mysql_config_editor.cc
       
   244 @@ -1,5 +1,5 @@
       
   245  /*
       
   246 -   Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
       
   247 +   Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
       
   248  
       
   249     This program is free software; you can redistribute it and/or modify
       
   250     it under the terms of the GNU General Public License as published by
       
   251 @@ -209,7 +209,7 @@ static struct my_option my_help_command_options[]=
       
   252  
       
   253  my_bool
       
   254  my_program_get_one_option(int optid,
       
   255 -                          const struct my_option *opt __attribute__((unused)),
       
   256 +                          const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   257                            char *argument)
       
   258  {
       
   259    switch(optid) {
       
   260 @@ -230,7 +230,7 @@ my_program_get_one_option(int optid,
       
   261  
       
   262  my_bool
       
   263  my_set_command_get_one_option(int optid,
       
   264 -                              const struct my_option *opt __attribute__((unused)),
       
   265 +                              const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   266                                char *argument)
       
   267  {
       
   268    switch(optid) {
       
   269 @@ -257,7 +257,7 @@ my_set_command_get_one_option(int optid,
       
   270  
       
   271  my_bool
       
   272  my_remove_command_get_one_option(int optid,
       
   273 -                                 const struct my_option *opt __attribute__((unused)),
       
   274 +                                 const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   275                                   char *argument)
       
   276  {
       
   277    switch(optid) {
       
   278 @@ -281,7 +281,7 @@ my_remove_command_get_one_option(int optid,
       
   279  
       
   280  my_bool
       
   281  my_print_command_get_one_option(int optid,
       
   282 -                                const struct my_option *opt __attribute__((unused)),
       
   283 +                                const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   284                                  char *argument)
       
   285  {
       
   286    switch(optid) {
       
   287 @@ -305,7 +305,7 @@ my_print_command_get_one_option(int optid,
       
   288  
       
   289  my_bool
       
   290  my_reset_command_get_one_option(int optid,
       
   291 -                                const struct my_option *opt __attribute__((unused)),
       
   292 +                                const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   293                                  char *argument)
       
   294  {
       
   295    switch(optid) {
       
   296 --- a/client/mysql_plugin.c
       
   297 +++ b/client/mysql_plugin.c
       
   298 @@ -1,5 +1,5 @@
       
   299  /*
       
   300 -   Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
   301 +   Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
   302  
       
   303     This program is free software; you can redistribute it and/or modify
       
   304     it under the terms of the GNU General Public License as published by
       
   305 @@ -406,7 +406,7 @@ exit:
       
   306  static void usage(void)
       
   307  {
       
   308    PRINT_VERSION;
       
   309 -  puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. "
       
   310 +  puts("Copyright (c) 2011, 2016, Oracle and/or its affiliates. "
       
   311         "All rights reserved.\n");
       
   312    puts("Enable or disable plugins.");
       
   313    printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n",
       
   314 @@ -471,7 +471,7 @@ static void print_default_values(void)
       
   315  
       
   316  static my_bool
       
   317  get_one_option(int optid,
       
   318 -               const struct my_option *opt __attribute__((unused)),
       
   319 +               const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   320                 char *argument)
       
   321  {
       
   322    switch(optid) {
       
   323 --- a/client/mysqladmin.cc
       
   324 +++ b/client/mysqladmin.cc
       
   325 @@ -237,7 +237,7 @@ static struct my_option my_long_options[] =
       
   326  static const char *load_default_groups[]= { "mysqladmin","client",0 };
       
   327  
       
   328  my_bool
       
   329 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   330 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   331  	       char *argument)
       
   332  {
       
   333    int error = 0;
       
   334 @@ -528,7 +528,7 @@ int main(int argc,char *argv[])
       
   335  }
       
   336  
       
   337  
       
   338 -sig_handler endprog(int signal_number __attribute__((unused)))
       
   339 +sig_handler endprog(int signal_number MY_ATTRIBUTE((unused)))
       
   340  {
       
   341    interrupted=1;
       
   342  }
       
   343 @@ -1416,7 +1416,7 @@ static void print_top(MYSQL_RES *result)
       
   344  
       
   345  /* 3.rd argument, uint row, is not in use. Don't remove! */
       
   346  static void print_row(MYSQL_RES *result, MYSQL_ROW cur,
       
   347 -		      uint row __attribute__((unused)))
       
   348 +		      uint row MY_ATTRIBUTE((unused)))
       
   349  {
       
   350    uint i,length;
       
   351    MYSQL_FIELD *field;
       
   352 @@ -1451,9 +1451,9 @@ static void print_relative_row(MYSQL_RES *result, MYSQL_ROW cur, uint row)
       
   353  }
       
   354  
       
   355  
       
   356 -static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)),
       
   357 +static void print_relative_row_vert(MYSQL_RES *result MY_ATTRIBUTE((unused)),
       
   358  				    MYSQL_ROW cur,
       
   359 -				    uint row __attribute__((unused)))
       
   360 +				    uint row MY_ATTRIBUTE((unused)))
       
   361  {
       
   362    uint length;
       
   363    ulonglong tmp;
       
   364 --- a/client/mysqlbinlog.cc
       
   365 +++ b/client/mysqlbinlog.cc
       
   366 @@ -1,5 +1,5 @@
       
   367  /*
       
   368 -   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
   369 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   370  
       
   371     This program is free software; you can redistribute it and/or modify
       
   372     it under the terms of the GNU General Public License as published by
       
   373 @@ -1819,7 +1819,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
       
   374  
       
   375  
       
   376  extern "C" my_bool
       
   377 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   378 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   379  	       char *argument)
       
   380  {
       
   381    bool tty_password=0;
       
   382 --- a/client/mysqlcheck.c
       
   383 +++ b/client/mysqlcheck.c
       
   384 @@ -270,7 +270,7 @@ static void usage(void)
       
   385  
       
   386  
       
   387  static my_bool
       
   388 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   389 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   390  	       char *argument)
       
   391  {
       
   392    int orig_what_to_do= what_to_do;
       
   393 --- a/client/mysqldump.c
       
   394 +++ b/client/mysqldump.c
       
   395 @@ -762,7 +762,7 @@ static void write_footer(FILE *sql_file)
       
   396  
       
   397  
       
   398  uchar* get_table_key(const char *entry, size_t *length,
       
   399 -                     my_bool not_used __attribute__((unused)))
       
   400 +                     my_bool not_used MY_ATTRIBUTE((unused)))
       
   401  {
       
   402    *length= strlen(entry);
       
   403    return (uchar*) entry;
       
   404 @@ -770,7 +770,7 @@ uchar* get_table_key(const char *entry, size_t *length,
       
   405  
       
   406  
       
   407  static my_bool
       
   408 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   409 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   410                 char *argument)
       
   411  {
       
   412    switch (optid) {
       
   413 @@ -1921,7 +1921,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
       
   414                            const char *str_create)
       
   415  {
       
   416    uint i;
       
   417 -  my_bool body_found __attribute__((unused)) = 0;
       
   418 +  my_bool body_found MY_ATTRIBUTE((unused)) = 0;
       
   419    char *create_stmt_ptr= NULL;
       
   420    ulong create_stmt_len= 0;
       
   421    MYSQL_FIELD *field;
       
   422 @@ -4281,7 +4281,7 @@ RETURN VALUES
       
   423    0        Success.
       
   424    1        Failure.
       
   425  */
       
   426 -int init_dumping_views(char *qdatabase __attribute__((unused)))
       
   427 +int init_dumping_views(char *qdatabase MY_ATTRIBUTE((unused)))
       
   428  {
       
   429      return 0;
       
   430  } /* init_dumping_views */
       
   431 --- a/client/mysqlimport.c
       
   432 +++ b/client/mysqlimport.c
       
   433 @@ -222,7 +222,7 @@ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
       
   434  
       
   435  
       
   436  static my_bool
       
   437 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   438 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   439  	       char *argument)
       
   440  {
       
   441    switch(optid) {
       
   442 --- a/client/mysqlshow.c
       
   443 +++ b/client/mysqlshow.c
       
   444 @@ -314,7 +314,7 @@ are shown.");
       
   445  
       
   446  
       
   447  static my_bool
       
   448 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   449 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   450  	       char *argument)
       
   451  {
       
   452    switch(optid) {
       
   453 --- a/client/mysqlslap.c
       
   454 +++ b/client/mysqlslap.c
       
   455 @@ -736,7 +736,7 @@ static void usage(void)
       
   456  
       
   457  
       
   458  static my_bool
       
   459 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   460 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   461                 char *argument)
       
   462  {
       
   463    DBUG_ENTER("get_one_option");
       
   464 --- a/client/mysqltest.cc
       
   465 +++ b/client/mysqltest.cc
       
   466 @@ -547,12 +547,12 @@ struct st_replace *glob_replace= 0;
       
   467  void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
       
   468  const char *from, int len);
       
   469  
       
   470 -static void cleanup_and_exit(int exit_code) __attribute__((noreturn));
       
   471 +static void cleanup_and_exit(int exit_code) MY_ATTRIBUTE((noreturn));
       
   472  
       
   473  void die(const char *fmt, ...)
       
   474 -  ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
       
   475 +  ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn));
       
   476  void abort_not_supported_test(const char *fmt, ...)
       
   477 -  ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
       
   478 +  ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn));
       
   479  void verbose_msg(const char *fmt, ...)
       
   480    ATTRIBUTE_FORMAT(printf, 1, 2);
       
   481  void log_msg(const char *fmt, ...)
       
   482 @@ -2121,7 +2121,7 @@ static void strip_parentheses(struct st_command *command)
       
   483  C_MODE_START
       
   484  
       
   485  static uchar *get_var_key(const uchar* var, size_t *len,
       
   486 -                          my_bool __attribute__((unused)) t)
       
   487 +                          my_bool MY_ATTRIBUTE((unused)) t)
       
   488  {
       
   489    register char* key;
       
   490    key = ((VAR*)var)->name;
       
   491 @@ -4320,7 +4320,7 @@ int do_echo(struct st_command *command)
       
   492  }
       
   493  
       
   494  
       
   495 -void do_wait_for_slave_to_stop(struct st_command *c __attribute__((unused)))
       
   496 +void do_wait_for_slave_to_stop(struct st_command *c MY_ATTRIBUTE((unused)))
       
   497  {
       
   498    static int SLAVE_POLL_INTERVAL= 300000;
       
   499    MYSQL* mysql = &cur_con->mysql;
       
   500 @@ -8418,7 +8418,7 @@ void update_expected_errors(struct st_command* command)
       
   501  
       
   502  */
       
   503  
       
   504 -void mark_progress(struct st_command* command __attribute__((unused)),
       
   505 +void mark_progress(struct st_command* command MY_ATTRIBUTE((unused)),
       
   506                     int line)
       
   507  {
       
   508    static ulonglong progress_start= 0; // < Beware
       
   509 @@ -9465,7 +9465,7 @@ typedef struct st_replace_found {
       
   510  
       
   511  void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds,
       
   512                              const char *str,
       
   513 -                            int len __attribute__((unused)))
       
   514 +                            int len MY_ATTRIBUTE((unused)))
       
   515  {
       
   516    reg1 REPLACE *rep_pos;
       
   517    reg2 REPLACE_STRING *rep_str;
       
   518 --- a/cmake/build_configurations/compiler_options.cmake
       
   519 +++ b/cmake/build_configurations/compiler_options.cmake
       
   520 @@ -1,4 +1,4 @@
       
   521 -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
       
   522 +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
       
   523  # 
       
   524  # This program is free software; you can redistribute it and/or modify
       
   525  # it under the terms of the GNU General Public License as published by
       
   526 @@ -66,11 +66,9 @@ IF(UNIX)
       
   527        SET(SUNPRO_CXX_LIBRARY "stlport4" CACHE STRING
       
   528          "What C++ library to use. The server needs stlport4. It is possible to build the client libraries with -DWITHOUT_SERVER=1 -DSUNPRO_CXX_LIBRARY=Cstd")
       
   529  
       
   530 -      MESSAGE(STATUS "SUNPRO_CXX_LIBRARY ${SUNPRO_CXX_LIBRARY}")
       
   531 -
       
   532        IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
       
   533          SET(COMMON_C_FLAGS                   "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
       
   534 -        SET(COMMON_CXX_FLAGS                 "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -library=${SUNPRO_CXX_LIBRARY}")
       
   535 +        SET(COMMON_CXX_FLAGS                 "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
       
   536          # We have to specify "-xO1" for DEBUG flags here,
       
   537          # see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978
       
   538          SET(CMAKE_C_FLAGS_DEBUG              "-xO1 ${COMMON_C_FLAGS}")
       
   539 @@ -85,7 +83,7 @@ IF(UNIX)
       
   540        ELSE() 
       
   541          # Assume !x86 is SPARC
       
   542          SET(COMMON_C_FLAGS                 "-g -Xa -xstrconst -mt")
       
   543 -        SET(COMMON_CXX_FLAGS               "-g0 -mt -library=${SUNPRO_CXX_LIBRARY}")
       
   544 +        SET(COMMON_CXX_FLAGS               "-g0 -mt")
       
   545          IF(32BIT)
       
   546            SET(COMMON_C_FLAGS               "${COMMON_C_FLAGS} -xarch=sparc")
       
   547            SET(COMMON_CXX_FLAGS             "${COMMON_CXX_FLAGS} -xarch=sparc")
       
   548 
       
   549 --- a/dbug/tests.c
       
   550 +++ b/dbug/tests.c
       
   551 @@ -73,7 +73,7 @@ int main (int argc, char *argv[])
       
   552              DBUG_EVALUATE_IF("evaluate_if", "ON", "OFF"));
       
   553      DBUG_EXECUTE_IF("pop",  DBUG_POP(); );
       
   554      {
       
   555 -      char s[1000] __attribute__((unused));
       
   556 +      char s[1000] MY_ATTRIBUTE((unused));
       
   557        DBUG_EXPLAIN(s, sizeof(s)-1);
       
   558        DBUG_PRINT("explain", ("dbug explained: %s", s));
       
   559      }
       
   560 --- a/extra/comp_err.c
       
   561 +++ b/extra/comp_err.c
       
   562 @@ -1,5 +1,5 @@
       
   563  /*
       
   564 -   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
   565 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   566  
       
   567     This program is free software; you can redistribute it and/or modify
       
   568     it under the terms of the GNU General Public License as published by
       
   569 @@ -1023,8 +1023,8 @@ static void print_version(void)
       
   570  
       
   571  
       
   572  static my_bool
       
   573 -get_one_option(int optid, const struct my_option *opt __attribute__ ((unused)),
       
   574 -	       char *argument __attribute__ ((unused)))
       
   575 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE ((unused)),
       
   576 +	       char *argument MY_ATTRIBUTE ((unused)))
       
   577  {
       
   578    DBUG_ENTER("get_one_option");
       
   579    switch (optid) {
       
   580 --- a/extra/innochecksum.cc
       
   581 +++ b/extra/innochecksum.cc
       
   582 @@ -1,5 +1,5 @@
       
   583  /*
       
   584 -   Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
       
   585 +   Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
   586  
       
   587     This program is free software; you can redistribute it and/or modify
       
   588     it under the terms of the GNU General Public License as published by
       
   589 @@ -235,8 +235,8 @@ extern "C" my_bool
       
   590  innochecksum_get_one_option(
       
   591  /*========================*/
       
   592    int optid,
       
   593 -  const struct my_option *opt __attribute__((unused)),
       
   594 -  char *argument __attribute__((unused)))
       
   595 +  const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   596 +  char *argument MY_ATTRIBUTE((unused)))
       
   597  {
       
   598    switch (optid) {
       
   599    case 'd':
       
   600 --- a/extra/my_print_defaults.c
       
   601 +++ b/extra/my_print_defaults.c
       
   602 @@ -1,6 +1,6 @@
       
   603  
       
   604  /*
       
   605 -   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
   606 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   607  
       
   608     This program is free software; you can redistribute it and/or modify
       
   609     it under the terms of the GNU General Public License as published by
       
   610 @@ -118,8 +118,8 @@ static void usage(my_bool version)
       
   611  
       
   612  
       
   613  static my_bool
       
   614 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   615 -	       char *argument __attribute__((unused)))
       
   616 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   617 +	       char *argument MY_ATTRIBUTE((unused)))
       
   618  {
       
   619    switch (optid) {
       
   620      case 'c':
       
   621 --- a/extra/mysql_waitpid.c
       
   622 +++ b/extra/mysql_waitpid.c
       
   623 @@ -1,4 +1,4 @@
       
   624 -/* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
       
   625 +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
   626  
       
   627     This program is free software; you can redistribute it and/or modify
       
   628     it under the terms of the GNU General Public License as published by
       
   629 @@ -43,8 +43,8 @@ static struct my_option my_long_options[] =
       
   630  };
       
   631  
       
   632  static my_bool
       
   633 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   634 -	       char *argument __attribute__((unused)))
       
   635 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   636 +	       char *argument MY_ATTRIBUTE((unused)))
       
   637  {
       
   638    switch(optid) {
       
   639    case 'V':
       
   640 --- a/extra/perror.c
       
   641 +++ b/extra/perror.c
       
   642 @@ -1,5 +1,5 @@
       
   643  /*
       
   644 -   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
   645 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   646  
       
   647     This program is free software; you can redistribute it and/or modify
       
   648     it under the terms of the GNU General Public License as published by
       
   649 @@ -94,8 +94,8 @@ static void usage(void)
       
   650  
       
   651  
       
   652  static my_bool
       
   653 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   654 -	       char *argument __attribute__((unused)))
       
   655 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   656 +	       char *argument MY_ATTRIBUTE((unused)))
       
   657  {
       
   658    switch (optid) {
       
   659    case 's':
       
   660 --- a/extra/resolve_stack_dump.cc
       
   661 +++ b/extra/resolve_stack_dump.cc
       
   662 @@ -1,4 +1,4 @@
       
   663 -/* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
       
   664 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
   665  
       
   666     This program is free software; you can redistribute it and/or modify
       
   667     it under the terms of the GNU General Public License as published by
       
   668 @@ -51,7 +51,7 @@ static char* dump_fname = 0, *sym_fname = 0;
       
   669  static std::vector<sym_entry> sym_table;
       
   670  static FILE* fp_dump, *fp_sym = 0, *fp_out; 
       
   671  static void die(const char* fmt, ...)
       
   672 -  __attribute__((noreturn)) __attribute__((format(printf, 1, 2)));
       
   673 +  MY_ATTRIBUTE((noreturn)) MY_ATTRIBUTE((format(printf, 1, 2)));
       
   674  
       
   675  static struct my_option my_long_options[] =
       
   676  {
       
   677 @@ -107,8 +107,8 @@ static void die(const char* fmt, ...)
       
   678  
       
   679  
       
   680  static my_bool
       
   681 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   682 -	       char *argument __attribute__((unused)))
       
   683 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   684 +	       char *argument MY_ATTRIBUTE((unused)))
       
   685  {
       
   686    switch(optid) {
       
   687    case 'V':
       
   688 --- a/extra/resolveip.c
       
   689 +++ b/extra/resolveip.c
       
   690 @@ -1,4 +1,4 @@
       
   691 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
   692 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   693  
       
   694     This program is free software; you can redistribute it and/or modify
       
   695     it under the terms of the GNU General Public License as published by
       
   696 @@ -72,8 +72,8 @@ static void usage(void)
       
   697  
       
   698  
       
   699  static my_bool
       
   700 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
   701 -	       char *argument __attribute__((unused)))
       
   702 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
   703 +	       char *argument MY_ATTRIBUTE((unused)))
       
   704  {
       
   705    switch (optid) {
       
   706    case 'V': print_version(); exit(0);
       
   707 --- a/extra/yassl/taocrypt/CMakeLists.txt
       
   708 +++ b/extra/yassl/taocrypt/CMakeLists.txt
       
   709 @@ -1,4 +1,4 @@
       
   710 -# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
       
   711 +# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
   712  # 
       
   713  # This program is free software; you can redistribute it and/or modify
       
   714  # it under the terms of the GNU General Public License as published by
       
   715 @@ -13,6 +13,8 @@
       
   716  # along with this program; if not, write to the Free Software
       
   717  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
       
   718  
       
   719 +INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
       
   720 +
       
   721  INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
       
   722                      ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
       
   723  
       
   724 @@ -29,6 +31,14 @@ SET(TAOCRYPT_SOURCES		src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
       
   725  				include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp
       
   726  				include/rabbit.hpp include/hc128.hpp)
       
   727  
       
   728 +# Segfaults with SIGILL at high optimization levels in:
       
   729 +# ModularArithmetic::SimultaneousExponentiate
       
   730 +IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
       
   731 +  IF(CMAKE_CXX_FLAGS MATCHES "-std=")
       
   732 +    ADD_COMPILE_FLAGS(src/integer.cpp COMPILE_FLAGS "-xO1")
       
   733 +  ENDIF()
       
   734 +ENDIF()
       
   735 +
       
   736  IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION)
       
   737    SET(TAOCRYPT_SOURCES ${TAOCRYPT_SOURCES} src/template_instnt.cpp)
       
   738  ENDIF()
       
   739 --- a/include/atomic/nolock.h
       
   740 +++ b/include/atomic/nolock.h
       
   741 @@ -1,7 +1,7 @@
       
   742  #ifndef ATOMIC_NOLOCK_INCLUDED
       
   743  #define ATOMIC_NOLOCK_INCLUDED
       
   744  
       
   745 -/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. reserved.
       
   746 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. reserved.
       
   747     reserved.
       
   748  
       
   749     This program is free software; you can redistribute it and/or modify
       
   750 @@ -44,7 +44,7 @@
       
   751    Type not used so minimal size (emptry struct has different size between C
       
   752    and C++, zero-length array is gcc-specific).
       
   753  */
       
   754 -typedef char my_atomic_rwlock_t __attribute__ ((unused));
       
   755 +typedef char my_atomic_rwlock_t MY_ATTRIBUTE ((unused));
       
   756  #define my_atomic_rwlock_destroy(name)
       
   757  #define my_atomic_rwlock_init(name)
       
   758  #define my_atomic_rwlock_rdlock(name)
       
   759 --- a/include/lf.h
       
   760 +++ b/include/lf.h
       
   761 @@ -1,4 +1,4 @@
       
   762 -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
       
   763 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
   764  
       
   765     This program is free software; you can redistribute it and/or modify
       
   766     it under the terms of the GNU General Public License as published by
       
   767 @@ -138,7 +138,7 @@ typedef struct {
       
   768  #if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG)
       
   769  #define LF_REQUIRE_PINS(N)                                      \
       
   770    static const char require_pins[LF_PINBOX_PINS-N]              \
       
   771 -                             __attribute__ ((unused));          \
       
   772 +                             MY_ATTRIBUTE ((unused));          \
       
   773    static const int LF_NUM_PINS_IN_THIS_FILE= N;
       
   774  #define _lf_pin(PINS, PIN, ADDR)                                \
       
   775    (                                                             \
       
   776 --- a/include/m_ctype.h
       
   777 +++ b/include/m_ctype.h
       
   778 @@ -1,4 +1,4 @@
       
   779 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
   780 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   781  
       
   782     This program is free software; you can redistribute it and/or modify
       
   783     it under the terms of the GNU General Public License as published by
       
   784 @@ -658,10 +658,10 @@ int my_wildcmp_mb_bin(const CHARSET_INFO *cs,
       
   785                        const char *wildstr,const char *wildend,
       
   786                        int escape, int w_one, int w_many);
       
   787  
       
   788 -int my_strcasecmp_mb_bin(const CHARSET_INFO * cs __attribute__((unused)),
       
   789 +int my_strcasecmp_mb_bin(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
       
   790                           const char *s, const char *t);
       
   791  
       
   792 -void my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
   793 +void my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
   794                           const uchar *key, size_t len,ulong *nr1, ulong *nr2);
       
   795  
       
   796  size_t my_strnxfrm_mb(const CHARSET_INFO *,
       
   797 --- a/include/my_atomic.h
       
   798 +++ b/include/my_atomic.h
       
   799 @@ -1,7 +1,7 @@
       
   800  #ifndef MY_ATOMIC_INCLUDED
       
   801  #define MY_ATOMIC_INCLUDED
       
   802  
       
   803 -/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
       
   804 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
   805  
       
   806     This program is free software; you can redistribute it and/or modify
       
   807     it under the terms of the GNU General Public License as published by
       
   808 @@ -121,11 +121,11 @@
       
   809          typedef union {                                         \
       
   810            int  ## S  i;                                         \
       
   811            uint ## S  u;                                         \
       
   812 -        } U_ ## S   __attribute__ ((transparent_union));        \
       
   813 +        } U_ ## S   MY_ATTRIBUTE ((transparent_union));        \
       
   814          typedef union {                                         \
       
   815            int  ## S volatile *i;                                \
       
   816            uint ## S volatile *u;                                \
       
   817 -        } Uv_ ## S   __attribute__ ((transparent_union));
       
   818 +        } Uv_ ## S   MY_ATTRIBUTE ((transparent_union));
       
   819  #define uintptr intptr
       
   820  make_transparent_unions(8)
       
   821  make_transparent_unions(16)
       
   822 --- a/include/my_attribute.h
       
   823 +++ b/include/my_attribute.h
       
   824 @@ -1,4 +1,4 @@
       
   825 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
   826 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
   827  
       
   828     This program is free software; you can redistribute it and/or modify
       
   829     it under the terms of the GNU General Public License as published by
       
   830 @@ -28,41 +28,30 @@
       
   831  #endif
       
   832  
       
   833  /*
       
   834 -  Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
       
   835 +  Disable MY_ATTRIBUTE() on g++ < 3.4, and non-gcc compilers.
       
   836    Some forms of __attribute__ are actually supported in earlier versions of
       
   837    g++, but we just disable them all because we only use them to generate
       
   838    compilation warnings.
       
   839  */
       
   840 -#ifndef __attribute__
       
   841 -# if !defined(__GNUC__)
       
   842 -#  define __attribute__(A)
       
   843 -# elif GCC_VERSION < 2008
       
   844 -#  define __attribute__(A)
       
   845 -# elif defined(__cplusplus) && GCC_VERSION < 3004
       
   846 -#  define __attribute__(A)
       
   847 -# endif
       
   848 +#ifndef MY_ATTRIBUTE
       
   849 +#if defined(__GNUC__) && GCC_VERSION > 3003
       
   850 +#  define MY_ATTRIBUTE(A) __attribute__(A)
       
   851 +#else
       
   852 +#  define MY_ATTRIBUTE(A)
       
   853 +#endif
       
   854  #endif
       
   855  
       
   856  /*
       
   857 -  __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4
       
   858 -  But that's already covered by the __attribute__ tests above, so this is
       
   859 +  __attribute__((format(...))) is only supported in g++ >= 3.4
       
   860 +  But that's already covered by the MY_ATTRIBUTE tests above, so this is
       
   861    just a convenience macro.
       
   862  */
       
   863  #ifndef ATTRIBUTE_FORMAT
       
   864 -# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
       
   865 +#  define ATTRIBUTE_FORMAT(style, m, n) MY_ATTRIBUTE((format(style, m, n)))
       
   866  #endif
       
   867  
       
   868 -/*
       
   869 -
       
   870 -   __attribute__((format(...))) on a function pointer is not supported
       
   871 -   until  gcc 3.1
       
   872 -*/
       
   873  #ifndef ATTRIBUTE_FORMAT_FPTR
       
   874 -# if (GCC_VERSION >= 3001)
       
   875  #  define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
       
   876 -# else
       
   877 -#  define ATTRIBUTE_FORMAT_FPTR(style, m, n)
       
   878 -# endif /* GNUC >= 3.1 */
       
   879  #endif
       
   880  
       
   881  
       
   882 --- a/include/my_global.h
       
   883 +++ b/include/my_global.h
       
   884 @@ -1,5 +1,5 @@
       
   885  /*
       
   886 -   Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
       
   887 +   Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
   888  
       
   889     This program is free software; you can redistribute it and/or modify
       
   890     it under the terms of the GNU General Public License as published by
       
   891 @@ -184,7 +184,7 @@
       
   892    other reason to use them is for documentation
       
   893  */
       
   894  
       
   895 -#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
       
   896 +#if !defined(__builtin_expect)
       
   897  #define __builtin_expect(x, expected_value) (x)
       
   898  #endif
       
   899  
       
   900 @@ -374,7 +374,7 @@ C_MODE_END
       
   901  #define compile_time_assert(X)                                  \
       
   902    do                                                            \
       
   903    {                                                             \
       
   904 -    typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \
       
   905 +    typedef char compile_time_assert[(X) ? 1 : -1] MY_ATTRIBUTE((unused)); \
       
   906    } while(0)
       
   907  #endif
       
   908  
       
   909 --- a/include/my_pthread.h
       
   910 +++ b/include/my_pthread.h
       
   911 @@ -860,7 +860,7 @@ struct st_my_thread_var
       
   912  #endif
       
   913  };
       
   914  
       
   915 -extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
       
   916 +extern struct st_my_thread_var *_my_thread_var(void) MY_ATTRIBUTE ((const));
       
   917  extern int set_mysys_var(struct st_my_thread_var *mysys_var);
       
   918  extern void **my_thread_var_dbug();
       
   919  extern uint my_thread_end_wait_time;
       
   920 --- a/include/mysql/psi/mysql_file.h
       
   921 +++ b/include/mysql/psi/mysql_file.h
       
   922 @@ -1,4 +1,4 @@
       
   923 -/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
       
   924 +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
       
   925  
       
   926    This program is free software; you can redistribute it and/or modify
       
   927    it under the terms of the GNU General Public License as published by
       
   928 @@ -511,9 +511,9 @@ static inline void inline_mysql_file_register(
       
   929    PSI_file_info *info,
       
   930    int count
       
   931  #else
       
   932 -  const char *category __attribute__ ((unused)),
       
   933 -  void *info __attribute__ ((unused)),
       
   934 -  int count __attribute__ ((unused))
       
   935 +  const char *category MY_ATTRIBUTE ((unused)),
       
   936 +  void *info MY_ATTRIBUTE ((unused)),
       
   937 +  int count MY_ATTRIBUTE ((unused))
       
   938  #endif
       
   939  )
       
   940  {
       
   941 --- a/include/mysql/psi/mysql_socket.h
       
   942 +++ b/include/mysql/psi/mysql_socket.h
       
   943 @@ -1,4 +1,4 @@
       
   944 -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
       
   945 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
   946  
       
   947  This program is free software; you can redistribute it and/or
       
   948  modify it under the terms of the GNU General Public License as
       
   949 @@ -114,9 +114,9 @@ mysql_socket_set_address(
       
   950    const struct sockaddr *addr,
       
   951    socklen_t addr_len
       
   952  #else
       
   953 -  MYSQL_SOCKET socket __attribute__ ((unused)),
       
   954 -  const struct sockaddr *addr __attribute__ ((unused)),
       
   955 -  socklen_t addr_len __attribute__ ((unused))
       
   956 +  MYSQL_SOCKET socket MY_ATTRIBUTE ((unused)),
       
   957 +  const struct sockaddr *addr MY_ATTRIBUTE ((unused)),
       
   958 +  socklen_t addr_len MY_ATTRIBUTE ((unused))
       
   959  #endif
       
   960  )
       
   961  {
       
   962 @@ -136,7 +136,7 @@ mysql_socket_set_thread_owner(
       
   963  #ifdef HAVE_PSI_SOCKET_INTERFACE
       
   964  MYSQL_SOCKET socket
       
   965  #else
       
   966 -MYSQL_SOCKET socket __attribute__ ((unused))
       
   967 +MYSQL_SOCKET socket MY_ATTRIBUTE ((unused))
       
   968  #endif
       
   969  )
       
   970  {
       
   971 --- a/include/mysql/psi/mysql_thread.h
       
   972 +++ b/include/mysql/psi/mysql_thread.h
       
   973 @@ -1,4 +1,4 @@
       
   974 -/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
       
   975 +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
       
   976  
       
   977    This program is free software; you can redistribute it and/or modify
       
   978    it under the terms of the GNU General Public License as published by
       
   979 @@ -587,9 +587,9 @@ static inline void inline_mysql_mutex_register(
       
   980    PSI_mutex_info *info,
       
   981    int count
       
   982  #else
       
   983 -  const char *category __attribute__ ((unused)),
       
   984 -  void *info __attribute__ ((unused)),
       
   985 -  int count __attribute__ ((unused))
       
   986 +  const char *category MY_ATTRIBUTE ((unused)),
       
   987 +  void *info MY_ATTRIBUTE ((unused)),
       
   988 +  int count MY_ATTRIBUTE ((unused))
       
   989  #endif
       
   990  )
       
   991  {
       
   992 @@ -771,9 +771,9 @@ static inline void inline_mysql_rwlock_register(
       
   993    PSI_rwlock_info *info,
       
   994    int count
       
   995  #else
       
   996 -  const char *category __attribute__ ((unused)),
       
   997 -  void *info __attribute__ ((unused)),
       
   998 -  int count __attribute__ ((unused))
       
   999 +  const char *category MY_ATTRIBUTE ((unused)),
       
  1000 +  void *info MY_ATTRIBUTE ((unused)),
       
  1001 +  int count MY_ATTRIBUTE ((unused))
       
  1002  #endif
       
  1003  )
       
  1004  {
       
  1005 @@ -1089,9 +1089,9 @@ static inline void inline_mysql_cond_register(
       
  1006    PSI_cond_info *info,
       
  1007    int count
       
  1008  #else
       
  1009 -  const char *category __attribute__ ((unused)),
       
  1010 -  void *info __attribute__ ((unused)),
       
  1011 -  int count __attribute__ ((unused))
       
  1012 +  const char *category MY_ATTRIBUTE ((unused)),
       
  1013 +  void *info MY_ATTRIBUTE ((unused)),
       
  1014 +  int count MY_ATTRIBUTE ((unused))
       
  1015  #endif
       
  1016  )
       
  1017  {
       
  1018 @@ -1231,9 +1231,9 @@ static inline void inline_mysql_thread_register(
       
  1019    PSI_thread_info *info,
       
  1020    int count
       
  1021  #else
       
  1022 -  const char *category __attribute__ ((unused)),
       
  1023 -  void *info __attribute__ ((unused)),
       
  1024 -  int count __attribute__ ((unused))
       
  1025 +  const char *category MY_ATTRIBUTE ((unused)),
       
  1026 +  void *info MY_ATTRIBUTE ((unused)),
       
  1027 +  int count MY_ATTRIBUTE ((unused))
       
  1028  #endif
       
  1029  )
       
  1030  {
       
  1031 --- a/libmysql/libmysql.c
       
  1032 +++ b/libmysql/libmysql.c
       
  1033 @@ -1,4 +1,4 @@
       
  1034 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  1035 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1036  
       
  1037     This program is free software; you can redistribute it and/or modify
       
  1038     it under the terms of the GNU General Public License as published by
       
  1039 @@ -111,9 +111,9 @@ typedef struct st_mysql_stmt_extension
       
  1040      1  could not initialize environment (out of memory or thread keys)
       
  1041  */
       
  1042  
       
  1043 -int STDCALL mysql_server_init(int argc __attribute__((unused)),
       
  1044 -			      char **argv __attribute__((unused)),
       
  1045 -			      char **groups __attribute__((unused)))
       
  1046 +int STDCALL mysql_server_init(int argc MY_ATTRIBUTE((unused)),
       
  1047 +			      char **argv MY_ATTRIBUTE((unused)),
       
  1048 +			      char **groups MY_ATTRIBUTE((unused)))
       
  1049  {
       
  1050    int result= 0;
       
  1051    if (!mysql_client_init)
       
  1052 @@ -128,7 +128,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
       
  1053      if (!mysql_port)
       
  1054      {
       
  1055        char *env;
       
  1056 -      struct servent *serv_ptr __attribute__((unused));
       
  1057 +      struct servent *serv_ptr MY_ATTRIBUTE((unused));
       
  1058  
       
  1059        mysql_port = MYSQL_PORT;
       
  1060  
       
  1061 @@ -264,7 +264,7 @@ append_wild(char *to, char *end, const char *wild)
       
  1062  **************************************************************************/
       
  1063  
       
  1064  void STDCALL
       
  1065 -mysql_debug(const char *debug __attribute__((unused)))
       
  1066 +mysql_debug(const char *debug MY_ATTRIBUTE((unused)))
       
  1067  {
       
  1068  #ifndef DBUG_OFF
       
  1069    char	*env;
       
  1070 @@ -299,7 +299,7 @@ mysql_debug(const char *debug __attribute__((unused)))
       
  1071  **************************************************************************/
       
  1072  
       
  1073  sig_handler
       
  1074 -my_pipe_sig_handler(int sig __attribute__((unused)))
       
  1075 +my_pipe_sig_handler(int sig MY_ATTRIBUTE((unused)))
       
  1076  {
       
  1077    DBUG_PRINT("info",("Hit by signal %d",sig));
       
  1078  #ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
       
  1079 @@ -559,7 +559,7 @@ typedef struct st_default_local_infile
       
  1080  */
       
  1081  
       
  1082  static int default_local_infile_init(void **ptr, const char *filename,
       
  1083 -             void *userdata __attribute__ ((unused)))
       
  1084 +             void *userdata MY_ATTRIBUTE ((unused)))
       
  1085  {
       
  1086    default_local_infile_data *data;
       
  1087    char tmp_name[FN_REFLEN];
       
  1088 @@ -2341,15 +2341,15 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
       
  1089  */
       
  1090  
       
  1091  static int
       
  1092 -stmt_read_row_no_data(MYSQL_STMT *stmt  __attribute__((unused)),
       
  1093 -                      unsigned char **row  __attribute__((unused)))
       
  1094 +stmt_read_row_no_data(MYSQL_STMT *stmt  MY_ATTRIBUTE((unused)),
       
  1095 +                      unsigned char **row  MY_ATTRIBUTE((unused)))
       
  1096  {
       
  1097    return MYSQL_NO_DATA;
       
  1098  }
       
  1099  
       
  1100  static int
       
  1101 -stmt_read_row_no_result_set(MYSQL_STMT *stmt  __attribute__((unused)),
       
  1102 -                      unsigned char **row  __attribute__((unused)))
       
  1103 +stmt_read_row_no_result_set(MYSQL_STMT *stmt  MY_ATTRIBUTE((unused)),
       
  1104 +                      unsigned char **row  MY_ATTRIBUTE((unused)))
       
  1105  {
       
  1106    set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate, NULL);
       
  1107    return 1;
       
  1108 @@ -3708,7 +3708,7 @@ static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field,
       
  1109  }
       
  1110  
       
  1111  static void fetch_result_int32(MYSQL_BIND *param,
       
  1112 -                               MYSQL_FIELD *field __attribute__((unused)),
       
  1113 +                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1114                                 uchar **row)
       
  1115  {
       
  1116    my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
       
  1117 @@ -3719,7 +3719,7 @@ static void fetch_result_int32(MYSQL_BIND *param,
       
  1118  }
       
  1119  
       
  1120  static void fetch_result_int64(MYSQL_BIND *param,
       
  1121 -                               MYSQL_FIELD *field __attribute__((unused)),
       
  1122 +                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1123                                 uchar **row)
       
  1124  {
       
  1125    my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
       
  1126 @@ -3730,7 +3730,7 @@ static void fetch_result_int64(MYSQL_BIND *param,
       
  1127  }
       
  1128  
       
  1129  static void fetch_result_float(MYSQL_BIND *param,
       
  1130 -                               MYSQL_FIELD *field __attribute__((unused)),
       
  1131 +                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1132                                 uchar **row)
       
  1133  {
       
  1134    float value;
       
  1135 @@ -3740,7 +3740,7 @@ static void fetch_result_float(MYSQL_BIND *param,
       
  1136  }
       
  1137  
       
  1138  static void fetch_result_double(MYSQL_BIND *param,
       
  1139 -                                MYSQL_FIELD *field __attribute__((unused)),
       
  1140 +                                MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1141                                  uchar **row)
       
  1142  {
       
  1143    double value;
       
  1144 @@ -3750,7 +3750,7 @@ static void fetch_result_double(MYSQL_BIND *param,
       
  1145  }
       
  1146  
       
  1147  static void fetch_result_time(MYSQL_BIND *param,
       
  1148 -                              MYSQL_FIELD *field __attribute__((unused)),
       
  1149 +                              MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1150                                uchar **row)
       
  1151  {
       
  1152    MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
       
  1153 @@ -3758,7 +3758,7 @@ static void fetch_result_time(MYSQL_BIND *param,
       
  1154  }
       
  1155  
       
  1156  static void fetch_result_date(MYSQL_BIND *param,
       
  1157 -                              MYSQL_FIELD *field __attribute__((unused)),
       
  1158 +                              MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1159                                uchar **row)
       
  1160  {
       
  1161    MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
       
  1162 @@ -3766,7 +3766,7 @@ static void fetch_result_date(MYSQL_BIND *param,
       
  1163  }
       
  1164  
       
  1165  static void fetch_result_datetime(MYSQL_BIND *param,
       
  1166 -                                  MYSQL_FIELD *field __attribute__((unused)),
       
  1167 +                                  MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1168                                    uchar **row)
       
  1169  {
       
  1170    MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
       
  1171 @@ -3774,7 +3774,7 @@ static void fetch_result_datetime(MYSQL_BIND *param,
       
  1172  }
       
  1173  
       
  1174  static void fetch_result_bin(MYSQL_BIND *param,
       
  1175 -                             MYSQL_FIELD *field __attribute__((unused)),
       
  1176 +                             MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1177                               uchar **row)
       
  1178  {
       
  1179    ulong length= net_field_length(row);
       
  1180 @@ -3786,7 +3786,7 @@ static void fetch_result_bin(MYSQL_BIND *param,
       
  1181  }
       
  1182  
       
  1183  static void fetch_result_str(MYSQL_BIND *param,
       
  1184 -                             MYSQL_FIELD *field __attribute__((unused)),
       
  1185 +                             MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1186                               uchar **row)
       
  1187  {
       
  1188    ulong length= net_field_length(row);
       
  1189 @@ -3807,7 +3807,7 @@ static void fetch_result_str(MYSQL_BIND *param,
       
  1190  */
       
  1191  
       
  1192  static void skip_result_fixed(MYSQL_BIND *param,
       
  1193 -			      MYSQL_FIELD *field __attribute__((unused)),
       
  1194 +			      MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1195  			      uchar **row)
       
  1196  
       
  1197  {
       
  1198 @@ -3815,8 +3815,8 @@ static void skip_result_fixed(MYSQL_BIND *param,
       
  1199  }
       
  1200  
       
  1201  
       
  1202 -static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)),
       
  1203 -				    MYSQL_FIELD *field __attribute__((unused)),
       
  1204 +static void skip_result_with_length(MYSQL_BIND *param MY_ATTRIBUTE((unused)),
       
  1205 +				    MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
       
  1206  				    uchar **row)
       
  1207  
       
  1208  {
       
  1209 @@ -3825,7 +3825,7 @@ static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)),
       
  1210  }
       
  1211  
       
  1212  
       
  1213 -static void skip_result_string(MYSQL_BIND *param __attribute__((unused)),
       
  1214 +static void skip_result_string(MYSQL_BIND *param MY_ATTRIBUTE((unused)),
       
  1215  			       MYSQL_FIELD *field,
       
  1216  			       uchar **row)
       
  1217  
       
  1218 --- a/libmysqld/lib_sql.cc
       
  1219 +++ b/libmysqld/lib_sql.cc
       
  1220 @@ -2,7 +2,7 @@
       
  1221   * Copyright (c)  2000
       
  1222   * SWsoft  company
       
  1223   *
       
  1224 - * Modifications copyright (c) 2001, 2015. Oracle and/or its affiliates.
       
  1225 + * Modifications copyright (c) 2001, 2016. Oracle and/or its affiliates.
       
  1226   * All rights reserved.
       
  1227   *
       
  1228   * This material is provided "as is", with absolutely no warranty expressed
       
  1229 @@ -213,8 +213,8 @@ static void emb_flush_use_result(MYSQL *mysql, my_bool)
       
  1230  */
       
  1231  
       
  1232  static MYSQL_DATA *
       
  1233 -emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields __attribute__((unused)),
       
  1234 -	      unsigned int fields __attribute__((unused)))
       
  1235 +emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields MY_ATTRIBUTE((unused)),
       
  1236 +	      unsigned int fields MY_ATTRIBUTE((unused)))
       
  1237  {
       
  1238    MYSQL_DATA *result= ((THD*)mysql->thd)->cur_data;
       
  1239    ((THD*)mysql->thd)->cur_data= 0;
       
  1240 @@ -1426,7 +1426,7 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
       
  1241  #define vsnprintf _vsnprintf
       
  1242  #endif
       
  1243  
       
  1244 -int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
       
  1245 +int vprint_msg_to_log(enum loglevel level MY_ATTRIBUTE((unused)),
       
  1246                         const char *format, va_list argsi)
       
  1247  {
       
  1248    my_vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error),
       
  1249 --- a/mysql-test/r/mysql_plugin.result
       
  1250 +++ b/mysql-test/r/mysql_plugin.result
       
  1251 @@ -105,7 +105,7 @@ ERROR: Missing --plugin_dir option.
       
  1252  # Show the help.
       
  1253  #
       
  1254  mysql_plugin  Ver V.V.VV Distrib XX.XX.XX
       
  1255 -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
  1256 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1257  
       
  1258  Enable or disable plugins.
       
  1259  
       
  1260 --- a/mysys/charset-def.c
       
  1261 +++ b/mysys/charset-def.c
       
  1262 @@ -1,4 +1,4 @@
       
  1263 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
  1264 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1265  
       
  1266     This program is free software; you can redistribute it and/or modify
       
  1267     it under the terms of the GNU General Public License as published by
       
  1268 @@ -161,7 +161,7 @@ extern CHARSET_INFO my_charset_utf8mb4_vietnamese_ci;
       
  1269  
       
  1270  #endif /* HAVE_UCA_COLLATIONS */
       
  1271  
       
  1272 -my_bool init_compiled_charsets(myf flags __attribute__((unused)))
       
  1273 +my_bool init_compiled_charsets(myf flags MY_ATTRIBUTE((unused)))
       
  1274  {
       
  1275    CHARSET_INFO *cs;
       
  1276  
       
  1277 --- a/mysys/charset.c
       
  1278 +++ b/mysys/charset.c
       
  1279 @@ -1,4 +1,4 @@
       
  1280 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1281 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1282  
       
  1283     This program is free software; you can redistribute it and/or modify
       
  1284     it under the terms of the GNU General Public License as published by
       
  1285 @@ -357,8 +357,8 @@ static int add_collation(CHARSET_INFO *cs)
       
  1286    Be silent by default: no warnings on the client side.
       
  1287  */
       
  1288  static void
       
  1289 -default_reporter(enum loglevel level  __attribute__ ((unused)),
       
  1290 -                 const char *format  __attribute__ ((unused)),
       
  1291 +default_reporter(enum loglevel level  MY_ATTRIBUTE ((unused)),
       
  1292 +                 const char *format  MY_ATTRIBUTE ((unused)),
       
  1293                   ...)
       
  1294  {
       
  1295  }
       
  1296 --- a/mysys/mf_cache.c
       
  1297 +++ b/mysys/mf_cache.c
       
  1298 @@ -1,4 +1,4 @@
       
  1299 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
  1300 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1301  
       
  1302     This program is free software; you can redistribute it and/or modify
       
  1303     it under the terms of the GNU General Public License as published by
       
  1304 @@ -26,7 +26,7 @@
       
  1305  	  this, just remember the file name for later removal
       
  1306  	*/
       
  1307  
       
  1308 -static my_bool cache_remove_open_tmp(IO_CACHE *cache __attribute__((unused)),
       
  1309 +static my_bool cache_remove_open_tmp(IO_CACHE *cache MY_ATTRIBUTE((unused)),
       
  1310  				     const char *name)
       
  1311  {
       
  1312  #if O_TEMPORARY == 0
       
  1313 --- a/mysys/mf_iocache.c
       
  1314 +++ b/mysys/mf_iocache.c
       
  1315 @@ -1,4 +1,4 @@
       
  1316 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  1317 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1318  
       
  1319     This program is free software; you can redistribute it and/or modify
       
  1320     it under the terms of the GNU General Public License as published by
       
  1321 @@ -323,7 +323,7 @@ static void my_aiowait(my_aio_result *result)
       
  1322  
       
  1323  my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
       
  1324  			my_off_t seek_offset,
       
  1325 -			pbool use_async_io __attribute__((unused)),
       
  1326 +			pbool use_async_io MY_ATTRIBUTE((unused)),
       
  1327  			pbool clear_cache)
       
  1328  {
       
  1329    DBUG_ENTER("reinit_io_cache");
       
  1330 @@ -1129,7 +1129,7 @@ static void copy_to_read_buffer(IO_CACHE *write_cache,
       
  1331    while (write_length)
       
  1332    {
       
  1333      size_t copy_length= MY_MIN(write_length, write_cache->buffer_length);
       
  1334 -    int  __attribute__((unused)) rc;
       
  1335 +    int  MY_ATTRIBUTE((unused)) rc;
       
  1336  
       
  1337      rc= lock_io_cache(write_cache, write_cache->pos_in_file);
       
  1338      /* The writing thread does always have the lock when it awakes. */
       
  1339 @@ -1732,7 +1732,7 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count,
       
  1340    unlock_append_buffer(info);
       
  1341  
       
  1342  int my_b_flush_io_cache(IO_CACHE *info,
       
  1343 -                        int need_append_buffer_lock __attribute__((unused)))
       
  1344 +                        int need_append_buffer_lock MY_ATTRIBUTE((unused)))
       
  1345  {
       
  1346    size_t length;
       
  1347    my_off_t pos_in_file;
       
  1348 --- a/mysys/mf_keycache.c
       
  1349 +++ b/mysys/mf_keycache.c
       
  1350 @@ -1,4 +1,4 @@
       
  1351 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  1352 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1353  
       
  1354     This program is free software; you can redistribute it and/or modify
       
  1355     it under the terms of the GNU General Public License as published by
       
  1356 @@ -2498,8 +2498,8 @@ static void read_block(KEY_CACHE *keycache,
       
  1357  uchar *key_cache_read(KEY_CACHE *keycache,
       
  1358                        File file, my_off_t filepos, int level,
       
  1359                        uchar *buff, uint length,
       
  1360 -                      uint block_length __attribute__((unused)),
       
  1361 -                      int return_buffer __attribute__((unused)))
       
  1362 +                      uint block_length MY_ATTRIBUTE((unused)),
       
  1363 +                      int return_buffer MY_ATTRIBUTE((unused)))
       
  1364  {
       
  1365    my_bool locked_and_incremented= FALSE;
       
  1366    int error=0;
       
  1367 @@ -2979,7 +2979,7 @@ int key_cache_insert(KEY_CACHE *keycache,
       
  1368  int key_cache_write(KEY_CACHE *keycache,
       
  1369                      File file, my_off_t filepos, int level,
       
  1370                      uchar *buff, uint length,
       
  1371 -                    uint block_length  __attribute__((unused)),
       
  1372 +                    uint block_length  MY_ATTRIBUTE((unused)),
       
  1373                      int dont_write)
       
  1374  {
       
  1375    my_bool locked_and_incremented= FALSE;
       
  1376 @@ -4206,7 +4206,7 @@ static int flush_all_key_blocks(KEY_CACHE *keycache)
       
  1377      0 on success (always because it can't fail)
       
  1378  */
       
  1379  
       
  1380 -int reset_key_cache_counters(const char *name __attribute__((unused)),
       
  1381 +int reset_key_cache_counters(const char *name MY_ATTRIBUTE((unused)),
       
  1382                               KEY_CACHE *key_cache)
       
  1383  {
       
  1384    DBUG_ENTER("reset_key_cache_counters");
       
  1385 @@ -4230,9 +4230,9 @@ int reset_key_cache_counters(const char *name __attribute__((unused)),
       
  1386  /*
       
  1387    Test if disk-cache is ok
       
  1388  */
       
  1389 -static void test_key_cache(KEY_CACHE *keycache __attribute__((unused)),
       
  1390 -                           const char *where __attribute__((unused)),
       
  1391 -                           my_bool lock __attribute__((unused)))
       
  1392 +static void test_key_cache(KEY_CACHE *keycache MY_ATTRIBUTE((unused)),
       
  1393 +                           const char *where MY_ATTRIBUTE((unused)),
       
  1394 +                           my_bool lock MY_ATTRIBUTE((unused)))
       
  1395  {
       
  1396    /* TODO */
       
  1397  }
       
  1398 --- a/mysys/mf_keycaches.c
       
  1399 +++ b/mysys/mf_keycaches.c
       
  1400 @@ -1,4 +1,4 @@
       
  1401 -/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1402 +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1403  
       
  1404     This program is free software; you can redistribute it and/or modify
       
  1405     it under the terms of the GNU General Public License as published by
       
  1406 @@ -77,7 +77,7 @@ static void safe_hash_entry_free(SAFE_HASH_ENTRY *entry)
       
  1407  /* Get key and length for a SAFE_HASH_ENTRY */
       
  1408  
       
  1409  static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length,
       
  1410 -                                  my_bool not_used __attribute__((unused)))
       
  1411 +                                  my_bool not_used MY_ATTRIBUTE((unused)))
       
  1412  {
       
  1413    *length=entry->length;
       
  1414    return (uchar*) entry->key;
       
  1415 --- a/mysys/mf_tempfile.c
       
  1416 +++ b/mysys/mf_tempfile.c
       
  1417 @@ -1,4 +1,4 @@
       
  1418 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  1419 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1420  
       
  1421     This program is free software; you can redistribute it and/or modify
       
  1422     it under the terms of the GNU General Public License as published by
       
  1423 @@ -55,8 +55,8 @@
       
  1424  */
       
  1425  
       
  1426  File create_temp_file(char *to, const char *dir, const char *prefix,
       
  1427 -		      int mode __attribute__((unused)),
       
  1428 -		      myf MyFlags __attribute__((unused)))
       
  1429 +		      int mode MY_ATTRIBUTE((unused)),
       
  1430 +		      myf MyFlags MY_ATTRIBUTE((unused)))
       
  1431  {
       
  1432    File file= -1;
       
  1433  #ifdef __WIN__
       
  1434 --- a/mysys/mf_unixpath.c
       
  1435 +++ b/mysys/mf_unixpath.c
       
  1436 @@ -1,4 +1,4 @@
       
  1437 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
  1438 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1439  
       
  1440     This program is free software; you can redistribute it and/or modify
       
  1441     it under the terms of the GNU General Public License as published by
       
  1442 @@ -24,7 +24,7 @@
       
  1443    @param to   A pathname.
       
  1444  */
       
  1445  
       
  1446 -void to_unix_path(char *to __attribute__((unused)))
       
  1447 +void to_unix_path(char *to MY_ATTRIBUTE((unused)))
       
  1448  {
       
  1449  #if FN_LIBCHAR != '/'
       
  1450    {
       
  1451 --- a/mysys/my_access.c
       
  1452 +++ b/mysys/my_access.c
       
  1453 @@ -1,4 +1,4 @@
       
  1454 -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
       
  1455 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1456  
       
  1457     This program is free software; you can redistribute it and/or modify
       
  1458     it under the terms of the GNU General Public License as published by
       
  1459 @@ -187,9 +187,9 @@ static my_bool does_drive_exists(char drive_letter)
       
  1460   
       
  1461    @return TRUE if the file name is allowed, FALSE otherwise.
       
  1462  */
       
  1463 -my_bool is_filename_allowed(const char *name __attribute__((unused)),
       
  1464 -                            size_t length __attribute__((unused)),
       
  1465 -                            my_bool allow_current_dir __attribute__((unused)))
       
  1466 +my_bool is_filename_allowed(const char *name MY_ATTRIBUTE((unused)),
       
  1467 +                            size_t length MY_ATTRIBUTE((unused)),
       
  1468 +                            my_bool allow_current_dir MY_ATTRIBUTE((unused)))
       
  1469  {
       
  1470    /* 
       
  1471      For Windows, check if the file name contains : character.
       
  1472 --- a/mysys/my_alarm.c
       
  1473 +++ b/mysys/my_alarm.c
       
  1474 @@ -1,5 +1,4 @@
       
  1475 -/* Copyright (C) 2000 MySQL AB
       
  1476 -   Use is subject to license terms
       
  1477 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1478  
       
  1479     This program is free software; you can redistribute it and/or modify
       
  1480     it under the terms of the GNU General Public License as published by
       
  1481 @@ -12,7 +11,7 @@
       
  1482  
       
  1483     You should have received a copy of the GNU General Public License
       
  1484     along with this program; if not, write to the Free Software
       
  1485 -   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
       
  1486 +   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
       
  1487  
       
  1488  /* Function to set a varible when we got a alarm */
       
  1489  /* Used by my_lock samt functions in m_alarm.h */
       
  1490 @@ -24,7 +23,7 @@
       
  1491  #ifdef HAVE_ALARM
       
  1492  
       
  1493  	/* ARGSUSED */
       
  1494 -sig_handler my_set_alarm_variable(int signo __attribute__((unused)))
       
  1495 +sig_handler my_set_alarm_variable(int signo MY_ATTRIBUTE((unused)))
       
  1496  {
       
  1497    my_have_got_alarm=1;			/* Tell program that time expired */
       
  1498    return;
       
  1499 --- a/mysys/my_alloc.c
       
  1500 +++ b/mysys/my_alloc.c
       
  1501 @@ -1,4 +1,4 @@
       
  1502 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1503 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1504  
       
  1505     This program is free software; you can redistribute it and/or modify
       
  1506     it under the terms of the GNU General Public License as published by
       
  1507 @@ -44,7 +44,7 @@
       
  1508  */
       
  1509  
       
  1510  void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
       
  1511 -		     size_t pre_alloc_size __attribute__((unused)))
       
  1512 +		     size_t pre_alloc_size MY_ATTRIBUTE((unused)))
       
  1513  {
       
  1514    DBUG_ENTER("init_alloc_root");
       
  1515    DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
       
  1516 @@ -94,7 +94,7 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
       
  1517  */
       
  1518  
       
  1519  void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
       
  1520 -                         size_t pre_alloc_size __attribute__((unused)))
       
  1521 +                         size_t pre_alloc_size MY_ATTRIBUTE((unused)))
       
  1522  {
       
  1523    DBUG_ASSERT(alloc_root_inited(mem_root));
       
  1524  
       
  1525 --- a/mysys/my_bitmap.c
       
  1526 +++ b/mysys/my_bitmap.c
       
  1527 @@ -1,5 +1,5 @@
       
  1528  /*
       
  1529 -   Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
       
  1530 +   Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1531  
       
  1532     This program is free software; you can redistribute it and/or modify
       
  1533     it under the terms of the GNU General Public License as published by
       
  1534 @@ -81,14 +81,14 @@ void create_last_word_mask(MY_BITMAP *map)
       
  1535  }
       
  1536  
       
  1537  
       
  1538 -static inline void bitmap_lock(MY_BITMAP *map __attribute__((unused)))
       
  1539 +static inline void bitmap_lock(MY_BITMAP *map MY_ATTRIBUTE((unused)))
       
  1540  {
       
  1541    if (map->mutex)
       
  1542      mysql_mutex_lock(map->mutex);
       
  1543  }
       
  1544  
       
  1545  
       
  1546 -static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused)))
       
  1547 +static inline void bitmap_unlock(MY_BITMAP *map MY_ATTRIBUTE((unused)))
       
  1548  {
       
  1549    if (map->mutex)
       
  1550      mysql_mutex_unlock(map->mutex);
       
  1551 @@ -136,7 +136,7 @@ static inline uint get_first_not_set(uint32 value, uint word_pos)
       
  1552  
       
  1553  
       
  1554  my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
       
  1555 -		    my_bool thread_safe __attribute__((unused)))
       
  1556 +		    my_bool thread_safe MY_ATTRIBUTE((unused)))
       
  1557  {
       
  1558    DBUG_ENTER("bitmap_init");
       
  1559    if (!buf)
       
  1560 --- a/mysys/my_fopen.c
       
  1561 +++ b/mysys/my_fopen.c
       
  1562 @@ -1,4 +1,4 @@
       
  1563 -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
       
  1564 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1565  
       
  1566     This program is free software; you can redistribute it and/or modify
       
  1567     it under the terms of the GNU General Public License as published by
       
  1568 @@ -147,7 +147,7 @@ static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream)
       
  1569  
       
  1570  /* No close operation hook. */
       
  1571  
       
  1572 -static int no_close(void *cookie __attribute__((unused)))
       
  1573 +static int no_close(void *cookie MY_ATTRIBUTE((unused)))
       
  1574  {
       
  1575    return 0;
       
  1576  }
       
  1577 --- a/mysys/my_fstream.c
       
  1578 +++ b/mysys/my_fstream.c
       
  1579 @@ -1,4 +1,4 @@
       
  1580 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  1581 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1582  
       
  1583     This program is free software; you can redistribute it and/or modify
       
  1584     it under the terms of the GNU General Public License as published by
       
  1585 @@ -171,7 +171,7 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
       
  1586  /* Seek to position in file */
       
  1587  
       
  1588  my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
       
  1589 -		  myf MyFlags __attribute__((unused)))
       
  1590 +		  myf MyFlags MY_ATTRIBUTE((unused)))
       
  1591  {
       
  1592    DBUG_ENTER("my_fseek");
       
  1593    DBUG_PRINT("my",("stream: 0x%lx  pos: %lu  whence: %d  MyFlags: %d",
       
  1594 @@ -183,7 +183,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
       
  1595  
       
  1596  /* Tell current position of file */
       
  1597  
       
  1598 -my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
       
  1599 +my_off_t my_ftell(FILE *stream, myf MyFlags MY_ATTRIBUTE((unused)))
       
  1600  {
       
  1601    off_t pos;
       
  1602    DBUG_ENTER("my_ftell");
       
  1603 --- a/mysys/my_gethwaddr.c
       
  1604 +++ b/mysys/my_gethwaddr.c
       
  1605 @@ -1,4 +1,4 @@
       
  1606 -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
       
  1607 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1608  
       
  1609     This program is free software; you can redistribute it and/or modify
       
  1610     it under the terms of the GNU General Public License as published by
       
  1611 @@ -228,14 +228,14 @@ my_bool my_gethwaddr(uchar *to)
       
  1612  
       
  1613  #else /* __FreeBSD__ || __linux__ || __WIN__ */
       
  1614  /* just fail */
       
  1615 -my_bool my_gethwaddr(uchar *to __attribute__((unused)))
       
  1616 +my_bool my_gethwaddr(uchar *to MY_ATTRIBUTE((unused)))
       
  1617  {
       
  1618    return 1;
       
  1619  }
       
  1620  #endif
       
  1621  
       
  1622  #else /* MAIN */
       
  1623 -int main(int argc __attribute__((unused)),char **argv)
       
  1624 +int main(int argc MY_ATTRIBUTE((unused)),char **argv)
       
  1625  {
       
  1626    uchar mac[6];
       
  1627    uint i;
       
  1628 --- a/mysys/my_getsystime.c
       
  1629 +++ b/mysys/my_getsystime.c
       
  1630 @@ -1,4 +1,4 @@
       
  1631 -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1632 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1633  
       
  1634     This program is free software; you can redistribute it and/or modify
       
  1635     it under the terms of the GNU General Public License as published by
       
  1636 @@ -170,7 +170,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg)
       
  1637    @retval current time.
       
  1638  */
       
  1639  
       
  1640 -time_t my_time_possible_from_micro(ulonglong microtime __attribute__((unused)))
       
  1641 +time_t my_time_possible_from_micro(ulonglong microtime MY_ATTRIBUTE((unused)))
       
  1642  {
       
  1643  #ifdef _WIN32
       
  1644    time_t t;
       
  1645 --- a/mysys/my_lib.c
       
  1646 +++ b/mysys/my_lib.c
       
  1647 @@ -1,4 +1,4 @@
       
  1648 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  1649 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1650  
       
  1651     This program is free software; you can redistribute it and/or modify
       
  1652     it under the terms of the GNU General Public License as published by
       
  1653 @@ -390,7 +390,7 @@ error:
       
  1654  
       
  1655  
       
  1656  int my_fstat(File Filedes, MY_STAT *stat_area,
       
  1657 -             myf MyFlags __attribute__((unused)))
       
  1658 +             myf MyFlags MY_ATTRIBUTE((unused)))
       
  1659  {
       
  1660    DBUG_ENTER("my_fstat");
       
  1661    DBUG_PRINT("my",("fd: %d  MyFlags: %d", Filedes, MyFlags));
       
  1662 --- a/mysys/my_mess.c
       
  1663 +++ b/mysys/my_mess.c
       
  1664 @@ -1,4 +1,4 @@
       
  1665 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
  1666 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1667  
       
  1668     This program is free software; you can redistribute it and/or modify
       
  1669     it under the terms of the GNU General Public License as published by
       
  1670 @@ -15,7 +15,7 @@
       
  1671  
       
  1672  #include "mysys_priv.h"
       
  1673  
       
  1674 -void my_message_stderr(uint error __attribute__((unused)),
       
  1675 +void my_message_stderr(uint error MY_ATTRIBUTE((unused)),
       
  1676                         const char *str, myf MyFlags)
       
  1677  {
       
  1678    DBUG_ENTER("my_message_stderr");
       
  1679 --- a/mysys/my_static.c
       
  1680 +++ b/mysys/my_static.c
       
  1681 @@ -1,4 +1,4 @@
       
  1682 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1683 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1684  
       
  1685     This program is free software; you can redistribute it and/or modify
       
  1686     it under the terms of the GNU General Public License as published by
       
  1687 @@ -74,12 +74,12 @@ void (*error_handler_hook)(uint error, const char *str, myf MyFlags)=
       
  1688  void (*fatal_error_handler_hook)(uint error, const char *str, myf MyFlags)=
       
  1689    my_message_stderr;
       
  1690  
       
  1691 -static void proc_info_dummy(void *a __attribute__((unused)),
       
  1692 -                            const PSI_stage_info *b __attribute__((unused)),
       
  1693 -                            PSI_stage_info *c __attribute__((unused)),
       
  1694 -                            const char *d __attribute__((unused)),
       
  1695 -                            const char *e __attribute__((unused)),
       
  1696 -                            const unsigned int f __attribute__((unused)))
       
  1697 +static void proc_info_dummy(void *a MY_ATTRIBUTE((unused)),
       
  1698 +                            const PSI_stage_info *b MY_ATTRIBUTE((unused)),
       
  1699 +                            PSI_stage_info *c MY_ATTRIBUTE((unused)),
       
  1700 +                            const char *d MY_ATTRIBUTE((unused)),
       
  1701 +                            const char *e MY_ATTRIBUTE((unused)),
       
  1702 +                            const unsigned int f MY_ATTRIBUTE((unused)))
       
  1703  {
       
  1704    return;
       
  1705  }
       
  1706 --- a/mysys/my_symlink.c
       
  1707 +++ b/mysys/my_symlink.c
       
  1708 @@ -1,4 +1,4 @@
       
  1709 -/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
       
  1710 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1711  
       
  1712     This program is free software; you can redistribute it and/or modify
       
  1713     it under the terms of the GNU General Public License as published by
       
  1714 @@ -107,7 +107,7 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags)
       
  1715  #endif
       
  1716  
       
  1717  
       
  1718 -int my_is_symlink(const char *filename __attribute__((unused)))
       
  1719 +int my_is_symlink(const char *filename MY_ATTRIBUTE((unused)))
       
  1720  {
       
  1721  #if defined (HAVE_LSTAT) && defined (S_ISLNK)
       
  1722    struct stat stat_buff;
       
  1723 --- a/mysys/my_sync.c
       
  1724 +++ b/mysys/my_sync.c
       
  1725 @@ -1,4 +1,4 @@
       
  1726 -/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
       
  1727 +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1728  
       
  1729     This program is free software; you can redistribute it and/or modify
       
  1730     it under the terms of the GNU General Public License as published by
       
  1731 @@ -159,8 +159,8 @@ int my_sync_dir(const char *dir_name, myf my_flags)
       
  1732  
       
  1733  #else /* NEED_EXPLICIT_SYNC_DIR */
       
  1734  
       
  1735 -int my_sync_dir(const char *dir_name __attribute__((unused)),
       
  1736 -                myf my_flags __attribute__((unused)))
       
  1737 +int my_sync_dir(const char *dir_name MY_ATTRIBUTE((unused)),
       
  1738 +                myf my_flags MY_ATTRIBUTE((unused)))
       
  1739  {
       
  1740    return 0;
       
  1741  }
       
  1742 @@ -192,8 +192,8 @@ int my_sync_dir_by_file(const char *file_name, myf my_flags)
       
  1743  
       
  1744  #else /* NEED_EXPLICIT_SYNC_DIR */
       
  1745  
       
  1746 -int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
       
  1747 -                        myf my_flags __attribute__((unused)))
       
  1748 +int my_sync_dir_by_file(const char *file_name MY_ATTRIBUTE((unused)),
       
  1749 +                        myf my_flags MY_ATTRIBUTE((unused)))
       
  1750  {
       
  1751    return 0;
       
  1752  }
       
  1753 --- a/mysys/psi_noop.c
       
  1754 +++ b/mysys/psi_noop.c
       
  1755 @@ -1,4 +1,4 @@
       
  1756 -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
  1757 +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1758  
       
  1759    This program is free software; you can redistribute it and/or modify
       
  1760    it under the terms of the GNU General Public License as published by
       
  1761 @@ -27,7 +27,7 @@
       
  1762  
       
  1763  C_MODE_START
       
  1764  
       
  1765 -#define NNN __attribute__((unused))
       
  1766 +#define NNN MY_ATTRIBUTE((unused))
       
  1767  
       
  1768  static void register_mutex_noop(const char *category NNN,
       
  1769                                  PSI_mutex_info *info NNN,
       
  1770 @@ -637,9 +637,9 @@ digest_end_noop(PSI_digest_locker *locker NNN,
       
  1771  }
       
  1772  
       
  1773  static int
       
  1774 -set_thread_connect_attrs_noop(const char *buffer __attribute__((unused)),
       
  1775 -                             uint length  __attribute__((unused)),
       
  1776 -                             const void *from_cs __attribute__((unused)))
       
  1777 +set_thread_connect_attrs_noop(const char *buffer MY_ATTRIBUTE((unused)),
       
  1778 +                             uint length  MY_ATTRIBUTE((unused)),
       
  1779 +                             const void *from_cs MY_ATTRIBUTE((unused)))
       
  1780  {
       
  1781    return 0;
       
  1782  }
       
  1783 --- a/mysys/ptr_cmp.c
       
  1784 +++ b/mysys/ptr_cmp.c
       
  1785 @@ -1,4 +1,4 @@
       
  1786 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  1787 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1788  
       
  1789     This program is free software; you can redistribute it and/or modify
       
  1790     it under the terms of the GNU General Public License as published by
       
  1791 @@ -45,9 +45,9 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b)
       
  1792    Special case for ORDER BY / GROUP BY CHAR(0) NOT NULL
       
  1793   */
       
  1794  static
       
  1795 -int ptr_compare_zero_length(size_t *compare_length __attribute__((unused)),
       
  1796 -                            uchar **a __attribute__((unused)),
       
  1797 -                            uchar **b __attribute__((unused)))
       
  1798 +int ptr_compare_zero_length(size_t *compare_length MY_ATTRIBUTE((unused)),
       
  1799 +                            uchar **a MY_ATTRIBUTE((unused)),
       
  1800 +                            uchar **b MY_ATTRIBUTE((unused)))
       
  1801  {
       
  1802    return 0;
       
  1803  }
       
  1804 @@ -61,7 +61,7 @@ static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b);
       
  1805  	/* Get a pointer to a optimal byte-compare function for a given size */
       
  1806  
       
  1807  #ifdef __sun
       
  1808 -qsort2_cmp get_ptr_compare (size_t size __attribute__((unused)))
       
  1809 +qsort2_cmp get_ptr_compare (size_t size MY_ATTRIBUTE((unused)))
       
  1810  {
       
  1811    return (qsort2_cmp) native_compare;
       
  1812  }
       
  1813 --- a/mysys/stacktrace.c
       
  1814 +++ b/mysys/stacktrace.c
       
  1815 @@ -1,4 +1,4 @@
       
  1816 -/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1817 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1818  
       
  1819     This program is free software; you can redistribute it and/or modify
       
  1820     it under the terms of the GNU General Public License as published by
       
  1821 @@ -159,8 +159,8 @@ void my_safe_print_str(const char* val, int max_len)
       
  1822  /* Use Solaris' symbolic stack trace routine. */
       
  1823  #include <ucontext.h>
       
  1824  
       
  1825 -void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)), 
       
  1826 -                         ulong thread_stack __attribute__((unused)))
       
  1827 +void my_print_stacktrace(uchar* stack_bottom MY_ATTRIBUTE((unused)), 
       
  1828 +                         ulong thread_stack MY_ATTRIBUTE((unused)))
       
  1829  {
       
  1830    if (printstack(fileno(stderr)) == -1)
       
  1831      my_safe_printf_stderr("%s",
       
  1832 @@ -178,9 +178,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)),
       
  1833  
       
  1834  #if BACKTRACE_DEMANGLE
       
  1835  
       
  1836 -char __attribute__ ((weak)) *
       
  1837 -my_demangle(const char *mangled_name __attribute__((unused)),
       
  1838 -            int *status __attribute__((unused)))
       
  1839 +char MY_ATTRIBUTE ((weak)) *
       
  1840 +my_demangle(const char *mangled_name MY_ATTRIBUTE((unused)),
       
  1841 +            int *status MY_ATTRIBUTE((unused)))
       
  1842  {
       
  1843    return NULL;
       
  1844  }
       
  1845 --- a/mysys/testhash.c
       
  1846 +++ b/mysys/testhash.c
       
  1847 @@ -1,4 +1,4 @@
       
  1848 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  1849 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1850  
       
  1851     This program is free software; you can redistribute it and/or modify
       
  1852     it under the terms of the GNU General Public License as published by
       
  1853 @@ -39,7 +39,7 @@ my_bool hash_check(HASH *hash);
       
  1854  void free_record(void *record);
       
  1855  
       
  1856  static uchar *hash2_key(const uchar *rec,uint *length,
       
  1857 -		       my_bool not_used __attribute__((unused)))
       
  1858 +		       my_bool not_used MY_ATTRIBUTE((unused)))
       
  1859  {
       
  1860    *length=(uint) (uchar) rec[reclength-1];
       
  1861    return (uchar*) rec;
       
  1862 --- a/mysys/thr_alarm.c
       
  1863 +++ b/mysys/thr_alarm.c
       
  1864 @@ -1,4 +1,4 @@
       
  1865 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  1866 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1867  
       
  1868     This program is free software; you can redistribute it and/or modify
       
  1869     it under the terms of the GNU General Public License as published by
       
  1870 @@ -60,9 +60,9 @@ static void *alarm_handler(void *arg);
       
  1871  #define reschedule_alarms() pthread_kill(alarm_thread,THR_SERVER_ALARM)
       
  1872  #endif
       
  1873  
       
  1874 -static sig_handler thread_alarm(int sig __attribute__((unused)));
       
  1875 +static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused)));
       
  1876  
       
  1877 -static int compare_ulong(void *not_used __attribute__((unused)),
       
  1878 +static int compare_ulong(void *not_used MY_ATTRIBUTE((unused)),
       
  1879  			 uchar *a_ptr,uchar* b_ptr)
       
  1880  {
       
  1881    ulong a=*((ulong*) a_ptr),b= *((ulong*) b_ptr);
       
  1882 @@ -274,7 +274,7 @@ void thr_end_alarm(thr_alarm_t *alarmed)
       
  1883    every second.
       
  1884  */
       
  1885  
       
  1886 -sig_handler process_alarm(int sig __attribute__((unused)))
       
  1887 +sig_handler process_alarm(int sig MY_ATTRIBUTE((unused)))
       
  1888  {
       
  1889    sigset_t old_mask;
       
  1890  /*
       
  1891 @@ -304,7 +304,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
       
  1892  }
       
  1893  
       
  1894  
       
  1895 -static sig_handler process_alarm_part2(int sig __attribute__((unused)))
       
  1896 +static sig_handler process_alarm_part2(int sig MY_ATTRIBUTE((unused)))
       
  1897  {
       
  1898    ALARM *alarm_data;
       
  1899    DBUG_ENTER("process_alarm");
       
  1900 @@ -492,7 +492,7 @@ void thr_alarm_info(ALARM_INFO *info)
       
  1901  */
       
  1902  
       
  1903  
       
  1904 -static sig_handler thread_alarm(int sig __attribute__((unused)))
       
  1905 +static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused)))
       
  1906  {
       
  1907  #ifdef MAIN
       
  1908    printf("thread_alarm\n"); fflush(stdout);
       
  1909 @@ -511,7 +511,7 @@ static sig_handler thread_alarm(int sig __attribute__((unused)))
       
  1910  /* set up a alarm thread with uses 'sleep' to sleep between alarms */
       
  1911  
       
  1912  #ifdef USE_ALARM_THREAD
       
  1913 -static void *alarm_handler(void *arg __attribute__((unused)))
       
  1914 +static void *alarm_handler(void *arg MY_ATTRIBUTE((unused)))
       
  1915  {
       
  1916    int error;
       
  1917    struct timespec abstime;
       
  1918 @@ -580,7 +580,7 @@ void thr_alarm_kill(my_thread_id thread_id)
       
  1919    /* Can't do this yet */
       
  1920  }
       
  1921  
       
  1922 -sig_handler process_alarm(int sig __attribute__((unused)))
       
  1923 +sig_handler process_alarm(int sig MY_ATTRIBUTE((unused)))
       
  1924  {
       
  1925    /* Can't do this yet */
       
  1926  }
       
  1927 @@ -774,7 +774,7 @@ static sig_handler print_signal_warning(int sig)
       
  1928  #endif /* USE_ONE_SIGNAL_HAND */
       
  1929  
       
  1930  
       
  1931 -static void *signal_hand(void *arg __attribute__((unused)))
       
  1932 +static void *signal_hand(void *arg MY_ATTRIBUTE((unused)))
       
  1933  {
       
  1934    sigset_t set;
       
  1935    int sig,error,err_count=0;;
       
  1936 @@ -842,7 +842,7 @@ static void *signal_hand(void *arg __attribute__((unused)))
       
  1937  }
       
  1938  
       
  1939  
       
  1940 -int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
       
  1941 +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
       
  1942  {
       
  1943    pthread_t tid;
       
  1944    pthread_attr_t thr_attr;
       
  1945 @@ -931,7 +931,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
       
  1946  
       
  1947  #else /* !defined(DONT_USE_ALARM_THREAD) */
       
  1948  
       
  1949 -int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
       
  1950 +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
       
  1951  {
       
  1952    printf("thr_alarm disabled with DONT_USE_THR_ALARM\n");
       
  1953    exit(1);
       
  1954 --- a/mysys/thr_lock.c
       
  1955 +++ b/mysys/thr_lock.c
       
  1956 @@ -1,4 +1,4 @@
       
  1957 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  1958 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  1959  
       
  1960     This program is free software; you can redistribute it and/or modify
       
  1961     it under the terms of the GNU General Public License as published by
       
  1962 @@ -1512,21 +1512,21 @@ static ulong sum=0;
       
  1963  
       
  1964  /* The following functions is for WRITE_CONCURRENT_INSERT */
       
  1965  
       
  1966 -static void test_get_status(void* param __attribute__((unused)),
       
  1967 -                            int concurrent_insert __attribute__((unused)))
       
  1968 +static void test_get_status(void* param MY_ATTRIBUTE((unused)),
       
  1969 +                            int concurrent_insert MY_ATTRIBUTE((unused)))
       
  1970  {
       
  1971  }
       
  1972  
       
  1973 -static void test_update_status(void* param __attribute__((unused)))
       
  1974 +static void test_update_status(void* param MY_ATTRIBUTE((unused)))
       
  1975  {
       
  1976  }
       
  1977  
       
  1978 -static void test_copy_status(void* to __attribute__((unused)) ,
       
  1979 -			     void *from __attribute__((unused)))
       
  1980 +static void test_copy_status(void* to MY_ATTRIBUTE((unused)) ,
       
  1981 +			     void *from MY_ATTRIBUTE((unused)))
       
  1982  {
       
  1983  }
       
  1984  
       
  1985 -static my_bool test_check_status(void* param __attribute__((unused)))
       
  1986 +static my_bool test_check_status(void* param MY_ATTRIBUTE((unused)))
       
  1987  {
       
  1988    return 0;
       
  1989  }
       
  1990 @@ -1583,7 +1583,7 @@ static void *test_thread(void *arg)
       
  1991  }
       
  1992  
       
  1993  
       
  1994 -int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
       
  1995 +int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
       
  1996  {
       
  1997    pthread_t tid;
       
  1998    pthread_attr_t thr_attr;
       
  1999 --- a/mysys/thr_mutex.c
       
  2000 +++ b/mysys/thr_mutex.c
       
  2001 @@ -1,4 +1,4 @@
       
  2002 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  2003 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2004  
       
  2005     This program is free software; you can redistribute it and/or modify
       
  2006     it under the terms of the GNU General Public License as published by
       
  2007 @@ -53,7 +53,7 @@ void safe_mutex_global_init(void)
       
  2008  
       
  2009  
       
  2010  int safe_mutex_init(safe_mutex_t *mp,
       
  2011 -		    const pthread_mutexattr_t *attr __attribute__((unused)),
       
  2012 +		    const pthread_mutexattr_t *attr MY_ATTRIBUTE((unused)),
       
  2013  		    const char *file,
       
  2014  		    uint line)
       
  2015  {
       
  2016 @@ -370,7 +370,7 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line)
       
  2017     This is ok, as this thread may not yet have been exited.
       
  2018  */
       
  2019  
       
  2020 -void safe_mutex_end(FILE *file __attribute__((unused)))
       
  2021 +void safe_mutex_end(FILE *file MY_ATTRIBUTE((unused)))
       
  2022  {
       
  2023    if (!safe_mutex_count)			/* safetly */
       
  2024      pthread_mutex_destroy(&THR_LOCK_mutex);
       
  2025 --- a/mysys/waiting_threads.c
       
  2026 +++ b/mysys/waiting_threads.c
       
  2027 @@ -1,4 +1,4 @@
       
  2028 -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2029 +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2030  
       
  2031     This program is free software; you can redistribute it and/or modify
       
  2032     it under the terms of the GNU General Public License as published by
       
  2033 @@ -295,9 +295,9 @@ uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1];
       
  2034  uint32 wt_success_stats;
       
  2035  
       
  2036  static my_atomic_rwlock_t
       
  2037 -  cycle_stats_lock __attribute__((unused)),
       
  2038 -  wait_stats_lock __attribute__((unused)),
       
  2039 -  success_stats_lock __attribute__((unused));
       
  2040 +  cycle_stats_lock MY_ATTRIBUTE((unused)),
       
  2041 +  wait_stats_lock MY_ATTRIBUTE((unused)),
       
  2042 +  success_stats_lock MY_ATTRIBUTE((unused));
       
  2043  
       
  2044  #ifdef SAFE_STATISTICS
       
  2045  #define incr(VAR, LOCK)                           \
       
  2046 --- a/mysys_ssl/my_default.cc
       
  2047 +++ b/mysys_ssl/my_default.cc
       
  2048 @@ -1,4 +1,4 @@
       
  2049 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  2050 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2051  
       
  2052     This program is free software; you can redistribute it and/or modify
       
  2053     it under the terms of the GNU General Public License as published by
       
  2054 @@ -1279,7 +1279,7 @@ static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
       
  2055    char buf[FN_REFLEN];
       
  2056    size_t len;
       
  2057    char *p;
       
  2058 -  my_bool err __attribute__((unused));
       
  2059 +  my_bool err MY_ATTRIBUTE((unused));
       
  2060  
       
  2061    len= normalize_dirname(buf, dir);
       
  2062    if (!(p= strmake_root(alloc, buf, len)))
       
  2063 --- a/mysys_ssl/my_getopt.cc
       
  2064 +++ b/mysys_ssl/my_getopt.cc
       
  2065 @@ -1,4 +1,4 @@
       
  2066 -/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2067 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2068  
       
  2069     This program is free software; you can redistribute it and/or modify
       
  2070     it under the terms of the GNU General Public License as published by
       
  2071 @@ -1370,7 +1370,7 @@ static void init_one_value(const struct my_option *option, void *variable,
       
  2072  */
       
  2073  
       
  2074  static void fini_one_value(const struct my_option *option, void *variable,
       
  2075 -			   longlong value __attribute__ ((unused)))
       
  2076 +			   longlong value MY_ATTRIBUTE ((unused)))
       
  2077  {
       
  2078    DBUG_ENTER("fini_one_value");
       
  2079    switch ((option->var_type & GET_TYPE_MASK)) {
       
  2080 --- a/plugin/audit_null/audit_null.c
       
  2081 +++ b/plugin/audit_null/audit_null.c
       
  2082 @@ -1,4 +1,4 @@
       
  2083 -/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
       
  2084 +/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2085  
       
  2086     This program is free software; you can redistribute it and/or
       
  2087     modify it under the terms of the GNU General Public License as
       
  2088 @@ -18,9 +18,7 @@
       
  2089  #include <mysql/plugin.h>
       
  2090  #include <mysql/plugin_audit.h>
       
  2091  
       
  2092 -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
       
  2093 -#define __attribute__(A)
       
  2094 -#endif
       
  2095 +#include "my_attribute.h"
       
  2096  
       
  2097  static volatile int number_of_calls; /* for SHOW STATUS, see below */
       
  2098  /* Count MYSQL_AUDIT_GENERAL_CLASS event instances */
       
  2099 @@ -48,7 +46,7 @@ static volatile int number_of_calls_connection_change_user;
       
  2100      1                    failure (cannot happen)
       
  2101  */
       
  2102  
       
  2103 -static int audit_null_plugin_init(void *arg __attribute__((unused)))
       
  2104 +static int audit_null_plugin_init(void *arg MY_ATTRIBUTE((unused)))
       
  2105  {
       
  2106    number_of_calls= 0;
       
  2107    number_of_calls_general_log= 0;
       
  2108 @@ -75,7 +73,7 @@ static int audit_null_plugin_init(void *arg __attribute__((unused)))
       
  2109  
       
  2110  */
       
  2111  
       
  2112 -static int audit_null_plugin_deinit(void *arg __attribute__((unused)))
       
  2113 +static int audit_null_plugin_deinit(void *arg MY_ATTRIBUTE((unused)))
       
  2114  {
       
  2115    return(0);
       
  2116  }
       
  2117 @@ -91,7 +89,7 @@ static int audit_null_plugin_deinit(void *arg __attribute__((unused)))
       
  2118    DESCRIPTION
       
  2119  */
       
  2120  
       
  2121 -static void audit_null_notify(MYSQL_THD thd __attribute__((unused)),
       
  2122 +static void audit_null_notify(MYSQL_THD thd MY_ATTRIBUTE((unused)),
       
  2123                                unsigned int event_class,
       
  2124                                const void *event)
       
  2125  {
       
  2126 --- a/plugin/auth/dialog.c
       
  2127 +++ b/plugin/auth/dialog.c
       
  2128 @@ -1,4 +1,4 @@
       
  2129 -/*  Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
       
  2130 +/*  Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2131  
       
  2132      This program is free software; you can redistribute it and/or
       
  2133      modify it under the terms of the GNU General Public License as
       
  2134 @@ -207,8 +207,8 @@ typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
       
  2135  
       
  2136  static mysql_authentication_dialog_ask_t ask;
       
  2137  
       
  2138 -static char *builtin_ask(MYSQL *mysql __attribute__((unused)),
       
  2139 -                         int type __attribute__((unused)),
       
  2140 +static char *builtin_ask(MYSQL *mysql MY_ATTRIBUTE((unused)),
       
  2141 +                         int type MY_ATTRIBUTE((unused)),
       
  2142                           const char *prompt,
       
  2143                           char *buf, int buf_len)
       
  2144  {
       
  2145 @@ -309,10 +309,10 @@ static int perform_dialog(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
       
  2146    or fall back to the default implementation.
       
  2147  */
       
  2148  
       
  2149 -static int init_dialog(char *unused1   __attribute__((unused)), 
       
  2150 -                       size_t unused2  __attribute__((unused)), 
       
  2151 -                       int unused3     __attribute__((unused)), 
       
  2152 -                       va_list unused4 __attribute__((unused)))
       
  2153 +static int init_dialog(char *unused1   MY_ATTRIBUTE((unused)), 
       
  2154 +                       size_t unused2  MY_ATTRIBUTE((unused)), 
       
  2155 +                       int unused3     MY_ATTRIBUTE((unused)), 
       
  2156 +                       va_list unused4 MY_ATTRIBUTE((unused)))
       
  2157  {
       
  2158    void *sym= dlsym(RTLD_DEFAULT, "mysql_authentication_dialog_ask");
       
  2159    ask= sym ? (mysql_authentication_dialog_ask_t) sym : builtin_ask;
       
  2160 --- a/plugin/auth/mysql_no_login.c
       
  2161 +++ b/plugin/auth/mysql_no_login.c
       
  2162 @@ -1,4 +1,4 @@
       
  2163 -/*  Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
       
  2164 +/*  Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved.
       
  2165  
       
  2166      This program is free software; you can redistribute it and/or
       
  2167      modify it under the terms of the GNU General Public License as
       
  2168 @@ -32,8 +32,8 @@
       
  2169  #include <stdlib.h>
       
  2170  
       
  2171  static int mysql_no_login(
       
  2172 -    MYSQL_PLUGIN_VIO *vio __attribute__((unused)),
       
  2173 -    MYSQL_SERVER_AUTH_INFO *info __attribute__((unused)))
       
  2174 +    MYSQL_PLUGIN_VIO *vio MY_ATTRIBUTE((unused)),
       
  2175 +    MYSQL_SERVER_AUTH_INFO *info MY_ATTRIBUTE((unused)))
       
  2176  {
       
  2177    return CR_ERROR;
       
  2178  }
       
  2179 --- a/plugin/daemon_example/daemon_example.cc
       
  2180 +++ b/plugin/daemon_example/daemon_example.cc
       
  2181 @@ -1,4 +1,4 @@
       
  2182 -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
       
  2183 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2184  
       
  2185     This program is free software; you can redistribute it and/or modify
       
  2186     it under the terms of the GNU General Public License as published by
       
  2187 @@ -26,10 +26,10 @@
       
  2188  #include "sql_plugin.h"                         // st_plugin_int
       
  2189  
       
  2190  /*
       
  2191 -  Disable __attribute__() on non-gcc compilers.
       
  2192 +  Disable MY_ATTRIBUTE() on non-gcc compilers.
       
  2193  */
       
  2194 -#if !defined(__attribute__) && !defined(__GNUC__)
       
  2195 -#define __attribute__(A)
       
  2196 +#if !defined(MY_ATTRIBUTE) && !defined(__GNUC__)
       
  2197 +#define MY_ATTRIBUTE(A)
       
  2198  #endif
       
  2199  
       
  2200  
       
  2201 --- a/plugin/fulltext/plugin_example.c
       
  2202 +++ b/plugin/fulltext/plugin_example.c
       
  2203 @@ -1,4 +1,4 @@
       
  2204 -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
       
  2205 +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2206  
       
  2207     This program is free software; you can redistribute it and/or modify
       
  2208     it under the terms of the GNU General Public License as published by
       
  2209 @@ -17,9 +17,7 @@
       
  2210  #include <ctype.h>
       
  2211  #include <mysql/plugin.h>
       
  2212  
       
  2213 -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
       
  2214 -#define __attribute__(A)
       
  2215 -#endif
       
  2216 +#include "my_attribute.h"
       
  2217  
       
  2218  static long number_of_calls= 0; /* for SHOW STATUS, see below */
       
  2219  
       
  2220 @@ -62,7 +60,7 @@ static long number_of_calls= 0; /* for SHOW STATUS, see below */
       
  2221      1                    failure (cannot happen)
       
  2222  */
       
  2223  
       
  2224 -static int simple_parser_plugin_init(void *arg __attribute__((unused)))
       
  2225 +static int simple_parser_plugin_init(void *arg MY_ATTRIBUTE((unused)))
       
  2226  {
       
  2227    return(0);
       
  2228  }
       
  2229 @@ -81,7 +79,7 @@ static int simple_parser_plugin_init(void *arg __attribute__((unused)))
       
  2230  
       
  2231  */
       
  2232  
       
  2233 -static int simple_parser_plugin_deinit(void *arg __attribute__((unused)))
       
  2234 +static int simple_parser_plugin_deinit(void *arg MY_ATTRIBUTE((unused)))
       
  2235  {
       
  2236    return(0);
       
  2237  }
       
  2238 @@ -102,7 +100,7 @@ static int simple_parser_plugin_deinit(void *arg __attribute__((unused)))
       
  2239  */
       
  2240  
       
  2241  static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
       
  2242 -                              __attribute__((unused)))
       
  2243 +                              MY_ATTRIBUTE((unused)))
       
  2244  {
       
  2245    return(0);
       
  2246  }
       
  2247 @@ -123,7 +121,7 @@ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
       
  2248  */
       
  2249  
       
  2250  static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param
       
  2251 -                                __attribute__((unused)))
       
  2252 +                                MY_ATTRIBUTE((unused)))
       
  2253  {
       
  2254    return(0);
       
  2255  }
       
  2256 --- a/plugin/password_validation/validate_password.cc
       
  2257 +++ b/plugin/password_validation/validate_password.cc
       
  2258 @@ -1,4 +1,4 @@
       
  2259 -/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2260 +/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2261  
       
  2262     This program is free software; you can redistribute it and/or modify
       
  2263     it under the terms of the GNU General Public License as published by
       
  2264 @@ -24,12 +24,12 @@
       
  2265  
       
  2266  
       
  2267  /*  
       
  2268 -  __attribute__(A) needs to be defined for Windows else complier
       
  2269 +  MY_ATTRIBUTE(A) needs to be defined for Windows else complier
       
  2270    do not recognise it. Argument in plugin_init and plugin_deinit
       
  2271    Used in other plugins as well.
       
  2272  */
       
  2273 -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
       
  2274 -#define __attribute__(A)
       
  2275 +#if !defined(MY_ATTRIBUTE) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
       
  2276 +#define MY_ATTRIBUTE(A)
       
  2277  #endif
       
  2278  
       
  2279  #define MAX_DICTIONARY_FILE_LENGTH    1024 * 1024
       
  2280 @@ -367,7 +367,7 @@ static int validate_password_init(MYSQL_PLUGIN plugin_info)
       
  2281    It empty the std::set and returns 0
       
  2282  */
       
  2283  
       
  2284 -static int validate_password_deinit(void *arg __attribute__((unused)))
       
  2285 +static int validate_password_deinit(void *arg MY_ATTRIBUTE((unused)))
       
  2286  {
       
  2287    free_dictionary_file();
       
  2288    mysql_rwlock_destroy(&LOCK_dict_file);
       
  2289 @@ -380,8 +380,8 @@ static int validate_password_deinit(void *arg __attribute__((unused)))
       
  2290    the cache and re-load the new dictionary file.
       
  2291  */
       
  2292  static void
       
  2293 -dictionary_update(MYSQL_THD thd __attribute__((unused)),
       
  2294 -                  struct st_mysql_sys_var *var __attribute__((unused)),
       
  2295 +dictionary_update(MYSQL_THD thd MY_ATTRIBUTE((unused)),
       
  2296 +                  struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
       
  2297                    void *var_ptr, const void *save)
       
  2298  {
       
  2299    *(const char**)var_ptr= *(const char**)save;
       
  2300 @@ -396,8 +396,8 @@ dictionary_update(MYSQL_THD thd __attribute__((unused)),
       
  2301    4. validate_password_special_char_count
       
  2302  */
       
  2303  static void
       
  2304 -length_update(MYSQL_THD thd __attribute__((unused)),
       
  2305 -              struct st_mysql_sys_var *var __attribute__((unused)),
       
  2306 +length_update(MYSQL_THD thd MY_ATTRIBUTE((unused)),
       
  2307 +              struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
       
  2308                void *var_ptr, const void *save)
       
  2309  {
       
  2310    int new_validate_password_length;
       
  2311 --- a/regex/regcomp.c
       
  2312 +++ b/regex/regcomp.c
       
  2313 @@ -3,7 +3,7 @@
       
  2314  
       
  2315     This file was modified by Oracle on 2015-05-18 for 32-bit compatibility.
       
  2316  
       
  2317 -   Modifications copyright (c) 2015, Oracle and/or its affiliates. All rights
       
  2318 +   Modifications copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights
       
  2319     reserved. */
       
  2320  
       
  2321  #include <my_global.h>
       
  2322 @@ -1258,8 +1258,8 @@ register char *cp;
       
  2323   */
       
  2324  static void
       
  2325  mcinvert(p, cs)
       
  2326 -  register struct parse *p __attribute__((unused));
       
  2327 -  register cset *cs __attribute__((unused));
       
  2328 +  register struct parse *p MY_ATTRIBUTE((unused));
       
  2329 +  register cset *cs MY_ATTRIBUTE((unused));
       
  2330  {
       
  2331  	assert(cs->multis == NULL);	/* xxx */
       
  2332  }
       
  2333 @@ -1273,8 +1273,8 @@ mcinvert(p, cs)
       
  2334   */
       
  2335  static void
       
  2336  mccase(p, cs)
       
  2337 -register struct parse *p __attribute__((unused));
       
  2338 -register cset *cs __attribute__((unused));
       
  2339 +register struct parse *p MY_ATTRIBUTE((unused));
       
  2340 +register cset *cs MY_ATTRIBUTE((unused));
       
  2341  {
       
  2342  	assert(cs->multis == NULL);	/* xxx */
       
  2343  }
       
  2344 --- a/sql-common/client.c
       
  2345 +++ b/sql-common/client.c
       
  2346 @@ -1741,12 +1741,12 @@ mysql_init(MYSQL *mysql)
       
  2347  #define strdup_if_not_null(A) (A) == 0 ? 0 : my_strdup((A),MYF(MY_WME))
       
  2348  
       
  2349  my_bool STDCALL
       
  2350 -mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
       
  2351 -	      const char *key __attribute__((unused)),
       
  2352 -	      const char *cert __attribute__((unused)),
       
  2353 -	      const char *ca __attribute__((unused)),
       
  2354 -	      const char *capath __attribute__((unused)),
       
  2355 -	      const char *cipher __attribute__((unused)))
       
  2356 +mysql_ssl_set(MYSQL *mysql MY_ATTRIBUTE((unused)) ,
       
  2357 +	      const char *key MY_ATTRIBUTE((unused)),
       
  2358 +	      const char *cert MY_ATTRIBUTE((unused)),
       
  2359 +	      const char *ca MY_ATTRIBUTE((unused)),
       
  2360 +	      const char *capath MY_ATTRIBUTE((unused)),
       
  2361 +	      const char *cipher MY_ATTRIBUTE((unused)))
       
  2362  {
       
  2363    my_bool result= 0;
       
  2364    DBUG_ENTER("mysql_ssl_set");
       
  2365 @@ -1771,7 +1771,7 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
       
  2366  #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
       
  2367  
       
  2368  static void
       
  2369 -mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
       
  2370 +mysql_ssl_free(MYSQL *mysql MY_ATTRIBUTE((unused)))
       
  2371  {
       
  2372    struct st_VioSSLFd *ssl_fd= (struct st_VioSSLFd*) mysql->connector_fd;
       
  2373    DBUG_ENTER("mysql_ssl_free");
       
  2374 @@ -1817,7 +1817,7 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
       
  2375  */
       
  2376  
       
  2377  const char * STDCALL
       
  2378 -mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused)))
       
  2379 +mysql_get_ssl_cipher(MYSQL *mysql MY_ATTRIBUTE((unused)))
       
  2380  {
       
  2381    DBUG_ENTER("mysql_get_ssl_cipher");
       
  2382  #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
       
  2383 @@ -4085,8 +4085,8 @@ static void mysql_prune_stmt_list(MYSQL *mysql)
       
  2384      should also be reflected there.
       
  2385  */
       
  2386  
       
  2387 -void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)),
       
  2388 -                            const char *func_name __attribute__((unused)))
       
  2389 +void mysql_detach_stmt_list(LIST **stmt_list MY_ATTRIBUTE((unused)),
       
  2390 +                            const char *func_name MY_ATTRIBUTE((unused)))
       
  2391  {
       
  2392  #ifdef MYSQL_CLIENT
       
  2393    /* Reset connection handle in all prepared statements. */
       
  2394 @@ -4598,7 +4598,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
       
  2395  */
       
  2396  uchar *
       
  2397  get_attr_key(LEX_STRING *part, size_t *length,
       
  2398 -             my_bool not_used __attribute__((unused)))
       
  2399 +             my_bool not_used MY_ATTRIBUTE((unused)))
       
  2400  {
       
  2401    *length= part[0].length;
       
  2402    return (uchar *) part[0].str;
       
  2403 --- a/sql/binlog.cc
       
  2404 +++ b/sql/binlog.cc
       
  2405 @@ -8613,7 +8613,7 @@ template <class RowsEventT> Rows_log_event*
       
  2406  THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
       
  2407                                         size_t needed,
       
  2408                                         bool is_transactional,
       
  2409 -				       RowsEventT *hint __attribute__((unused)),
       
  2410 +				       RowsEventT *hint MY_ATTRIBUTE((unused)),
       
  2411                                         const uchar* extra_row_info)
       
  2412  {
       
  2413    DBUG_ENTER("binlog_prepare_pending_rows_event");
       
  2414 --- a/sql/binlog.h
       
  2415 +++ b/sql/binlog.h
       
  2416 @@ -1,5 +1,5 @@
       
  2417  #ifndef BINLOG_H_INCLUDED
       
  2418 -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2419 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2420  
       
  2421     This program is free software; you can redistribute it and/or modify
       
  2422     it under the terms of the GNU General Public License as published by
       
  2423 @@ -86,7 +86,7 @@ public:
       
  2424  
       
  2425      /** Lock for protecting the queue. */
       
  2426      mysql_mutex_t m_lock;
       
  2427 -  } __attribute__((aligned(CPU_LEVEL1_DCACHE_LINESIZE)));
       
  2428 +  } MY_ATTRIBUTE((aligned(CPU_LEVEL1_DCACHE_LINESIZE)));
       
  2429  
       
  2430  public:
       
  2431    Stage_manager()
       
  2432 --- a/sql/field.cc
       
  2433 +++ b/sql/field.cc
       
  2434 @@ -1,5 +1,5 @@
       
  2435  /*
       
  2436 -   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  2437 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2438  
       
  2439     This program is free software; you can redistribute it and/or modify
       
  2440     it under the terms of the GNU General Public License as published by
       
  2441 @@ -1290,7 +1290,7 @@ out_of_range:
       
  2442  */
       
  2443  type_conversion_status
       
  2444  Field_num::store_time(MYSQL_TIME *ltime,
       
  2445 -                      uint8 dec_arg __attribute__((unused)))
       
  2446 +                      uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2447  {
       
  2448    longlong nr= TIME_to_ulonglong_round(ltime);
       
  2449    return store(ltime->neg ? -nr : nr, 0);
       
  2450 @@ -1444,8 +1444,8 @@ bool Field::send_binary(Protocol *protocol)
       
  2451     master's field size, @c false otherwise.
       
  2452  */
       
  2453  bool Field::compatible_field_size(uint field_metadata,
       
  2454 -                                  Relay_log_info *rli_arg __attribute__((unused)),
       
  2455 -                                  uint16 mflags __attribute__((unused)),
       
  2456 +                                  Relay_log_info *rli_arg MY_ATTRIBUTE((unused)),
       
  2457 +                                  uint16 mflags MY_ATTRIBUTE((unused)),
       
  2458                                    int *order_var)
       
  2459  {
       
  2460    uint const source_size= pack_length_from_metadata(field_metadata);
       
  2461 @@ -1508,7 +1508,7 @@ Field::store(const char *to, uint length, const CHARSET_INFO *cs,
       
  2462  */
       
  2463  uchar *
       
  2464  Field::pack(uchar *to, const uchar *from, uint max_length,
       
  2465 -            bool low_byte_first __attribute__((unused)))
       
  2466 +            bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2467  {
       
  2468    uint32 length= pack_length();
       
  2469    set_if_smaller(length, max_length);
       
  2470 @@ -1548,7 +1548,7 @@ Field::pack(uchar *to, const uchar *from, uint max_length,
       
  2471  */
       
  2472  const uchar *
       
  2473  Field::unpack(uchar* to, const uchar *from, uint param_data,
       
  2474 -              bool low_byte_first __attribute__((unused)))
       
  2475 +              bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2476  {
       
  2477    uint length=pack_length();
       
  2478    int from_type= 0;
       
  2479 @@ -1860,7 +1860,7 @@ bool Field::optimize_range(uint idx, uint part)
       
  2480  
       
  2481  
       
  2482  Field *Field::new_field(MEM_ROOT *root, TABLE *new_table,
       
  2483 -                        bool keep_type __attribute__((unused)))
       
  2484 +                        bool keep_type MY_ATTRIBUTE((unused)))
       
  2485  {
       
  2486    Field *tmp= clone(root);
       
  2487    if (tmp == NULL)
       
  2488 @@ -2435,7 +2435,7 @@ longlong Field_decimal::val_int(void)
       
  2489  }
       
  2490  
       
  2491  
       
  2492 -String *Field_decimal::val_str(String *val_buffer __attribute__((unused)),
       
  2493 +String *Field_decimal::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
       
  2494  			       String *val_ptr)
       
  2495  {
       
  2496    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2497 @@ -2806,7 +2806,7 @@ Field_new_decimal::store_decimal(const my_decimal *decimal_value)
       
  2498  
       
  2499  type_conversion_status
       
  2500  Field_new_decimal::store_time(MYSQL_TIME *ltime,
       
  2501 -                                  uint8 dec_arg __attribute__((unused)))
       
  2502 +                                  uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2503  {
       
  2504    my_decimal decimal_value;
       
  2505    return store_value(date2my_decimal(ltime, &decimal_value));
       
  2506 @@ -2847,7 +2847,7 @@ my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value)
       
  2507  
       
  2508  
       
  2509  String *Field_new_decimal::val_str(String *val_buffer,
       
  2510 -                                   String *val_ptr __attribute__((unused)))
       
  2511 +                                   String *val_ptr MY_ATTRIBUTE((unused)))
       
  2512  {
       
  2513    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2514    my_decimal decimal_value;
       
  2515 @@ -2960,8 +2960,8 @@ uint Field_new_decimal::pack_length_from_metadata(uint field_metadata)
       
  2516     @return @c true
       
  2517  */
       
  2518  bool Field_new_decimal::compatible_field_size(uint field_metadata,
       
  2519 -                                              Relay_log_info * __attribute__((unused)),
       
  2520 -                                              uint16 mflags __attribute__((unused)),
       
  2521 +                                              Relay_log_info * MY_ATTRIBUTE((unused)),
       
  2522 +                                              uint16 mflags MY_ATTRIBUTE((unused)),
       
  2523                                                int *order_var)
       
  2524  {
       
  2525    uint const source_precision= (field_metadata >> 8U) & 0x00ff;
       
  2526 @@ -3161,7 +3161,7 @@ longlong Field_tiny::val_int(void)
       
  2527  
       
  2528  
       
  2529  String *Field_tiny::val_str(String *val_buffer,
       
  2530 -			    String *val_ptr __attribute__((unused)))
       
  2531 +			    String *val_ptr MY_ATTRIBUTE((unused)))
       
  2532  {
       
  2533    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2534    const CHARSET_INFO *cs= &my_charset_numeric;
       
  2535 @@ -3376,7 +3376,7 @@ longlong Field_short::val_int(void)
       
  2536  
       
  2537  
       
  2538  String *Field_short::val_str(String *val_buffer,
       
  2539 -			     String *val_ptr __attribute__((unused)))
       
  2540 +			     String *val_ptr MY_ATTRIBUTE((unused)))
       
  2541  {
       
  2542    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2543    const CHARSET_INFO *cs= &my_charset_numeric;
       
  2544 @@ -3596,7 +3596,7 @@ longlong Field_medium::val_int(void)
       
  2545  
       
  2546  
       
  2547  String *Field_medium::val_str(String *val_buffer,
       
  2548 -			      String *val_ptr __attribute__((unused)))
       
  2549 +			      String *val_ptr MY_ATTRIBUTE((unused)))
       
  2550  {
       
  2551    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2552    const CHARSET_INFO *cs= &my_charset_numeric;
       
  2553 @@ -3830,7 +3830,7 @@ longlong Field_long::val_int(void)
       
  2554  }
       
  2555  
       
  2556  String *Field_long::val_str(String *val_buffer,
       
  2557 -			    String *val_ptr __attribute__((unused)))
       
  2558 +			    String *val_ptr MY_ATTRIBUTE((unused)))
       
  2559  {
       
  2560    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2561    const CHARSET_INFO *cs= &my_charset_numeric;
       
  2562 @@ -4079,7 +4079,7 @@ longlong Field_longlong::val_int(void)
       
  2563  
       
  2564  
       
  2565  String *Field_longlong::val_str(String *val_buffer,
       
  2566 -				String *val_ptr __attribute__((unused)))
       
  2567 +				String *val_ptr MY_ATTRIBUTE((unused)))
       
  2568  {
       
  2569    const CHARSET_INFO *cs= &my_charset_numeric;
       
  2570    uint length;
       
  2571 @@ -4199,7 +4199,7 @@ Field_real::unpack(uchar *to, const uchar *from,
       
  2572  
       
  2573  type_conversion_status
       
  2574  Field_real::store_time(MYSQL_TIME *ltime,
       
  2575 -                       uint8 dec_arg __attribute__((unused)))
       
  2576 +                       uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2577  {
       
  2578    double nr= TIME_to_double(ltime);
       
  2579    return store(ltime->neg ? -nr : nr);
       
  2580 @@ -4289,7 +4289,7 @@ longlong Field_float::val_int(void)
       
  2581  
       
  2582  
       
  2583  String *Field_float::val_str(String *val_buffer,
       
  2584 -			     String *val_ptr __attribute__((unused)))
       
  2585 +			     String *val_ptr MY_ATTRIBUTE((unused)))
       
  2586  {
       
  2587    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2588    DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
       
  2589 @@ -4625,7 +4625,7 @@ bool Field_real::get_time(MYSQL_TIME *ltime)
       
  2590  
       
  2591  
       
  2592  String *Field_double::val_str(String *val_buffer,
       
  2593 -			      String *val_ptr __attribute__((unused)))
       
  2594 +			      String *val_ptr MY_ATTRIBUTE((unused)))
       
  2595  {
       
  2596    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2597    DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
       
  2598 @@ -5089,7 +5089,7 @@ Field_temporal_with_date::convert_number_to_TIME(longlong nr,
       
  2599  
       
  2600  type_conversion_status
       
  2601  Field_temporal_with_date::store_time(MYSQL_TIME *ltime,
       
  2602 -                                     uint8 dec_arg __attribute__((unused)))
       
  2603 +                                     uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2604  {
       
  2605    ASSERT_COLUMN_MARKED_FOR_WRITE;
       
  2606    type_conversion_status error;
       
  2607 @@ -5480,7 +5480,7 @@ int Field_timestamp::cmp(const uchar *a_ptr, const uchar *b_ptr)
       
  2608  }
       
  2609  
       
  2610  
       
  2611 -void Field_timestamp::make_sort_key(uchar *to,uint length __attribute__((unused)))
       
  2612 +void Field_timestamp::make_sort_key(uchar *to,uint length MY_ATTRIBUTE((unused)))
       
  2613  {
       
  2614  #ifdef WORDS_BIGENDIAN
       
  2615    if (!table || !table->s->db_low_byte_first)
       
  2616 @@ -5699,7 +5699,7 @@ Field_time_common::convert_number_to_TIME(longlong nr, bool unsigned_val,
       
  2617  
       
  2618  type_conversion_status
       
  2619  Field_time_common::store_time(MYSQL_TIME *ltime,
       
  2620 -                              uint8 dec_arg __attribute__((unused)))
       
  2621 +                              uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2622  {
       
  2623    /* Check if seconds or minutes are out of range */
       
  2624    if (ltime->second >= 60 || ltime->minute >= 60)
       
  2625 @@ -5725,7 +5725,7 @@ Field_time_common::store_internal_with_round(MYSQL_TIME *ltime, int *warnings)
       
  2626  
       
  2627  
       
  2628  String *Field_time_common::val_str(String *val_buffer,
       
  2629 -                                   String *val_ptr __attribute__((unused)))
       
  2630 +                                   String *val_ptr MY_ATTRIBUTE((unused)))
       
  2631  {
       
  2632    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2633    MYSQL_TIME ltime;
       
  2634 @@ -6039,7 +6039,7 @@ type_conversion_status Field_year::store(double nr)
       
  2635  
       
  2636  type_conversion_status
       
  2637  Field_year::store_time(MYSQL_TIME *ltime,
       
  2638 -                       uint8 dec_arg __attribute__((unused)))
       
  2639 +                       uint8 dec_arg MY_ATTRIBUTE((unused)))
       
  2640  {
       
  2641    if (ltime->time_type != MYSQL_TIMESTAMP_DATETIME &&
       
  2642        ltime->time_type != MYSQL_TIMESTAMP_DATE)
       
  2643 @@ -6103,7 +6103,7 @@ longlong Field_year::val_int(void)
       
  2644  
       
  2645  
       
  2646  String *Field_year::val_str(String *val_buffer,
       
  2647 -			    String *val_ptr __attribute__((unused)))
       
  2648 +			    String *val_ptr MY_ATTRIBUTE((unused)))
       
  2649  {
       
  2650    DBUG_ASSERT(field_length < 5);
       
  2651    val_buffer->alloc(5);
       
  2652 @@ -6203,7 +6203,7 @@ longlong Field_newdate::val_time_temporal()
       
  2653  
       
  2654  
       
  2655  String *Field_newdate::val_str(String *val_buffer,
       
  2656 -			       String *val_ptr __attribute__((unused)))
       
  2657 +			       String *val_ptr MY_ATTRIBUTE((unused)))
       
  2658  {
       
  2659    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2660    val_buffer->alloc(field_length);
       
  2661 @@ -6393,7 +6393,7 @@ longlong Field_datetime::val_int()
       
  2662    Using my_datetime_number_to_str() instead of my_datetime_to_str().
       
  2663  */
       
  2664  String *Field_datetime::val_str(String *val_buffer,
       
  2665 -				String *val_ptr __attribute__((unused)))
       
  2666 +				String *val_ptr MY_ATTRIBUTE((unused)))
       
  2667  {
       
  2668    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2669    val_buffer->alloc(field_length + 1);
       
  2670 @@ -6787,7 +6787,7 @@ longlong Field_string::val_int(void)
       
  2671  }
       
  2672  
       
  2673  
       
  2674 -String *Field_string::val_str(String *val_buffer __attribute__((unused)),
       
  2675 +String *Field_string::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
       
  2676  			      String *val_ptr)
       
  2677  {
       
  2678    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2679 @@ -6845,7 +6845,7 @@ check_field_for_37426(const void *param_arg)
       
  2680  bool
       
  2681  Field_string::compatible_field_size(uint field_metadata,
       
  2682                                      Relay_log_info *rli_arg,
       
  2683 -                                    uint16 mflags __attribute__((unused)),
       
  2684 +                                    uint16 mflags MY_ATTRIBUTE((unused)),
       
  2685                                      int *order_var)
       
  2686  {
       
  2687  #ifdef HAVE_REPLICATION
       
  2688 @@ -6883,7 +6883,7 @@ int Field_string::cmp(const uchar *a_ptr, const uchar *b_ptr)
       
  2689  
       
  2690  void Field_string::make_sort_key(uchar *to, uint length)
       
  2691  {
       
  2692 -  uint tmp __attribute__((unused))=
       
  2693 +  uint tmp MY_ATTRIBUTE((unused))=
       
  2694      field_charset->coll->strnxfrm(field_charset,
       
  2695                                    to, length, char_length(),
       
  2696                                    ptr, field_length,
       
  2697 @@ -6915,7 +6915,7 @@ void Field_string::sql_type(String &res) const
       
  2698  
       
  2699  uchar *Field_string::pack(uchar *to, const uchar *from,
       
  2700                            uint max_length,
       
  2701 -                          bool low_byte_first __attribute__((unused)))
       
  2702 +                          bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2703  {
       
  2704    uint length=      min(field_length,max_length);
       
  2705    uint local_char_length= max_length/field_charset->mbmaxlen;
       
  2706 @@ -6974,7 +6974,7 @@ const uchar *
       
  2707  Field_string::unpack(uchar *to,
       
  2708                       const uchar *from,
       
  2709                       uint param_data,
       
  2710 -                     bool low_byte_first __attribute__((unused)))
       
  2711 +                     bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2712  {
       
  2713    uint from_length, length;
       
  2714  
       
  2715 @@ -7229,7 +7229,7 @@ longlong Field_varstring::val_int(void)
       
  2716    return result;
       
  2717  }
       
  2718  
       
  2719 -String *Field_varstring::val_str(String *val_buffer __attribute__((unused)),
       
  2720 +String *Field_varstring::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
       
  2721  				 String *val_ptr)
       
  2722  {
       
  2723    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2724 @@ -7391,7 +7391,7 @@ uint32 Field_varstring::data_length()
       
  2725  
       
  2726  uchar *Field_varstring::pack(uchar *to, const uchar *from,
       
  2727                               uint max_length,
       
  2728 -                             bool low_byte_first __attribute__((unused)))
       
  2729 +                             bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2730  {
       
  2731    uint length= length_bytes == 1 ? (uint) *from : uint2korr(from);
       
  2732    set_if_smaller(max_length, field_length);
       
  2733 @@ -7428,7 +7428,7 @@ uchar *Field_varstring::pack(uchar *to, const uchar *from,
       
  2734  const uchar *
       
  2735  Field_varstring::unpack(uchar *to, const uchar *from,
       
  2736                          uint param_data,
       
  2737 -                        bool low_byte_first __attribute__((unused)))
       
  2738 +                        bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2739  {
       
  2740    uint length;
       
  2741    uint l_bytes= (param_data && (param_data < field_length)) ? 
       
  2742 @@ -7887,7 +7887,7 @@ longlong Field_blob::val_int(void)
       
  2743    return my_strntoll(charset(),blob,length,10,NULL,&not_used);
       
  2744  }
       
  2745  
       
  2746 -String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
       
  2747 +String *Field_blob::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
       
  2748  			    String *val_ptr)
       
  2749  {
       
  2750    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2751 @@ -8539,7 +8539,7 @@ int Field_enum::do_save_field_metadata(uchar *metadata_ptr)
       
  2752  }
       
  2753  
       
  2754  
       
  2755 -String *Field_enum::val_str(String *val_buffer __attribute__((unused)),
       
  2756 +String *Field_enum::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
       
  2757  			    String *val_ptr)
       
  2758  {
       
  2759    uint tmp=(uint) Field_enum::val_int();
       
  2760 @@ -8683,7 +8683,7 @@ type_conversion_status Field_set::store(longlong nr, bool unsigned_val)
       
  2761  
       
  2762  
       
  2763  String *Field_set::val_str(String *val_buffer,
       
  2764 -			   String *val_ptr __attribute__((unused)))
       
  2765 +			   String *val_ptr MY_ATTRIBUTE((unused)))
       
  2766  {
       
  2767    ulonglong tmp=(ulonglong) Field_enum::val_int();
       
  2768    uint bitnr=0;
       
  2769 @@ -9148,7 +9148,7 @@ longlong Field_bit::val_int(void)
       
  2770  
       
  2771  
       
  2772  String *Field_bit::val_str(String *val_buffer,
       
  2773 -                           String *val_ptr __attribute__((unused)))
       
  2774 +                           String *val_ptr MY_ATTRIBUTE((unused)))
       
  2775  {
       
  2776    ASSERT_COLUMN_MARKED_FOR_READ;
       
  2777    char buff[sizeof(longlong)];
       
  2778 @@ -9308,7 +9308,7 @@ uint Field_bit::pack_length_from_metadata(uint field_metadata)
       
  2779  */
       
  2780  bool
       
  2781  Field_bit::compatible_field_size(uint field_metadata,
       
  2782 -                                 Relay_log_info * __attribute__((unused)),
       
  2783 +                                 Relay_log_info * MY_ATTRIBUTE((unused)),
       
  2784                                   uint16 mflags,
       
  2785                                   int *order_var)
       
  2786  {
       
  2787 @@ -9348,7 +9348,7 @@ void Field_bit::sql_type(String &res) const
       
  2788  
       
  2789  uchar *
       
  2790  Field_bit::pack(uchar *to, const uchar *from, uint max_length,
       
  2791 -                bool low_byte_first __attribute__((unused)))
       
  2792 +                bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2793  {
       
  2794    DBUG_ASSERT(max_length > 0);
       
  2795    uint length;
       
  2796 @@ -9396,7 +9396,7 @@ Field_bit::pack(uchar *to, const uchar *from, uint max_length,
       
  2797  */
       
  2798  const uchar *
       
  2799  Field_bit::unpack(uchar *to, const uchar *from, uint param_data,
       
  2800 -                  bool low_byte_first __attribute__((unused)))
       
  2801 +                  bool low_byte_first MY_ATTRIBUTE((unused)))
       
  2802  {
       
  2803    DBUG_ENTER("Field_bit::unpack");
       
  2804    DBUG_PRINT("enter", ("to: %p, from: %p, param_data: 0x%x",
       
  2805 --- a/sql/field.h
       
  2806 +++ b/sql/field.h
       
  2807 @@ -1,7 +1,7 @@
       
  2808  #ifndef FIELD_INCLUDED
       
  2809  #define FIELD_INCLUDED
       
  2810  
       
  2811 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2812 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2813  
       
  2814     This program is free software; you can redistribute it and/or modify
       
  2815     it under the terms of the GNU General Public License as published by
       
  2816 @@ -1889,13 +1889,13 @@ public:
       
  2817      return new Field_long(*this);
       
  2818    }
       
  2819    virtual uchar *pack(uchar* to, const uchar *from,
       
  2820 -                      uint max_length __attribute__((unused)),
       
  2821 +                      uint max_length MY_ATTRIBUTE((unused)),
       
  2822                        bool low_byte_first)
       
  2823    {
       
  2824      return pack_int32(to, from, low_byte_first);
       
  2825    }
       
  2826    virtual const uchar *unpack(uchar* to, const uchar *from,
       
  2827 -                              uint param_data __attribute__((unused)),
       
  2828 +                              uint param_data MY_ATTRIBUTE((unused)),
       
  2829                                bool low_byte_first)
       
  2830    {
       
  2831      return unpack_int32(to, from, low_byte_first);
       
  2832 @@ -1954,13 +1954,13 @@ public:
       
  2833      return new Field_longlong(*this);
       
  2834    }
       
  2835    virtual uchar *pack(uchar* to, const uchar *from,
       
  2836 -                      uint max_length  __attribute__((unused)),
       
  2837 +                      uint max_length  MY_ATTRIBUTE((unused)),
       
  2838                        bool low_byte_first)
       
  2839    {
       
  2840      return pack_int64(to, from, low_byte_first);
       
  2841    }
       
  2842    virtual const uchar *unpack(uchar* to, const uchar *from,
       
  2843 -                              uint param_data __attribute__((unused)),
       
  2844 +                              uint param_data MY_ATTRIBUTE((unused)),
       
  2845                                bool low_byte_first)
       
  2846    {
       
  2847      return unpack_int64(to, from, low_byte_first);
       
  2848 @@ -2560,12 +2560,12 @@ public:
       
  2849      return new Field_timestamp(*this);
       
  2850    }
       
  2851    uchar *pack(uchar *to, const uchar *from,
       
  2852 -              uint max_length __attribute__((unused)), bool low_byte_first)
       
  2853 +              uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first)
       
  2854    {
       
  2855      return pack_int32(to, from, low_byte_first);
       
  2856    }
       
  2857    const uchar *unpack(uchar* to, const uchar *from,
       
  2858 -                      uint param_data __attribute__((unused)),
       
  2859 +                      uint param_data MY_ATTRIBUTE((unused)),
       
  2860                        bool low_byte_first)
       
  2861    {
       
  2862      return unpack_int32(to, from, low_byte_first);
       
  2863 @@ -2998,12 +2998,12 @@ public:
       
  2864      return new Field_datetime(*this);
       
  2865    }
       
  2866    uchar *pack(uchar* to, const uchar *from,
       
  2867 -              uint max_length __attribute__((unused)), bool low_byte_first)
       
  2868 +              uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first)
       
  2869    {
       
  2870      return pack_int64(to, from, low_byte_first);
       
  2871    }
       
  2872    const uchar *unpack(uchar* to, const uchar *from,
       
  2873 -                      uint param_data __attribute__((unused)),
       
  2874 +                      uint param_data MY_ATTRIBUTE((unused)),
       
  2875                        bool low_byte_first)
       
  2876    {
       
  2877      return unpack_int64(to, from, low_byte_first);
       
  2878 --- a/sql/field_conv.cc
       
  2879 +++ b/sql/field_conv.cc
       
  2880 @@ -195,7 +195,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
       
  2881  }
       
  2882  
       
  2883  
       
  2884 -static void do_skip(Copy_field *copy __attribute__((unused)))
       
  2885 +static void do_skip(Copy_field *copy MY_ATTRIBUTE((unused)))
       
  2886  {
       
  2887  }
       
  2888  
       
  2889 --- a/sql/filesort.cc
       
  2890 +++ b/sql/filesort.cc
       
  2891 @@ -1,5 +1,5 @@
       
  2892  /*
       
  2893 -   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2894 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2895  
       
  2896     This program is free software; you can redistribute it and/or modify
       
  2897     it under the terms of the GNU General Public License as published by
       
  2898 @@ -1040,7 +1040,7 @@ void make_sortkey(Sort_param *param, uchar *to, uchar *ref_pos)
       
  2899          if (sort_field->need_strxnfrm)
       
  2900          {
       
  2901            char *from=(char*) res->ptr();
       
  2902 -          uint tmp_length __attribute__((unused));
       
  2903 +          uint tmp_length MY_ATTRIBUTE((unused));
       
  2904            if ((uchar*) from == to)
       
  2905            {
       
  2906              DBUG_ASSERT(sort_field->length >= length);
       
  2907 --- a/sql/ha_ndb_index_stat.cc
       
  2908 +++ b/sql/ha_ndb_index_stat.cc
       
  2909 @@ -1,5 +1,5 @@
       
  2910  /*
       
  2911 -   Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
       
  2912 +   Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2913  
       
  2914     This program is free software; you can redistribute it and/or modify
       
  2915     it under the terms of the GNU General Public License as published by
       
  2916 @@ -1727,7 +1727,7 @@ ndb_index_stat_stop_listener(Ndb_index_stat_proc &pr)
       
  2917  }
       
  2918  
       
  2919  pthread_handler_t
       
  2920 -ndb_index_stat_thread_func(void *arg __attribute__((unused)))
       
  2921 +ndb_index_stat_thread_func(void *arg MY_ATTRIBUTE((unused)))
       
  2922  {
       
  2923    THD *thd; /* needs to be first for thread_stack */
       
  2924    struct timespec abstime;
       
  2925 --- a/sql/ha_ndbcluster.cc
       
  2926 +++ b/sql/ha_ndbcluster.cc
       
  2927 @@ -1,4 +1,4 @@
       
  2928 -/* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2929 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2930  
       
  2931    This program is free software; you can redistribute it and/or modify
       
  2932    it under the terms of the GNU General Public License as published by
       
  2933 @@ -417,7 +417,7 @@ pthread_mutex_t ndbcluster_mutex;
       
  2934  HASH ndbcluster_open_tables;
       
  2935  
       
  2936  static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length,
       
  2937 -                                my_bool not_used __attribute__((unused)));
       
  2938 +                                my_bool not_used MY_ATTRIBUTE((unused)));
       
  2939  
       
  2940  static void modify_shared_stats(NDB_SHARE *share,
       
  2941                                  Ndb_local_table_statistics *local_stat);
       
  2942 @@ -1293,7 +1293,7 @@ typedef struct st_thd_ndb_share {
       
  2943  } THD_NDB_SHARE;
       
  2944  static
       
  2945  uchar *thd_ndb_share_get_key(THD_NDB_SHARE *thd_ndb_share, size_t *length,
       
  2946 -                            my_bool not_used __attribute__((unused)))
       
  2947 +                            my_bool not_used MY_ATTRIBUTE((unused)))
       
  2948  {
       
  2949    *length= sizeof(thd_ndb_share->key);
       
  2950    return (uchar*) &thd_ndb_share->key;
       
  2951 @@ -11106,7 +11106,7 @@ int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd,
       
  2952  
       
  2953  
       
  2954  extern "C" uchar* tables_get_key(const char *entry, size_t *length,
       
  2955 -                                my_bool not_used __attribute__((unused)))
       
  2956 +                                my_bool not_used MY_ATTRIBUTE((unused)))
       
  2957  {
       
  2958    *length= strlen(entry);
       
  2959    return (uchar*) entry;
       
  2960 @@ -12657,7 +12657,7 @@ ha_ndbcluster::register_query_cache_table(THD *thd,
       
  2961  */
       
  2962  
       
  2963  static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length,
       
  2964 -                                my_bool not_used __attribute__((unused)))
       
  2965 +                                my_bool not_used MY_ATTRIBUTE((unused)))
       
  2966  {
       
  2967    *length= share->key_length;
       
  2968    return (uchar*) share->key;
       
  2969 @@ -14539,7 +14539,7 @@ ha_ndbcluster::update_table_comment(
       
  2970  /**
       
  2971    Utility thread main loop.
       
  2972  */
       
  2973 -pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
       
  2974 +pthread_handler_t ndb_util_thread_func(void *arg MY_ATTRIBUTE((unused)))
       
  2975  {
       
  2976    THD *thd; /* needs to be first for thread_stack */
       
  2977    struct timespec abstime;
       
  2978 --- a/sql/ha_ndbcluster_binlog.cc
       
  2979 +++ b/sql/ha_ndbcluster_binlog.cc
       
  2980 @@ -1,5 +1,5 @@
       
  2981  /*
       
  2982 -  Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
       
  2983 +  Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  2984  
       
  2985    This program is free software; you can redistribute it and/or modify
       
  2986    it under the terms of the GNU General Public License as published by
       
  2987 @@ -6252,7 +6252,7 @@ private:
       
  2988  static uchar *
       
  2989  ndb_schema_objects_get_key(NDB_SCHEMA_OBJECT *schema_object,
       
  2990                             size_t *length,
       
  2991 -                           my_bool not_used __attribute__((unused)))
       
  2992 +                           my_bool not_used MY_ATTRIBUTE((unused)))
       
  2993  {
       
  2994    *length= schema_object->key_length;
       
  2995    return (uchar*) schema_object->key;
       
  2996 --- a/sql/ha_partition.cc
       
  2997 +++ b/sql/ha_partition.cc
       
  2998 @@ -1,5 +1,5 @@
       
  2999  /*
       
  3000 -   Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3001 +   Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3002  
       
  3003     This program is free software; you can redistribute it and/or modify
       
  3004     it under the terms of the GNU General Public License as published by
       
  3005 @@ -222,7 +222,7 @@ static uint partition_flags()
       
  3006    return HA_CAN_PARTITION;
       
  3007  }
       
  3008  
       
  3009 -static uint alter_table_flags(uint flags __attribute__((unused)))
       
  3010 +static uint alter_table_flags(uint flags MY_ATTRIBUTE((unused)))
       
  3011  {
       
  3012    return (HA_PARTITION_FUNCTION_SUPPORTED |
       
  3013            HA_FAST_CHANGE_PARTITION);
       
  3014 @@ -1670,9 +1670,9 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
       
  3015                                      ulonglong * const copied,
       
  3016                                      ulonglong * const deleted,
       
  3017                                      const uchar *pack_frm_data
       
  3018 -                                    __attribute__((unused)),
       
  3019 +                                    MY_ATTRIBUTE((unused)),
       
  3020                                      size_t pack_frm_len
       
  3021 -                                    __attribute__((unused)))
       
  3022 +                                    MY_ATTRIBUTE((unused)))
       
  3023  {
       
  3024    List_iterator<partition_element> part_it(m_part_info->partitions);
       
  3025    List_iterator <partition_element> t_it(m_part_info->temp_partitions);
       
  3026 @@ -2956,7 +2956,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root,
       
  3027  */
       
  3028  
       
  3029  static uchar *get_part_name(PART_NAME_DEF *part, size_t *length,
       
  3030 -                            my_bool not_used __attribute__((unused)))
       
  3031 +                            my_bool not_used MY_ATTRIBUTE((unused)))
       
  3032  {
       
  3033    *length= part->length;
       
  3034    return part->partition_name;
       
  3035 --- a/sql/handler.cc
       
  3036 +++ b/sql/handler.cc
       
  3037 @@ -6278,7 +6278,7 @@ end:
       
  3038  ha_rows DsMrr_impl::dsmrr_info(uint keyno, uint n_ranges, uint rows,
       
  3039                                 uint *bufsz, uint *flags, Cost_estimate *cost)
       
  3040  {  
       
  3041 -  ha_rows res __attribute__((unused));
       
  3042 +  ha_rows res MY_ATTRIBUTE((unused));
       
  3043    uint def_flags= *flags;
       
  3044    uint def_bufsz= *bufsz;
       
  3045  
       
  3046 --- a/sql/handler.h
       
  3047 +++ b/sql/handler.h
       
  3048 @@ -3067,7 +3067,7 @@ private:
       
  3049    */
       
  3050    virtual int rnd_init(bool scan)= 0;
       
  3051    virtual int rnd_end() { return 0; }
       
  3052 -  virtual int write_row(uchar *buf __attribute__((unused)))
       
  3053 +  virtual int write_row(uchar *buf MY_ATTRIBUTE((unused)))
       
  3054    {
       
  3055      return HA_ERR_WRONG_COMMAND;
       
  3056    }
       
  3057 @@ -3080,13 +3080,13 @@ private:
       
  3058      the columns required for the error message are not read, the error
       
  3059      message will contain garbage.
       
  3060    */
       
  3061 -  virtual int update_row(const uchar *old_data __attribute__((unused)),
       
  3062 -                         uchar *new_data __attribute__((unused)))
       
  3063 +  virtual int update_row(const uchar *old_data MY_ATTRIBUTE((unused)),
       
  3064 +                         uchar *new_data MY_ATTRIBUTE((unused)))
       
  3065    {
       
  3066      return HA_ERR_WRONG_COMMAND;
       
  3067    }
       
  3068  
       
  3069 -  virtual int delete_row(const uchar *buf __attribute__((unused)))
       
  3070 +  virtual int delete_row(const uchar *buf MY_ATTRIBUTE((unused)))
       
  3071    {
       
  3072      return HA_ERR_WRONG_COMMAND;
       
  3073    }
       
  3074 @@ -3119,8 +3119,8 @@ private:
       
  3075      @return  non-0 in case of failure, 0 in case of success.
       
  3076      When lock_type is F_UNLCK, the return value is ignored.
       
  3077    */
       
  3078 -  virtual int external_lock(THD *thd __attribute__((unused)),
       
  3079 -                            int lock_type __attribute__((unused)))
       
  3080 +  virtual int external_lock(THD *thd MY_ATTRIBUTE((unused)),
       
  3081 +                            int lock_type MY_ATTRIBUTE((unused)))
       
  3082    {
       
  3083      return 0;
       
  3084    }
       
  3085 --- a/sql/hostname.cc
       
  3086 +++ b/sql/hostname.cc
       
  3087 @@ -1,4 +1,4 @@
       
  3088 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3089 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3090  
       
  3091     This program is free software; you can redistribute it and/or modify
       
  3092     it under the terms of the GNU General Public License as published by
       
  3093 @@ -413,7 +413,7 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage,
       
  3094  {
       
  3095    const struct sockaddr *ip= (const sockaddr *) ip_storage;
       
  3096    int err_code;
       
  3097 -  bool err_status __attribute__((unused));
       
  3098 +  bool err_status MY_ATTRIBUTE((unused));
       
  3099    Host_errors errors;
       
  3100  
       
  3101    DBUG_ENTER("ip_to_hostname");
       
  3102 --- a/sql/init.h
       
  3103 +++ b/sql/init.h
       
  3104 @@ -1,4 +1,4 @@
       
  3105 -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
       
  3106 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3107  
       
  3108     This program is free software; you can redistribute it and/or modify
       
  3109     it under the terms of the GNU General Public License as published by
       
  3110 @@ -19,6 +19,6 @@
       
  3111  #include "my_global.h"                          /* ulong */
       
  3112  
       
  3113  void unireg_init(ulong options);
       
  3114 -void unireg_end(void) __attribute__((noreturn));
       
  3115 +void unireg_end(void) MY_ATTRIBUTE((noreturn));
       
  3116  
       
  3117  #endif /* INIT_INCLUDED */
       
  3118 --- a/sql/item.cc
       
  3119 +++ b/sql/item.cc
       
  3120 @@ -3413,8 +3413,8 @@ Item *Item_null::safe_charset_converter(const CHARSET_INFO *tocs)
       
  3121  
       
  3122  static void
       
  3123  default_set_param_func(Item_param *param,
       
  3124 -                       uchar **pos __attribute__((unused)),
       
  3125 -                       ulong len __attribute__((unused)))
       
  3126 +                       uchar **pos MY_ATTRIBUTE((unused)),
       
  3127 +                       ulong len MY_ATTRIBUTE((unused)))
       
  3128  {
       
  3129    param->set_null();
       
  3130  }
       
  3131 --- a/sql/item_func.cc
       
  3132 +++ b/sql/item_func.cc
       
  3133 @@ -1,4 +1,4 @@
       
  3134 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3135 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3136  
       
  3137     This program is free software; you can redistribute it and/or modify
       
  3138     it under the terms of the GNU General Public License as published by
       
  3139 @@ -3985,7 +3985,7 @@ public:
       
  3140  };
       
  3141  
       
  3142  uchar *ull_get_key(const User_level_lock *ull, size_t *length,
       
  3143 -                   my_bool not_used __attribute__((unused)))
       
  3144 +                   my_bool not_used MY_ATTRIBUTE((unused)))
       
  3145  {
       
  3146    *length= ull->key_length;
       
  3147    return ull->key;
       
  3148 --- a/sql/item_sum.cc
       
  3149 +++ b/sql/item_sum.cc
       
  3150 @@ -1,4 +1,4 @@
       
  3151 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3152 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3153     rights reserved.
       
  3154  
       
  3155     This program is free software; you can redistribute it and/or modify
       
  3156 @@ -3070,7 +3070,7 @@ int group_concat_key_cmp_with_order(const void* arg, const void* key1,
       
  3157  */
       
  3158  
       
  3159  extern "C"
       
  3160 -int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)),
       
  3161 +int dump_leaf_key(void* key_arg, element_count count MY_ATTRIBUTE((unused)),
       
  3162                    void* item_arg)
       
  3163  {
       
  3164    Item_func_group_concat *item= (Item_func_group_concat *) item_arg;
       
  3165 --- a/sql/item_sum.h
       
  3166 +++ b/sql/item_sum.h
       
  3167 @@ -1,7 +1,7 @@
       
  3168  #ifndef ITEM_SUM_INCLUDED
       
  3169  #define ITEM_SUM_INCLUDED
       
  3170  
       
  3171 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. reserved.
       
  3172 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. reserved.
       
  3173     reserved.
       
  3174  
       
  3175     This program is free software; you can redistribute it and/or modify
       
  3176 @@ -1417,7 +1417,7 @@ int group_concat_key_cmp_with_distinct(const void* arg, const void* key1,
       
  3177  int group_concat_key_cmp_with_order(const void* arg, const void* key1,
       
  3178                                      const void* key2);
       
  3179  int dump_leaf_key(void* key_arg,
       
  3180 -                  element_count count __attribute__((unused)),
       
  3181 +                  element_count count MY_ATTRIBUTE((unused)),
       
  3182                    void* item_arg);
       
  3183  C_MODE_END
       
  3184  
       
  3185 @@ -1463,7 +1463,7 @@ class Item_func_group_concat : public Item_sum
       
  3186                                               const void* key1,
       
  3187  					     const void* key2);
       
  3188    friend int dump_leaf_key(void* key_arg,
       
  3189 -                           element_count count __attribute__((unused)),
       
  3190 +                           element_count count MY_ATTRIBUTE((unused)),
       
  3191  			   void* item_arg);
       
  3192  
       
  3193  public:
       
  3194 --- a/sql/item_timefunc.cc
       
  3195 +++ b/sql/item_timefunc.cc
       
  3196 @@ -1,5 +1,5 @@
       
  3197  /*
       
  3198 -   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3199 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3200  
       
  3201     This program is free software; you can redistribute it and/or modify
       
  3202     it under the terms of the GNU General Public License as published by
       
  3203 @@ -1902,7 +1902,7 @@ Item_func_now::save_in_field(Field *to, bool no_conversions)
       
  3204      time zone. Defines time zone (local) used for whole SYSDATE function.
       
  3205  */
       
  3206  bool Item_func_sysdate_local::get_date(MYSQL_TIME *now_time,
       
  3207 -                                       uint fuzzy_date __attribute__((unused)))
       
  3208 +                                       uint fuzzy_date MY_ATTRIBUTE((unused)))
       
  3209  {
       
  3210    THD *thd= current_thd;
       
  3211    ulonglong tmp= my_micro_time();
       
  3212 @@ -2138,7 +2138,7 @@ void Item_func_from_unixtime::fix_length_and_dec()
       
  3213  
       
  3214  
       
  3215  bool Item_func_from_unixtime::get_date(MYSQL_TIME *ltime,
       
  3216 -				       uint fuzzy_date __attribute__((unused)))
       
  3217 +				       uint fuzzy_date MY_ATTRIBUTE((unused)))
       
  3218  {
       
  3219    lldiv_t lld;
       
  3220    if (decimals)
       
  3221 @@ -2177,7 +2177,7 @@ void Item_func_convert_tz::fix_length_and_dec()
       
  3222  
       
  3223  
       
  3224  bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
       
  3225 -                                    uint fuzzy_date __attribute__((unused)))
       
  3226 +                                    uint fuzzy_date MY_ATTRIBUTE((unused)))
       
  3227  {
       
  3228    my_time_t my_time_tmp;
       
  3229    String str;
       
  3230 --- a/sql/log_event.cc
       
  3231 +++ b/sql/log_event.cc
       
  3232 @@ -1740,7 +1740,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
       
  3233  
       
  3234  void Log_event::print_header(IO_CACHE* file,
       
  3235                               PRINT_EVENT_INFO* print_event_info,
       
  3236 -                             bool is_more __attribute__((unused)))
       
  3237 +                             bool is_more MY_ATTRIBUTE((unused)))
       
  3238  {
       
  3239    char llbuff[22];
       
  3240    my_off_t hexdump_from= print_event_info->hexdump_from;
       
  3241 @@ -2724,7 +2724,7 @@ Slave_worker *Log_event::get_slave_worker(Relay_log_info *rli)
       
  3242    {
       
  3243      if (!rli->curr_group_seen_gtid && !rli->curr_group_seen_begin)
       
  3244      {
       
  3245 -      ulong gaq_idx __attribute__((unused));
       
  3246 +      ulong gaq_idx MY_ATTRIBUTE((unused));
       
  3247        rli->mts_groups_assigned++;
       
  3248  
       
  3249        rli->curr_group_isolated= FALSE;
       
  3250 --- a/sql/log_event.h
       
  3251 +++ b/sql/log_event.h
       
  3252 @@ -1,4 +1,4 @@
       
  3253 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3254 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3255  
       
  3256     This program is free software; you can redistribute it and/or modify
       
  3257     it under the terms of the GNU General Public License as published by
       
  3258 @@ -1311,7 +1311,7 @@ public:
       
  3259    }
       
  3260    virtual bool write_data_header(IO_CACHE* file)
       
  3261    { return 0; }
       
  3262 -  virtual bool write_data_body(IO_CACHE* file __attribute__((unused)))
       
  3263 +  virtual bool write_data_body(IO_CACHE* file MY_ATTRIBUTE((unused)))
       
  3264    { return 0; }
       
  3265    inline time_t get_time()
       
  3266    {
       
  3267 @@ -4520,7 +4520,7 @@ public:
       
  3268    static bool binlog_row_logging_function(THD *thd, TABLE *table,
       
  3269                                            bool is_transactional,
       
  3270                                            const uchar *before_record
       
  3271 -                                          __attribute__((unused)),
       
  3272 +                                          MY_ATTRIBUTE((unused)),
       
  3273                                            const uchar *after_record)
       
  3274    {
       
  3275      return thd->binlog_write_row(table, is_transactional,
       
  3276 @@ -4660,7 +4660,7 @@ public:
       
  3277                                            bool is_transactional,
       
  3278                                            const uchar *before_record,
       
  3279                                            const uchar *after_record
       
  3280 -                                          __attribute__((unused)))
       
  3281 +                                          MY_ATTRIBUTE((unused)))
       
  3282    {
       
  3283      return thd->binlog_delete_row(table, is_transactional,
       
  3284                                    before_record, NULL);
       
  3285 --- a/sql/log_event_old.h
       
  3286 +++ b/sql/log_event_old.h
       
  3287 @@ -1,4 +1,4 @@
       
  3288 -/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3289 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3290  
       
  3291     This program is free software; you can redistribute it and/or modify
       
  3292     it under the terms of the GNU General Public License as published by
       
  3293 @@ -369,7 +369,7 @@ public:
       
  3294    static bool binlog_row_logging_function(THD *thd, TABLE *table,
       
  3295                                            bool is_transactional,
       
  3296                                            const uchar *before_record
       
  3297 -                                          __attribute__((unused)),
       
  3298 +                                          MY_ATTRIBUTE((unused)),
       
  3299                                            const uchar *after_record)
       
  3300    {
       
  3301      return thd->binlog_write_row(table, is_transactional,
       
  3302 @@ -518,7 +518,7 @@ public:
       
  3303                                            bool is_transactional,
       
  3304                                            const uchar *before_record,
       
  3305                                            const uchar *after_record
       
  3306 -                                          __attribute__((unused)))
       
  3307 +                                          MY_ATTRIBUTE((unused)))
       
  3308    {
       
  3309      return thd->binlog_delete_row(table, is_transactional,
       
  3310                                    before_record, NULL);
       
  3311 --- a/sql/mdl.cc
       
  3312 +++ b/sql/mdl.cc
       
  3313 @@ -1,4 +1,4 @@
       
  3314 -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3315 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3316  
       
  3317     This program is free software; you can redistribute it and/or modify
       
  3318     it under the terms of the GNU General Public License as published by
       
  3319 @@ -94,7 +94,7 @@ void MDL_key::init_psi_keys()
       
  3320  {
       
  3321    int i;
       
  3322    int count;
       
  3323 -  PSI_stage_info *info __attribute__((unused));
       
  3324 +  PSI_stage_info *info MY_ATTRIBUTE((unused));
       
  3325  
       
  3326    count= array_elements(MDL_key::m_namespace_to_wait_state_name);
       
  3327    for (i= 0; i<count; i++)
       
  3328 @@ -651,7 +651,7 @@ extern "C"
       
  3329  {
       
  3330  static uchar *
       
  3331  mdl_locks_key(const uchar *record, size_t *length,
       
  3332 -              my_bool not_used __attribute__((unused)))
       
  3333 +              my_bool not_used MY_ATTRIBUTE((unused)))
       
  3334  {
       
  3335    MDL_lock *lock=(MDL_lock*) record;
       
  3336    *length= lock->key.length();
       
  3337 --- a/sql/mf_iocache.cc
       
  3338 +++ b/sql/mf_iocache.cc
       
  3339 @@ -1,4 +1,4 @@
       
  3340 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
  3341 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3342  
       
  3343     This program is free software; you can redistribute it and/or modify
       
  3344     it under the terms of the GNU General Public License as published by
       
  3345 @@ -49,7 +49,7 @@ extern "C" {
       
  3346  
       
  3347  
       
  3348  int _my_b_net_read(register IO_CACHE *info, uchar *Buffer,
       
  3349 -		   size_t Count __attribute__((unused)))
       
  3350 +		   size_t Count MY_ATTRIBUTE((unused)))
       
  3351  {
       
  3352    ulong read_length;
       
  3353    NET *net= &(current_thd)->net;
       
  3354 --- a/sql/mysqld.cc
       
  3355 +++ b/sql/mysqld.cc
       
  3356 @@ -1,4 +1,4 @@
       
  3357 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
       
  3358 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
       
  3359     reserved.
       
  3360  
       
  3361     This program is free software; you can redistribute it and/or modify
       
  3362 @@ -1303,7 +1303,7 @@ static void close_server_sock();
       
  3363  static void clean_up_mutexes(void);
       
  3364  static void wait_for_signal_thread_to_end(void);
       
  3365  static void create_pid_file();
       
  3366 -static void mysqld_exit(int exit_code) __attribute__((noreturn));
       
  3367 +static void mysqld_exit(int exit_code) MY_ATTRIBUTE((noreturn));
       
  3368  #endif
       
  3369  static void delete_pid_file(myf flags);
       
  3370  static void end_ssl();
       
  3371 @@ -1715,7 +1715,7 @@ static void __cdecl kill_server(int sig_ptr)
       
  3372  
       
  3373  
       
  3374  #if defined(USE_ONE_SIGNAL_HAND)
       
  3375 -pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
       
  3376 +pthread_handler_t kill_server_thread(void *arg MY_ATTRIBUTE((unused)))
       
  3377  {
       
  3378    my_thread_init();       // Initialize new thread
       
  3379    kill_server(0);
       
  3380 @@ -2619,7 +2619,7 @@ void close_connection(THD *thd, uint sql_errno)
       
  3381  
       
  3382  /** Called when a thread is aborted. */
       
  3383  /* ARGSUSED */
       
  3384 -extern "C" sig_handler end_thread_signal(int sig __attribute__((unused)))
       
  3385 +extern "C" sig_handler end_thread_signal(int sig MY_ATTRIBUTE((unused)))
       
  3386  {
       
  3387    THD *thd=current_thd;
       
  3388    my_safe_printf_stderr("end_thread_signal %p", thd);
       
  3389 @@ -2824,7 +2824,7 @@ void kill_blocked_pthreads()
       
  3390    @todo
       
  3391      One should have to fix that thr_alarm know about this thread too.
       
  3392  */
       
  3393 -extern "C" sig_handler abort_thread(int sig __attribute__((unused)))
       
  3394 +extern "C" sig_handler abort_thread(int sig MY_ATTRIBUTE((unused)))
       
  3395  {
       
  3396    THD *thd=current_thd;
       
  3397    DBUG_ENTER("abort_thread");
       
  3398 @@ -3135,7 +3135,7 @@ static void start_signal_handler(void)
       
  3399  
       
  3400  /** This threads handles all signals and alarms. */
       
  3401  /* ARGSUSED */
       
  3402 -pthread_handler_t signal_hand(void *arg __attribute__((unused)))
       
  3403 +pthread_handler_t signal_hand(void *arg MY_ATTRIBUTE((unused)))
       
  3404  {
       
  3405    sigset_t set;
       
  3406    int sig;
       
  3407 @@ -8384,7 +8384,7 @@ static int mysql_init_variables(void)
       
  3408  
       
  3409  my_bool
       
  3410  mysqld_get_one_option(int optid,
       
  3411 -                      const struct my_option *opt __attribute__((unused)),
       
  3412 +                      const struct my_option *opt MY_ATTRIBUTE((unused)),
       
  3413                        char *argument)
       
  3414  {
       
  3415    switch(optid) {
       
  3416 --- a/sql/mysqld.h
       
  3417 +++ b/sql/mysqld.h
       
  3418 @@ -710,10 +710,10 @@ typedef int64 query_id_t;
       
  3419  extern query_id_t global_query_id;
       
  3420  extern my_atomic_rwlock_t global_query_id_lock;
       
  3421  
       
  3422 -void unireg_end(void) __attribute__((noreturn));
       
  3423 +void unireg_end(void) MY_ATTRIBUTE((noreturn));
       
  3424  
       
  3425  /* increment query_id and return it.  */
       
  3426 -inline __attribute__((warn_unused_result)) query_id_t next_query_id()
       
  3427 +inline MY_ATTRIBUTE((warn_unused_result)) query_id_t next_query_id()
       
  3428  {
       
  3429    query_id_t id;
       
  3430    my_atomic_rwlock_wrlock(&global_query_id_lock);
       
  3431 @@ -726,7 +726,7 @@ inline __attribute__((warn_unused_result)) query_id_t next_query_id()
       
  3432    TODO: Replace this with an inline function.
       
  3433   */
       
  3434  #ifndef EMBEDDED_LIBRARY
       
  3435 -extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
       
  3436 +extern "C" void unireg_abort(int exit_code) MY_ATTRIBUTE((noreturn));
       
  3437  #else
       
  3438  extern "C" void unireg_clear(int exit_code);
       
  3439  #define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0)
       
  3440 --- a/sql/net_serv.cc
       
  3441 +++ b/sql/net_serv.cc
       
  3442 @@ -1,4 +1,4 @@
       
  3443 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3444 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3445  
       
  3446     This program is free software; you can redistribute it and/or modify
       
  3447     it under the terms of the GNU General Public License as published by
       
  3448 @@ -191,7 +191,7 @@ my_bool net_realloc(NET *net, size_t length)
       
  3449  */
       
  3450  
       
  3451  void net_clear(NET *net,
       
  3452 -               my_bool check_buffer __attribute__((unused)))
       
  3453 +               my_bool check_buffer MY_ATTRIBUTE((unused)))
       
  3454  {
       
  3455    DBUG_ENTER("net_clear");
       
  3456  
       
  3457 @@ -238,7 +238,7 @@ my_bool net_flush(NET *net)
       
  3458  */
       
  3459  
       
  3460  static my_bool
       
  3461 -net_should_retry(NET *net, uint *retry_count __attribute__((unused)))
       
  3462 +net_should_retry(NET *net, uint *retry_count MY_ATTRIBUTE((unused)))
       
  3463  {
       
  3464    my_bool retry;
       
  3465  
       
  3466 --- a/sql/partition_info.cc
       
  3467 +++ b/sql/partition_info.cc
       
  3468 @@ -1,4 +1,4 @@
       
  3469 -/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3470 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3471  
       
  3472     This program is free software; you can redistribute it and/or modify
       
  3473     it under the terms of the GNU General Public License as published by
       
  3474 @@ -945,7 +945,7 @@ partition_element *partition_info::get_part_elem(const char *partition_name,
       
  3475  */
       
  3476  
       
  3477  static const char *get_part_name_from_elem(const char *name, size_t *length,
       
  3478 -                                      my_bool not_used __attribute__((unused)))
       
  3479 +                                      my_bool not_used MY_ATTRIBUTE((unused)))
       
  3480  {
       
  3481    *length= strlen(name);
       
  3482    return name;
       
  3483 --- a/sql/rpl_filter.cc
       
  3484 +++ b/sql/rpl_filter.cc
       
  3485 @@ -1,4 +1,4 @@
       
  3486 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3487 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3488  
       
  3489     This program is free software; you can redistribute it and/or modify
       
  3490     it under the terms of the GNU General Public License as published by
       
  3491 @@ -508,7 +508,7 @@ extern "C" uchar *get_table_key(const uchar *, size_t *, my_bool);
       
  3492  extern "C" void free_table_ent(void* a);
       
  3493  
       
  3494  uchar *get_table_key(const uchar* a, size_t *len,
       
  3495 -                     my_bool __attribute__((unused)))
       
  3496 +                     my_bool MY_ATTRIBUTE((unused)))
       
  3497  {
       
  3498    TABLE_RULE_ENT *e= (TABLE_RULE_ENT *) a;
       
  3499  
       
  3500 --- a/sql/rpl_info_dummy.cc
       
  3501 +++ b/sql/rpl_info_dummy.cc
       
  3502 @@ -1,4 +1,4 @@
       
  3503 -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
       
  3504 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3505  
       
  3506     This program is free software; you can redistribute it and/or modify
       
  3507     it under the terms of the GNU General Public License as published by
       
  3508 @@ -21,7 +21,7 @@ Rpl_info_dummy::Rpl_info_dummy(const int nparam)
       
  3509  {
       
  3510  }
       
  3511  
       
  3512 -int Rpl_info_dummy::do_init_info(uint instance __attribute__((unused)))
       
  3513 +int Rpl_info_dummy::do_init_info(uint instance MY_ATTRIBUTE((unused)))
       
  3514  {
       
  3515    return 0;
       
  3516  }
       
  3517 @@ -51,13 +51,13 @@ enum_return_check Rpl_info_dummy::do_check_info()
       
  3518    return REPOSITORY_DOES_NOT_EXIST;
       
  3519  }
       
  3520  
       
  3521 -enum_return_check Rpl_info_dummy::do_check_info(uint instance __attribute__((unused)))
       
  3522 +enum_return_check Rpl_info_dummy::do_check_info(uint instance MY_ATTRIBUTE((unused)))
       
  3523  {
       
  3524    DBUG_ASSERT(!abort);
       
  3525    return REPOSITORY_DOES_NOT_EXIST;
       
  3526  }
       
  3527  
       
  3528 -int Rpl_info_dummy::do_flush_info(const bool force __attribute__((unused)))
       
  3529 +int Rpl_info_dummy::do_flush_info(const bool force MY_ATTRIBUTE((unused)))
       
  3530  {
       
  3531    DBUG_ASSERT(!abort);
       
  3532    return 0;
       
  3533 @@ -85,105 +85,105 @@ uint Rpl_info_dummy::do_get_rpl_info_type()
       
  3534    return INFO_REPOSITORY_DUMMY;
       
  3535  }
       
  3536  
       
  3537 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3538 -                                const char *value __attribute__((unused)))
       
  3539 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3540 +                                const char *value MY_ATTRIBUTE((unused)))
       
  3541  {
       
  3542    DBUG_ASSERT(!abort);
       
  3543  
       
  3544    return FALSE;
       
  3545  }
       
  3546  
       
  3547 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3548 -                                const uchar *value __attribute__((unused)),
       
  3549 -                                const size_t size __attribute__((unused)))
       
  3550 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3551 +                                const uchar *value MY_ATTRIBUTE((unused)),
       
  3552 +                                const size_t size MY_ATTRIBUTE((unused)))
       
  3553  {
       
  3554    DBUG_ASSERT(!abort);
       
  3555  
       
  3556    return FALSE;
       
  3557  }
       
  3558  
       
  3559 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3560 -                                const ulong value __attribute__((unused)))
       
  3561 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3562 +                                const ulong value MY_ATTRIBUTE((unused)))
       
  3563  {
       
  3564    DBUG_ASSERT(!abort);
       
  3565  
       
  3566    return FALSE;
       
  3567  }
       
  3568  
       
  3569 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3570 -                                const int value __attribute__((unused)))
       
  3571 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3572 +                                const int value MY_ATTRIBUTE((unused)))
       
  3573  {
       
  3574    DBUG_ASSERT(!abort);
       
  3575  
       
  3576    return FALSE;
       
  3577  }
       
  3578  
       
  3579 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3580 -                                const float value __attribute__((unused)))
       
  3581 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3582 +                                const float value MY_ATTRIBUTE((unused)))
       
  3583  {
       
  3584    DBUG_ASSERT(!abort);
       
  3585  
       
  3586    return FALSE;
       
  3587  }
       
  3588  
       
  3589 -bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
       
  3590 -                                const Dynamic_ids *value __attribute__((unused)))
       
  3591 +bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
       
  3592 +                                const Dynamic_ids *value MY_ATTRIBUTE((unused)))
       
  3593  {
       
  3594    DBUG_ASSERT(!abort);
       
  3595  
       
  3596    return FALSE;
       
  3597  }
       
  3598  
       
  3599 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3600 -                                char *value __attribute__((unused)),
       
  3601 -                                const size_t size __attribute__((unused)),
       
  3602 -                                const char *default_value __attribute__((unused)))
       
  3603 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3604 +                                char *value MY_ATTRIBUTE((unused)),
       
  3605 +                                const size_t size MY_ATTRIBUTE((unused)),
       
  3606 +                                const char *default_value MY_ATTRIBUTE((unused)))
       
  3607  {
       
  3608      DBUG_ASSERT(!abort);
       
  3609  
       
  3610    return FALSE;
       
  3611  }
       
  3612  
       
  3613 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3614 -                                uchar *value __attribute__((unused)),
       
  3615 -                                const size_t size __attribute__((unused)),
       
  3616 -                                const uchar *default_value __attribute__((unused)))
       
  3617 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3618 +                                uchar *value MY_ATTRIBUTE((unused)),
       
  3619 +                                const size_t size MY_ATTRIBUTE((unused)),
       
  3620 +                                const uchar *default_value MY_ATTRIBUTE((unused)))
       
  3621  {
       
  3622    DBUG_ASSERT(!abort);
       
  3623  
       
  3624    return FALSE;
       
  3625  }
       
  3626  
       
  3627 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3628 -                                ulong *value __attribute__((unused)),
       
  3629 -                                const ulong default_value __attribute__((unused)))
       
  3630 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3631 +                                ulong *value MY_ATTRIBUTE((unused)),
       
  3632 +                                const ulong default_value MY_ATTRIBUTE((unused)))
       
  3633  {
       
  3634    DBUG_ASSERT(!abort);
       
  3635  
       
  3636    return FALSE;
       
  3637  }
       
  3638  
       
  3639 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3640 -                                int *value __attribute__((unused)),
       
  3641 -                                const int default_value __attribute__((unused)))
       
  3642 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3643 +                                int *value MY_ATTRIBUTE((unused)),
       
  3644 +                                const int default_value MY_ATTRIBUTE((unused)))
       
  3645  {
       
  3646    DBUG_ASSERT(!abort);
       
  3647  
       
  3648    return FALSE;
       
  3649  }
       
  3650  
       
  3651 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3652 -                                float *value __attribute__((unused)),
       
  3653 -                                const float default_value __attribute__((unused)))
       
  3654 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3655 +                                float *value MY_ATTRIBUTE((unused)),
       
  3656 +                                const float default_value MY_ATTRIBUTE((unused)))
       
  3657  {
       
  3658    DBUG_ASSERT(!abort);
       
  3659  
       
  3660    return FALSE;
       
  3661  }
       
  3662  
       
  3663 -bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
       
  3664 -                                Dynamic_ids *value __attribute__((unused)),
       
  3665 -                                const Dynamic_ids *default_value __attribute__((unused)))
       
  3666 +bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
       
  3667 +                                Dynamic_ids *value MY_ATTRIBUTE((unused)),
       
  3668 +                                const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
       
  3669  {
       
  3670    DBUG_ASSERT(!abort);
       
  3671  
       
  3672 --- a/sql/rpl_info_file.cc
       
  3673 +++ b/sql/rpl_info_file.cc
       
  3674 @@ -1,4 +1,4 @@
       
  3675 -/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
       
  3676 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3677  
       
  3678     This program is free software; you can redistribute it and/or modify
       
  3679     it under the terms of the GNU General Public License as published by
       
  3680 @@ -438,7 +438,7 @@ bool Rpl_info_file::do_get_info(const int pos, float *value,
       
  3681  }
       
  3682  
       
  3683  bool Rpl_info_file::do_get_info(const int pos, Dynamic_ids *value,
       
  3684 -                                const Dynamic_ids *default_value __attribute__((unused)))
       
  3685 +                                const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
       
  3686  {
       
  3687    /*
       
  3688      Static buffer to use most of the times. However, if it is not big
       
  3689 --- a/sql/rpl_info_table.cc
       
  3690 +++ b/sql/rpl_info_table.cc
       
  3691 @@ -1,4 +1,4 @@
       
  3692 -/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3693 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3694  
       
  3695     This program is free software; you can redistribute it and/or modify
       
  3696     it under the terms of the GNU General Public License as published by
       
  3697 @@ -600,7 +600,7 @@ bool Rpl_info_table::do_get_info(const int pos, char *value, const size_t size,
       
  3698  }
       
  3699  
       
  3700  bool Rpl_info_table::do_get_info(const int pos, uchar *value, const size_t size,
       
  3701 -                                 const uchar *default_value __attribute__((unused)))
       
  3702 +                                 const uchar *default_value MY_ATTRIBUTE((unused)))
       
  3703  {
       
  3704    if (field_values->value[pos].length() == size)
       
  3705      return (!memcpy((char *) value, (char *)
       
  3706 @@ -661,7 +661,7 @@ bool Rpl_info_table::do_get_info(const int pos, float *value,
       
  3707  }
       
  3708  
       
  3709  bool Rpl_info_table::do_get_info(const int pos, Dynamic_ids *value,
       
  3710 -                                 const Dynamic_ids *default_value __attribute__((unused)))
       
  3711 +                                 const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
       
  3712  {
       
  3713    if (value->unpack_dynamic_ids(field_values->value[pos].c_ptr_safe()))
       
  3714      return TRUE;
       
  3715 --- a/sql/rpl_master.cc
       
  3716 +++ b/sql/rpl_master.cc
       
  3717 @@ -1,4 +1,4 @@
       
  3718 -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3719 +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3720  
       
  3721     This program is free software; you can redistribute it and/or modify
       
  3722     it under the terms of the GNU General Public License as published by
       
  3723 @@ -62,7 +62,7 @@ extern TYPELIB binlog_checksum_typelib;
       
  3724  
       
  3725  extern "C" uint32
       
  3726  *slave_list_key(SLAVE_INFO* si, size_t *len,
       
  3727 -		my_bool not_used __attribute__((unused)))
       
  3728 +		my_bool not_used MY_ATTRIBUTE((unused)))
       
  3729  {
       
  3730    *len = 4;
       
  3731    return &si->server_id;
       
  3732 --- a/sql/rpl_mi.cc
       
  3733 +++ b/sql/rpl_mi.cc
       
  3734 @@ -1,4 +1,4 @@
       
  3735 -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
       
  3736 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3737  
       
  3738     This program is free software; you can redistribute it and/or modify
       
  3739     it under the terms of the GNU General Public License as published by
       
  3740 @@ -542,7 +542,7 @@ bool Master_info::write_info(Rpl_info_handler *to)
       
  3741  }
       
  3742  
       
  3743  bool Master_info::set_password(const char* password_arg,
       
  3744 -                               int password_arg_size __attribute__((unused)))
       
  3745 +                               int password_arg_size MY_ATTRIBUTE((unused)))
       
  3746  {
       
  3747    bool ret= true;
       
  3748    DBUG_ENTER("Master_info::set_password");
       
  3749 --- a/sql/rpl_rli_pdb.cc
       
  3750 +++ b/sql/rpl_rli_pdb.cc
       
  3751 @@ -1,4 +1,4 @@
       
  3752 -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
  3753 +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3754  
       
  3755     This program is free software; you can redistribute it and/or modify
       
  3756     it under the terms of the GNU General Public License as published by
       
  3757 @@ -629,7 +629,7 @@ static  mysql_cond_t slave_worker_hash_cond;
       
  3758  
       
  3759  
       
  3760  extern "C" uchar *get_key(const uchar *record, size_t *length,
       
  3761 -                          my_bool not_used __attribute__((unused)))
       
  3762 +                          my_bool not_used MY_ATTRIBUTE((unused)))
       
  3763  {
       
  3764    DBUG_ENTER("get_key");
       
  3765  
       
  3766 @@ -1490,7 +1490,7 @@ ulong Slave_committed_queue::move_queue_head(DYNAMIC_ARRAY *ws)
       
  3767      Slave_worker *w_i;
       
  3768      Slave_job_group *ptr_g, g;
       
  3769      char grl_name[FN_REFLEN];
       
  3770 -    ulong ind __attribute__((unused));
       
  3771 +    ulong ind MY_ATTRIBUTE((unused));
       
  3772  
       
  3773  #ifndef DBUG_OFF
       
  3774      if (DBUG_EVALUATE_IF("check_slave_debug_group", 1, 0) &&
       
  3775 --- a/sql/rpl_slave.cc
       
  3776 +++ b/sql/rpl_slave.cc
       
  3777 @@ -1384,7 +1384,7 @@ terminate_slave_thread(THD *thd,
       
  3778  
       
  3779    while (*slave_running)                        // Should always be true
       
  3780    {
       
  3781 -    int error __attribute__((unused));
       
  3782 +    int error MY_ATTRIBUTE((unused));
       
  3783      DBUG_PRINT("loop", ("killing slave thread"));
       
  3784  
       
  3785      mysql_mutex_lock(&thd->LOCK_thd_data);
       
  3786 @@ -1394,7 +1394,7 @@ terminate_slave_thread(THD *thd,
       
  3787        EINVAL: invalid signal number (can't happen)
       
  3788        ESRCH: thread already killed (can happen, should be ignored)
       
  3789      */
       
  3790 -    int err __attribute__((unused))= pthread_kill(thd->real_id, thr_client_alarm);
       
  3791 +    int err MY_ATTRIBUTE((unused))= pthread_kill(thd->real_id, thr_client_alarm);
       
  3792      DBUG_ASSERT(err != EINVAL);
       
  3793  #endif
       
  3794      thd->awake(THD::NOT_KILLED);
       
  3795 --- a/sql/rpl_utility.cc
       
  3796 +++ b/sql/rpl_utility.cc
       
  3797 @@ -1,4 +1,4 @@
       
  3798 -/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
       
  3799 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3800  
       
  3801     This program is free software; you can redistribute it and/or modify
       
  3802     it under the terms of the GNU General Public License as published by
       
  3803 @@ -1243,7 +1243,7 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg)
       
  3804  static uchar*
       
  3805  hash_slave_rows_get_key(const uchar *record,
       
  3806                          size_t *length,
       
  3807 -                        my_bool not_used __attribute__((unused)))
       
  3808 +                        my_bool not_used MY_ATTRIBUTE((unused)))
       
  3809  {
       
  3810    DBUG_ENTER("get_key");
       
  3811  
       
  3812 --- a/sql/sql_acl.cc
       
  3813 +++ b/sql/sql_acl.cc
       
  3814 @@ -625,7 +625,7 @@ public:
       
  3815  
       
  3816  
       
  3817  static uchar* acl_entry_get_key(acl_entry *entry, size_t *length,
       
  3818 -                                my_bool not_used __attribute__((unused)))
       
  3819 +                                my_bool not_used MY_ATTRIBUTE((unused)))
       
  3820  {
       
  3821    *length=(uint) entry->length;
       
  3822    return (uchar*) entry->key;
       
  3823 @@ -1673,7 +1673,7 @@ bool acl_getroot(Security_context *sctx, char *user, char *host,
       
  3824  }
       
  3825  
       
  3826  static uchar* check_get_key(ACL_USER *buff, size_t *length,
       
  3827 -                            my_bool not_used __attribute__((unused)))
       
  3828 +                            my_bool not_used MY_ATTRIBUTE((unused)))
       
  3829  {
       
  3830    *length=buff->host.get_host_len();
       
  3831    return (uchar*) buff->host.get_host();
       
  3832 @@ -3607,7 +3607,7 @@ public:
       
  3833  
       
  3834  
       
  3835  static uchar* get_key_column(GRANT_COLUMN *buff, size_t *length,
       
  3836 -			    my_bool not_used __attribute__((unused)))
       
  3837 +			    my_bool not_used MY_ATTRIBUTE((unused)))
       
  3838  {
       
  3839    *length=buff->key_length;
       
  3840    return (uchar*) buff->column;
       
  3841 @@ -3800,7 +3800,7 @@ GRANT_TABLE::~GRANT_TABLE()
       
  3842  
       
  3843  
       
  3844  static uchar* get_grant_table(GRANT_NAME *buff, size_t *length,
       
  3845 -			     my_bool not_used __attribute__((unused)))
       
  3846 +			     my_bool not_used MY_ATTRIBUTE((unused)))
       
  3847  {
       
  3848    *length=buff->key_length;
       
  3849    return (uchar*) buff->hash_key;
       
  3850 --- a/sql/sql_analyse.cc
       
  3851 +++ b/sql/sql_analyse.cc
       
  3852 @@ -1,5 +1,5 @@
       
  3853  /*
       
  3854 -   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  3855 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3856  
       
  3857     This program is free software; you can redistribute it and/or modify
       
  3858     it under the terms of the GNU General Public License as published by
       
  3859 @@ -34,25 +34,25 @@
       
  3860  using std::min;
       
  3861  using std::max;
       
  3862  
       
  3863 -int sortcmp2(void* cmp_arg __attribute__((unused)),
       
  3864 +int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3865  	     const String *a,const String *b)
       
  3866  {
       
  3867    return sortcmp(a,b,a->charset());
       
  3868  }
       
  3869  
       
  3870 -int compare_double2(void* cmp_arg __attribute__((unused)),
       
  3871 +int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3872  		    const double *s, const double *t)
       
  3873  {
       
  3874    return compare_double(s,t);
       
  3875  }
       
  3876  
       
  3877 -int compare_longlong2(void* cmp_arg __attribute__((unused)),
       
  3878 +int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3879  		      const longlong *s, const longlong *t)
       
  3880  {
       
  3881    return compare_longlong(s,t);
       
  3882  }
       
  3883  
       
  3884 -int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
       
  3885 +int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3886  		       const ulonglong *s, const ulonglong *t)
       
  3887  {
       
  3888    return compare_ulonglong(s,t);
       
  3889 @@ -835,7 +835,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
       
  3890  
       
  3891  
       
  3892  void field_real::get_opt_type(String *answer,
       
  3893 -			      ha_rows total_rows __attribute__((unused)))
       
  3894 +			      ha_rows total_rows MY_ATTRIBUTE((unused)))
       
  3895  {
       
  3896    char buff[MAX_FIELD_WIDTH];
       
  3897  
       
  3898 @@ -888,7 +888,7 @@ void field_real::get_opt_type(String *answer,
       
  3899  
       
  3900  
       
  3901  void field_longlong::get_opt_type(String *answer,
       
  3902 -				  ha_rows total_rows __attribute__((unused)))
       
  3903 +				  ha_rows total_rows MY_ATTRIBUTE((unused)))
       
  3904  {
       
  3905    char buff[MAX_FIELD_WIDTH];
       
  3906  
       
  3907 @@ -919,7 +919,7 @@ void field_longlong::get_opt_type(String *answer,
       
  3908  
       
  3909  
       
  3910  void field_ulonglong::get_opt_type(String *answer,
       
  3911 -				   ha_rows total_rows __attribute__((unused)))
       
  3912 +				   ha_rows total_rows MY_ATTRIBUTE((unused)))
       
  3913  {
       
  3914    char buff[MAX_FIELD_WIDTH];
       
  3915  
       
  3916 @@ -944,7 +944,7 @@ void field_ulonglong::get_opt_type(String *answer,
       
  3917  
       
  3918  
       
  3919  void field_decimal::get_opt_type(String *answer,
       
  3920 -                                 ha_rows total_rows __attribute__((unused)))
       
  3921 +                                 ha_rows total_rows MY_ATTRIBUTE((unused)))
       
  3922  {
       
  3923    my_decimal zero;
       
  3924    char buff[MAX_FIELD_WIDTH];
       
  3925 @@ -1022,7 +1022,7 @@ String *field_decimal::std(String *s, ha_rows rows)
       
  3926  
       
  3927  
       
  3928  int collect_string(String *element,
       
  3929 -		   element_count count __attribute__((unused)),
       
  3930 +		   element_count count MY_ATTRIBUTE((unused)),
       
  3931  		   TREE_INFO *info)
       
  3932  {
       
  3933    if (info->found)
       
  3934 @@ -1037,7 +1037,7 @@ int collect_string(String *element,
       
  3935  } // collect_string
       
  3936  
       
  3937  
       
  3938 -int collect_real(double *element, element_count count __attribute__((unused)),
       
  3939 +int collect_real(double *element, element_count count MY_ATTRIBUTE((unused)),
       
  3940  		 TREE_INFO *info)
       
  3941  {
       
  3942    char buff[MAX_FIELD_WIDTH];
       
  3943 @@ -1078,7 +1078,7 @@ int collect_decimal(uchar *element, element_count count,
       
  3944  
       
  3945  
       
  3946  int collect_longlong(longlong *element,
       
  3947 -		     element_count count __attribute__((unused)),
       
  3948 +		     element_count count MY_ATTRIBUTE((unused)),
       
  3949  		     TREE_INFO *info)
       
  3950  {
       
  3951    char buff[MAX_FIELD_WIDTH];
       
  3952 @@ -1097,7 +1097,7 @@ int collect_longlong(longlong *element,
       
  3953  
       
  3954  
       
  3955  int collect_ulonglong(ulonglong *element,
       
  3956 -		      element_count count __attribute__((unused)),
       
  3957 +		      element_count count MY_ATTRIBUTE((unused)),
       
  3958  		      TREE_INFO *info)
       
  3959  {
       
  3960    char buff[MAX_FIELD_WIDTH];
       
  3961 --- a/sql/sql_analyse.h
       
  3962 +++ b/sql/sql_analyse.h
       
  3963 @@ -1,7 +1,7 @@
       
  3964  #ifndef SQL_ANALYSE_INCLUDED
       
  3965  #define SQL_ANALYSE_INCLUDED
       
  3966  
       
  3967 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  3968 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  3969  
       
  3970     This program is free software; you can redistribute it and/or modify
       
  3971     it under the terms of the GNU General Public License as published by
       
  3972 @@ -53,13 +53,13 @@ uint check_ulonglong(const char *str, uint length);
       
  3973  bool get_ev_num_info(EV_NUM_INFO *ev_info, NUM_INFO *info, const char *num);
       
  3974  bool test_if_number(NUM_INFO *info, const char *str, uint str_len);
       
  3975  int compare_double(const double *s, const double *t);
       
  3976 -int compare_double2(void* cmp_arg __attribute__((unused)),
       
  3977 +int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3978  		    const double *s, const double *t);
       
  3979  int compare_longlong(const longlong *s, const longlong *t);
       
  3980 -int compare_longlong2(void* cmp_arg __attribute__((unused)),
       
  3981 +int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3982  		      const longlong *s, const longlong *t);
       
  3983  int compare_ulonglong(const ulonglong *s, const ulonglong *t);
       
  3984 -int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
       
  3985 +int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3986  		       const ulonglong *s, const ulonglong *t);
       
  3987  int compare_decimal2(int* len, const char *s, const char *t);
       
  3988  void free_string(String*);
       
  3989 @@ -97,7 +97,7 @@ public:
       
  3990  int collect_string(String *element, element_count count,
       
  3991  		   TREE_INFO *info);
       
  3992  
       
  3993 -int sortcmp2(void* cmp_arg __attribute__((unused)),
       
  3994 +int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)),
       
  3995  	     const String *a,const String *b);
       
  3996  
       
  3997  class field_str :public field_info
       
  3998 @@ -120,9 +120,9 @@ public:
       
  3999  
       
  4000    void	 add();
       
  4001    void	 get_opt_type(String*, ha_rows);
       
  4002 -  String *get_min_arg(String *not_used __attribute__((unused)))
       
  4003 +  String *get_min_arg(String *not_used MY_ATTRIBUTE((unused)))
       
  4004    { return &min_arg; }
       
  4005 -  String *get_max_arg(String *not_used __attribute__((unused)))
       
  4006 +  String *get_max_arg(String *not_used MY_ATTRIBUTE((unused)))
       
  4007    { return &max_arg; }
       
  4008    String *avg(String *s, ha_rows rows)
       
  4009    {
       
  4010 @@ -137,8 +137,8 @@ public:
       
  4011  			    TREE_INFO *info);
       
  4012    tree_walk_action collect_enum()
       
  4013    { return (tree_walk_action) collect_string; }
       
  4014 -  String *std(String *s __attribute__((unused)),
       
  4015 -	      ha_rows rows __attribute__((unused)))
       
  4016 +  String *std(String *s MY_ATTRIBUTE((unused)),
       
  4017 +	      ha_rows rows MY_ATTRIBUTE((unused)))
       
  4018    { return (String*) 0; }
       
  4019  };
       
  4020  
       
  4021 --- a/sql/sql_audit.cc
       
  4022 +++ b/sql/sql_audit.cc
       
  4023 @@ -1,4 +1,4 @@
       
  4024 -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4025 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4026  
       
  4027     This program is free software; you can redistribute it and/or modify
       
  4028     it under the terms of the GNU General Public License as published by
       
  4029 @@ -494,7 +494,7 @@ static void event_class_dispatch(THD *thd, unsigned int event_class,
       
  4030  
       
  4031  
       
  4032  /**  There's at least one active audit plugin tracking the general events */
       
  4033 -bool is_any_audit_plugin_active(THD *thd __attribute__((unused)))
       
  4034 +bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)))
       
  4035  {
       
  4036    return (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK);
       
  4037  }
       
  4038 --- a/sql/sql_audit.h
       
  4039 +++ b/sql/sql_audit.h
       
  4040 @@ -1,4 +1,4 @@
       
  4041 -/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4042 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4043  
       
  4044     This program is free software; you can redistribute it and/or modify
       
  4045     it under the terms of the GNU General Public License as published by
       
  4046 @@ -37,7 +37,7 @@ extern void mysql_audit_acquire_plugins(THD *thd, uint event_class);
       
  4047  #ifndef EMBEDDED_LIBRARY
       
  4048  extern void mysql_audit_notify(THD *thd, uint event_class,
       
  4049                                 uint event_subtype, ...);
       
  4050 -bool is_any_audit_plugin_active(THD *thd __attribute__((unused)));
       
  4051 +bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)));
       
  4052  #else
       
  4053  #define mysql_audit_notify(...)
       
  4054  #endif
       
  4055 --- a/sql/sql_base.cc
       
  4056 +++ b/sql/sql_base.cc
       
  4057 @@ -330,7 +330,7 @@ uint get_table_def_key(const TABLE_LIST *table_list, const char **key)
       
  4058  *****************************************************************************/
       
  4059  
       
  4060  extern "C" uchar *table_def_key(const uchar *record, size_t *length,
       
  4061 -                               my_bool not_used __attribute__((unused)))
       
  4062 +                               my_bool not_used MY_ATTRIBUTE((unused)))
       
  4063  {
       
  4064    TABLE_SHARE *entry=(TABLE_SHARE*) record;
       
  4065    *length= entry->table_cache_key.length;
       
  4066 @@ -4865,7 +4865,7 @@ end:
       
  4067  }
       
  4068  
       
  4069  extern "C" uchar *schema_set_get_key(const uchar *record, size_t *length,
       
  4070 -                                     my_bool not_used __attribute__((unused)))
       
  4071 +                                     my_bool not_used MY_ATTRIBUTE((unused)))
       
  4072  {
       
  4073    TABLE_LIST *table=(TABLE_LIST*) record;
       
  4074    *length= table->db_length;
       
  4075 --- a/sql/sql_cache.cc
       
  4076 +++ b/sql/sql_cache.cc
       
  4077 @@ -1,4 +1,4 @@
       
  4078 -/* Copyright (c) 2000, 2013, 2015, Oracle and/or its affiliates. All rights
       
  4079 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
       
  4080     reserved.
       
  4081  
       
  4082     This program is free software; you can redistribute it and/or modify
       
  4083 @@ -729,7 +729,7 @@ inline Query_cache_block_table * Query_cache_block::table(TABLE_COUNTER_TYPE n)
       
  4084  extern "C"
       
  4085  {
       
  4086  uchar *query_cache_table_get_key(const uchar *record, size_t *length,
       
  4087 -				my_bool not_used __attribute__((unused)))
       
  4088 +				my_bool not_used MY_ATTRIBUTE((unused)))
       
  4089  {
       
  4090    Query_cache_block* table_block = (Query_cache_block*) record;
       
  4091    *length = (table_block->used - table_block->headers_len() -
       
  4092 --- a/sql/sql_class.cc
       
  4093 +++ b/sql/sql_class.cc
       
  4094 @@ -83,7 +83,7 @@ const char * const THD::DEFAULT_WHERE= "field list";
       
  4095  ****************************************************************************/
       
  4096  
       
  4097  extern "C" uchar *get_var_key(user_var_entry *entry, size_t *length,
       
  4098 -                              my_bool not_used __attribute__((unused)))
       
  4099 +                              my_bool not_used MY_ATTRIBUTE((unused)))
       
  4100  {
       
  4101    *length= entry->entry_name.length();
       
  4102    return (uchar*) entry->entry_name.ptr();
       
  4103 @@ -3053,7 +3053,7 @@ err:
       
  4104  
       
  4105  
       
  4106  int
       
  4107 -select_dump::prepare(List<Item> &list __attribute__((unused)),
       
  4108 +select_dump::prepare(List<Item> &list MY_ATTRIBUTE((unused)),
       
  4109  		     SELECT_LEX_UNIT *u)
       
  4110  {
       
  4111    unit= u;
       
  4112 @@ -3465,7 +3465,7 @@ C_MODE_START
       
  4113  
       
  4114  static uchar *
       
  4115  get_statement_id_as_hash_key(const uchar *record, size_t *key_length,
       
  4116 -                             my_bool not_used __attribute__((unused)))
       
  4117 +                             my_bool not_used MY_ATTRIBUTE((unused)))
       
  4118  {
       
  4119    const Statement *statement= (const Statement *) record; 
       
  4120    *key_length= sizeof(statement->id);
       
  4121 @@ -3478,7 +3478,7 @@ static void delete_statement_as_hash_key(void *key)
       
  4122  }
       
  4123  
       
  4124  static uchar *get_stmt_name_hash_key(Statement *entry, size_t *length,
       
  4125 -                                    my_bool not_used __attribute__((unused)))
       
  4126 +                                    my_bool not_used MY_ATTRIBUTE((unused)))
       
  4127  {
       
  4128    *length= entry->name.length;
       
  4129    return (uchar*) entry->name.str;
       
  4130 @@ -4779,7 +4779,7 @@ extern "C" uchar *xid_get_hash_key(const uchar *, size_t *, my_bool);
       
  4131  extern "C" void xid_free_hash(void *);
       
  4132  
       
  4133  uchar *xid_get_hash_key(const uchar *ptr, size_t *length,
       
  4134 -                                  my_bool not_used __attribute__((unused)))
       
  4135 +                                  my_bool not_used MY_ATTRIBUTE((unused)))
       
  4136  {
       
  4137    *length=((XID_STATE*)ptr)->xid.key_length();
       
  4138    return ((XID_STATE*)ptr)->xid.key();
       
  4139 --- a/sql/sql_connect.cc
       
  4140 +++ b/sql/sql_connect.cc
       
  4141 @@ -1,5 +1,5 @@
       
  4142  /*
       
  4143 -   Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4144 +   Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4145  
       
  4146     This program is free software; you can redistribute it and/or modify
       
  4147     it under the terms of the GNU General Public License as published by
       
  4148 @@ -337,7 +337,7 @@ void release_user_connection(THD *thd)
       
  4149  */
       
  4150  
       
  4151  extern "C" uchar *get_key_conn(user_conn *buff, size_t *length,
       
  4152 -            my_bool not_used __attribute__((unused)))
       
  4153 +            my_bool not_used MY_ATTRIBUTE((unused)))
       
  4154  {
       
  4155    *length= buff->len;
       
  4156    return (uchar*) buff->user;
       
  4157 --- a/sql/sql_cursor.cc
       
  4158 +++ b/sql/sql_cursor.cc
       
  4159 @@ -1,4 +1,4 @@
       
  4160 -/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4161 +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4162  
       
  4163     This program is free software; you can redistribute it and/or modify
       
  4164     it under the terms of the GNU General Public License as published by
       
  4165 @@ -47,7 +47,7 @@ public:
       
  4166  
       
  4167    int send_result_set_metadata(THD *thd, List<Item> &send_result_set_metadata);
       
  4168    virtual bool is_open() const { return table != 0; }
       
  4169 -  virtual int open(JOIN *join __attribute__((unused)));
       
  4170 +  virtual int open(JOIN *join MY_ATTRIBUTE((unused)));
       
  4171    virtual void fetch(ulong num_rows);
       
  4172    virtual void close();
       
  4173    virtual ~Materialized_cursor();
       
  4174 @@ -277,7 +277,7 @@ end:
       
  4175  }
       
  4176  
       
  4177  
       
  4178 -int Materialized_cursor::open(JOIN *join __attribute__((unused)))
       
  4179 +int Materialized_cursor::open(JOIN *join MY_ATTRIBUTE((unused)))
       
  4180  {
       
  4181    THD *thd= fake_unit.thd;
       
  4182    int rc;
       
  4183 --- a/sql/sql_db.cc
       
  4184 +++ b/sql/sql_db.cc
       
  4185 @@ -1,5 +1,5 @@
       
  4186  /*
       
  4187 -   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  4188 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4189  
       
  4190     This program is free software; you can redistribute it and/or modify
       
  4191     it under the terms of the GNU General Public License as published by
       
  4192 @@ -86,7 +86,7 @@ extern "C" uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
       
  4193                                      my_bool not_used);
       
  4194  
       
  4195  uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
       
  4196 -                         my_bool not_used __attribute__((unused)))
       
  4197 +                         my_bool not_used MY_ATTRIBUTE((unused)))
       
  4198  {
       
  4199    *length= opt->name_length;
       
  4200    return (uchar*) opt->name;
       
  4201 --- a/sql/sql_executor.cc
       
  4202 +++ b/sql/sql_executor.cc
       
  4203 @@ -1,4 +1,4 @@
       
  4204 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4205 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4206  
       
  4207     This program is free software; you can redistribute it and/or modify
       
  4208     it under the terms of the GNU General Public License as published by
       
  4209 @@ -484,7 +484,7 @@ init_tmptable_sum_functions(Item_sum **func_ptr)
       
  4210  
       
  4211  static void
       
  4212  update_tmptable_sum_func(Item_sum **func_ptr,
       
  4213 -			 TABLE *tmp_table __attribute__((unused)))
       
  4214 +			 TABLE *tmp_table MY_ATTRIBUTE((unused)))
       
  4215  {
       
  4216    Item_sum *func;
       
  4217    while ((func= *(func_ptr++)))
       
  4218 @@ -2256,7 +2256,7 @@ join_read_last_key(JOIN_TAB *tab)
       
  4219  
       
  4220  	/* ARGSUSED */
       
  4221  static int
       
  4222 -join_no_more_records(READ_RECORD *info __attribute__((unused)))
       
  4223 +join_no_more_records(READ_RECORD *info MY_ATTRIBUTE((unused)))
       
  4224  {
       
  4225    return -1;
       
  4226  }
       
  4227 @@ -2858,7 +2858,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
       
  4228  
       
  4229  	/* ARGSUSED */
       
  4230  enum_nested_loop_state
       
  4231 -end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
       
  4232 +end_send_group(JOIN *join, JOIN_TAB *join_tab MY_ATTRIBUTE((unused)),
       
  4233  	       bool end_of_records)
       
  4234  {
       
  4235    int idx= -1;
       
  4236 @@ -3856,7 +3856,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
       
  4237    Item *pos;
       
  4238    List_iterator_fast<Item> li(all_fields);
       
  4239    Copy_field *copy= NULL;
       
  4240 -  Copy_field *copy_start __attribute__((unused));
       
  4241 +  Copy_field *copy_start MY_ATTRIBUTE((unused));
       
  4242    res_selected_fields.empty();
       
  4243    res_all_fields.empty();
       
  4244    List_iterator_fast<Item> itr(res_all_fields);
       
  4245 --- a/sql/sql_executor.h
       
  4246 +++ b/sql/sql_executor.h
       
  4247 @@ -1,7 +1,7 @@
       
  4248  #ifndef SQL_EXECUTOR_INCLUDED
       
  4249  #define SQL_EXECUTOR_INCLUDED
       
  4250  
       
  4251 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
       
  4252 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
       
  4253     reserved.
       
  4254  
       
  4255     This program is free software; you can redistribute it and/or modify
       
  4256 @@ -258,7 +258,7 @@ private:
       
  4257    /** Write function that would be used for saving records in tmp table. */
       
  4258    Next_select_func write_func;
       
  4259    enum_nested_loop_state put_record(bool end_of_records);
       
  4260 -  __attribute__((warn_unused_result))
       
  4261 +  MY_ATTRIBUTE((warn_unused_result))
       
  4262    bool prepare_tmp_table();
       
  4263  };
       
  4264  
       
  4265 --- a/sql/sql_handler.cc
       
  4266 +++ b/sql/sql_handler.cc
       
  4267 @@ -1,4 +1,4 @@
       
  4268 -/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4269 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4270  
       
  4271     This program is free software; you can redistribute it and/or modify
       
  4272     it under the terms of the GNU General Public License as published by
       
  4273 @@ -89,7 +89,7 @@ static bool mysql_ha_open_table(THD *thd, TABLE_LIST *table);
       
  4274  */
       
  4275  
       
  4276  static char *mysql_ha_hash_get_key(TABLE_LIST *tables, size_t *key_len_p,
       
  4277 -                                   my_bool first __attribute__((unused)))
       
  4278 +                                   my_bool first MY_ATTRIBUTE((unused)))
       
  4279  {
       
  4280    *key_len_p= strlen(tables->alias) + 1 ; /* include '\0' in comparisons */
       
  4281    return tables->alias;
       
  4282 --- a/sql/sql_load.cc
       
  4283 +++ b/sql/sql_load.cc
       
  4284 @@ -209,7 +209,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
       
  4285    */
       
  4286    char *tdb= thd->db ? thd->db : db;		// Result is never null
       
  4287    ulong skip_lines= ex->skip_lines;
       
  4288 -  bool transactional_table __attribute__((unused));
       
  4289 +  bool transactional_table MY_ATTRIBUTE((unused));
       
  4290    DBUG_ENTER("mysql_load");
       
  4291  
       
  4292    /*
       
  4293 --- a/sql/sql_manager.cc
       
  4294 +++ b/sql/sql_manager.cc
       
  4295 @@ -1,4 +1,4 @@
       
  4296 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4297 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4298  
       
  4299     This program is free software; you can redistribute it and/or modify
       
  4300     it under the terms of the GNU General Public License as published by
       
  4301 @@ -63,7 +63,7 @@ bool mysql_manager_submit(void (*action)())
       
  4302    return result;
       
  4303  }
       
  4304  
       
  4305 -pthread_handler_t handle_manager(void *arg __attribute__((unused)))
       
  4306 +pthread_handler_t handle_manager(void *arg MY_ATTRIBUTE((unused)))
       
  4307  {
       
  4308    int error = 0;
       
  4309    struct timespec abstime;
       
  4310 --- a/sql/sql_optimizer.cc
       
  4311 +++ b/sql/sql_optimizer.cc
       
  4312 @@ -1,4 +1,4 @@
       
  4313 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4314 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4315  
       
  4316     This program is free software; you can redistribute it and/or modify
       
  4317     it under the terms of the GNU General Public License as published by
       
  4318 @@ -1121,8 +1121,8 @@ public:
       
  4319    {
       
  4320      return (void*) sql_alloc((uint) size);
       
  4321    }
       
  4322 -  static void operator delete(void *ptr __attribute__((unused)),
       
  4323 -                              size_t size __attribute__((unused)))
       
  4324 +  static void operator delete(void *ptr MY_ATTRIBUTE((unused)),
       
  4325 +                              size_t size MY_ATTRIBUTE((unused)))
       
  4326    { TRASH(ptr, size); }
       
  4327  
       
  4328    Item *and_level;
       
  4329 --- a/sql/sql_parse.cc
       
  4330 +++ b/sql/sql_parse.cc
       
  4331 @@ -1,4 +1,4 @@
       
  4332 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4333 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4334  
       
  4335     This program is free software; you can redistribute it and/or modify
       
  4336     it under the terms of the GNU General Public License as published by
       
  4337 @@ -1645,7 +1645,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
       
  4338    {
       
  4339      STATUS_VAR current_global_status_var;
       
  4340      ulong uptime;
       
  4341 -    uint length __attribute__((unused));
       
  4342 +    uint length MY_ATTRIBUTE((unused));
       
  4343      ulonglong queries_per_second1000;
       
  4344      char buff[250];
       
  4345      uint buff_len= sizeof(buff);
       
  4346 @@ -1791,7 +1791,7 @@ done:
       
  4347    /* DTRACE instrumentation, end */
       
  4348    if (MYSQL_QUERY_DONE_ENABLED() || MYSQL_COMMAND_DONE_ENABLED())
       
  4349    {
       
  4350 -    int res __attribute__((unused));
       
  4351 +    int res MY_ATTRIBUTE((unused));
       
  4352      res= (int) thd->is_error();
       
  4353      if (command == COM_QUERY)
       
  4354      {
       
  4355 @@ -5919,7 +5919,7 @@ long max_stack_used;
       
  4356    - Passing to check_stack_overrun() prevents the compiler from removing it.
       
  4357  */
       
  4358  bool check_stack_overrun(THD *thd, long margin,
       
  4359 -			 uchar *buf __attribute__((unused)))
       
  4360 +			 uchar *buf MY_ATTRIBUTE((unused)))
       
  4361  {
       
  4362    long stack_used;
       
  4363    DBUG_ASSERT(thd == current_thd);
       
  4364 @@ -6260,7 +6260,7 @@ void mysql_init_multi_delete(LEX *lex)
       
  4365  void mysql_parse(THD *thd, char *rawbuf, uint length,
       
  4366                   Parser_state *parser_state)
       
  4367  {
       
  4368 -  int error __attribute__((unused));
       
  4369 +  int error MY_ATTRIBUTE((unused));
       
  4370    DBUG_ENTER("mysql_parse");
       
  4371  
       
  4372    DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
       
  4373 --- a/sql/sql_planner.cc
       
  4374 +++ b/sql/sql_planner.cc
       
  4375 @@ -1516,7 +1516,7 @@ bool Optimize_table_order::greedy_search(table_map remaining_tables)
       
  4376        join state will not be reverted back to its initial state because we
       
  4377        don't "pop" tables already present in the partial plan.
       
  4378      */
       
  4379 -    bool is_interleave_error __attribute__((unused))= 
       
  4380 +    bool is_interleave_error MY_ATTRIBUTE((unused))= 
       
  4381        check_interleaving_with_nj (best_table);
       
  4382      /* This has been already checked by best_extension_by_limited_search */
       
  4383      DBUG_ASSERT(!is_interleave_error);
       
  4384 --- a/sql/sql_plugin.cc
       
  4385 +++ b/sql/sql_plugin.cc
       
  4386 @@ -1216,7 +1216,7 @@ extern "C" uchar *get_bookmark_hash_key(const uchar *, size_t *, my_bool);
       
  4387  
       
  4388  
       
  4389  uchar *get_plugin_hash_key(const uchar *buff, size_t *length,
       
  4390 -                           my_bool not_used __attribute__((unused)))
       
  4391 +                           my_bool not_used MY_ATTRIBUTE((unused)))
       
  4392  {
       
  4393    struct st_plugin_int *plugin= (st_plugin_int *)buff;
       
  4394    *length= (uint)plugin->name.length;
       
  4395 @@ -1225,7 +1225,7 @@ uchar *get_plugin_hash_key(const uchar *buff, size_t *length,
       
  4396  
       
  4397  
       
  4398  uchar *get_bookmark_hash_key(const uchar *buff, size_t *length,
       
  4399 -                             my_bool not_used __attribute__((unused)))
       
  4400 +                             my_bool not_used MY_ATTRIBUTE((unused)))
       
  4401  {
       
  4402    struct st_bookmark *var= (st_bookmark *)buff;
       
  4403    *length= var->name_len + 1;
       
  4404 @@ -3396,7 +3396,7 @@ static void plugin_opt_set_limits(struct my_option *options,
       
  4405  extern "C" my_bool get_one_plugin_option(int optid, const struct my_option *,
       
  4406                                           char *);
       
  4407  
       
  4408 -my_bool get_one_plugin_option(int optid __attribute__((unused)),
       
  4409 +my_bool get_one_plugin_option(int optid MY_ATTRIBUTE((unused)),
       
  4410                                const struct my_option *opt,
       
  4411                                char *argument)
       
  4412  {
       
  4413 @@ -3717,7 +3717,7 @@ static my_option *construct_help_options(MEM_ROOT *mem_root,
       
  4414  
       
  4415  static my_bool check_if_option_is_deprecated(int optid,
       
  4416                                               const struct my_option *opt,
       
  4417 -                                             char *argument __attribute__((unused)))
       
  4418 +                                             char *argument MY_ATTRIBUTE((unused)))
       
  4419  {
       
  4420    if (optid == -1)
       
  4421    {
       
  4422 @@ -3767,7 +3767,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
       
  4423    LEX_STRING plugin_name;
       
  4424    char *varname;
       
  4425    int error;
       
  4426 -  sys_var *v __attribute__((unused));
       
  4427 +  sys_var *v MY_ATTRIBUTE((unused));
       
  4428    struct st_bookmark *var;
       
  4429    uint len, count= EXTRA_OPTIONS;
       
  4430    DBUG_ENTER("test_plugin_options");
       
  4431 --- a/sql/sql_prepare.cc
       
  4432 +++ b/sql/sql_prepare.cc
       
  4433 @@ -1,4 +1,4 @@
       
  4434 -/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4435 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4436  
       
  4437     This program is free software; you can redistribute it and/or modify
       
  4438     it under the terms of the GNU General Public License as published by
       
  4439 @@ -399,7 +399,7 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns)
       
  4440  }
       
  4441  #else
       
  4442  static bool send_prep_stmt(Prepared_statement *stmt,
       
  4443 -                           uint columns __attribute__((unused)))
       
  4444 +                           uint columns MY_ATTRIBUTE((unused)))
       
  4445  {
       
  4446    THD *thd= stmt->thd;
       
  4447  
       
  4448 @@ -1183,7 +1183,7 @@ swap_parameter_array(Item_param **param_array_dst,
       
  4449  
       
  4450  static bool insert_params_from_vars(Prepared_statement *stmt,
       
  4451                                      List<LEX_STRING>& varnames,
       
  4452 -                                    String *query __attribute__((unused)))
       
  4453 +                                    String *query MY_ATTRIBUTE((unused)))
       
  4454  {
       
  4455    Item_param **begin= stmt->param_array;
       
  4456    Item_param **end= begin + stmt->param_count;
       
  4457 @@ -4529,7 +4529,7 @@ bool Protocol_local::store(const char *str, size_t length,
       
  4458  /* Store MYSQL_TIME (in binary format) */
       
  4459  
       
  4460  bool Protocol_local::store(MYSQL_TIME *time,
       
  4461 -                           uint precision __attribute__((unused)))
       
  4462 +                           uint precision MY_ATTRIBUTE((unused)))
       
  4463  {
       
  4464    return store_column(time, sizeof(MYSQL_TIME));
       
  4465  }
       
  4466 @@ -4546,7 +4546,7 @@ bool Protocol_local::store_date(MYSQL_TIME *time)
       
  4467  /** Store MYSQL_TIME (in binary format) */
       
  4468  
       
  4469  bool Protocol_local::store_time(MYSQL_TIME *time,
       
  4470 -                                uint precision __attribute__((unused)))
       
  4471 +                                uint precision MY_ATTRIBUTE((unused)))
       
  4472  {
       
  4473    return store_column(time, sizeof(MYSQL_TIME));
       
  4474  }
       
  4475 --- a/sql/sql_select.cc
       
  4476 +++ b/sql/sql_select.cc
       
  4477 @@ -1,4 +1,4 @@
       
  4478 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4479 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4480  
       
  4481     This program is free software; you can redistribute it and/or modify
       
  4482     it under the terms of the GNU General Public License as published by
       
  4483 @@ -3075,7 +3075,7 @@ bool JOIN_TAB::and_with_jt_and_sel_condition(Item *add_cond, uint line)
       
  4484  */
       
  4485  bool JOIN_TAB::and_with_condition(Item *add_cond, uint line)
       
  4486  {
       
  4487 -  Item *old_cond __attribute__((unused))= m_condition;
       
  4488 +  Item *old_cond MY_ATTRIBUTE((unused))= m_condition;
       
  4489    if (and_conditions(&m_condition, add_cond))
       
  4490      return true;
       
  4491    DBUG_PRINT("info", ("JOIN_TAB::m_condition extended. Change %p -> %p "
       
  4492 --- a/sql/sql_servers.cc
       
  4493 +++ b/sql/sql_servers.cc
       
  4494 @@ -1,4 +1,4 @@
       
  4495 -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
       
  4496 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4497  
       
  4498     This program is free software; you can redistribute it and/or modify
       
  4499     it under the terms of the GNU General Public License as published by
       
  4500 @@ -86,7 +86,7 @@ static void merge_server_struct(FOREIGN_SERVER *from, FOREIGN_SERVER *to);
       
  4501  
       
  4502  
       
  4503  static uchar *servers_cache_get_key(FOREIGN_SERVER *server, size_t *length,
       
  4504 -			       my_bool not_used __attribute__((unused)))
       
  4505 +			       my_bool not_used MY_ATTRIBUTE((unused)))
       
  4506  {
       
  4507    DBUG_ENTER("servers_cache_get_key");
       
  4508    DBUG_PRINT("info", ("server_name_length %d server_name %s",
       
  4509 --- a/sql/sql_show.cc
       
  4510 +++ b/sql/sql_show.cc
       
  4511 @@ -1,4 +1,4 @@
       
  4512 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4513 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4514  
       
  4515     This program is free software; you can redistribute it and/or modify
       
  4516     it under the terms of the GNU General Public License as published by
       
  4517 @@ -369,7 +369,7 @@ ignore_db_dirs_init()
       
  4518  
       
  4519  static uchar *
       
  4520  db_dirs_hash_get_key(const uchar *data, size_t *len_ret,
       
  4521 -                     my_bool __attribute__((unused)))
       
  4522 +                     my_bool MY_ATTRIBUTE((unused)))
       
  4523  {
       
  4524    LEX_STRING *e= (LEX_STRING *) data;
       
  4525  
       
  4526 @@ -2032,8 +2032,8 @@ public:
       
  4527    {
       
  4528      return (void*) sql_alloc((uint) size);
       
  4529    }
       
  4530 -  static void operator delete(void *ptr __attribute__((unused)),
       
  4531 -                              size_t size __attribute__((unused)))
       
  4532 +  static void operator delete(void *ptr MY_ATTRIBUTE((unused)),
       
  4533 +                              size_t size MY_ATTRIBUTE((unused)))
       
  4534    { TRASH(ptr, size); }
       
  4535  
       
  4536    ulong thread_id;
       
  4537 --- a/sql/sql_table.cc
       
  4538 +++ b/sql/sql_table.cc
       
  4539 @@ -5513,7 +5513,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
       
  4540            */
       
  4541            create_info->used_fields|= HA_CREATE_USED_ENGINE;
       
  4542  
       
  4543 -          int result __attribute__((unused))=
       
  4544 +          int result MY_ATTRIBUTE((unused))=
       
  4545              store_create_info(thd, table, &query,
       
  4546                                create_info, TRUE /* show_database */);
       
  4547  
       
  4548 --- a/sql/sql_time.cc
       
  4549 +++ b/sql/sql_time.cc
       
  4550 @@ -1,4 +1,4 @@
       
  4551 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4552 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4553  
       
  4554     This program is free software; you can redistribute it and/or modify
       
  4555     it under the terms of the GNU General Public License as published by
       
  4556 @@ -1187,7 +1187,7 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
       
  4557    @param OUT str  String to conver to
       
  4558    @param dec      Number of fractional digits.
       
  4559  */
       
  4560 -void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)),
       
  4561 +void make_time(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
       
  4562                 const MYSQL_TIME *l_time, String *str, uint dec)
       
  4563  {
       
  4564    uint length= (uint) my_time_to_str(l_time, (char*) str->ptr(), dec);
       
  4565 @@ -1202,7 +1202,7 @@ void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)),
       
  4566    @param l_time   DATE value
       
  4567    @param OUT str  String to conver to
       
  4568  */
       
  4569 -void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)),
       
  4570 +void make_date(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
       
  4571                 const MYSQL_TIME *l_time, String *str)
       
  4572  {
       
  4573    uint length= (uint) my_date_to_str(l_time, (char*) str->ptr());
       
  4574 @@ -1218,7 +1218,7 @@ void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)),
       
  4575    @param OUT str  String to conver to
       
  4576    @param dec      Number of fractional digits.
       
  4577  */
       
  4578 -void make_datetime(const DATE_TIME_FORMAT *format __attribute__((unused)),
       
  4579 +void make_datetime(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
       
  4580                     const MYSQL_TIME *l_time, String *str, uint dec)
       
  4581  {
       
  4582    uint length= (uint) my_datetime_to_str(l_time, (char*) str->ptr(), dec);
       
  4583 --- a/sql/sql_udf.cc
       
  4584 +++ b/sql/sql_udf.cc
       
  4585 @@ -1,4 +1,4 @@
       
  4586 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  4587 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4588  
       
  4589     This program is free software; you can redistribute it and/or modify
       
  4590     it under the terms of the GNU General Public License as published by
       
  4591 @@ -94,7 +94,7 @@ static char *init_syms(udf_func *tmp, char *nm)
       
  4592  
       
  4593  
       
  4594  extern "C" uchar* get_hash_key(const uchar *buff, size_t *length,
       
  4595 -			      my_bool not_used __attribute__((unused)))
       
  4596 +			      my_bool not_used MY_ATTRIBUTE((unused)))
       
  4597  {
       
  4598    udf_func *udf=(udf_func*) buff;
       
  4599    *length=(uint) udf->name.length;
       
  4600 --- a/sql/sql_yacc.yy
       
  4601 +++ b/sql/sql_yacc.yy
       
  4602 @@ -113,18 +113,18 @@ int yylex(void *yylval, void *yythd);
       
  4603  <pre>
       
  4604    yyerrlab1:
       
  4605    #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
       
  4606 -    __attribute__ ((__unused__))
       
  4607 +    MY_ATTRIBUTE ((__unused__))
       
  4608    #endif
       
  4609  </pre>
       
  4610 -  This usage of __attribute__ is illegal, so we remove it.
       
  4611 +  This usage of MY_ATTRIBUTE is illegal, so we remove it.
       
  4612    See the following references for details:
       
  4613    http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00014.html
       
  4614    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14273
       
  4615  */
       
  4616  
       
  4617  #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
       
  4618 -#undef __attribute__
       
  4619 -#define __attribute__(X)
       
  4620 +#undef MY_ATTRIBUTE
       
  4621 +#define MY_ATTRIBUTE(X)
       
  4622  #endif
       
  4623  
       
  4624  
       
  4625 --- a/sql/table.cc
       
  4626 +++ b/sql/table.cc
       
  4627 @@ -1,5 +1,5 @@
       
  4628  /*
       
  4629 -   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
  4630 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4631  
       
  4632     This program is free software; you can redistribute it and/or modify
       
  4633     it under the terms of the GNU General Public License as published by
       
  4634 @@ -210,7 +210,7 @@ View_creation_ctx * View_creation_ctx::create(THD *thd,
       
  4635  /* Get column name from column hash */
       
  4636  
       
  4637  static uchar *get_field_name(Field **buff, size_t *length,
       
  4638 -                             my_bool not_used __attribute__((unused)))
       
  4639 +                             my_bool not_used MY_ATTRIBUTE((unused)))
       
  4640  {
       
  4641    *length= (uint) strlen((*buff)->field_name);
       
  4642    return (uchar*) (*buff)->field_name;
       
  4643 --- a/sql/table_cache.cc
       
  4644 +++ b/sql/table_cache.cc
       
  4645 @@ -1,4 +1,4 @@
       
  4646 -/* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
       
  4647 +/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4648  
       
  4649     This program is free software; you can redistribute it and/or modify
       
  4650     it under the terms of the GNU General Public License as published by
       
  4651 @@ -33,7 +33,7 @@ PSI_mutex_info Table_cache::m_mutex_keys[]= {
       
  4652  
       
  4653  extern "C" uchar *table_cache_key(const uchar *record,
       
  4654                                    size_t *length,
       
  4655 -                                  my_bool not_used __attribute__((unused)))
       
  4656 +                                  my_bool not_used MY_ATTRIBUTE((unused)))
       
  4657  {
       
  4658    TABLE_SHARE *share= ((Table_cache_element*)record)->get_share();
       
  4659    *length= share->table_cache_key.length;
       
  4660 --- a/sql/tztime.cc
       
  4661 +++ b/sql/tztime.cc
       
  4662 @@ -1,4 +1,4 @@
       
  4663 -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4664 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4665  
       
  4666     This program is free software; you can redistribute it and/or modify
       
  4667     it under the terms of the GNU General Public License as published by
       
  4668 @@ -1490,7 +1490,7 @@ public:
       
  4669  
       
  4670  extern "C" uchar *
       
  4671  my_tz_names_get_key(Tz_names_entry *entry, size_t *length,
       
  4672 -                    my_bool not_used __attribute__((unused)))
       
  4673 +                    my_bool not_used MY_ATTRIBUTE((unused)))
       
  4674  {
       
  4675    *length= entry->name.length();
       
  4676    return (uchar*) entry->name.ptr();
       
  4677 @@ -1499,7 +1499,7 @@ my_tz_names_get_key(Tz_names_entry *entry, size_t *length,
       
  4678  extern "C" uchar *
       
  4679  my_offset_tzs_get_key(Time_zone_offset *entry,
       
  4680                        size_t *length,
       
  4681 -                      my_bool not_used __attribute__((unused)))
       
  4682 +                      my_bool not_used MY_ATTRIBUTE((unused)))
       
  4683  {
       
  4684    *length= sizeof(long);
       
  4685    return (uchar*) &entry->offset;
       
  4686 --- a/sql/udf_example.cc
       
  4687 +++ b/sql/udf_example.cc
       
  4688 @@ -1,4 +1,4 @@
       
  4689 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
  4690 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4691  
       
  4692     This program is free software; you can redistribute it and/or modify
       
  4693     it under the terms of the GNU General Public License as published by
       
  4694 @@ -227,7 +227,7 @@ my_bool metaphon_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4695  ****************************************************************************/
       
  4696  
       
  4697  
       
  4698 -void metaphon_deinit(UDF_INIT *initid __attribute__((unused)))
       
  4699 +void metaphon_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
       
  4700  {
       
  4701  }
       
  4702  
       
  4703 @@ -273,9 +273,9 @@ static char codes[26] =  {
       
  4704  #define NOGHTOF(x)  (codes[(x) - 'A'] & 16)	/* BDH */
       
  4705  
       
  4706  
       
  4707 -char *metaphon(UDF_INIT *initid __attribute__((unused)),
       
  4708 +char *metaphon(UDF_INIT *initid MY_ATTRIBUTE((unused)),
       
  4709                 UDF_ARGS *args, char *result, unsigned long *length,
       
  4710 -               char *is_null, char *error __attribute__((unused)))
       
  4711 +               char *is_null, char *error MY_ATTRIBUTE((unused)))
       
  4712  {
       
  4713    const char *word=args->args[0];
       
  4714    const char *w_end;
       
  4715 @@ -550,8 +550,8 @@ my_bool myfunc_double_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4716  }
       
  4717  
       
  4718  
       
  4719 -double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4720 -                     char *is_null, char *error __attribute__((unused)))
       
  4721 +double myfunc_double(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
       
  4722 +                     char *is_null, char *error MY_ATTRIBUTE((unused)))
       
  4723  {
       
  4724    unsigned long val = 0;
       
  4725    unsigned long v = 0;
       
  4726 @@ -589,9 +589,9 @@ double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4727  
       
  4728  /* This function returns the sum of all arguments */
       
  4729  
       
  4730 -longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4731 -                    char *is_null __attribute__((unused)),
       
  4732 -                    char *error __attribute__((unused)))
       
  4733 +longlong myfunc_int(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
       
  4734 +                    char *is_null MY_ATTRIBUTE((unused)),
       
  4735 +                    char *error MY_ATTRIBUTE((unused)))
       
  4736  {
       
  4737    longlong val = 0;
       
  4738    uint i;
       
  4739 @@ -621,9 +621,9 @@ longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4740    At least one of _init/_deinit is needed unless the server is started
       
  4741    with --allow_suspicious_udfs.
       
  4742  */
       
  4743 -my_bool myfunc_int_init(UDF_INIT *initid __attribute__((unused)),
       
  4744 -                        UDF_ARGS *args __attribute__((unused)),
       
  4745 -                        char *message __attribute__((unused)))
       
  4746 +my_bool myfunc_int_init(UDF_INIT *initid MY_ATTRIBUTE((unused)),
       
  4747 +                        UDF_ARGS *args MY_ATTRIBUTE((unused)),
       
  4748 +                        char *message MY_ATTRIBUTE((unused)))
       
  4749  {
       
  4750    return 0;
       
  4751  }
       
  4752 @@ -663,9 +663,9 @@ void sequence_deinit(UDF_INIT *initid)
       
  4753      free(initid->ptr);
       
  4754  }
       
  4755  
       
  4756 -longlong sequence(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4757 -                  char *is_null __attribute__((unused)),
       
  4758 -                  char *error __attribute__((unused)))
       
  4759 +longlong sequence(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
       
  4760 +                  char *is_null MY_ATTRIBUTE((unused)),
       
  4761 +                  char *error MY_ATTRIBUTE((unused)))
       
  4762  {
       
  4763    ulonglong val=0;
       
  4764    if (args->arg_count)
       
  4765 @@ -727,16 +727,16 @@ my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4766    return 0;
       
  4767  }
       
  4768  
       
  4769 -void lookup_deinit(UDF_INIT *initid __attribute__((unused)))
       
  4770 +void lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
       
  4771  {
       
  4772  #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
       
  4773    (void) pthread_mutex_destroy(&LOCK_hostname);
       
  4774  #endif
       
  4775  }
       
  4776  
       
  4777 -char *lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4778 +char *lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
       
  4779               char *result, unsigned long *res_length, char *null_value,
       
  4780 -             char *error __attribute__((unused)))
       
  4781 +             char *error MY_ATTRIBUTE((unused)))
       
  4782  {
       
  4783    uint length;
       
  4784    char name_buff[256];
       
  4785 @@ -807,16 +807,16 @@ my_bool reverse_lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4786    return 0;
       
  4787  }
       
  4788  
       
  4789 -void reverse_lookup_deinit(UDF_INIT *initid __attribute__((unused)))
       
  4790 +void reverse_lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
       
  4791  {
       
  4792  #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
       
  4793    (void) pthread_mutex_destroy(&LOCK_hostname);
       
  4794  #endif
       
  4795  }
       
  4796  
       
  4797 -char *reverse_lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
       
  4798 +char *reverse_lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
       
  4799                       char *result, unsigned long *res_length,
       
  4800 -                     char *null_value, char *error __attribute__((unused)))
       
  4801 +                     char *null_value, char *error MY_ATTRIBUTE((unused)))
       
  4802  {
       
  4803  #if defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
       
  4804    char name_buff[256];
       
  4805 @@ -970,8 +970,8 @@ avgcost_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message)
       
  4806  /* This is needed to get things to work in MySQL 4.1.1 and above */
       
  4807  
       
  4808  void
       
  4809 -avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
       
  4810 -              char* message __attribute__((unused)))
       
  4811 +avgcost_clear(UDF_INIT* initid, char* is_null MY_ATTRIBUTE((unused)),
       
  4812 +              char* message MY_ATTRIBUTE((unused)))
       
  4813  {
       
  4814    struct avgcost_data* data = (struct avgcost_data*)initid->ptr;
       
  4815    data->totalprice=	0.0;
       
  4816 @@ -982,8 +982,8 @@ avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
       
  4817  
       
  4818  void
       
  4819  avgcost_add(UDF_INIT* initid, UDF_ARGS* args,
       
  4820 -            char* is_null __attribute__((unused)),
       
  4821 -            char* message __attribute__((unused)))
       
  4822 +            char* is_null MY_ATTRIBUTE((unused)),
       
  4823 +            char* message MY_ATTRIBUTE((unused)))
       
  4824  {
       
  4825    if (args->args[0] && args->args[1])
       
  4826    {
       
  4827 @@ -1029,8 +1029,8 @@ avgcost_add(UDF_INIT* initid, UDF_ARGS* args,
       
  4828  
       
  4829  
       
  4830  double
       
  4831 -avgcost( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)),
       
  4832 -         char* is_null, char* error __attribute__((unused)))
       
  4833 +avgcost( UDF_INIT* initid, UDF_ARGS* args MY_ATTRIBUTE((unused)),
       
  4834 +         char* is_null, char* error MY_ATTRIBUTE((unused)))
       
  4835  {
       
  4836    struct avgcost_data* data = (struct avgcost_data*)initid->ptr;
       
  4837    if (!data->count || !data->totalquantity)
       
  4838 @@ -1063,10 +1063,10 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
       
  4839    return 0;
       
  4840  }
       
  4841  
       
  4842 -char *myfunc_argument_name(UDF_INIT *initid __attribute__((unused)),
       
  4843 +char *myfunc_argument_name(UDF_INIT *initid MY_ATTRIBUTE((unused)),
       
  4844                             UDF_ARGS *args, char *result,
       
  4845                             unsigned long *length, char *null_value,
       
  4846 -                           char *error __attribute__((unused)))
       
  4847 +                           char *error MY_ATTRIBUTE((unused)))
       
  4848  {
       
  4849    if (!args->attributes[0])
       
  4850    {
       
  4851 @@ -1094,9 +1094,9 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4852    return 0;
       
  4853  }
       
  4854  
       
  4855 -char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
       
  4856 +char * is_const(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)),
       
  4857                  char *result, unsigned long *length,
       
  4858 -                char *is_null, char *error __attribute__((unused)))
       
  4859 +                char *is_null, char *error MY_ATTRIBUTE((unused)))
       
  4860  {
       
  4861    if (initid->ptr != 0) {
       
  4862      sprintf(result, "const");
       
  4863 @@ -1135,9 +1135,9 @@ my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
       
  4864  }
       
  4865  
       
  4866  extern "C"
       
  4867 -char * check_const_len(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
       
  4868 +char * check_const_len(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)),
       
  4869                  char *result, unsigned long *length,
       
  4870 -                char *is_null, char *error __attribute__((unused)))
       
  4871 +                char *is_null, char *error MY_ATTRIBUTE((unused)))
       
  4872  {
       
  4873    strmov(result, initid->ptr);
       
  4874    *length= (uint) strlen(result);
       
  4875 @@ -1183,8 +1183,8 @@ void my_median_deinit(UDF_INIT* initid)
       
  4876  }
       
  4877  
       
  4878  void my_median_add(UDF_INIT* initid, UDF_ARGS* args,
       
  4879 -                   char* is_null __attribute__((unused)),
       
  4880 -                   char* message __attribute__((unused)))
       
  4881 +                   char* is_null MY_ATTRIBUTE((unused)),
       
  4882 +                   char* message MY_ATTRIBUTE((unused)))
       
  4883  {
       
  4884    My_median_data *data=
       
  4885      static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
       
  4886 @@ -1197,8 +1197,8 @@ void my_median_add(UDF_INIT* initid, UDF_ARGS* args,
       
  4887  }
       
  4888  
       
  4889  void my_median_clear(UDF_INIT* initid, UDF_ARGS* args,
       
  4890 -                     char* is_null __attribute__((unused)),
       
  4891 -                     char* message __attribute__((unused)))
       
  4892 +                     char* is_null MY_ATTRIBUTE((unused)),
       
  4893 +                     char* message MY_ATTRIBUTE((unused)))
       
  4894  {
       
  4895    My_median_data *data=
       
  4896      static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
       
  4897 @@ -1207,7 +1207,7 @@ void my_median_clear(UDF_INIT* initid, UDF_ARGS* args,
       
  4898  
       
  4899  longlong my_median(UDF_INIT* initid, UDF_ARGS* args,
       
  4900                     char* is_null,
       
  4901 -                   char* message __attribute__((unused)))
       
  4902 +                   char* message MY_ATTRIBUTE((unused)))
       
  4903  {
       
  4904    My_median_data *data=
       
  4905      static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
       
  4906 --- a/storage/archive/archive_reader.c
       
  4907 +++ b/storage/archive/archive_reader.c
       
  4908 @@ -1,4 +1,4 @@
       
  4909 -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
       
  4910 +/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4911  
       
  4912     This program is free software; you can redistribute it and/or modify
       
  4913     it under the terms of the GNU General Public License as published by
       
  4914 @@ -22,6 +22,7 @@
       
  4915  #include <m_string.h>
       
  4916  #include <my_getopt.h>
       
  4917  #include <mysql_version.h>
       
  4918 +#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
       
  4919  
       
  4920  #define BUFFER_LEN 1024
       
  4921  #define ARCHIVE_ROW_HEADER_SIZE 4
       
  4922 @@ -292,7 +293,7 @@ end:
       
  4923  
       
  4924  static my_bool
       
  4925  get_one_option(int optid,
       
  4926 -	       const struct my_option *opt __attribute__((unused)),
       
  4927 +	       const struct my_option *opt MY_ATTRIBUTE((unused)),
       
  4928  	       char *argument)
       
  4929  {
       
  4930    switch (optid) {
       
  4931 @@ -388,8 +389,8 @@ static struct my_option my_long_options[] =
       
  4932  static void usage(void)
       
  4933  {
       
  4934    print_version();
       
  4935 -  puts("Copyright 2007-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
       
  4936 -  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
       
  4937 +  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2007"));
       
  4938 +
       
  4939    puts("Read and modify Archive files directly\n");
       
  4940    printf("Usage: %s [OPTIONS] file_to_be_looked_at [file_for_backup]\n", my_progname);
       
  4941    print_defaults("my", load_default_groups);
       
  4942 --- a/storage/blackhole/ha_blackhole.cc
       
  4943 +++ b/storage/blackhole/ha_blackhole.cc
       
  4944 @@ -1,4 +1,4 @@
       
  4945 -/* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
       
  4946 +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4947  
       
  4948    This program is free software; you can redistribute it and/or modify
       
  4949    it under the terms of the GNU General Public License as published by
       
  4950 @@ -383,7 +383,7 @@ static void blackhole_free_key(st_blackhole_share *share)
       
  4951  }
       
  4952  
       
  4953  static uchar* blackhole_get_key(st_blackhole_share *share, size_t *length,
       
  4954 -                                my_bool not_used __attribute__((unused)))
       
  4955 +                                my_bool not_used MY_ATTRIBUTE((unused)))
       
  4956  {
       
  4957    *length= share->table_name_length;
       
  4958    return (uchar*) share->table_name;
       
  4959 --- a/storage/csv/ha_tina.cc
       
  4960 +++ b/storage/csv/ha_tina.cc
       
  4961 @@ -1,4 +1,4 @@
       
  4962 -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
       
  4963 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4964  
       
  4965    This program is free software; you can redistribute it and/or modify
       
  4966    it under the terms of the GNU General Public License as published by
       
  4967 @@ -102,7 +102,7 @@ int sort_set (tina_set *a, tina_set *b)
       
  4968  }
       
  4969  
       
  4970  static uchar* tina_get_key(TINA_SHARE *share, size_t *length,
       
  4971 -                          my_bool not_used __attribute__((unused)))
       
  4972 +                          my_bool not_used MY_ATTRIBUTE((unused)))
       
  4973  {
       
  4974    *length=share->table_name_length;
       
  4975    return (uchar*) share->table_name;
       
  4976 --- a/storage/example/ha_example.cc
       
  4977 +++ b/storage/example/ha_example.cc
       
  4978 @@ -1,4 +1,4 @@
       
  4979 -/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
       
  4980 +/* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
  4981  
       
  4982    This program is free software; you can redistribute it and/or modify
       
  4983    it under the terms of the GNU General Public License as published by
       
  4984 @@ -436,9 +436,9 @@ int ha_example::delete_row(const uchar *buf)
       
  4985  */
       
  4986  
       
  4987  int ha_example::index_read_map(uchar *buf, const uchar *key,
       
  4988 -                               key_part_map keypart_map __attribute__((unused)),
       
  4989 +                               key_part_map keypart_map MY_ATTRIBUTE((unused)),
       
  4990                                 enum ha_rkey_function find_flag
       
  4991 -                               __attribute__((unused)))
       
  4992 +                               MY_ATTRIBUTE((unused)))
       
  4993  {
       
  4994    int rc;
       
  4995    DBUG_ENTER("ha_example::index_read");
       
  4996 --- a/storage/federated/ha_federated.cc
       
  4997 +++ b/storage/federated/ha_federated.cc
       
  4998 @@ -425,7 +425,7 @@ static handler *federated_create_handler(handlerton *hton,
       
  4999  /* Function we use in the creation of our hash to get key */
       
  5000  
       
  5001  static uchar *federated_get_key(FEDERATED_SHARE *share, size_t *length,
       
  5002 -                                my_bool not_used __attribute__ ((unused)))
       
  5003 +                                my_bool not_used MY_ATTRIBUTE ((unused)))
       
  5004  {
       
  5005    *length= share->share_key_length;
       
  5006    return (uchar*) share->share_key;
       
  5007 @@ -2743,7 +2743,7 @@ int ha_federated::read_next(uchar *buf, MYSQL_RES *result)
       
  5008    @param[in]  record  record data (unused)
       
  5009  */
       
  5010  
       
  5011 -void ha_federated::position(const uchar *record __attribute__ ((unused)))
       
  5012 +void ha_federated::position(const uchar *record MY_ATTRIBUTE ((unused)))
       
  5013  {
       
  5014    DBUG_ENTER("ha_federated::position");
       
  5015    
       
  5016 --- a/storage/heap/hp_hash.c
       
  5017 +++ b/storage/heap/hp_hash.c
       
  5018 @@ -1,4 +1,4 @@
       
  5019 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
  5020 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  5021  
       
  5022     This program is free software; you can redistribute it and/or modify
       
  5023     it under the terms of the GNU General Public License as published by
       
  5024 @@ -867,7 +867,7 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,
       
  5025  
       
  5026  
       
  5027  uint hp_rb_key_length(HP_KEYDEF *keydef, 
       
  5028 -		      const uchar *key __attribute__((unused)))
       
  5029 +		      const uchar *key MY_ATTRIBUTE((unused)))
       
  5030  {
       
  5031    return keydef->length;
       
  5032  }
       
  5033 --- a/storage/heap/hp_test2.c
       
  5034 +++ b/storage/heap/hp_test2.c
       
  5035 @@ -1,4 +1,4 @@
       
  5036 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
  5037 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
  5038     reserved
       
  5039  
       
  5040     This program is free software; you can redistribute it and/or modify
       
  5041 @@ -660,7 +660,7 @@ static int rnd(int max_value)
       
  5042  } /* rnd */
       
  5043  
       
  5044  
       
  5045 -static sig_handler endprog(int sig_number __attribute__((unused)))
       
  5046 +static sig_handler endprog(int sig_number MY_ATTRIBUTE((unused)))
       
  5047  {
       
  5048    {
       
  5049      hp_panic(HA_PANIC_CLOSE);
       
  5050 --- a/storage/innobase/btr/btr0btr.cc
       
  5051 +++ b/storage/innobase/btr/btr0btr.cc
       
  5052 @@ -1,6 +1,6 @@
       
  5053  /*****************************************************************************
       
  5054  
       
  5055 -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5056 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5057  Copyright (c) 2012, Facebook Inc.
       
  5058  
       
  5059  This program is free software; you can redistribute it and/or modify it under
       
  5060 @@ -1102,7 +1102,7 @@ that the caller has made the reservation for free extents!
       
  5061  @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
       
  5062  (init_mtr == mtr, or the page was not previously freed in mtr)
       
  5063  @retval block (not allocated or initialized) otherwise */
       
  5064 -static __attribute__((nonnull, warn_unused_result))
       
  5065 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5066  buf_block_t*
       
  5067  btr_page_alloc_low(
       
  5068  /*===============*/
       
  5069 @@ -1971,7 +1971,7 @@ IBUF_BITMAP_FREE is unaffected by reorganization.
       
  5070  
       
  5071  @retval true if the operation was successful
       
  5072  @retval false if it is a compressed page, and recompression failed */
       
  5073 -static __attribute__((nonnull))
       
  5074 +static MY_ATTRIBUTE((nonnull))
       
  5075  bool
       
  5076  btr_page_reorganize_block(
       
  5077  /*======================*/
       
  5078 @@ -2500,7 +2500,7 @@ func_exit:
       
  5079  Returns TRUE if the insert fits on the appropriate half-page with the
       
  5080  chosen split_rec.
       
  5081  @return	true if fits */
       
  5082 -static __attribute__((nonnull(1,3,4,6), warn_unused_result))
       
  5083 +static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result))
       
  5084  bool
       
  5085  btr_page_insert_fits(
       
  5086  /*=================*/
       
  5087 @@ -2643,7 +2643,7 @@ btr_insert_on_non_leaf_level_func(
       
  5088  /**************************************************************//**
       
  5089  Attaches the halves of an index page on the appropriate level in an
       
  5090  index tree. */
       
  5091 -static __attribute__((nonnull))
       
  5092 +static MY_ATTRIBUTE((nonnull))
       
  5093  void
       
  5094  btr_attach_half_pages(
       
  5095  /*==================*/
       
  5096 @@ -2779,7 +2779,7 @@ btr_attach_half_pages(
       
  5097  /*************************************************************//**
       
  5098  Determine if a tuple is smaller than any record on the page.
       
  5099  @return TRUE if smaller */
       
  5100 -static __attribute__((nonnull, warn_unused_result))
       
  5101 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5102  bool
       
  5103  btr_page_tuple_smaller(
       
  5104  /*===================*/
       
  5105 @@ -3355,7 +3355,7 @@ Removes a page from the level list of pages.
       
  5106  
       
  5107  /*************************************************************//**
       
  5108  Removes a page from the level list of pages. */
       
  5109 -static __attribute__((nonnull))
       
  5110 +static MY_ATTRIBUTE((nonnull))
       
  5111  void
       
  5112  btr_level_list_remove_func(
       
  5113  /*=======================*/
       
  5114 --- a/storage/innobase/btr/btr0cur.cc
       
  5115 +++ b/storage/innobase/btr/btr0cur.cc
       
  5116 @@ -1,6 +1,6 @@
       
  5117  /*****************************************************************************
       
  5118  
       
  5119 -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5120 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5121  Copyright (c) 2008, Google Inc.
       
  5122  Copyright (c) 2012, Facebook Inc.
       
  5123  
       
  5124 @@ -1084,7 +1084,7 @@ This has to be done either within the same mini-transaction,
       
  5125  or by invoking ibuf_reset_free_bits() before mtr_commit().
       
  5126  
       
  5127  @return	pointer to inserted record if succeed, else NULL */
       
  5128 -static __attribute__((nonnull, warn_unused_result))
       
  5129 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5130  rec_t*
       
  5131  btr_cur_insert_if_possible(
       
  5132  /*=======================*/
       
  5133 @@ -1127,7 +1127,7 @@ btr_cur_insert_if_possible(
       
  5134  /*************************************************************//**
       
  5135  For an insert, checks the locks and does the undo logging if desired.
       
  5136  @return	DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */
       
  5137 -UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6)))
       
  5138 +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6)))
       
  5139  dberr_t
       
  5140  btr_cur_ins_lock_and_undo(
       
  5141  /*======================*/
       
  5142 @@ -1653,7 +1653,7 @@ btr_cur_pessimistic_insert(
       
  5143  /*************************************************************//**
       
  5144  For an update, checks the locks and does the undo logging.
       
  5145  @return	DB_SUCCESS, DB_WAIT_LOCK, or error number */
       
  5146 -UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7)))
       
  5147 +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7)))
       
  5148  dberr_t
       
  5149  btr_cur_upd_lock_and_undo(
       
  5150  /*======================*/
       
  5151 @@ -4992,7 +4992,7 @@ btr_free_externally_stored_field(
       
  5152  	ulint		i,		/*!< in: field number of field_ref;
       
  5153  					ignored if rec == NULL */
       
  5154  	enum trx_rb_ctx	rb_ctx,		/*!< in: rollback context */
       
  5155 -	mtr_t*		local_mtr __attribute__((unused))) /*!< in: mtr
       
  5156 +	mtr_t*		local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr
       
  5157  					containing the latch to data an an
       
  5158  					X-latch to the index tree */
       
  5159  {
       
  5160 --- a/storage/innobase/btr/btr0sea.cc
       
  5161 +++ b/storage/innobase/btr/btr0sea.cc
       
  5162 @@ -1,6 +1,6 @@
       
  5163  /*****************************************************************************
       
  5164  
       
  5165 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  5166 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5167  Copyright (c) 2008, Google Inc.
       
  5168  
       
  5169  Portions of this file contain modifications contributed and copyrighted by
       
  5170 @@ -473,7 +473,7 @@ btr_search_update_block_hash_info(
       
  5171  /*==============================*/
       
  5172  	btr_search_t*	info,	/*!< in: search info */
       
  5173  	buf_block_t*	block,	/*!< in: buffer block */
       
  5174 -	btr_cur_t*	cursor __attribute__((unused)))
       
  5175 +	btr_cur_t*	cursor MY_ATTRIBUTE((unused)))
       
  5176  				/*!< in: cursor */
       
  5177  {
       
  5178  #ifdef UNIV_SYNC_DEBUG
       
  5179 --- a/storage/innobase/buf/buf0buddy.cc
       
  5180 +++ b/storage/innobase/buf/buf0buddy.cc
       
  5181 @@ -1,6 +1,6 @@
       
  5182  /*****************************************************************************
       
  5183  
       
  5184 -Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  5185 +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5186  
       
  5187  This program is free software; you can redistribute it and/or modify it under
       
  5188  the terms of the GNU General Public License as published by the Free Software
       
  5189 @@ -112,7 +112,7 @@ buf_buddy_mem_invalid(
       
  5190  /**********************************************************************//**
       
  5191  Check if a buddy is stamped free.
       
  5192  @return	whether the buddy is free */
       
  5193 -UNIV_INLINE __attribute__((warn_unused_result))
       
  5194 +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result))
       
  5195  bool
       
  5196  buf_buddy_stamp_is_free(
       
  5197  /*====================*/
       
  5198 @@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[].
       
  5199  @retval BUF_BUDDY_STATE_FREE if fully free
       
  5200  @retval BUF_BUDDY_STATE_USED if currently in use
       
  5201  @retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */
       
  5202 -static  __attribute__((warn_unused_result))
       
  5203 +static  MY_ATTRIBUTE((warn_unused_result))
       
  5204  buf_buddy_state_t
       
  5205  buf_buddy_is_free(
       
  5206  /*==============*/
       
  5207 --- a/storage/innobase/buf/buf0buf.cc
       
  5208 +++ b/storage/innobase/buf/buf0buf.cc
       
  5209 @@ -1,6 +1,6 @@
       
  5210  /*****************************************************************************
       
  5211  
       
  5212 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5213 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5214  Copyright (c) 2008, Google Inc.
       
  5215  
       
  5216  Portions of this file contain modifications contributed and copyrighted by
       
  5217 @@ -3470,7 +3470,7 @@ buf_page_init_low(
       
  5218  
       
  5219  /********************************************************************//**
       
  5220  Inits a page to the buffer buf_pool. */
       
  5221 -static __attribute__((nonnull))
       
  5222 +static MY_ATTRIBUTE((nonnull))
       
  5223  void
       
  5224  buf_page_init(
       
  5225  /*==========*/
       
  5226 --- a/storage/innobase/buf/buf0dump.cc
       
  5227 +++ b/storage/innobase/buf/buf0dump.cc
       
  5228 @@ -1,6 +1,6 @@
       
  5229  /*****************************************************************************
       
  5230  
       
  5231 -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5232 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5233  
       
  5234  This program is free software; you can redistribute it and/or modify it under
       
  5235  the terms of the GNU General Public License as published by the Free Software
       
  5236 @@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
       
  5237  variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
       
  5238  or by:
       
  5239  SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */
       
  5240 -static __attribute__((nonnull, format(printf, 2, 3)))
       
  5241 +static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
       
  5242  void
       
  5243  buf_dump_status(
       
  5244  /*============*/
       
  5245 @@ -141,7 +141,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
       
  5246  variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS';
       
  5247  or by:
       
  5248  SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */
       
  5249 -static __attribute__((nonnull, format(printf, 2, 3)))
       
  5250 +static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
       
  5251  void
       
  5252  buf_load_status(
       
  5253  /*============*/
       
  5254 @@ -594,7 +594,7 @@ extern "C" UNIV_INTERN
       
  5255  os_thread_ret_t
       
  5256  DECLARE_THREAD(buf_dump_thread)(
       
  5257  /*============================*/
       
  5258 -	void*	arg __attribute__((unused)))	/*!< in: a dummy parameter
       
  5259 +	void*	arg MY_ATTRIBUTE((unused)))	/*!< in: a dummy parameter
       
  5260  						required by os_thread_create */
       
  5261  {
       
  5262  	ut_ad(!srv_read_only_mode);
       
  5263 --- a/storage/innobase/buf/buf0flu.cc
       
  5264 +++ b/storage/innobase/buf/buf0flu.cc
       
  5265 @@ -1,6 +1,6 @@
       
  5266  /*****************************************************************************
       
  5267  
       
  5268 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5269 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5270  
       
  5271  This program is free software; you can redistribute it and/or modify it under
       
  5272  the terms of the GNU General Public License as published by the Free Software
       
  5273 @@ -2384,7 +2384,7 @@ extern "C" UNIV_INTERN
       
  5274  os_thread_ret_t
       
  5275  DECLARE_THREAD(buf_flush_page_cleaner_thread)(
       
  5276  /*==========================================*/
       
  5277 -	void*	arg __attribute__((unused)))
       
  5278 +	void*	arg MY_ATTRIBUTE((unused)))
       
  5279  			/*!< in: a dummy parameter required by
       
  5280  			os_thread_create */
       
  5281  {
       
  5282 --- a/storage/innobase/buf/buf0lru.cc
       
  5283 +++ b/storage/innobase/buf/buf0lru.cc
       
  5284 @@ -1,6 +1,6 @@
       
  5285  /*****************************************************************************
       
  5286  
       
  5287 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  5288 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5289  
       
  5290  This program is free software; you can redistribute it and/or modify it under
       
  5291  the terms of the GNU General Public License as published by the Free Software
       
  5292 @@ -142,7 +142,7 @@ If a compressed page is freed other compressed pages may be relocated.
       
  5293  caller needs to free the page to the free list
       
  5294  @retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In
       
  5295  this case the block is already returned to the buddy allocator. */
       
  5296 -static __attribute__((nonnull, warn_unused_result))
       
  5297 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5298  bool
       
  5299  buf_LRU_block_remove_hashed(
       
  5300  /*========================*/
       
  5301 @@ -366,7 +366,7 @@ want to hog the CPU and resources. Release the buffer pool and block
       
  5302  mutex and try to force a context switch. Then reacquire the same mutexes.
       
  5303  The current page is "fixed" before the release of the mutexes and then
       
  5304  "unfixed" again once we have reacquired the mutexes. */
       
  5305 -static	__attribute__((nonnull))
       
  5306 +static	MY_ATTRIBUTE((nonnull))
       
  5307  void
       
  5308  buf_flush_yield(
       
  5309  /*============*/
       
  5310 @@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer
       
  5311  pool and flush list mutex and do a thread yield. Set the current page
       
  5312  to "sticky" so that it is not relocated during the yield.
       
  5313  @return true if yielded */
       
  5314 -static	__attribute__((nonnull(1), warn_unused_result))
       
  5315 +static	MY_ATTRIBUTE((nonnull(1), warn_unused_result))
       
  5316  bool
       
  5317  buf_flush_try_yield(
       
  5318  /*================*/
       
  5319 @@ -450,7 +450,7 @@ buf_flush_try_yield(
       
  5320  Removes a single page from a given tablespace inside a specific
       
  5321  buffer pool instance.
       
  5322  @return true if page was removed. */
       
  5323 -static	__attribute__((nonnull, warn_unused_result))
       
  5324 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5325  bool
       
  5326  buf_flush_or_remove_page(
       
  5327  /*=====================*/
       
  5328 @@ -531,7 +531,7 @@ the list as they age towards the tail of the LRU.
       
  5329  @retval DB_SUCCESS if all freed
       
  5330  @retval DB_FAIL if not all freed
       
  5331  @retval DB_INTERRUPTED if the transaction was interrupted */
       
  5332 -static	__attribute__((nonnull(1), warn_unused_result))
       
  5333 +static	MY_ATTRIBUTE((nonnull(1), warn_unused_result))
       
  5334  dberr_t
       
  5335  buf_flush_or_remove_pages(
       
  5336  /*======================*/
       
  5337 @@ -637,7 +637,7 @@ Remove or flush all the dirty pages that belong to a given tablespace
       
  5338  inside a specific buffer pool instance. The pages will remain in the LRU
       
  5339  list and will be evicted from the LRU list as they age and move towards
       
  5340  the tail of the LRU list. */
       
  5341 -static __attribute__((nonnull(1)))
       
  5342 +static MY_ATTRIBUTE((nonnull(1)))
       
  5343  void
       
  5344  buf_flush_dirty_pages(
       
  5345  /*==================*/
       
  5346 @@ -677,7 +677,7 @@ buf_flush_dirty_pages(
       
  5347  /******************************************************************//**
       
  5348  Remove all pages that belong to a given tablespace inside a specific
       
  5349  buffer pool instance when we are DISCARDing the tablespace. */
       
  5350 -static __attribute__((nonnull))
       
  5351 +static MY_ATTRIBUTE((nonnull))
       
  5352  void
       
  5353  buf_LRU_remove_all_pages(
       
  5354  /*=====================*/
       
  5355 @@ -825,7 +825,7 @@ buffer pool instance when we are deleting the data file(s) of that
       
  5356  tablespace. The pages still remain a part of LRU and are evicted from
       
  5357  the list as they age towards the tail of the LRU only if buf_remove
       
  5358  is BUF_REMOVE_FLUSH_NO_WRITE. */
       
  5359 -static	__attribute__((nonnull(1)))
       
  5360 +static	MY_ATTRIBUTE((nonnull(1)))
       
  5361  void
       
  5362  buf_LRU_remove_pages(
       
  5363  /*=================*/
       
  5364 --- a/storage/innobase/data/data0data.cc
       
  5365 +++ b/storage/innobase/data/data0data.cc
       
  5366 @@ -1,6 +1,6 @@
       
  5367  /*****************************************************************************
       
  5368  
       
  5369 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  5370 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5371  
       
  5372  This program is free software; you can redistribute it and/or modify it under
       
  5373  the terms of the GNU General Public License as published by the Free Software
       
  5374 @@ -715,7 +715,7 @@ UNIV_INTERN
       
  5375  void
       
  5376  dtuple_convert_back_big_rec(
       
  5377  /*========================*/
       
  5378 -	dict_index_t*	index __attribute__((unused)),	/*!< in: index */
       
  5379 +	dict_index_t*	index MY_ATTRIBUTE((unused)),	/*!< in: index */
       
  5380  	dtuple_t*	entry,	/*!< in: entry whose data was put to vector */
       
  5381  	big_rec_t*	vector)	/*!< in, own: big rec vector; it is
       
  5382  				freed in this function */
       
  5383 --- a/storage/innobase/dict/dict0crea.cc
       
  5384 +++ b/storage/innobase/dict/dict0crea.cc
       
  5385 @@ -1,6 +1,6 @@
       
  5386  /*****************************************************************************
       
  5387  
       
  5388 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  5389 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5390  
       
  5391  This program is free software; you can redistribute it and/or modify it under
       
  5392  the terms of the GNU General Public License as published by the Free Software
       
  5393 @@ -246,7 +246,7 @@ dict_create_sys_columns_tuple(
       
  5394  /***************************************************************//**
       
  5395  Builds a table definition to insert.
       
  5396  @return	DB_SUCCESS or error code */
       
  5397 -static __attribute__((nonnull, warn_unused_result))
       
  5398 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5399  dberr_t
       
  5400  dict_build_table_def_step(
       
  5401  /*======================*/
       
  5402 @@ -573,7 +573,7 @@ dict_create_search_tuple(
       
  5403  /***************************************************************//**
       
  5404  Builds an index definition row to insert.
       
  5405  @return	DB_SUCCESS or error code */
       
  5406 -static __attribute__((nonnull, warn_unused_result))
       
  5407 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5408  dberr_t
       
  5409  dict_build_index_def_step(
       
  5410  /*======================*/
       
  5411 @@ -648,7 +648,7 @@ dict_build_field_def_step(
       
  5412  /***************************************************************//**
       
  5413  Creates an index tree for the index if it is not a member of a cluster.
       
  5414  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
  5415 -static __attribute__((nonnull, warn_unused_result))
       
  5416 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5417  dberr_t
       
  5418  dict_create_index_tree_step(
       
  5419  /*========================*/
       
  5420 @@ -1464,7 +1464,7 @@ dict_create_or_check_foreign_constraint_tables(void)
       
  5421  /****************************************************************//**
       
  5422  Evaluate the given foreign key SQL statement.
       
  5423  @return	error code or DB_SUCCESS */
       
  5424 -static __attribute__((nonnull, warn_unused_result))
       
  5425 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5426  dberr_t
       
  5427  dict_foreign_eval_sql(
       
  5428  /*==================*/
       
  5429 @@ -1530,7 +1530,7 @@ dict_foreign_eval_sql(
       
  5430  Add a single foreign key field definition to the data dictionary tables in
       
  5431  the database.
       
  5432  @return	error code or DB_SUCCESS */
       
  5433 -static __attribute__((nonnull, warn_unused_result))
       
  5434 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5435  dberr_t
       
  5436  dict_create_add_foreign_field_to_dictionary(
       
  5437  /*========================================*/
       
  5438 --- a/storage/innobase/dict/dict0load.cc
       
  5439 +++ b/storage/innobase/dict/dict0load.cc
       
  5440 @@ -1783,7 +1783,7 @@ Loads definitions for table indexes. Adds them to the data dictionary
       
  5441  cache.
       
  5442  @return DB_SUCCESS if ok, DB_CORRUPTION if corruption of dictionary
       
  5443  table or DB_UNSUPPORTED if table has unknown index type */
       
  5444 -static __attribute__((nonnull))
       
  5445 +static MY_ATTRIBUTE((nonnull))
       
  5446  dberr_t
       
  5447  dict_load_indexes(
       
  5448  /*==============*/
       
  5449 @@ -2789,7 +2789,7 @@ dict_load_foreign_cols(
       
  5450  /***********************************************************************//**
       
  5451  Loads a foreign key constraint to the dictionary cache.
       
  5452  @return	DB_SUCCESS or error code */
       
  5453 -static __attribute__((nonnull(1), warn_unused_result))
       
  5454 +static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
       
  5455  dberr_t
       
  5456  dict_load_foreign(
       
  5457  /*==============*/
       
  5458 --- a/storage/innobase/dict/dict0mem.cc
       
  5459 +++ b/storage/innobase/dict/dict0mem.cc
       
  5460 @@ -1,6 +1,6 @@
       
  5461  /*****************************************************************************
       
  5462  
       
  5463 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5464 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5465  Copyright (c) 2012, Facebook Inc.
       
  5466  
       
  5467  This program is free software; you can redistribute it and/or modify it under
       
  5468 @@ -264,7 +264,7 @@ dict_mem_table_add_col(
       
  5469  
       
  5470  /**********************************************************************//**
       
  5471  Renames a column of a table in the data dictionary cache. */
       
  5472 -static __attribute__((nonnull))
       
  5473 +static MY_ATTRIBUTE((nonnull))
       
  5474  void
       
  5475  dict_mem_table_col_rename_low(
       
  5476  /*==========================*/
       
  5477 --- a/storage/innobase/dict/dict0stats_bg.cc
       
  5478 +++ b/storage/innobase/dict/dict0stats_bg.cc
       
  5479 @@ -1,6 +1,6 @@
       
  5480  /*****************************************************************************
       
  5481  
       
  5482 -Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  5483 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5484  
       
  5485  This program is free software; you can redistribute it and/or modify it under
       
  5486  the terms of the GNU General Public License as published by the Free Software
       
  5487 @@ -331,7 +331,7 @@ extern "C" UNIV_INTERN
       
  5488  os_thread_ret_t
       
  5489  DECLARE_THREAD(dict_stats_thread)(
       
  5490  /*==============================*/
       
  5491 -	void*	arg __attribute__((unused)))	/*!< in: a dummy parameter
       
  5492 +	void*	arg MY_ATTRIBUTE((unused)))	/*!< in: a dummy parameter
       
  5493  						required by os_thread_create */
       
  5494  {
       
  5495  	ut_a(!srv_read_only_mode);
       
  5496 --- a/storage/innobase/fil/fil0fil.cc
       
  5497 +++ b/storage/innobase/fil/fil0fil.cc
       
  5498 @@ -1875,7 +1875,7 @@ fil_set_max_space_id_if_bigger(
       
  5499  Writes the flushed lsn and the latest archived log number to the page header
       
  5500  of the first page of a data file of the system tablespace (space 0),
       
  5501  which is uncompressed. */
       
  5502 -static __attribute__((warn_unused_result))
       
  5503 +static MY_ATTRIBUTE((warn_unused_result))
       
  5504  dberr_t
       
  5505  fil_write_lsn_and_arch_no_to_file(
       
  5506  /*==============================*/
       
  5507 @@ -1883,7 +1883,7 @@ fil_write_lsn_and_arch_no_to_file(
       
  5508  	ulint	sum_of_sizes,	/*!< in: combined size of previous files
       
  5509  				in space, in database pages */
       
  5510  	lsn_t	lsn,		/*!< in: lsn to write */
       
  5511 -	ulint	arch_log_no __attribute__((unused)))
       
  5512 +	ulint	arch_log_no MY_ATTRIBUTE((unused)))
       
  5513  				/*!< in: archived log number to write */
       
  5514  {
       
  5515  	byte*	buf1;
       
  5516 @@ -1970,7 +1970,7 @@ Checks the consistency of the first data page of a tablespace
       
  5517  at database startup.
       
  5518  @retval NULL on success, or if innodb_force_recovery is set
       
  5519  @return pointer to an error message string */
       
  5520 -static __attribute__((warn_unused_result))
       
  5521 +static MY_ATTRIBUTE((warn_unused_result))
       
  5522  const char*
       
  5523  fil_check_first_page(
       
  5524  /*=================*/
       
  5525 --- a/storage/innobase/fsp/fsp0fsp.cc
       
  5526 +++ b/storage/innobase/fsp/fsp0fsp.cc
       
  5527 @@ -1,6 +1,6 @@
       
  5528  /*****************************************************************************
       
  5529  
       
  5530 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  5531 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5532  
       
  5533  This program is free software; you can redistribute it and/or modify it under
       
  5534  the terms of the GNU General Public License as published by the Free Software
       
  5535 @@ -93,7 +93,7 @@ fseg_n_reserved_pages_low(
       
  5536  /********************************************************************//**
       
  5537  Marks a page used. The page must reside within the extents of the given
       
  5538  segment. */
       
  5539 -static __attribute__((nonnull))
       
  5540 +static MY_ATTRIBUTE((nonnull))
       
  5541  void
       
  5542  fseg_mark_page_used(
       
  5543  /*================*/
       
  5544 @@ -132,7 +132,7 @@ fsp_fill_free_list(
       
  5545  	ulint		space,		/*!< in: space */
       
  5546  	fsp_header_t*	header,		/*!< in/out: space header */
       
  5547  	mtr_t*		mtr)		/*!< in/out: mini-transaction */
       
  5548 -	UNIV_COLD __attribute__((nonnull));
       
  5549 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
  5550  /**********************************************************************//**
       
  5551  Allocates a single free page from a segment. This function implements
       
  5552  the intelligent allocation strategy which tries to minimize file space
       
  5553 @@ -161,7 +161,7 @@ fseg_alloc_free_page_low(
       
  5554  				in which the page should be initialized.
       
  5555  				If init_mtr!=mtr, but the page is already
       
  5556  				latched in mtr, do not initialize the page. */
       
  5557 -	__attribute__((warn_unused_result, nonnull));
       
  5558 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
  5559  #endif /* !UNIV_HOTBACKUP */
       
  5560  
       
  5561  /**********************************************************************//**
       
  5562 @@ -425,7 +425,7 @@ descriptor resides is x-locked. This function no longer extends the data
       
  5563  file.
       
  5564  @return pointer to the extent descriptor, NULL if the page does not
       
  5565  exist in the space or if the offset is >= the free limit */
       
  5566 -UNIV_INLINE __attribute__((nonnull, warn_unused_result))
       
  5567 +UNIV_INLINE MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5568  xdes_t*
       
  5569  xdes_get_descriptor_with_space_hdr(
       
  5570  /*===============================*/
       
  5571 @@ -487,7 +487,7 @@ is necessary to make the descriptor defined, as they are uninitialized
       
  5572  above the free limit.
       
  5573  @return pointer to the extent descriptor, NULL if the page does not
       
  5574  exist in the space or if the offset exceeds the free limit */
       
  5575 -static __attribute__((nonnull, warn_unused_result))
       
  5576 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5577  xdes_t*
       
  5578  xdes_get_descriptor(
       
  5579  /*================*/
       
  5580 @@ -614,7 +614,7 @@ byte*
       
  5581  fsp_parse_init_file_page(
       
  5582  /*=====================*/
       
  5583  	byte*		ptr,	/*!< in: buffer */
       
  5584 -	byte*		end_ptr __attribute__((unused)), /*!< in: buffer end */
       
  5585 +	byte*		end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
       
  5586  	buf_block_t*	block)	/*!< in: block or NULL */
       
  5587  {
       
  5588  	ut_ad(ptr && end_ptr);
       
  5589 @@ -850,7 +850,7 @@ fsp_header_get_tablespace_size(void)
       
  5590  Tries to extend a single-table tablespace so that a page would fit in the
       
  5591  data file.
       
  5592  @return	TRUE if success */
       
  5593 -static UNIV_COLD __attribute__((nonnull, warn_unused_result))
       
  5594 +static UNIV_COLD MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5595  ibool
       
  5596  fsp_try_extend_data_file_with_pages(
       
  5597  /*================================*/
       
  5598 @@ -882,7 +882,7 @@ fsp_try_extend_data_file_with_pages(
       
  5599  /***********************************************************************//**
       
  5600  Tries to extend the last data file of a tablespace if it is auto-extending.
       
  5601  @return	FALSE if not auto-extending */
       
  5602 -static UNIV_COLD __attribute__((nonnull))
       
  5603 +static UNIV_COLD MY_ATTRIBUTE((nonnull))
       
  5604  ibool
       
  5605  fsp_try_extend_data_file(
       
  5606  /*=====================*/
       
  5607 @@ -1236,7 +1236,7 @@ fsp_alloc_free_extent(
       
  5608  
       
  5609  /**********************************************************************//**
       
  5610  Allocates a single free page from a space. */
       
  5611 -static __attribute__((nonnull))
       
  5612 +static MY_ATTRIBUTE((nonnull))
       
  5613  void
       
  5614  fsp_alloc_from_free_frag(
       
  5615  /*=====================*/
       
  5616 @@ -1327,7 +1327,7 @@ Allocates a single free page from a space. The page is marked as used.
       
  5617  @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
       
  5618  (init_mtr == mtr, or the page was not previously freed in mtr)
       
  5619  @retval block (not allocated or initialized) otherwise */
       
  5620 -static __attribute__((nonnull, warn_unused_result))
       
  5621 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5622  buf_block_t*
       
  5623  fsp_alloc_free_page(
       
  5624  /*================*/
       
  5625 @@ -1576,9 +1576,9 @@ fsp_seg_inode_page_get_nth_inode(
       
  5626  /*=============================*/
       
  5627  	page_t*	page,	/*!< in: segment inode page */
       
  5628  	ulint	i,	/*!< in: inode index on page */
       
  5629 -	ulint	zip_size __attribute__((unused)),
       
  5630 +	ulint	zip_size MY_ATTRIBUTE((unused)),
       
  5631  			/*!< in: compressed page size, or 0 */
       
  5632 -	mtr_t*	mtr __attribute__((unused)))
       
  5633 +	mtr_t*	mtr MY_ATTRIBUTE((unused)))
       
  5634  			/*!< in/out: mini-transaction */
       
  5635  {
       
  5636  	ut_ad(i < FSP_SEG_INODES_PER_PAGE(zip_size));
       
  5637 @@ -1877,7 +1877,7 @@ fseg_get_nth_frag_page_no(
       
  5638  /*======================*/
       
  5639  	fseg_inode_t*	inode,	/*!< in: segment inode */
       
  5640  	ulint		n,	/*!< in: slot index */
       
  5641 -	mtr_t*		mtr __attribute__((unused)))
       
  5642 +	mtr_t*		mtr MY_ATTRIBUTE((unused)))
       
  5643  				/*!< in/out: mini-transaction */
       
  5644  {
       
  5645  	ut_ad(inode && mtr);
       
  5646 @@ -2958,7 +2958,7 @@ fsp_get_available_space_in_free_extents(
       
  5647  /********************************************************************//**
       
  5648  Marks a page used. The page must reside within the extents of the given
       
  5649  segment. */
       
  5650 -static __attribute__((nonnull))
       
  5651 +static MY_ATTRIBUTE((nonnull))
       
  5652  void
       
  5653  fseg_mark_page_used(
       
  5654  /*================*/
       
  5655 --- a/storage/innobase/fts/fts0blex.cc
       
  5656 +++ b/storage/innobase/fts/fts0blex.cc
       
  5657 @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
       
  5658  YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
       
  5659  YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
       
  5660  
       
  5661 -void *fts0balloc (yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  5662 -void *fts0brealloc (void *,yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  5663 -void fts0bfree (void * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  5664 +void *fts0balloc (yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  5665 +void *fts0brealloc (void *,yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  5666 +void fts0bfree (void * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  5667  
       
  5668  #define yy_new_buffer fts0b_create_buffer
       
  5669  
       
  5670 @@ -347,7 +347,7 @@ typedef int yy_state_type;
       
  5671  static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
       
  5672  static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
       
  5673  static int yy_get_next_buffer (yyscan_t yyscanner );
       
  5674 -static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  5675 +static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  5676  
       
  5677  /* Done after the current pattern has been matched and before the
       
  5678   * corresponding action - sets up yytext.
       
  5679 @@ -451,7 +451,7 @@ static yyconst flex_int16_t yy_chk[32] =
       
  5680  #line 1 "fts0blex.l"
       
  5681  /*****************************************************************************
       
  5682  
       
  5683 -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  5684 +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  5685  
       
  5686  This program is free software; you can redistribute it and/or modify it under
       
  5687  the terms of the GNU General Public License as published by the Free Software
       
  5688 @@ -579,11 +579,11 @@ extern int fts0bwrap (yyscan_t yyscanner );
       
  5689  #endif
       
  5690  
       
  5691  #ifndef yytext_ptr
       
  5692 -static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
       
  5693 +static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
       
  5694  #endif
       
  5695  
       
  5696  #ifdef YY_NEED_STRLEN
       
  5697 -static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
       
  5698 +static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
       
  5699  #endif
       
  5700  
       
  5701  #ifndef YY_NO_INPUT
       
  5702 @@ -1609,7 +1609,7 @@ YY_BUFFER_STATE fts0b_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , y
       
  5703  #define YY_EXIT_FAILURE 2
       
  5704  #endif
       
  5705  
       
  5706 -static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5707 +static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5708  {
       
  5709  	(void) fprintf( stderr, "%s\n", msg );
       
  5710  	exit( YY_EXIT_FAILURE );
       
  5711 @@ -1910,7 +1910,7 @@ int fts0blex_destroy  (yyscan_t yyscanner)
       
  5712   */
       
  5713  
       
  5714  #ifndef yytext_ptr
       
  5715 -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5716 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5717  {
       
  5718  	register int i;
       
  5719  	for ( i = 0; i < n; ++i )
       
  5720 @@ -1919,7 +1919,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yys
       
  5721  #endif
       
  5722  
       
  5723  #ifdef YY_NEED_STRLEN
       
  5724 -static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5725 +static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5726  {
       
  5727  	register int n;
       
  5728  	for ( n = 0; s[n]; ++n )
       
  5729 @@ -1929,12 +1929,12 @@ static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __at
       
  5730  }
       
  5731  #endif
       
  5732  
       
  5733 -void *fts0balloc (yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5734 +void *fts0balloc (yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5735  {
       
  5736  	return (void *) malloc( size );
       
  5737  }
       
  5738  
       
  5739 -void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5740 +void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5741  {
       
  5742  	/* The cast to (char *) in the following accommodates both
       
  5743  	 * implementations that use char* generic pointers, and those
       
  5744 @@ -1946,7 +1946,7 @@ void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner
       
  5745  	return (void *) realloc( (char *) ptr, size );
       
  5746  }
       
  5747  
       
  5748 -void fts0bfree (void * ptr ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  5749 +void fts0bfree (void * ptr ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  5750  {
       
  5751  	free( (char *) ptr );	/* see fts0brealloc() for (char *) cast */
       
  5752  }
       
  5753 --- a/storage/innobase/fts/fts0fts.cc
       
  5754 +++ b/storage/innobase/fts/fts0fts.cc
       
  5755 @@ -280,7 +280,7 @@ void
       
  5756  fts_words_free(
       
  5757  /*===========*/
       
  5758  	ib_rbt_t*	words)		/*!< in: rb tree of words */
       
  5759 -	__attribute__((nonnull));
       
  5760 +	MY_ATTRIBUTE((nonnull));
       
  5761  #ifdef FTS_CACHE_SIZE_DEBUG
       
  5762  /****************************************************************//**
       
  5763  Read the max cache size parameter from the config table. */
       
  5764 @@ -302,7 +302,7 @@ fts_add_doc_by_id(
       
  5765  /*==============*/
       
  5766  	fts_trx_table_t*ftt,		/*!< in: FTS trx table */
       
  5767  	doc_id_t	doc_id,		/*!< in: doc id */
       
  5768 -	ib_vector_t*	fts_indexes __attribute__((unused)));
       
  5769 +	ib_vector_t*	fts_indexes MY_ATTRIBUTE((unused)));
       
  5770  					/*!< in: affected fts indexes */
       
  5771  #ifdef FTS_DOC_STATS_DEBUG
       
  5772  /****************************************************************//**
       
  5773 @@ -317,7 +317,7 @@ fts_is_word_in_index(
       
  5774  	fts_table_t*	fts_table,	/*!< in: table instance */
       
  5775  	const fts_string_t* word,	/*!< in: the word to check */
       
  5776  	ibool*		found)		/*!< out: TRUE if exists */
       
  5777 -	__attribute__((nonnull, warn_unused_result));
       
  5778 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  5779  #endif /* FTS_DOC_STATS_DEBUG */
       
  5780  
       
  5781  /******************************************************************//**
       
  5782 @@ -332,7 +332,7 @@ fts_update_sync_doc_id(
       
  5783  	const char*		table_name,	/*!< in: table name, or NULL */
       
  5784  	doc_id_t		doc_id,		/*!< in: last document id */
       
  5785  	trx_t*			trx)		/*!< in: update trx, or NULL */
       
  5786 -	__attribute__((nonnull(1)));
       
  5787 +	MY_ATTRIBUTE((nonnull(1)));
       
  5788  
       
  5789  /****************************************************************//**
       
  5790  This function loads the default InnoDB stopword list */
       
  5791 @@ -1477,7 +1477,7 @@ fts_cache_add_doc(
       
  5792  /****************************************************************//**
       
  5793  Drops a table. If the table can't be found we return a SUCCESS code.
       
  5794  @return DB_SUCCESS or error code */
       
  5795 -static __attribute__((nonnull, warn_unused_result))
       
  5796 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5797  dberr_t
       
  5798  fts_drop_table(
       
  5799  /*===========*/
       
  5800 @@ -1519,7 +1519,7 @@ fts_drop_table(
       
  5801  /****************************************************************//**
       
  5802  Rename a single auxiliary table due to database name change.
       
  5803  @return DB_SUCCESS or error code */
       
  5804 -static __attribute__((nonnull, warn_unused_result))
       
  5805 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5806  dberr_t
       
  5807  fts_rename_one_aux_table(
       
  5808  /*=====================*/
       
  5809 @@ -1628,7 +1628,7 @@ Drops the common ancillary tables needed for supporting an FTS index
       
  5810  on the given table. row_mysql_lock_data_dictionary must have been called
       
  5811  before this.
       
  5812  @return DB_SUCCESS or error code */
       
  5813 -static __attribute__((nonnull, warn_unused_result))
       
  5814 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5815  dberr_t
       
  5816  fts_drop_common_tables(
       
  5817  /*===================*/
       
  5818 @@ -1755,7 +1755,7 @@ Drops FTS ancillary tables needed for supporting an FTS index
       
  5819  on the given table. row_mysql_lock_data_dictionary must have been called
       
  5820  before this.
       
  5821  @return DB_SUCCESS or error code */
       
  5822 -static __attribute__((nonnull, warn_unused_result))
       
  5823 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5824  dberr_t
       
  5825  fts_drop_all_index_tables(
       
  5826  /*======================*/
       
  5827 @@ -2663,7 +2663,7 @@ fts_get_next_doc_id(
       
  5828  This function fetch the Doc ID from CONFIG table, and compare with
       
  5829  the Doc ID supplied. And store the larger one to the CONFIG table.
       
  5830  @return DB_SUCCESS if OK */
       
  5831 -static __attribute__((nonnull))
       
  5832 +static MY_ATTRIBUTE((nonnull))
       
  5833  dberr_t
       
  5834  fts_cmp_set_sync_doc_id(
       
  5835  /*====================*/
       
  5836 @@ -2917,7 +2917,7 @@ fts_add(
       
  5837  /*********************************************************************//**
       
  5838  Do commit-phase steps necessary for the deletion of a row.
       
  5839  @return DB_SUCCESS or error code */
       
  5840 -static __attribute__((nonnull, warn_unused_result))
       
  5841 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5842  dberr_t
       
  5843  fts_delete(
       
  5844  /*=======*/
       
  5845 @@ -3008,7 +3008,7 @@ fts_delete(
       
  5846  /*********************************************************************//**
       
  5847  Do commit-phase steps necessary for the modification of a row.
       
  5848  @return DB_SUCCESS or error code */
       
  5849 -static __attribute__((nonnull, warn_unused_result))
       
  5850 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5851  dberr_t
       
  5852  fts_modify(
       
  5853  /*=======*/
       
  5854 @@ -3079,7 +3079,7 @@ fts_create_doc_id(
       
  5855  The given transaction is about to be committed; do whatever is necessary
       
  5856  from the FTS system's POV.
       
  5857  @return DB_SUCCESS or error code */
       
  5858 -static __attribute__((nonnull, warn_unused_result))
       
  5859 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5860  dberr_t
       
  5861  fts_commit_table(
       
  5862  /*=============*/
       
  5863 @@ -3412,7 +3412,7 @@ fts_add_doc_by_id(
       
  5864  /*==============*/
       
  5865  	fts_trx_table_t*ftt,		/*!< in: FTS trx table */
       
  5866  	doc_id_t	doc_id,		/*!< in: doc id */
       
  5867 -	ib_vector_t*	fts_indexes __attribute__((unused)))
       
  5868 +	ib_vector_t*	fts_indexes MY_ATTRIBUTE((unused)))
       
  5869  					/*!< in: affected fts indexes */
       
  5870  {
       
  5871  	mtr_t		mtr;
       
  5872 @@ -3532,7 +3532,7 @@ fts_add_doc_by_id(
       
  5873  				get_doc, clust_index, doc_pcur, offsets, &doc);
       
  5874  
       
  5875  			if (doc.found) {
       
  5876 -				ibool	success __attribute__((unused));
       
  5877 +				ibool	success MY_ATTRIBUTE((unused));
       
  5878  
       
  5879  				btr_pcur_store_position(doc_pcur, &mtr);
       
  5880  				mtr_commit(&mtr);
       
  5881 @@ -3641,7 +3641,7 @@ fts_get_max_doc_id(
       
  5882  	dict_table_t*	table)		/*!< in: user table */
       
  5883  {
       
  5884  	dict_index_t*	index;
       
  5885 -	dict_field_t*	dfield __attribute__((unused)) = NULL;
       
  5886 +	dict_field_t*	dfield MY_ATTRIBUTE((unused)) = NULL;
       
  5887  	doc_id_t	doc_id = 0;
       
  5888  	mtr_t		mtr;
       
  5889  	btr_pcur_t	pcur;
       
  5890 @@ -3899,7 +3899,7 @@ fts_write_node(
       
  5891  /*********************************************************************//**
       
  5892  Add rows to the DELETED_CACHE table.
       
  5893  @return DB_SUCCESS if all went well else error code*/
       
  5894 -static __attribute__((nonnull, warn_unused_result))
       
  5895 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5896  dberr_t
       
  5897  fts_sync_add_deleted_cache(
       
  5898  /*=======================*/
       
  5899 @@ -3953,7 +3953,7 @@ fts_sync_add_deleted_cache(
       
  5900  @param[in]	index_cache	index cache
       
  5901  @param[in]	unlock_cache	whether unlock cache when write node
       
  5902  @return DB_SUCCESS if all went well else error code */
       
  5903 -static __attribute__((nonnull, warn_unused_result))
       
  5904 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5905  dberr_t
       
  5906  fts_sync_write_words(
       
  5907  	trx_t*			trx,
       
  5908 @@ -4089,7 +4089,7 @@ fts_sync_write_words(
       
  5909  /*********************************************************************//**
       
  5910  Write a single documents statistics to disk.
       
  5911  @return DB_SUCCESS if all went well else error code */
       
  5912 -static __attribute__((nonnull, warn_unused_result))
       
  5913 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5914  dberr_t
       
  5915  fts_sync_write_doc_stat(
       
  5916  /*====================*/
       
  5917 @@ -4343,7 +4343,7 @@ fts_sync_begin(
       
  5918  Run SYNC on the table, i.e., write out data from the index specific
       
  5919  cache to the FTS aux INDEX table and FTS aux doc id stats table.
       
  5920  @return DB_SUCCESS if all OK */
       
  5921 -static __attribute__((nonnull, warn_unused_result))
       
  5922 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5923  dberr_t
       
  5924  fts_sync_index(
       
  5925  /*===========*/
       
  5926 @@ -4411,7 +4411,7 @@ fts_sync_index_check(
       
  5927  /*********************************************************************//**
       
  5928  Commit the SYNC, change state of processed doc ids etc.
       
  5929  @return DB_SUCCESS if all OK */
       
  5930 -static  __attribute__((nonnull, warn_unused_result))
       
  5931 +static  MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5932  dberr_t
       
  5933  fts_sync_commit(
       
  5934  /*============*/
       
  5935 @@ -6169,7 +6169,7 @@ fts_update_hex_format_flag(
       
  5936  /*********************************************************************//**
       
  5937  Rename an aux table to HEX format. It's called when "%016llu" is used
       
  5938  to format an object id in table name, which only happens in Windows. */
       
  5939 -static __attribute__((nonnull, warn_unused_result))
       
  5940 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5941  dberr_t
       
  5942  fts_rename_one_aux_table_to_hex_format(
       
  5943  /*===================================*/
       
  5944 @@ -6260,7 +6260,7 @@ Note the ids in tables are correct but the names are old ambiguous ones.
       
  5945  
       
  5946  This function should make sure that either all the parent table and aux tables
       
  5947  are set DICT_TF2_FTS_AUX_HEX_NAME with flags2 or none of them are set */
       
  5948 -static __attribute__((nonnull, warn_unused_result))
       
  5949 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5950  dberr_t
       
  5951  fts_rename_aux_tables_to_hex_format_low(
       
  5952  /*====================================*/
       
  5953 @@ -6414,7 +6414,7 @@ fts_fake_hex_to_dec(
       
  5954  {
       
  5955  	ib_id_t		dec_id = 0;
       
  5956  	char		tmp_id[FTS_AUX_MIN_TABLE_ID_LENGTH];
       
  5957 -	int		ret __attribute__((unused));
       
  5958 +	int		ret MY_ATTRIBUTE((unused));
       
  5959  
       
  5960  	ret = sprintf(tmp_id, UINT64PFx, id);
       
  5961  	ut_ad(ret == 16);
       
  5962 @@ -6736,7 +6736,7 @@ fts_drop_aux_table_from_vector(
       
  5963  Check and drop all orphaned FTS auxiliary tables, those that don't have
       
  5964  a parent table or FTS index defined on them.
       
  5965  @return DB_SUCCESS or error code */
       
  5966 -static __attribute__((nonnull))
       
  5967 +static MY_ATTRIBUTE((nonnull))
       
  5968  void
       
  5969  fts_check_and_drop_orphaned_tables(
       
  5970  /*===============================*/
       
  5971 --- a/storage/innobase/fts/fts0opt.cc
       
  5972 +++ b/storage/innobase/fts/fts0opt.cc
       
  5973 @@ -797,7 +797,7 @@ fts_zip_deflate_end(
       
  5974  Read the words from the FTS INDEX.
       
  5975  @return DB_SUCCESS if all OK, DB_TABLE_NOT_FOUND if no more indexes
       
  5976          to search else error code */
       
  5977 -static __attribute__((nonnull, warn_unused_result))
       
  5978 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  5979  dberr_t
       
  5980  fts_index_fetch_words(
       
  5981  /*==================*/
       
  5982 @@ -1131,7 +1131,7 @@ fts_optimize_lookup(
       
  5983  /**********************************************************************//**
       
  5984  Encode the word pos list into the node
       
  5985  @return DB_SUCCESS or error code*/
       
  5986 -static __attribute__((nonnull))
       
  5987 +static MY_ATTRIBUTE((nonnull))
       
  5988  dberr_t
       
  5989  fts_optimize_encode_node(
       
  5990  /*=====================*/
       
  5991 @@ -1220,7 +1220,7 @@ fts_optimize_encode_node(
       
  5992  /**********************************************************************//**
       
  5993  Optimize the data contained in a node.
       
  5994  @return DB_SUCCESS or error code*/
       
  5995 -static __attribute__((nonnull))
       
  5996 +static MY_ATTRIBUTE((nonnull))
       
  5997  dberr_t
       
  5998  fts_optimize_node(
       
  5999  /*==============*/
       
  6000 @@ -1318,7 +1318,7 @@ test_again:
       
  6001  /**********************************************************************//**
       
  6002  Determine the starting pos within the deleted doc id vector for a word.
       
  6003  @return delete position */
       
  6004 -static __attribute__((nonnull, warn_unused_result))
       
  6005 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6006  int
       
  6007  fts_optimize_deleted_pos(
       
  6008  /*=====================*/
       
  6009 @@ -1447,7 +1447,7 @@ fts_optimize_word(
       
  6010  /**********************************************************************//**
       
  6011  Update the FTS index table. This is a delete followed by an insert.
       
  6012  @return DB_SUCCESS or error code */
       
  6013 -static __attribute__((nonnull, warn_unused_result))
       
  6014 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6015  dberr_t
       
  6016  fts_optimize_write_word(
       
  6017  /*====================*/
       
  6018 @@ -1550,7 +1550,7 @@ fts_word_free(
       
  6019  /**********************************************************************//**
       
  6020  Optimize the word ilist and rewrite data to the FTS index.
       
  6021  @return status one of RESTART, EXIT, ERROR */
       
  6022 -static __attribute__((nonnull, warn_unused_result))
       
  6023 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6024  dberr_t
       
  6025  fts_optimize_compact(
       
  6026  /*=================*/
       
  6027 @@ -1645,7 +1645,7 @@ fts_optimize_create(
       
  6028  /**********************************************************************//**
       
  6029  Get optimize start time of an FTS index.
       
  6030  @return DB_SUCCESS if all OK else error code */
       
  6031 -static __attribute__((nonnull, warn_unused_result))
       
  6032 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6033  dberr_t
       
  6034  fts_optimize_get_index_start_time(
       
  6035  /*==============================*/
       
  6036 @@ -1661,7 +1661,7 @@ fts_optimize_get_index_start_time(
       
  6037  /**********************************************************************//**
       
  6038  Set the optimize start time of an FTS index.
       
  6039  @return DB_SUCCESS if all OK else error code */
       
  6040 -static __attribute__((nonnull, warn_unused_result))
       
  6041 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6042  dberr_t
       
  6043  fts_optimize_set_index_start_time(
       
  6044  /*==============================*/
       
  6045 @@ -1677,7 +1677,7 @@ fts_optimize_set_index_start_time(
       
  6046  /**********************************************************************//**
       
  6047  Get optimize end time of an FTS index.
       
  6048  @return DB_SUCCESS if all OK else error code */
       
  6049 -static __attribute__((nonnull, warn_unused_result))
       
  6050 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6051  dberr_t
       
  6052  fts_optimize_get_index_end_time(
       
  6053  /*============================*/
       
  6054 @@ -1692,7 +1692,7 @@ fts_optimize_get_index_end_time(
       
  6055  /**********************************************************************//**
       
  6056  Set the optimize end time of an FTS index.
       
  6057  @return DB_SUCCESS if all OK else error code */
       
  6058 -static __attribute__((nonnull, warn_unused_result))
       
  6059 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6060  dberr_t
       
  6061  fts_optimize_set_index_end_time(
       
  6062  /*============================*/
       
  6063 @@ -1912,7 +1912,7 @@ fts_optimize_set_next_word(
       
  6064  Optimize is complete. Set the completion time, and reset the optimize
       
  6065  start string for this FTS index to "".
       
  6066  @return DB_SUCCESS if all OK */
       
  6067 -static __attribute__((nonnull, warn_unused_result))
       
  6068 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6069  dberr_t
       
  6070  fts_optimize_index_completed(
       
  6071  /*=========================*/
       
  6072 @@ -1952,7 +1952,7 @@ fts_optimize_index_completed(
       
  6073  Read the list of words from the FTS auxiliary index that will be
       
  6074  optimized in this pass.
       
  6075  @return DB_SUCCESS if all OK */
       
  6076 -static __attribute__((nonnull, warn_unused_result))
       
  6077 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6078  dberr_t
       
  6079  fts_optimize_index_read_words(
       
  6080  /*==========================*/
       
  6081 @@ -2009,7 +2009,7 @@ fts_optimize_index_read_words(
       
  6082  Run OPTIMIZE on the given FTS index. Note: this can take a very long
       
  6083  time (hours).
       
  6084  @return DB_SUCCESS if all OK */
       
  6085 -static __attribute__((nonnull, warn_unused_result))
       
  6086 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6087  dberr_t
       
  6088  fts_optimize_index(
       
  6089  /*===============*/
       
  6090 @@ -2080,7 +2080,7 @@ fts_optimize_index(
       
  6091  /**********************************************************************//**
       
  6092  Delete the document ids in the delete, and delete cache tables.
       
  6093  @return DB_SUCCESS if all OK */
       
  6094 -static __attribute__((nonnull, warn_unused_result))
       
  6095 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6096  dberr_t
       
  6097  fts_optimize_purge_deleted_doc_ids(
       
  6098  /*===============================*/
       
  6099 @@ -2149,7 +2149,7 @@ fts_optimize_purge_deleted_doc_ids(
       
  6100  /**********************************************************************//**
       
  6101  Delete the document ids in the pending delete, and delete tables.
       
  6102  @return DB_SUCCESS if all OK */
       
  6103 -static __attribute__((nonnull, warn_unused_result))
       
  6104 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6105  dberr_t
       
  6106  fts_optimize_purge_deleted_doc_id_snapshot(
       
  6107  /*=======================================*/
       
  6108 @@ -2199,7 +2199,7 @@ Copy the deleted doc ids that will be purged during this optimize run
       
  6109  to the being deleted FTS auxiliary tables. The transaction is committed
       
  6110  upon successfull copy and rolled back on DB_DUPLICATE_KEY error.
       
  6111  @return DB_SUCCESS if all OK */
       
  6112 -static __attribute__((nonnull, warn_unused_result))
       
  6113 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6114  dberr_t
       
  6115  fts_optimize_create_deleted_doc_id_snapshot(
       
  6116  /*========================================*/
       
  6117 @@ -2237,7 +2237,7 @@ fts_optimize_create_deleted_doc_id_snapshot(
       
  6118  Read in the document ids that are to be purged during optimize. The
       
  6119  transaction is committed upon successfully read.
       
  6120  @return DB_SUCCESS if all OK */
       
  6121 -static __attribute__((nonnull, warn_unused_result))
       
  6122 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6123  dberr_t
       
  6124  fts_optimize_read_deleted_doc_id_snapshot(
       
  6125  /*======================================*/
       
  6126 @@ -2274,7 +2274,7 @@ Optimze all the FTS indexes, skipping those that have already been
       
  6127  optimized, since the FTS auxiliary indexes are not guaranteed to be
       
  6128  of the same cardinality.
       
  6129  @return DB_SUCCESS if all OK */
       
  6130 -static __attribute__((nonnull, warn_unused_result))
       
  6131 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6132  dberr_t
       
  6133  fts_optimize_indexes(
       
  6134  /*=================*/
       
  6135 @@ -2344,7 +2344,7 @@ fts_optimize_indexes(
       
  6136  /*********************************************************************//**
       
  6137  Cleanup the snapshot tables and the master deleted table.
       
  6138  @return DB_SUCCESS if all OK */
       
  6139 -static __attribute__((nonnull, warn_unused_result))
       
  6140 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6141  dberr_t
       
  6142  fts_optimize_purge_snapshot(
       
  6143  /*========================*/
       
  6144 @@ -2373,7 +2373,7 @@ fts_optimize_purge_snapshot(
       
  6145  /*********************************************************************//**
       
  6146  Reset the start time to 0 so that a new optimize can be started.
       
  6147  @return DB_SUCCESS if all OK */
       
  6148 -static __attribute__((nonnull, warn_unused_result))
       
  6149 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6150  dberr_t
       
  6151  fts_optimize_reset_start_time(
       
  6152  /*==========================*/
       
  6153 @@ -2412,7 +2412,7 @@ fts_optimize_reset_start_time(
       
  6154  /*********************************************************************//**
       
  6155  Run OPTIMIZE on the given table by a background thread.
       
  6156  @return DB_SUCCESS if all OK */
       
  6157 -static __attribute__((nonnull))
       
  6158 +static MY_ATTRIBUTE((nonnull))
       
  6159  dberr_t
       
  6160  fts_optimize_table_bk(
       
  6161  /*==================*/
       
  6162 --- a/storage/innobase/fts/fts0que.cc
       
  6163 +++ b/storage/innobase/fts/fts0que.cc
       
  6164 @@ -1,6 +1,6 @@
       
  6165  /*****************************************************************************
       
  6166  
       
  6167 -Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  6168 +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  6169  
       
  6170  This program is free software; you can redistribute it and/or modify it under
       
  6171  the terms of the GNU General Public License as published by the Free Software
       
  6172 @@ -287,7 +287,7 @@ fts_expand_query(
       
  6173  	dict_index_t*	index,		/*!< in: FTS index to search */
       
  6174  	fts_query_t*	query)		/*!< in: query result, to be freed
       
  6175  					by the client */
       
  6176 -	__attribute__((nonnull, warn_unused_result));
       
  6177 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  6178  /*************************************************************//**
       
  6179  This function finds documents that contain all words in a
       
  6180  phrase or proximity search. And if proximity search, verify
       
  6181 @@ -1128,7 +1128,7 @@ cont_search:
       
  6182  /*****************************************************************//**
       
  6183  Set difference.
       
  6184  @return DB_SUCCESS if all go well */
       
  6185 -static __attribute__((nonnull, warn_unused_result))
       
  6186 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6187  dberr_t
       
  6188  fts_query_difference(
       
  6189  /*=================*/
       
  6190 @@ -1220,7 +1220,7 @@ fts_query_difference(
       
  6191  /*****************************************************************//**
       
  6192  Intersect the token doc ids with the current set.
       
  6193  @return DB_SUCCESS if all go well */
       
  6194 -static __attribute__((nonnull, warn_unused_result))
       
  6195 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6196  dberr_t
       
  6197  fts_query_intersect(
       
  6198  /*================*/
       
  6199 @@ -1398,7 +1398,7 @@ fts_query_cache(
       
  6200  /*****************************************************************//**
       
  6201  Set union.
       
  6202  @return DB_SUCCESS if all go well */
       
  6203 -static __attribute__((nonnull, warn_unused_result))
       
  6204 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6205  dberr_t
       
  6206  fts_query_union(
       
  6207  /*============*/
       
  6208 @@ -2014,7 +2014,7 @@ fts_query_select(
       
  6209  Read the rows from the FTS index, that match word and where the
       
  6210  doc id is between first and last doc id.
       
  6211  @return DB_SUCCESS if all go well else error code */
       
  6212 -static __attribute__((nonnull, warn_unused_result))
       
  6213 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6214  dberr_t
       
  6215  fts_query_find_term(
       
  6216  /*================*/
       
  6217 @@ -2154,7 +2154,7 @@ fts_query_sum(
       
  6218  /********************************************************************
       
  6219  Calculate the total documents that contain a particular word (term).
       
  6220  @return DB_SUCCESS if all go well else error code */
       
  6221 -static __attribute__((nonnull, warn_unused_result))
       
  6222 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6223  dberr_t
       
  6224  fts_query_total_docs_containing_term(
       
  6225  /*=================================*/
       
  6226 @@ -2233,7 +2233,7 @@ fts_query_total_docs_containing_term(
       
  6227  /********************************************************************
       
  6228  Get the total number of words in a documents.
       
  6229  @return DB_SUCCESS if all go well else error code */
       
  6230 -static __attribute__((nonnull, warn_unused_result))
       
  6231 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6232  dberr_t
       
  6233  fts_query_terms_in_document(
       
  6234  /*========================*/
       
  6235 @@ -2314,7 +2314,7 @@ fts_query_terms_in_document(
       
  6236  /*****************************************************************//**
       
  6237  Retrieve the document and match the phrase tokens.
       
  6238  @return DB_SUCCESS or error code */
       
  6239 -static __attribute__((nonnull, warn_unused_result))
       
  6240 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6241  dberr_t
       
  6242  fts_query_match_document(
       
  6243  /*=====================*/
       
  6244 @@ -2360,7 +2360,7 @@ fts_query_match_document(
       
  6245  This function fetches the original documents and count the
       
  6246  words in between matching words to see that is in specified distance
       
  6247  @return DB_SUCCESS if all OK */
       
  6248 -static __attribute__((nonnull, warn_unused_result))
       
  6249 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6250  bool
       
  6251  fts_query_is_in_proximity_range(
       
  6252  /*============================*/
       
  6253 @@ -2415,7 +2415,7 @@ fts_query_is_in_proximity_range(
       
  6254  Iterate over the matched document ids and search the for the
       
  6255  actual phrase in the text.
       
  6256  @return DB_SUCCESS if all OK */
       
  6257 -static __attribute__((nonnull, warn_unused_result))
       
  6258 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6259  dberr_t
       
  6260  fts_query_search_phrase(
       
  6261  /*====================*/
       
  6262 @@ -2503,7 +2503,7 @@ func_exit:
       
  6263  /*****************************************************************//**
       
  6264  Text/Phrase search.
       
  6265  @return DB_SUCCESS or error code */
       
  6266 -static __attribute__((nonnull, warn_unused_result))
       
  6267 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6268  dberr_t
       
  6269  fts_query_phrase_search(
       
  6270  /*====================*/
       
  6271 @@ -2754,7 +2754,7 @@ func_exit:
       
  6272  /*****************************************************************//**
       
  6273  Find the word and evaluate.
       
  6274  @return DB_SUCCESS if all go well */
       
  6275 -static __attribute__((nonnull, warn_unused_result))
       
  6276 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6277  dberr_t
       
  6278  fts_query_execute(
       
  6279  /*==============*/
       
  6280 @@ -4123,7 +4123,7 @@ words in documents found in the first search pass will be used as
       
  6281  search arguments to search the document again, thus "expand"
       
  6282  the search result set.
       
  6283  @return DB_SUCCESS if success, otherwise the error code */
       
  6284 -static __attribute__((nonnull, warn_unused_result))
       
  6285 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6286  dberr_t
       
  6287  fts_expand_query(
       
  6288  /*=============*/
       
  6289 --- a/storage/innobase/fts/fts0tlex.cc
       
  6290 +++ b/storage/innobase/fts/fts0tlex.cc
       
  6291 @@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
       
  6292  YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
       
  6293  YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
       
  6294  
       
  6295 -void *fts0talloc (yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  6296 -void *fts0trealloc (void *,yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  6297 -void fts0tfree (void * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  6298 +void *fts0talloc (yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  6299 +void *fts0trealloc (void *,yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  6300 +void fts0tfree (void * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  6301  
       
  6302  #define yy_new_buffer fts0t_create_buffer
       
  6303  
       
  6304 @@ -347,7 +347,7 @@ typedef int yy_state_type;
       
  6305  static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
       
  6306  static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
       
  6307  static int yy_get_next_buffer (yyscan_t yyscanner );
       
  6308 -static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
       
  6309 +static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
       
  6310  
       
  6311  /* Done after the current pattern has been matched and before the
       
  6312   * corresponding action - sets up yytext.
       
  6313 @@ -447,7 +447,7 @@ static yyconst flex_int16_t yy_chk[29] =
       
  6314  #line 1 "fts0tlex.l"
       
  6315  /*****************************************************************************
       
  6316  
       
  6317 -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  6318 +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  6319  
       
  6320  This program is free software; you can redistribute it and/or modify it under
       
  6321  the terms of the GNU General Public License as published by the Free Software
       
  6322 @@ -575,11 +575,11 @@ extern int fts0twrap (yyscan_t yyscanner );
       
  6323  #endif
       
  6324  
       
  6325  #ifndef yytext_ptr
       
  6326 -static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
       
  6327 +static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
       
  6328  #endif
       
  6329  
       
  6330  #ifdef YY_NEED_STRLEN
       
  6331 -static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
       
  6332 +static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
       
  6333  #endif
       
  6334  
       
  6335  #ifndef YY_NO_INPUT
       
  6336 @@ -1602,7 +1602,7 @@ YY_BUFFER_STATE fts0t_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , y
       
  6337  #define YY_EXIT_FAILURE 2
       
  6338  #endif
       
  6339  
       
  6340 -static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6341 +static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6342  {
       
  6343      	(void) fprintf( stderr, "%s\n", msg );
       
  6344  	exit( YY_EXIT_FAILURE );
       
  6345 @@ -1903,7 +1903,7 @@ int fts0tlex_destroy  (yyscan_t yyscanner)
       
  6346   */
       
  6347  
       
  6348  #ifndef yytext_ptr
       
  6349 -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6350 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6351  {
       
  6352  	register int i;
       
  6353  	for ( i = 0; i < n; ++i )
       
  6354 @@ -1912,7 +1912,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yys
       
  6355  #endif
       
  6356  
       
  6357  #ifdef YY_NEED_STRLEN
       
  6358 -static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6359 +static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6360  {
       
  6361  	register int n;
       
  6362  	for ( n = 0; s[n]; ++n )
       
  6363 @@ -1922,12 +1922,12 @@ static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __at
       
  6364  }
       
  6365  #endif
       
  6366  
       
  6367 -void *fts0talloc (yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6368 +void *fts0talloc (yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6369  {
       
  6370  	return (void *) malloc( size );
       
  6371  }
       
  6372  
       
  6373 -void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6374 +void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6375  {
       
  6376  	/* The cast to (char *) in the following accommodates both
       
  6377  	 * implementations that use char* generic pointers, and those
       
  6378 @@ -1939,7 +1939,7 @@ void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner
       
  6379  	return (void *) realloc( (char *) ptr, size );
       
  6380  }
       
  6381  
       
  6382 -void fts0tfree (void * ptr ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
       
  6383 +void fts0tfree (void * ptr ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
       
  6384  {
       
  6385  	free( (char *) ptr );	/* see fts0trealloc() for (char *) cast */
       
  6386  }
       
  6387 --- a/storage/innobase/fts/make_parser.sh
       
  6388 +++ b/storage/innobase/fts/make_parser.sh
       
  6389 @@ -1,6 +1,6 @@
       
  6390  #!/bin/sh
       
  6391  #
       
  6392 -# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
  6393 +# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  6394  #
       
  6395  # This program is free software; you can redistribute it and/or modify it under
       
  6396  # the terms of the GNU General Public License as published by the Free Software
       
  6397 @@ -22,15 +22,15 @@ make -f Makefile.query
       
  6398  echo '#include "univ.i"' > $TMPF
       
  6399  
       
  6400  # This is to avoid compiler warning about unused parameters.
       
  6401 -# FIXME: gcc extension "__attribute__" causing compilation errors on windows
       
  6402 +# FIXME: gcc extension "MY_ATTRIBUTE" causing compilation errors on windows
       
  6403  # platform. Quote them out for now.
       
  6404  sed -e '
       
  6405 -s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6406 -s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6407 -s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6408 -s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6409 -s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6410 -s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6411 +s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6412 +s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6413 +s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6414 +s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6415 +s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6416 +s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6417  ' < fts0blex.cc >> $TMPF
       
  6418  
       
  6419  mv $TMPF fts0blex.cc
       
  6420 @@ -38,12 +38,12 @@ mv $TMPF fts0blex.cc
       
  6421  echo '#include "univ.i"' > $TMPF
       
  6422  
       
  6423  sed -e '
       
  6424 -s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6425 -s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6426 -s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
       
  6427 -s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6428 -s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6429 -s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
       
  6430 +s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6431 +s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6432 +s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
       
  6433 +s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6434 +s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6435 +s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
       
  6436  ' < fts0tlex.cc >> $TMPF
       
  6437  
       
  6438  mv $TMPF fts0tlex.cc
       
  6439 --- a/storage/innobase/handler/ha_innodb.cc
       
  6440 +++ b/storage/innobase/handler/ha_innodb.cc
       
  6441 @@ -1425,7 +1425,7 @@ thd_set_lock_wait_time(
       
  6442  /********************************************************************//**
       
  6443  Obtain the InnoDB transaction of a MySQL thread.
       
  6444  @return	reference to transaction pointer */
       
  6445 -__attribute__((warn_unused_result, nonnull))
       
  6446 +MY_ATTRIBUTE((warn_unused_result, nonnull))
       
  6447  static inline
       
  6448  trx_t*&
       
  6449  thd_to_trx(
       
  6450 @@ -3486,7 +3486,7 @@ int
       
  6451  innobase_end(
       
  6452  /*=========*/
       
  6453  	handlerton*		hton,	/*!< in/out: InnoDB handlerton */
       
  6454 -	ha_panic_function	type __attribute__((unused)))
       
  6455 +	ha_panic_function	type MY_ATTRIBUTE((unused)))
       
  6456  					/*!< in: ha_panic() parameter */
       
  6457  {
       
  6458  	int	err= 0;
       
  6459 @@ -8612,7 +8612,7 @@ create_table_check_doc_id_col(
       
  6460  
       
  6461  /*****************************************************************//**
       
  6462  Creates a table definition to an InnoDB database. */
       
  6463 -static __attribute__((nonnull, warn_unused_result))
       
  6464 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6465  int
       
  6466  create_table_def(
       
  6467  /*=============*/
       
  6468 @@ -10325,7 +10325,7 @@ innobase_drop_database(
       
  6469  /*********************************************************************//**
       
  6470  Renames an InnoDB table.
       
  6471  @return DB_SUCCESS or error code */
       
  6472 -static __attribute__((nonnull, warn_unused_result))
       
  6473 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6474  dberr_t
       
  6475  innobase_rename_table(
       
  6476  /*==================*/
       
  6477 @@ -15235,7 +15235,7 @@ static char* srv_buffer_pool_evict;
       
  6478  Evict all uncompressed pages of compressed tables from the buffer pool.
       
  6479  Keep the compressed pages in the buffer pool.
       
  6480  @return whether all uncompressed pages were evicted */
       
  6481 -static __attribute__((warn_unused_result))
       
  6482 +static MY_ATTRIBUTE((warn_unused_result))
       
  6483  bool
       
  6484  innodb_buffer_pool_evict_uncompressed(void)
       
  6485  /*=======================================*/
       
  6486 @@ -15563,13 +15563,13 @@ void
       
  6487  purge_run_now_set(
       
  6488  /*==============*/
       
  6489  	THD*				thd	/*!< in: thread handle */
       
  6490 -					__attribute__((unused)),
       
  6491 +					MY_ATTRIBUTE((unused)),
       
  6492  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6493  						variable */
       
  6494 -					__attribute__((unused)),
       
  6495 +					MY_ATTRIBUTE((unused)),
       
  6496  	void*				var_ptr	/*!< out: where the formal
       
  6497  						string goes */
       
  6498 -					__attribute__((unused)),
       
  6499 +					MY_ATTRIBUTE((unused)),
       
  6500  	const void*			save)	/*!< in: immediate result from
       
  6501  						check function */
       
  6502  {
       
  6503 @@ -15586,13 +15586,13 @@ void
       
  6504  purge_stop_now_set(
       
  6505  /*===============*/
       
  6506  	THD*				thd	/*!< in: thread handle */
       
  6507 -					__attribute__((unused)),
       
  6508 +					MY_ATTRIBUTE((unused)),
       
  6509  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6510  						variable */
       
  6511 -					__attribute__((unused)),
       
  6512 +					MY_ATTRIBUTE((unused)),
       
  6513  	void*				var_ptr	/*!< out: where the formal
       
  6514  						string goes */
       
  6515 -					__attribute__((unused)),
       
  6516 +					MY_ATTRIBUTE((unused)),
       
  6517  	const void*			save)	/*!< in: immediate result from
       
  6518  						check function */
       
  6519  {
       
  6520 @@ -15608,13 +15608,13 @@ void
       
  6521  checkpoint_now_set(
       
  6522  /*===============*/
       
  6523  	THD*				thd	/*!< in: thread handle */
       
  6524 -					__attribute__((unused)),
       
  6525 +					MY_ATTRIBUTE((unused)),
       
  6526  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6527  						variable */
       
  6528 -					__attribute__((unused)),
       
  6529 +					MY_ATTRIBUTE((unused)),
       
  6530  	void*				var_ptr	/*!< out: where the formal
       
  6531  						string goes */
       
  6532 -					__attribute__((unused)),
       
  6533 +					MY_ATTRIBUTE((unused)),
       
  6534  	const void*			save)	/*!< in: immediate result from
       
  6535  						check function */
       
  6536  {
       
  6537 @@ -15635,13 +15635,13 @@ void
       
  6538  buf_flush_list_now_set(
       
  6539  /*===================*/
       
  6540  	THD*				thd	/*!< in: thread handle */
       
  6541 -					__attribute__((unused)),
       
  6542 +					MY_ATTRIBUTE((unused)),
       
  6543  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6544  						variable */
       
  6545 -					__attribute__((unused)),
       
  6546 +					MY_ATTRIBUTE((unused)),
       
  6547  	void*				var_ptr	/*!< out: where the formal
       
  6548  						string goes */
       
  6549 -					__attribute__((unused)),
       
  6550 +					MY_ATTRIBUTE((unused)),
       
  6551  	const void*			save)	/*!< in: immediate result from
       
  6552  						check function */
       
  6553  {
       
  6554 @@ -15738,13 +15738,13 @@ void
       
  6555  buffer_pool_dump_now(
       
  6556  /*=================*/
       
  6557  	THD*				thd	/*!< in: thread handle */
       
  6558 -					__attribute__((unused)),
       
  6559 +					MY_ATTRIBUTE((unused)),
       
  6560  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6561  						variable */
       
  6562 -					__attribute__((unused)),
       
  6563 +					MY_ATTRIBUTE((unused)),
       
  6564  	void*				var_ptr	/*!< out: where the formal
       
  6565  						string goes */
       
  6566 -					__attribute__((unused)),
       
  6567 +					MY_ATTRIBUTE((unused)),
       
  6568  	const void*			save)	/*!< in: immediate result from
       
  6569  						check function */
       
  6570  {
       
  6571 @@ -15761,13 +15761,13 @@ void
       
  6572  buffer_pool_load_now(
       
  6573  /*=================*/
       
  6574  	THD*				thd	/*!< in: thread handle */
       
  6575 -					__attribute__((unused)),
       
  6576 +					MY_ATTRIBUTE((unused)),
       
  6577  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6578  						variable */
       
  6579 -					__attribute__((unused)),
       
  6580 +					MY_ATTRIBUTE((unused)),
       
  6581  	void*				var_ptr	/*!< out: where the formal
       
  6582  						string goes */
       
  6583 -					__attribute__((unused)),
       
  6584 +					MY_ATTRIBUTE((unused)),
       
  6585  	const void*			save)	/*!< in: immediate result from
       
  6586  						check function */
       
  6587  {
       
  6588 @@ -15784,13 +15784,13 @@ void
       
  6589  buffer_pool_load_abort(
       
  6590  /*===================*/
       
  6591  	THD*				thd	/*!< in: thread handle */
       
  6592 -					__attribute__((unused)),
       
  6593 +					MY_ATTRIBUTE((unused)),
       
  6594  	struct st_mysql_sys_var*	var	/*!< in: pointer to system
       
  6595  						variable */
       
  6596 -					__attribute__((unused)),
       
  6597 +					MY_ATTRIBUTE((unused)),
       
  6598  	void*				var_ptr	/*!< out: where the formal
       
  6599  						string goes */
       
  6600 -					__attribute__((unused)),
       
  6601 +					MY_ATTRIBUTE((unused)),
       
  6602  	const void*			save)	/*!< in: immediate result from
       
  6603  						check function */
       
  6604  {
       
  6605 @@ -15808,10 +15808,10 @@ which control InnoDB "status monitor" output to the error log.
       
  6606  static
       
  6607  void
       
  6608  innodb_status_output_update(
       
  6609 -	THD*				thd __attribute__((unused)),
       
  6610 -	struct st_mysql_sys_var*	var __attribute__((unused)),
       
  6611 -	void*				var_ptr __attribute__((unused)),
       
  6612 -	const void*			save __attribute__((unused)))
       
  6613 +	THD*				thd MY_ATTRIBUTE((unused)),
       
  6614 +	struct st_mysql_sys_var*	var MY_ATTRIBUTE((unused)),
       
  6615 +	void*				var_ptr MY_ATTRIBUTE((unused)),
       
  6616 +	const void*			save MY_ATTRIBUTE((unused)))
       
  6617  {
       
  6618  	*static_cast<my_bool*>(var_ptr) = *static_cast<const my_bool*>(save);
       
  6619  	/* The lock timeout monitor thread also takes care of this
       
  6620 --- a/storage/innobase/handler/ha_innodb.h
       
  6621 +++ b/storage/innobase/handler/ha_innodb.h
       
  6622 @@ -1,6 +1,6 @@
       
  6623  /*****************************************************************************
       
  6624  
       
  6625 -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  6626 +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  6627  
       
  6628  This program is free software; you can redistribute it and/or modify it under
       
  6629  the terms of the GNU General Public License as published by the Free Software
       
  6630 @@ -430,14 +430,14 @@ enum durability_properties thd_get_durability_property(const MYSQL_THD thd);
       
  6631  @param off	auto_increment_offset
       
  6632  @param inc	auto_increment_increment */
       
  6633  void thd_get_autoinc(const MYSQL_THD thd, ulong* off, ulong* inc)
       
  6634 -__attribute__((nonnull));
       
  6635 +MY_ATTRIBUTE((nonnull));
       
  6636  
       
  6637  /** Is strict sql_mode set.
       
  6638  @param thd	Thread object
       
  6639  @return True if sql_mode has strict mode (all or trans), false otherwise.
       
  6640  */
       
  6641  bool thd_is_strict_mode(const MYSQL_THD thd)
       
  6642 -__attribute__((nonnull));
       
  6643 +MY_ATTRIBUTE((nonnull));
       
  6644  } /* extern "C" */
       
  6645  
       
  6646  struct trx_t;
       
  6647 @@ -475,7 +475,7 @@ innobase_index_name_is_reserved(
       
  6648  	const KEY*	key_info,	/*!< in: Indexes to be created */
       
  6649  	ulint		num_of_keys)	/*!< in: Number of indexes to
       
  6650  					be created. */
       
  6651 -	__attribute__((nonnull, warn_unused_result));
       
  6652 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  6653  
       
  6654  /*****************************************************************//**
       
  6655  Determines InnoDB table flags.
       
  6656 @@ -492,7 +492,7 @@ innobase_table_flags(
       
  6657  						outside system tablespace */
       
  6658  	ulint*			flags,		/*!< out: DICT_TF flags */
       
  6659  	ulint*			flags2)		/*!< out: DICT_TF2 flags */
       
  6660 -	__attribute__((nonnull, warn_unused_result));
       
  6661 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  6662  
       
  6663  /*****************************************************************//**
       
  6664  Validates the create options. We may build on this function
       
  6665 @@ -509,7 +509,7 @@ create_options_are_invalid(
       
  6666  					columns and indexes */
       
  6667  	HA_CREATE_INFO*	create_info,	/*!< in: create info. */
       
  6668  	bool		use_tablespace)	/*!< in: srv_file_per_table */
       
  6669 -	__attribute__((nonnull, warn_unused_result));
       
  6670 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  6671  
       
  6672  /*********************************************************************//**
       
  6673  Retrieve the FTS Relevance Ranking result for doc with doc_id
       
  6674 @@ -539,7 +539,7 @@ void
       
  6675  innobase_fts_close_ranking(
       
  6676  /*=======================*/
       
  6677  	FT_INFO*	fts_hdl)	/*!< in: FTS handler */
       
  6678 -	__attribute__((nonnull));
       
  6679 +	MY_ATTRIBUTE((nonnull));
       
  6680  /*****************************************************************//**
       
  6681  Initialize the table FTS stopword list
       
  6682  @return TRUE if success */
       
  6683 @@ -550,7 +550,7 @@ innobase_fts_load_stopword(
       
  6684  	dict_table_t*	table,		/*!< in: Table has the FTS */
       
  6685  	trx_t*		trx,		/*!< in: transaction */
       
  6686  	THD*		thd)		/*!< in: current thread */
       
  6687 -	__attribute__((nonnull(1,3), warn_unused_result));
       
  6688 +	MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
       
  6689  
       
  6690  /** Some defines for innobase_fts_check_doc_id_index() return value */
       
  6691  enum fts_doc_id_index_enum {
       
  6692 @@ -572,7 +572,7 @@ innobase_fts_check_doc_id_index(
       
  6693  						that is being altered */
       
  6694  	ulint*			fts_doc_col_no)	/*!< out: The column number for
       
  6695  						Doc ID */
       
  6696 -	__attribute__((warn_unused_result));
       
  6697 +	MY_ATTRIBUTE((warn_unused_result));
       
  6698  
       
  6699  /*******************************************************************//**
       
  6700  Check whether the table has a unique index with FTS_DOC_ID_INDEX_NAME
       
  6701 @@ -585,7 +585,7 @@ innobase_fts_check_doc_id_index_in_def(
       
  6702  /*===================================*/
       
  6703  	ulint		n_key,		/*!< in: Number of keys */
       
  6704  	const KEY*	key_info)	/*!< in: Key definitions */
       
  6705 -	__attribute__((nonnull, warn_unused_result));
       
  6706 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  6707  
       
  6708  /***********************************************************************
       
  6709  @return version of the extended FTS API */
       
  6710 --- a/storage/innobase/handler/handler0alter.cc
       
  6711 +++ b/storage/innobase/handler/handler0alter.cc
       
  6712 @@ -1,6 +1,6 @@
       
  6713  /*****************************************************************************
       
  6714  
       
  6715 -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  6716 +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  6717  
       
  6718  This program is free software; you can redistribute it and/or modify it under
       
  6719  the terms of the GNU General Public License as published by the Free Software
       
  6720 @@ -98,7 +98,7 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_NOREBUILD
       
  6721  	| Alter_inplace_info::ALTER_COLUMN_NAME;
       
  6722  
       
  6723  /* Report an InnoDB error to the client by invoking my_error(). */
       
  6724 -static UNIV_COLD __attribute__((nonnull))
       
  6725 +static UNIV_COLD MY_ATTRIBUTE((nonnull))
       
  6726  void
       
  6727  my_error_innodb(
       
  6728  /*============*/
       
  6729 @@ -195,7 +195,7 @@ innobase_fulltext_exist(
       
  6730  Determine if ALTER TABLE needs to rebuild the table.
       
  6731  @param ha_alter_info		the DDL operation
       
  6732  @return whether it is necessary to rebuild the table */
       
  6733 -static __attribute__((nonnull, warn_unused_result))
       
  6734 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6735  bool
       
  6736  innobase_need_rebuild(
       
  6737  /*==================*/
       
  6738 @@ -515,7 +515,7 @@ ha_innobase::check_if_supported_inplace_alter(
       
  6739  /*************************************************************//**
       
  6740  Initialize the dict_foreign_t structure with supplied info
       
  6741  @return true if added, false if duplicate foreign->id */
       
  6742 -static __attribute__((nonnull(1,3,5,7)))
       
  6743 +static MY_ATTRIBUTE((nonnull(1,3,5,7)))
       
  6744  bool
       
  6745  innobase_init_foreign(
       
  6746  /*==================*/
       
  6747 @@ -604,7 +604,7 @@ innobase_init_foreign(
       
  6748  /*************************************************************//**
       
  6749  Check whether the foreign key options is legit
       
  6750  @return true if it is */
       
  6751 -static __attribute__((nonnull, warn_unused_result))
       
  6752 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6753  bool
       
  6754  innobase_check_fk_option(
       
  6755  /*=====================*/
       
  6756 @@ -636,7 +636,7 @@ innobase_check_fk_option(
       
  6757  /*************************************************************//**
       
  6758  Set foreign key options
       
  6759  @return true if successfully set */
       
  6760 -static __attribute__((nonnull, warn_unused_result))
       
  6761 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6762  bool
       
  6763  innobase_set_foreign_key_option(
       
  6764  /*============================*/
       
  6765 @@ -681,7 +681,7 @@ innobase_set_foreign_key_option(
       
  6766  Check if a foreign key constraint can make use of an index
       
  6767  that is being created.
       
  6768  @return	useable index, or NULL if none found */
       
  6769 -static __attribute__((nonnull, warn_unused_result))
       
  6770 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6771  const KEY*
       
  6772  innobase_find_equiv_index(
       
  6773  /*======================*/
       
  6774 @@ -737,7 +737,7 @@ no_match:
       
  6775  Find an index whose first fields are the columns in the array
       
  6776  in the same order and is not marked for deletion
       
  6777  @return matching index, NULL if not found */
       
  6778 -static __attribute__((nonnull(1,2,6), warn_unused_result))
       
  6779 +static MY_ATTRIBUTE((nonnull(1,2,6), warn_unused_result))
       
  6780  dict_index_t*
       
  6781  innobase_find_fk_index(
       
  6782  /*===================*/
       
  6783 @@ -784,7 +784,7 @@ next_rec:
       
  6784  Create InnoDB foreign key structure from MySQL alter_info
       
  6785  @retval true if successful
       
  6786  @retval false on error (will call my_error()) */
       
  6787 -static __attribute__((nonnull(1,2,3,7,8), warn_unused_result))
       
  6788 +static MY_ATTRIBUTE((nonnull(1,2,3,7,8), warn_unused_result))
       
  6789  bool
       
  6790  innobase_get_foreign_key_info(
       
  6791  /*==========================*/
       
  6792 @@ -1269,7 +1269,7 @@ innobase_rec_reset(
       
  6793  /*******************************************************************//**
       
  6794  This function checks that index keys are sensible.
       
  6795  @return	0 or error number */
       
  6796 -static __attribute__((nonnull, warn_unused_result))
       
  6797 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6798  int
       
  6799  innobase_check_index_keys(
       
  6800  /*======================*/
       
  6801 @@ -1390,7 +1390,7 @@ name_ok:
       
  6802  
       
  6803  /*******************************************************************//**
       
  6804  Create index field definition for key part */
       
  6805 -static __attribute__((nonnull(2,3)))
       
  6806 +static MY_ATTRIBUTE((nonnull(2,3)))
       
  6807  void
       
  6808  innobase_create_index_field_def(
       
  6809  /*============================*/
       
  6810 @@ -1437,7 +1437,7 @@ innobase_create_index_field_def(
       
  6811  
       
  6812  /*******************************************************************//**
       
  6813  Create index definition for key */
       
  6814 -static __attribute__((nonnull))
       
  6815 +static MY_ATTRIBUTE((nonnull))
       
  6816  void
       
  6817  innobase_create_index_def(
       
  6818  /*======================*/
       
  6819 @@ -1721,7 +1721,7 @@ ELSE
       
  6820  ENDIF
       
  6821  
       
  6822  @return	key definitions */
       
  6823 -static __attribute__((nonnull, warn_unused_result, malloc))
       
  6824 +static MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
       
  6825  index_def_t*
       
  6826  innobase_create_key_defs(
       
  6827  /*=====================*/
       
  6828 @@ -1940,7 +1940,7 @@ created_clustered:
       
  6829  /*******************************************************************//**
       
  6830  Check each index column size, make sure they do not exceed the max limit
       
  6831  @return	true if index column size exceeds limit */
       
  6832 -static __attribute__((nonnull, warn_unused_result))
       
  6833 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6834  bool
       
  6835  innobase_check_column_length(
       
  6836  /*=========================*/
       
  6837 @@ -2090,7 +2090,7 @@ online_retry_drop_indexes_low(
       
  6838  /********************************************************************//**
       
  6839  Drop any indexes that we were not able to free previously due to
       
  6840  open table handles. */
       
  6841 -static __attribute__((nonnull))
       
  6842 +static MY_ATTRIBUTE((nonnull))
       
  6843  void
       
  6844  online_retry_drop_indexes(
       
  6845  /*======================*/
       
  6846 @@ -2120,7 +2120,7 @@ online_retry_drop_indexes(
       
  6847  /********************************************************************//**
       
  6848  Commit a dictionary transaction and drop any indexes that we were not
       
  6849  able to free previously due to open table handles. */
       
  6850 -static __attribute__((nonnull))
       
  6851 +static MY_ATTRIBUTE((nonnull))
       
  6852  void
       
  6853  online_retry_drop_indexes_with_trx(
       
  6854  /*===============================*/
       
  6855 @@ -2149,7 +2149,7 @@ online_retry_drop_indexes_with_trx(
       
  6856  @param drop_fk		constraints being dropped
       
  6857  @param n_drop_fk	number of constraints that are being dropped
       
  6858  @return whether the constraint is being dropped */
       
  6859 -inline __attribute__((pure, nonnull, warn_unused_result))
       
  6860 +inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
       
  6861  bool
       
  6862  innobase_dropping_foreign(
       
  6863  /*======================*/
       
  6864 @@ -2176,7 +2176,7 @@ column that is being dropped or modified to NOT NULL.
       
  6865  @retval true		Not allowed (will call my_error())
       
  6866  @retval false		Allowed
       
  6867  */
       
  6868 -static __attribute__((pure, nonnull, warn_unused_result))
       
  6869 +static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
       
  6870  bool
       
  6871  innobase_check_foreigns_low(
       
  6872  /*========================*/
       
  6873 @@ -2276,7 +2276,7 @@ column that is being dropped or modified to NOT NULL.
       
  6874  @retval true		Not allowed (will call my_error())
       
  6875  @retval false		Allowed
       
  6876  */
       
  6877 -static __attribute__((pure, nonnull, warn_unused_result))
       
  6878 +static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
       
  6879  bool
       
  6880  innobase_check_foreigns(
       
  6881  /*====================*/
       
  6882 @@ -2321,7 +2321,7 @@ innobase_check_foreigns(
       
  6883  @param dfield	InnoDB data field to copy to
       
  6884  @param field	MySQL value for the column
       
  6885  @param comp	nonzero if in compact format */
       
  6886 -static __attribute__((nonnull))
       
  6887 +static MY_ATTRIBUTE((nonnull))
       
  6888  void
       
  6889  innobase_build_col_map_add(
       
  6890  /*=======================*/
       
  6891 @@ -2355,7 +2355,7 @@ adding columns.
       
  6892  @param heap		Memory heap where allocated
       
  6893  @return	array of integers, mapping column numbers in the table
       
  6894  to column numbers in altered_table */
       
  6895 -static __attribute__((nonnull(1,2,3,4,5,7), warn_unused_result))
       
  6896 +static MY_ATTRIBUTE((nonnull(1,2,3,4,5,7), warn_unused_result))
       
  6897  const ulint*
       
  6898  innobase_build_col_map(
       
  6899  /*===================*/
       
  6900 @@ -2492,7 +2492,7 @@ innobase_drop_fts_index_table(
       
  6901  @param user_table	InnoDB table as it is before the ALTER operation
       
  6902  @param heap		Memory heap for the allocation
       
  6903  @return array of new column names in rebuilt_table, or NULL if not renamed */
       
  6904 -static __attribute__((nonnull, warn_unused_result))
       
  6905 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6906  const char**
       
  6907  innobase_get_col_names(
       
  6908  	Alter_inplace_info*	ha_alter_info,
       
  6909 @@ -2555,7 +2555,7 @@ while preparing ALTER TABLE.
       
  6910  @retval true		Failure
       
  6911  @retval false		Success
       
  6912  */
       
  6913 -static __attribute__((warn_unused_result, nonnull(1,2,3,4)))
       
  6914 +static MY_ATTRIBUTE((warn_unused_result, nonnull(1,2,3,4)))
       
  6915  bool
       
  6916  prepare_inplace_alter_table_dict(
       
  6917  /*=============================*/
       
  6918 @@ -3193,7 +3193,7 @@ err_exit:
       
  6919  /* Check whether an index is needed for the foreign key constraint.
       
  6920  If so, if it is dropped, is there an equivalent index can play its role.
       
  6921  @return true if the index is needed and can't be dropped */
       
  6922 -static __attribute__((nonnull(1,2,3,5), warn_unused_result))
       
  6923 +static MY_ATTRIBUTE((nonnull(1,2,3,5), warn_unused_result))
       
  6924  bool
       
  6925  innobase_check_foreign_key_index(
       
  6926  /*=============================*/
       
  6927 @@ -4069,7 +4069,7 @@ temparary index prefix
       
  6928  @param locked		TRUE=table locked, FALSE=may need to do a lazy drop
       
  6929  @param trx		the transaction
       
  6930  */
       
  6931 -static __attribute__((nonnull))
       
  6932 +static MY_ATTRIBUTE((nonnull))
       
  6933  void
       
  6934  innobase_rollback_sec_index(
       
  6935  /*========================*/
       
  6936 @@ -4103,7 +4103,7 @@ during prepare, but might not be during commit).
       
  6937  @retval true		Failure
       
  6938  @retval false		Success
       
  6939  */
       
  6940 -inline __attribute__((nonnull, warn_unused_result))
       
  6941 +inline MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6942  bool
       
  6943  rollback_inplace_alter_table(
       
  6944  /*=========================*/
       
  6945 @@ -4235,7 +4235,7 @@ func_exit:
       
  6946  @param foreign_id	Foreign key constraint identifier
       
  6947  @retval true		Failure
       
  6948  @retval false		Success */
       
  6949 -static __attribute__((nonnull, warn_unused_result))
       
  6950 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6951  bool
       
  6952  innobase_drop_foreign_try(
       
  6953  /*======================*/
       
  6954 @@ -4292,7 +4292,7 @@ innobase_drop_foreign_try(
       
  6955  @param new_clustered	whether the table has been rebuilt
       
  6956  @retval true		Failure
       
  6957  @retval false		Success */
       
  6958 -static __attribute__((nonnull, warn_unused_result))
       
  6959 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6960  bool
       
  6961  innobase_rename_column_try(
       
  6962  /*=======================*/
       
  6963 @@ -4501,7 +4501,7 @@ rename_foreign:
       
  6964  @param table_name	Table name in MySQL
       
  6965  @retval true		Failure
       
  6966  @retval false		Success */
       
  6967 -static __attribute__((nonnull, warn_unused_result))
       
  6968 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6969  bool
       
  6970  innobase_rename_columns_try(
       
  6971  /*========================*/
       
  6972 @@ -4551,7 +4551,7 @@ as part of commit_cache_norebuild().
       
  6973  @param ha_alter_info	Data used during in-place alter.
       
  6974  @param table		the TABLE
       
  6975  @param user_table	InnoDB table that was being altered */
       
  6976 -static __attribute__((nonnull))
       
  6977 +static MY_ATTRIBUTE((nonnull))
       
  6978  void
       
  6979  innobase_rename_columns_cache(
       
  6980  /*==========================*/
       
  6981 @@ -4595,7 +4595,7 @@ processed_field:
       
  6982  @param altered_table	MySQL table that is being altered
       
  6983  @param old_table	MySQL table as it is before the ALTER operation
       
  6984  @return the next auto-increment value (0 if not present) */
       
  6985 -static __attribute__((nonnull, warn_unused_result))
       
  6986 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6987  ulonglong
       
  6988  commit_get_autoinc(
       
  6989  /*===============*/
       
  6990 @@ -4677,7 +4677,7 @@ but do not touch the data dictionary cache.
       
  6991  @retval true		Failure
       
  6992  @retval false		Success
       
  6993  */
       
  6994 -static __attribute__((nonnull, warn_unused_result))
       
  6995 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  6996  bool
       
  6997  innobase_update_foreign_try(
       
  6998  /*========================*/
       
  6999 @@ -4760,7 +4760,7 @@ after the changes to data dictionary tables were committed.
       
  7000  @param ctx	In-place ALTER TABLE context
       
  7001  @param user_thd	MySQL connection
       
  7002  @return		InnoDB error code (should always be DB_SUCCESS) */
       
  7003 -static __attribute__((nonnull, warn_unused_result))
       
  7004 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7005  dberr_t
       
  7006  innobase_update_foreign_cache(
       
  7007  /*==========================*/
       
  7008 @@ -4845,7 +4845,7 @@ when rebuilding the table.
       
  7009  @retval true		Failure
       
  7010  @retval false		Success
       
  7011  */
       
  7012 -inline __attribute__((nonnull, warn_unused_result))
       
  7013 +inline MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7014  bool
       
  7015  commit_try_rebuild(
       
  7016  /*===============*/
       
  7017 @@ -5007,7 +5007,7 @@ commit_try_rebuild(
       
  7018  /** Apply the changes made during commit_try_rebuild(),
       
  7019  to the data dictionary cache and the file system.
       
  7020  @param ctx	In-place ALTER TABLE context */
       
  7021 -inline __attribute__((nonnull))
       
  7022 +inline MY_ATTRIBUTE((nonnull))
       
  7023  void
       
  7024  commit_cache_rebuild(
       
  7025  /*=================*/
       
  7026 @@ -5102,7 +5102,7 @@ when not rebuilding the table.
       
  7027  @retval true		Failure
       
  7028  @retval false		Success
       
  7029  */
       
  7030 -inline __attribute__((nonnull, warn_unused_result))
       
  7031 +inline MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7032  bool
       
  7033  commit_try_norebuild(
       
  7034  /*=================*/
       
  7035 @@ -5212,7 +5212,7 @@ after a successful commit_try_norebuild() call.
       
  7036  @param trx		Data dictionary transaction object
       
  7037  (will be started and committed)
       
  7038  @return whether all replacements were found for dropped indexes */
       
  7039 -inline __attribute__((nonnull, warn_unused_result))
       
  7040 +inline MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7041  bool
       
  7042  commit_cache_norebuild(
       
  7043  /*===================*/
       
  7044 --- a/storage/innobase/ibuf/ibuf0ibuf.cc
       
  7045 +++ b/storage/innobase/ibuf/ibuf0ibuf.cc
       
  7046 @@ -1,6 +1,6 @@
       
  7047  /*****************************************************************************
       
  7048  
       
  7049 -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  7050 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7051  
       
  7052  This program is free software; you can redistribute it and/or modify it under
       
  7053  the terms of the GNU General Public License as published by the Free Software
       
  7054 @@ -657,7 +657,7 @@ byte*
       
  7055  ibuf_parse_bitmap_init(
       
  7056  /*===================*/
       
  7057  	byte*		ptr,	/*!< in: buffer */
       
  7058 -	byte*		end_ptr __attribute__((unused)), /*!< in: buffer end */
       
  7059 +	byte*		end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
       
  7060  	buf_block_t*	block,	/*!< in: block or NULL */
       
  7061  	mtr_t*		mtr)	/*!< in: mtr or NULL */
       
  7062  {
       
  7063 @@ -2494,7 +2494,7 @@ ibuf_get_merge_page_nos_func(
       
  7064  /*******************************************************************//**
       
  7065  Get the matching records for space id.
       
  7066  @return	current rec or NULL */
       
  7067 -static	__attribute__((nonnull, warn_unused_result))
       
  7068 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7069  const rec_t*
       
  7070  ibuf_get_user_rec(
       
  7071  /*===============*/
       
  7072 @@ -2516,7 +2516,7 @@ ibuf_get_user_rec(
       
  7073  Reads page numbers for a space id from an ibuf tree.
       
  7074  @return a lower limit for the combined volume of records which will be
       
  7075  merged */
       
  7076 -static	__attribute__((nonnull, warn_unused_result))
       
  7077 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7078  ulint
       
  7079  ibuf_get_merge_pages(
       
  7080  /*=================*/
       
  7081 @@ -2626,7 +2626,7 @@ ibuf_merge_pages(
       
  7082  /*********************************************************************//**
       
  7083  Get the table instance from the table id.
       
  7084  @return table instance */
       
  7085 -static __attribute__((warn_unused_result))
       
  7086 +static MY_ATTRIBUTE((warn_unused_result))
       
  7087  dict_table_t*
       
  7088  ibuf_get_table(
       
  7089  /*===========*/
       
  7090 @@ -2725,7 +2725,7 @@ Contracts insert buffer trees by reading pages to the buffer pool.
       
  7091  @return a lower limit for the combined size in bytes of entries which
       
  7092  will be merged from ibuf trees to the pages read, 0 if ibuf is
       
  7093  empty */
       
  7094 -static __attribute__((nonnull, warn_unused_result))
       
  7095 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7096  ulint
       
  7097  ibuf_merge(
       
  7098  /*=======*/
       
  7099 @@ -3444,7 +3444,7 @@ ibuf_get_entry_counter_func(
       
  7100  Buffer an operation in the insert/delete buffer, instead of doing it
       
  7101  directly to the disk page, if this is possible.
       
  7102  @return	DB_SUCCESS, DB_STRONG_FAIL or other error */
       
  7103 -static __attribute__((nonnull, warn_unused_result))
       
  7104 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
  7105  dberr_t
       
  7106  ibuf_insert_low(
       
  7107  /*============*/
       
  7108 @@ -3935,7 +3935,7 @@ skip_watch:
       
  7109  During merge, inserts to an index page a secondary index entry extracted
       
  7110  from the insert buffer.
       
  7111  @return	newly inserted record */
       
  7112 -static __attribute__((nonnull))
       
  7113 +static MY_ATTRIBUTE((nonnull))
       
  7114  rec_t*
       
  7115  ibuf_insert_to_index_page_low(
       
  7116  /*==========================*/
       
  7117 @@ -4366,7 +4366,7 @@ ibuf_delete(
       
  7118  /*********************************************************************//**
       
  7119  Restores insert buffer tree cursor position
       
  7120  @return	TRUE if the position was restored; FALSE if not */
       
  7121 -static __attribute__((nonnull))
       
  7122 +static MY_ATTRIBUTE((nonnull))
       
  7123  ibool
       
  7124  ibuf_restore_pos(
       
  7125  /*=============*/
       
  7126 @@ -4421,7 +4421,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to
       
  7127  resort to a pessimistic delete, this function commits mtr and closes
       
  7128  the cursor.
       
  7129  @return	TRUE if mtr was committed and pcur closed in this operation */
       
  7130 -static __attribute__((warn_unused_result))
       
  7131 +static MY_ATTRIBUTE((warn_unused_result))
       
  7132  ibool
       
  7133  ibuf_delete_rec(
       
  7134  /*============*/
       
  7135 --- a/storage/innobase/include/api0api.h
       
  7136 +++ b/storage/innobase/include/api0api.h
       
  7137 @@ -1,6 +1,6 @@
       
  7138  /*****************************************************************************
       
  7139  
       
  7140 -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  7141 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7142  
       
  7143  This program is free software; you can redistribute it and/or modify it under
       
  7144  the terms of the GNU General Public License as published by the Free Software
       
  7145 @@ -36,7 +36,7 @@ InnoDB Native API
       
  7146  #endif
       
  7147  
       
  7148  #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
       
  7149 -#define UNIV_NO_IGNORE		__attribute__ ((warn_unused_result))
       
  7150 +#define UNIV_NO_IGNORE		MY_ATTRIBUTE ((warn_unused_result))
       
  7151  #else
       
  7152  #define UNIV_NO_IGNORE
       
  7153  #endif /* __GNUC__ && __GNUC__ > 2 && !__INTEL_COMPILER */
       
  7154 --- a/storage/innobase/include/btr0btr.h
       
  7155 +++ b/storage/innobase/include/btr0btr.h
       
  7156 @@ -1,6 +1,6 @@
       
  7157  /*****************************************************************************
       
  7158  
       
  7159 -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  7160 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7161  Copyright (c) 2012, Facebook Inc.
       
  7162  
       
  7163  This program is free software; you can redistribute it and/or modify it under
       
  7164 @@ -114,7 +114,7 @@ btr_corruption_report(
       
  7165  /*==================*/
       
  7166  	const buf_block_t*	block,	/*!< in: corrupted block */
       
  7167  	const dict_index_t*	index)	/*!< in: index tree */
       
  7168 -	UNIV_COLD __attribute__((nonnull));
       
  7169 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
  7170  
       
  7171  /** Assert that a B-tree page is not corrupted.
       
  7172  @param block buffer block containing a B-tree page
       
  7173 @@ -156,7 +156,7 @@ btr_blob_dbg_add_blob(
       
  7174  	ulint		page_no,	/*!< in: start page of the column */
       
  7175  	dict_index_t*	index,		/*!< in/out: index tree */
       
  7176  	const char*	ctx)		/*!< in: context (for logging) */
       
  7177 -	__attribute__((nonnull));
       
  7178 +	MY_ATTRIBUTE((nonnull));
       
  7179  /**************************************************************//**
       
  7180  Display the references to off-page columns.
       
  7181  This function is to be called from a debugger,
       
  7182 @@ -166,7 +166,7 @@ void
       
  7183  btr_blob_dbg_print(
       
  7184  /*===============*/
       
  7185  	const dict_index_t*	index)	/*!< in: index tree */
       
  7186 -	__attribute__((nonnull));
       
  7187 +	MY_ATTRIBUTE((nonnull));
       
  7188  /**************************************************************//**
       
  7189  Check that there are no references to off-page columns from or to
       
  7190  the given page. Invoked when freeing or clearing a page.
       
  7191 @@ -177,7 +177,7 @@ btr_blob_dbg_is_empty(
       
  7192  /*==================*/
       
  7193  	dict_index_t*	index,		/*!< in: index */
       
  7194  	ulint		page_no)	/*!< in: page number */
       
  7195 -	__attribute__((nonnull, warn_unused_result));
       
  7196 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7197  
       
  7198  /**************************************************************//**
       
  7199  Modify the 'deleted' flag of a record. */
       
  7200 @@ -189,7 +189,7 @@ btr_blob_dbg_set_deleted_flag(
       
  7201  	dict_index_t*		index,	/*!< in/out: index */
       
  7202  	const ulint*		offsets,/*!< in: rec_get_offs(rec, index) */
       
  7203  	ibool			del)	/*!< in: TRUE=deleted, FALSE=exists */
       
  7204 -	__attribute__((nonnull));
       
  7205 +	MY_ATTRIBUTE((nonnull));
       
  7206  /**************************************************************//**
       
  7207  Change the ownership of an off-page column. */
       
  7208  UNIV_INTERN
       
  7209 @@ -201,7 +201,7 @@ btr_blob_dbg_owner(
       
  7210  	const ulint*		offsets,/*!< in: rec_get_offs(rec, index) */
       
  7211  	ulint			i,	/*!< in: ith field in rec */
       
  7212  	ibool			own)	/*!< in: TRUE=owned, FALSE=disowned */
       
  7213 -	__attribute__((nonnull));
       
  7214 +	MY_ATTRIBUTE((nonnull));
       
  7215  /** Assert that there are no BLOB references to or from the given page. */
       
  7216  # define btr_blob_dbg_assert_empty(index, page_no)	\
       
  7217  	ut_a(btr_blob_dbg_is_empty(index, page_no))
       
  7218 @@ -221,7 +221,7 @@ btr_root_get(
       
  7219  /*=========*/
       
  7220  	const dict_index_t*	index,	/*!< in: index tree */
       
  7221  	mtr_t*			mtr)	/*!< in: mtr */
       
  7222 -	__attribute__((nonnull));
       
  7223 +	MY_ATTRIBUTE((nonnull));
       
  7224  
       
  7225  /**************************************************************//**
       
  7226  Checks and adjusts the root node of a tree during IMPORT TABLESPACE.
       
  7227 @@ -231,7 +231,7 @@ dberr_t
       
  7228  btr_root_adjust_on_import(
       
  7229  /*======================*/
       
  7230  	const dict_index_t*	index)	/*!< in: index tree */
       
  7231 -	__attribute__((nonnull, warn_unused_result));
       
  7232 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7233  
       
  7234  /**************************************************************//**
       
  7235  Gets the height of the B-tree (the level of the root, when the leaf
       
  7236 @@ -244,7 +244,7 @@ btr_height_get(
       
  7237  /*===========*/
       
  7238  	dict_index_t*	index,	/*!< in: index tree */
       
  7239  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7240 -	__attribute__((nonnull, warn_unused_result));
       
  7241 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7242  /**************************************************************//**
       
  7243  Gets a buffer page and declares its latching order level. */
       
  7244  UNIV_INLINE
       
  7245 @@ -306,7 +306,7 @@ index_id_t
       
  7246  btr_page_get_index_id(
       
  7247  /*==================*/
       
  7248  	const page_t*	page)	/*!< in: index page */
       
  7249 -	__attribute__((nonnull, pure, warn_unused_result));
       
  7250 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  7251  #ifndef UNIV_HOTBACKUP
       
  7252  /********************************************************//**
       
  7253  Gets the node level field in an index page.
       
  7254 @@ -316,7 +316,7 @@ ulint
       
  7255  btr_page_get_level_low(
       
  7256  /*===================*/
       
  7257  	const page_t*	page)	/*!< in: index page */
       
  7258 -	__attribute__((nonnull, pure, warn_unused_result));
       
  7259 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  7260  #define btr_page_get_level(page, mtr) btr_page_get_level_low(page)
       
  7261  /********************************************************//**
       
  7262  Gets the next index page number.
       
  7263 @@ -327,7 +327,7 @@ btr_page_get_next(
       
  7264  /*==============*/
       
  7265  	const page_t*	page,	/*!< in: index page */
       
  7266  	mtr_t*		mtr)	/*!< in: mini-transaction handle */
       
  7267 -	__attribute__((nonnull, warn_unused_result));
       
  7268 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7269  /********************************************************//**
       
  7270  Gets the previous index page number.
       
  7271  @return	prev page number */
       
  7272 @@ -337,7 +337,7 @@ btr_page_get_prev(
       
  7273  /*==============*/
       
  7274  	const page_t*	page,	/*!< in: index page */
       
  7275  	mtr_t*		mtr)	/*!< in: mini-transaction handle */
       
  7276 -	__attribute__((nonnull, warn_unused_result));
       
  7277 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7278  /*************************************************************//**
       
  7279  Gets pointer to the previous user record in the tree. It is assumed
       
  7280  that the caller has appropriate latches on the page and its neighbor.
       
  7281 @@ -349,7 +349,7 @@ btr_get_prev_user_rec(
       
  7282  	rec_t*	rec,	/*!< in: record on leaf level */
       
  7283  	mtr_t*	mtr)	/*!< in: mtr holding a latch on the page, and if
       
  7284  			needed, also to the previous page */
       
  7285 -	__attribute__((nonnull, warn_unused_result));
       
  7286 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7287  /*************************************************************//**
       
  7288  Gets pointer to the next user record in the tree. It is assumed
       
  7289  that the caller has appropriate latches on the page and its neighbor.
       
  7290 @@ -361,7 +361,7 @@ btr_get_next_user_rec(
       
  7291  	rec_t*	rec,	/*!< in: record on leaf level */
       
  7292  	mtr_t*	mtr)	/*!< in: mtr holding a latch on the page, and if
       
  7293  			needed, also to the next page */
       
  7294 -	__attribute__((nonnull, warn_unused_result));
       
  7295 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7296  /**************************************************************//**
       
  7297  Releases the latch on a leaf page and bufferunfixes it. */
       
  7298  UNIV_INLINE
       
  7299 @@ -372,7 +372,7 @@ btr_leaf_page_release(
       
  7300  	ulint		latch_mode,	/*!< in: BTR_SEARCH_LEAF or
       
  7301  					BTR_MODIFY_LEAF */
       
  7302  	mtr_t*		mtr)		/*!< in: mtr */
       
  7303 -	__attribute__((nonnull));
       
  7304 +	MY_ATTRIBUTE((nonnull));
       
  7305  /**************************************************************//**
       
  7306  Gets the child node file address in a node pointer.
       
  7307  NOTE: the offsets array must contain all offsets for the record since
       
  7308 @@ -386,7 +386,7 @@ btr_node_ptr_get_child_page_no(
       
  7309  /*===========================*/
       
  7310  	const rec_t*	rec,	/*!< in: node pointer record */
       
  7311  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
  7312 -	__attribute__((nonnull, pure, warn_unused_result));
       
  7313 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  7314  /************************************************************//**
       
  7315  Creates the root node for a new index tree.
       
  7316  @return	page number of the created root, FIL_NULL if did not succeed */
       
  7317 @@ -401,7 +401,7 @@ btr_create(
       
  7318  	index_id_t	index_id,/*!< in: index id */
       
  7319  	dict_index_t*	index,	/*!< in: index */
       
  7320  	mtr_t*		mtr)	/*!< in: mini-transaction handle */
       
  7321 -	__attribute__((nonnull));
       
  7322 +	MY_ATTRIBUTE((nonnull));
       
  7323  /************************************************************//**
       
  7324  Frees a B-tree except the root page, which MUST be freed after this
       
  7325  by calling btr_free_root. */
       
  7326 @@ -424,7 +424,7 @@ btr_free_root(
       
  7327  				or 0 for uncompressed pages */
       
  7328  	ulint	root_page_no,	/*!< in: root page number */
       
  7329  	mtr_t*	mtr)		/*!< in/out: mini-transaction */
       
  7330 -	__attribute__((nonnull));
       
  7331 +	MY_ATTRIBUTE((nonnull));
       
  7332  /*************************************************************//**
       
  7333  Makes tree one level higher by splitting the root, and inserts
       
  7334  the tuple. It is assumed that mtr contains an x-latch on the tree.
       
  7335 @@ -447,7 +447,7 @@ btr_root_raise_and_insert(
       
  7336  	const dtuple_t*	tuple,	/*!< in: tuple to insert */
       
  7337  	ulint		n_ext,	/*!< in: number of externally stored columns */
       
  7338  	mtr_t*		mtr)	/*!< in: mtr */
       
  7339 -	__attribute__((nonnull, warn_unused_result));
       
  7340 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7341  /*************************************************************//**
       
  7342  Reorganizes an index page.
       
  7343  
       
  7344 @@ -473,7 +473,7 @@ btr_page_reorganize_low(
       
  7345  	page_cur_t*	cursor,	/*!< in/out: page cursor */
       
  7346  	dict_index_t*	index,	/*!< in: the index tree of the page */
       
  7347  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7348 -	__attribute__((nonnull, warn_unused_result));
       
  7349 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7350  /*************************************************************//**
       
  7351  Reorganizes an index page.
       
  7352  
       
  7353 @@ -492,7 +492,7 @@ btr_page_reorganize(
       
  7354  	page_cur_t*	cursor,	/*!< in/out: page cursor */
       
  7355  	dict_index_t*	index,	/*!< in: the index tree of the page */
       
  7356  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7357 -	__attribute__((nonnull));
       
  7358 +	MY_ATTRIBUTE((nonnull));
       
  7359  /*************************************************************//**
       
  7360  Decides if the page should be split at the convergence point of
       
  7361  inserts converging to left.
       
  7362 @@ -505,7 +505,7 @@ btr_page_get_split_rec_to_left(
       
  7363  	rec_t**		split_rec)/*!< out: if split recommended,
       
  7364  				the first record on upper half page,
       
  7365  				or NULL if tuple should be first */
       
  7366 -	__attribute__((nonnull, warn_unused_result));
       
  7367 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7368  /*************************************************************//**
       
  7369  Decides if the page should be split at the convergence point of
       
  7370  inserts converging to right.
       
  7371 @@ -518,7 +518,7 @@ btr_page_get_split_rec_to_right(
       
  7372  	rec_t**		split_rec)/*!< out: if split recommended,
       
  7373  				the first record on upper half page,
       
  7374  				or NULL if tuple should be first */
       
  7375 -	__attribute__((nonnull, warn_unused_result));
       
  7376 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7377  /*************************************************************//**
       
  7378  Splits an index page to halves and inserts the tuple. It is assumed
       
  7379  that mtr holds an x-latch to the index tree. NOTE: the tree x-latch is
       
  7380 @@ -542,7 +542,7 @@ btr_page_split_and_insert(
       
  7381  	const dtuple_t*	tuple,	/*!< in: tuple to insert */
       
  7382  	ulint		n_ext,	/*!< in: number of externally stored columns */
       
  7383  	mtr_t*		mtr)	/*!< in: mtr */
       
  7384 -	__attribute__((nonnull, warn_unused_result));
       
  7385 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7386  /*******************************************************//**
       
  7387  Inserts a data tuple to a tree on a non-leaf level. It is assumed
       
  7388  that mtr holds an x-latch on the tree. */
       
  7389 @@ -557,7 +557,7 @@ btr_insert_on_non_leaf_level_func(
       
  7390  	const char*	file,	/*!< in: file name */
       
  7391  	ulint		line,	/*!< in: line where called */
       
  7392  	mtr_t*		mtr)	/*!< in: mtr */
       
  7393 -	__attribute__((nonnull));
       
  7394 +	MY_ATTRIBUTE((nonnull));
       
  7395  # define btr_insert_on_non_leaf_level(f,i,l,t,m)			\
       
  7396  	btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m)
       
  7397  #endif /* !UNIV_HOTBACKUP */
       
  7398 @@ -569,7 +569,7 @@ btr_set_min_rec_mark(
       
  7399  /*=================*/
       
  7400  	rec_t*	rec,	/*!< in/out: record */
       
  7401  	mtr_t*	mtr)	/*!< in: mtr */
       
  7402 -	__attribute__((nonnull));
       
  7403 +	MY_ATTRIBUTE((nonnull));
       
  7404  #ifndef UNIV_HOTBACKUP
       
  7405  /*************************************************************//**
       
  7406  Deletes on the upper level the node pointer to a page. */
       
  7407 @@ -580,7 +580,7 @@ btr_node_ptr_delete(
       
  7408  	dict_index_t*	index,	/*!< in: index tree */
       
  7409  	buf_block_t*	block,	/*!< in: page whose node pointer is deleted */
       
  7410  	mtr_t*		mtr)	/*!< in: mtr */
       
  7411 -	__attribute__((nonnull));
       
  7412 +	MY_ATTRIBUTE((nonnull));
       
  7413  #ifdef UNIV_DEBUG
       
  7414  /************************************************************//**
       
  7415  Checks that the node pointer to a page is appropriate.
       
  7416 @@ -592,7 +592,7 @@ btr_check_node_ptr(
       
  7417  	dict_index_t*	index,	/*!< in: index tree */
       
  7418  	buf_block_t*	block,	/*!< in: index page */
       
  7419  	mtr_t*		mtr)	/*!< in: mtr */
       
  7420 -	__attribute__((nonnull, warn_unused_result));
       
  7421 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7422  #endif /* UNIV_DEBUG */
       
  7423  /*************************************************************//**
       
  7424  Tries to merge the page first to the left immediate brother if such a
       
  7425 @@ -615,7 +615,7 @@ btr_compress(
       
  7426  	ibool		adjust,	/*!< in: TRUE if should adjust the
       
  7427  				cursor position even if compression occurs */
       
  7428  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7429 -	__attribute__((nonnull));
       
  7430 +	MY_ATTRIBUTE((nonnull));
       
  7431  /*************************************************************//**
       
  7432  Discards a page from a B-tree. This is used to remove the last record from
       
  7433  a B-tree page: the whole page must be removed at the same time. This cannot
       
  7434 @@ -627,7 +627,7 @@ btr_discard_page(
       
  7435  	btr_cur_t*	cursor,	/*!< in: cursor on the page to discard: not on
       
  7436  				the root page */
       
  7437  	mtr_t*		mtr)	/*!< in: mtr */
       
  7438 -	__attribute__((nonnull));
       
  7439 +	MY_ATTRIBUTE((nonnull));
       
  7440  #endif /* !UNIV_HOTBACKUP */
       
  7441  /****************************************************************//**
       
  7442  Parses the redo log record for setting an index record as the predefined
       
  7443 @@ -642,7 +642,7 @@ btr_parse_set_min_rec_mark(
       
  7444  	ulint	comp,	/*!< in: nonzero=compact page format */
       
  7445  	page_t*	page,	/*!< in: page or NULL */
       
  7446  	mtr_t*	mtr)	/*!< in: mtr or NULL */
       
  7447 -	__attribute__((nonnull(1,2), warn_unused_result));
       
  7448 +	MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
       
  7449  /***********************************************************//**
       
  7450  Parses a redo log record of reorganizing a page.
       
  7451  @return	end of log record or NULL */
       
  7452 @@ -656,7 +656,7 @@ btr_parse_page_reorganize(
       
  7453  	bool		compressed,/*!< in: true if compressed page */
       
  7454  	buf_block_t*	block,	/*!< in: page to be reorganized, or NULL */
       
  7455  	mtr_t*		mtr)	/*!< in: mtr or NULL */
       
  7456 -	__attribute__((nonnull(1,2,3), warn_unused_result));
       
  7457 +	MY_ATTRIBUTE((nonnull(1,2,3), warn_unused_result));
       
  7458  #ifndef UNIV_HOTBACKUP
       
  7459  /**************************************************************//**
       
  7460  Gets the number of pages in a B-tree.
       
  7461 @@ -669,7 +669,7 @@ btr_get_size(
       
  7462  	ulint		flag,	/*!< in: BTR_N_LEAF_PAGES or BTR_TOTAL_SIZE */
       
  7463  	mtr_t*		mtr)	/*!< in/out: mini-transaction where index
       
  7464  				is s-latched */
       
  7465 -	__attribute__((nonnull, warn_unused_result));
       
  7466 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7467  /**************************************************************//**
       
  7468  Allocates a new file page to be used in an index tree. NOTE: we assume
       
  7469  that the caller has made the reservation for free extents!
       
  7470 @@ -692,7 +692,7 @@ btr_page_alloc(
       
  7471  	mtr_t*		init_mtr)	/*!< in/out: mini-transaction
       
  7472  					for x-latching and initializing
       
  7473  					the page */
       
  7474 -	__attribute__((nonnull, warn_unused_result));
       
  7475 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7476  /**************************************************************//**
       
  7477  Frees a file page used in an index tree. NOTE: cannot free field external
       
  7478  storage pages because the page must contain info on its level. */
       
  7479 @@ -703,7 +703,7 @@ btr_page_free(
       
  7480  	dict_index_t*	index,	/*!< in: index tree */
       
  7481  	buf_block_t*	block,	/*!< in: block to be freed, x-latched */
       
  7482  	mtr_t*		mtr)	/*!< in: mtr */
       
  7483 -	__attribute__((nonnull));
       
  7484 +	MY_ATTRIBUTE((nonnull));
       
  7485  /**************************************************************//**
       
  7486  Frees a file page used in an index tree. Can be used also to BLOB
       
  7487  external storage pages, because the page level 0 can be given as an
       
  7488 @@ -716,7 +716,7 @@ btr_page_free_low(
       
  7489  	buf_block_t*	block,	/*!< in: block to be freed, x-latched */
       
  7490  	ulint		level,	/*!< in: page level */
       
  7491  	mtr_t*		mtr)	/*!< in: mtr */
       
  7492 -	__attribute__((nonnull));
       
  7493 +	MY_ATTRIBUTE((nonnull));
       
  7494  #ifdef UNIV_BTR_PRINT
       
  7495  /*************************************************************//**
       
  7496  Prints size info of a B-tree. */
       
  7497 @@ -725,7 +725,7 @@ void
       
  7498  btr_print_size(
       
  7499  /*===========*/
       
  7500  	dict_index_t*	index)	/*!< in: index tree */
       
  7501 -	__attribute__((nonnull));
       
  7502 +	MY_ATTRIBUTE((nonnull));
       
  7503  /**************************************************************//**
       
  7504  Prints directories and other info of all nodes in the index. */
       
  7505  UNIV_INTERN
       
  7506 @@ -735,7 +735,7 @@ btr_print_index(
       
  7507  	dict_index_t*	index,	/*!< in: index */
       
  7508  	ulint		width)	/*!< in: print this many entries from start
       
  7509  				and end */
       
  7510 -	__attribute__((nonnull));
       
  7511 +	MY_ATTRIBUTE((nonnull));
       
  7512  #endif /* UNIV_BTR_PRINT */
       
  7513  /************************************************************//**
       
  7514  Checks the size and number of fields in a record based on the definition of
       
  7515 @@ -750,7 +750,7 @@ btr_index_rec_validate(
       
  7516  	ibool			dump_on_error)	/*!< in: TRUE if the function
       
  7517  						should print hex dump of record
       
  7518  						and page on error */
       
  7519 -	__attribute__((nonnull, warn_unused_result));
       
  7520 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7521  /**************************************************************//**
       
  7522  Checks the consistency of an index tree.
       
  7523  @return	TRUE if ok */
       
  7524 @@ -760,7 +760,7 @@ btr_validate_index(
       
  7525  /*===============*/
       
  7526  	dict_index_t*	index,			/*!< in: index */
       
  7527  	const trx_t*	trx)			/*!< in: transaction or 0 */
       
  7528 -	__attribute__((nonnull(1), warn_unused_result));
       
  7529 +	MY_ATTRIBUTE((nonnull(1), warn_unused_result));
       
  7530  
       
  7531  #define BTR_N_LEAF_PAGES	1
       
  7532  #define BTR_TOTAL_SIZE		2
       
  7533 --- a/storage/innobase/include/btr0btr.ic
       
  7534 +++ b/storage/innobase/include/btr0btr.ic
       
  7535 @@ -1,6 +1,6 @@
       
  7536  /*****************************************************************************
       
  7537  
       
  7538 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  7539 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7540  
       
  7541  This program is free software; you can redistribute it and/or modify it under
       
  7542  the terms of the GNU General Public License as published by the Free Software
       
  7543 @@ -159,7 +159,7 @@ ulint
       
  7544  btr_page_get_next(
       
  7545  /*==============*/
       
  7546  	const page_t*	page,	/*!< in: index page */
       
  7547 -	mtr_t*		mtr __attribute__((unused)))
       
  7548 +	mtr_t*		mtr MY_ATTRIBUTE((unused)))
       
  7549  				/*!< in: mini-transaction handle */
       
  7550  {
       
  7551  	ut_ad(page && mtr);
       
  7552 @@ -199,7 +199,7 @@ ulint
       
  7553  btr_page_get_prev(
       
  7554  /*==============*/
       
  7555  	const page_t*	page,	/*!< in: index page */
       
  7556 -	mtr_t*	mtr __attribute__((unused))) /*!< in: mini-transaction handle */
       
  7557 +	mtr_t*	mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */
       
  7558  {
       
  7559  	ut_ad(page && mtr);
       
  7560  
       
  7561 --- a/storage/innobase/include/btr0cur.h
       
  7562 +++ b/storage/innobase/include/btr0cur.h
       
  7563 @@ -1,6 +1,6 @@
       
  7564  /*****************************************************************************
       
  7565  
       
  7566 -Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  7567 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7568  
       
  7569  This program is free software; you can redistribute it and/or modify it under
       
  7570  the terms of the GNU General Public License as published by the Free Software
       
  7571 @@ -186,7 +186,7 @@ btr_cur_open_at_index_side_func(
       
  7572  	const char*	file,		/*!< in: file name */
       
  7573  	ulint		line,		/*!< in: line where called */
       
  7574  	mtr_t*		mtr)		/*!< in/out: mini-transaction */
       
  7575 -	__attribute__((nonnull));
       
  7576 +	MY_ATTRIBUTE((nonnull));
       
  7577  #define btr_cur_open_at_index_side(f,i,l,c,lv,m)			\
       
  7578  	btr_cur_open_at_index_side_func(f,i,l,c,lv,__FILE__,__LINE__,m)
       
  7579  /**********************************************************************//**
       
  7580 @@ -235,7 +235,7 @@ btr_cur_optimistic_insert(
       
  7581  				compressed tablespace, the caller must
       
  7582  				mtr_commit(mtr) before latching
       
  7583  				any further pages */
       
  7584 -	__attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
       
  7585 +	MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
       
  7586  /*************************************************************//**
       
  7587  Performs an insert on a page of an index tree. It is assumed that mtr
       
  7588  holds an x-latch on the tree and on the cursor page. If the insert is
       
  7589 @@ -266,7 +266,7 @@ btr_cur_pessimistic_insert(
       
  7590  	ulint		n_ext,	/*!< in: number of externally stored columns */
       
  7591  	que_thr_t*	thr,	/*!< in: query thread or NULL */
       
  7592  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7593 -	__attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
       
  7594 +	MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
       
  7595  /*************************************************************//**
       
  7596  See if there is enough place in the page modification log to log
       
  7597  an update-in-place.
       
  7598 @@ -293,7 +293,7 @@ btr_cur_update_alloc_zip_func(
       
  7599  	bool		create,	/*!< in: true=delete-and-insert,
       
  7600  				false=update-in-place */
       
  7601  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7602 -	__attribute__((nonnull, warn_unused_result));
       
  7603 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7604  #ifdef UNIV_DEBUG
       
  7605  # define btr_cur_update_alloc_zip(page_zip,cursor,index,offsets,len,cr,mtr) \
       
  7606  	btr_cur_update_alloc_zip_func(page_zip,cursor,index,offsets,len,cr,mtr)
       
  7607 @@ -325,7 +325,7 @@ btr_cur_update_in_place(
       
  7608  				is a secondary index, the caller must
       
  7609  				mtr_commit(mtr) before latching any
       
  7610  				further pages */
       
  7611 -	__attribute__((warn_unused_result, nonnull));
       
  7612 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
  7613  /***********************************************************//**
       
  7614  Writes a redo log record of updating a record in-place. */
       
  7615  UNIV_INTERN
       
  7616 @@ -339,7 +339,7 @@ btr_cur_update_in_place_log(
       
  7617  	trx_id_t	trx_id,		/*!< in: transaction id */
       
  7618  	roll_ptr_t	roll_ptr,	/*!< in: roll ptr */
       
  7619  	mtr_t*		mtr)		/*!< in: mtr */
       
  7620 -	__attribute__((nonnull));
       
  7621 +	MY_ATTRIBUTE((nonnull));
       
  7622  /*************************************************************//**
       
  7623  Tries to update a record on a page in an index tree. It is assumed that mtr
       
  7624  holds an x-latch on the page. The operation does not succeed if there is too
       
  7625 @@ -371,7 +371,7 @@ btr_cur_optimistic_update(
       
  7626  				is a secondary index, the caller must
       
  7627  				mtr_commit(mtr) before latching any
       
  7628  				further pages */
       
  7629 -	__attribute__((warn_unused_result, nonnull));
       
  7630 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
  7631  /*************************************************************//**
       
  7632  Performs an update of a record on a page of a tree. It is assumed
       
  7633  that mtr holds an x-latch on the tree and on the cursor page. If the
       
  7634 @@ -405,7 +405,7 @@ btr_cur_pessimistic_update(
       
  7635  	trx_id_t	trx_id,	/*!< in: transaction id */
       
  7636  	mtr_t*		mtr)	/*!< in/out: mini-transaction; must be committed
       
  7637  				before latching any further pages */
       
  7638 -	__attribute__((warn_unused_result, nonnull));
       
  7639 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
  7640  /***********************************************************//**
       
  7641  Marks a clustered index record deleted. Writes an undo log record to
       
  7642  undo log on this delete marking. Writes in the trx id field the id
       
  7643 @@ -422,7 +422,7 @@ btr_cur_del_mark_set_clust_rec(
       
  7644  	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
       
  7645  	que_thr_t*	thr,	/*!< in: query thread */
       
  7646  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7647 -	__attribute__((nonnull, warn_unused_result));
       
  7648 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7649  /***********************************************************//**
       
  7650  Sets a secondary index record delete mark to TRUE or FALSE.
       
  7651  @return	DB_SUCCESS, DB_LOCK_WAIT, or error number */
       
  7652 @@ -435,7 +435,7 @@ btr_cur_del_mark_set_sec_rec(
       
  7653  	ibool		val,	/*!< in: value to set */
       
  7654  	que_thr_t*	thr,	/*!< in: query thread */
       
  7655  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7656 -	__attribute__((nonnull, warn_unused_result));
       
  7657 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7658  /*************************************************************//**
       
  7659  Tries to compress a page of the tree if it seems useful. It is assumed
       
  7660  that mtr holds an x-latch on the tree and on the cursor page. To avoid
       
  7661 @@ -453,7 +453,7 @@ btr_cur_compress_if_useful(
       
  7662  	ibool		adjust,	/*!< in: TRUE if should adjust the
       
  7663  				cursor position even if compression occurs */
       
  7664  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7665 -	__attribute__((nonnull));
       
  7666 +	MY_ATTRIBUTE((nonnull));
       
  7667  /*******************************************************//**
       
  7668  Removes the record on which the tree cursor is positioned. It is assumed
       
  7669  that the mtr has an x-latch on the page where the cursor is positioned,
       
  7670 @@ -474,7 +474,7 @@ btr_cur_optimistic_delete_func(
       
  7671  				TRUE on a leaf page of a secondary
       
  7672  				index, the mtr must be committed
       
  7673  				before latching any further pages */
       
  7674 -	__attribute__((nonnull, warn_unused_result));
       
  7675 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7676  # ifdef UNIV_DEBUG
       
  7677  #  define btr_cur_optimistic_delete(cursor, flags, mtr)		\
       
  7678  	btr_cur_optimistic_delete_func(cursor, flags, mtr)
       
  7679 @@ -510,7 +510,7 @@ btr_cur_pessimistic_delete(
       
  7680  	ulint		flags,	/*!< in: BTR_CREATE_FLAG or 0 */
       
  7681  	enum trx_rb_ctx	rb_ctx,	/*!< in: rollback context */
       
  7682  	mtr_t*		mtr)	/*!< in: mtr */
       
  7683 -	__attribute__((nonnull));
       
  7684 +	MY_ATTRIBUTE((nonnull));
       
  7685  #endif /* !UNIV_HOTBACKUP */
       
  7686  /***********************************************************//**
       
  7687  Parses a redo log record of updating a record in-place.
       
  7688 @@ -603,7 +603,7 @@ btr_cur_disown_inherited_fields(
       
  7689  	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
       
  7690  	const upd_t*	update,	/*!< in: update vector */
       
  7691  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
  7692 -	__attribute__((nonnull(2,3,4,5,6)));
       
  7693 +	MY_ATTRIBUTE((nonnull(2,3,4,5,6)));
       
  7694  
       
  7695  /** Operation code for btr_store_big_rec_extern_fields(). */
       
  7696  enum blob_op {
       
  7697 @@ -623,7 +623,7 @@ ibool
       
  7698  btr_blob_op_is_update(
       
  7699  /*==================*/
       
  7700  	enum blob_op	op)	/*!< in: operation */
       
  7701 -	__attribute__((warn_unused_result));
       
  7702 +	MY_ATTRIBUTE((warn_unused_result));
       
  7703  
       
  7704  /*******************************************************************//**
       
  7705  Stores the fields in big_rec_vec to the tablespace and puts pointers to
       
  7706 @@ -648,7 +648,7 @@ btr_store_big_rec_extern_fields(
       
  7707  	mtr_t*		btr_mtr,	/*!< in: mtr containing the
       
  7708  					latches to the clustered index */
       
  7709  	enum blob_op	op)		/*! in: operation code */
       
  7710 -	__attribute__((nonnull, warn_unused_result));
       
  7711 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7712  
       
  7713  /*******************************************************************//**
       
  7714  Frees the space in an externally stored field to the file space
       
  7715 @@ -742,7 +742,7 @@ btr_push_update_extern_fields(
       
  7716  	dtuple_t*	tuple,	/*!< in/out: data tuple */
       
  7717  	const upd_t*	update,	/*!< in: update vector */
       
  7718  	mem_heap_t*	heap)	/*!< in: memory heap */
       
  7719 -	__attribute__((nonnull));
       
  7720 +	MY_ATTRIBUTE((nonnull));
       
  7721  /***********************************************************//**
       
  7722  Sets a secondary index record's delete mark to the given value. This
       
  7723  function is only used by the insert buffer merge mechanism. */
       
  7724 --- a/storage/innobase/include/btr0pcur.h
       
  7725 +++ b/storage/innobase/include/btr0pcur.h
       
  7726 @@ -1,6 +1,6 @@
       
  7727  /*****************************************************************************
       
  7728  
       
  7729 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  7730 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7731  
       
  7732  This program is free software; you can redistribute it and/or modify it under
       
  7733  the terms of the GNU General Public License as published by the Free Software
       
  7734 @@ -155,7 +155,7 @@ btr_pcur_open_at_index_side(
       
  7735  	ulint		level,		/*!< in: level to search for
       
  7736  					(0=leaf) */
       
  7737  	mtr_t*		mtr)		/*!< in/out: mini-transaction */
       
  7738 -	__attribute__((nonnull));
       
  7739 +	MY_ATTRIBUTE((nonnull));
       
  7740  /**************************************************************//**
       
  7741  Gets the up_match value for a pcur after a search.
       
  7742  @return number of matched fields at the cursor or to the right if
       
  7743 --- a/storage/innobase/include/btr0sea.h
       
  7744 +++ b/storage/innobase/include/btr0sea.h
       
  7745 @@ -1,6 +1,6 @@
       
  7746  /*****************************************************************************
       
  7747  
       
  7748 -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
  7749 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7750  
       
  7751  This program is free software; you can redistribute it and/or modify it under
       
  7752  the terms of the GNU General Public License as published by the Free Software
       
  7753 @@ -69,7 +69,7 @@ btr_search_t*
       
  7754  btr_search_get_info(
       
  7755  /*================*/
       
  7756  	dict_index_t*	index)	/*!< in: index */
       
  7757 -	__attribute__((nonnull));
       
  7758 +	MY_ATTRIBUTE((nonnull));
       
  7759  /*****************************************************************//**
       
  7760  Creates and initializes a search info struct.
       
  7761  @return	own: search info struct */
       
  7762 --- a/storage/innobase/include/btr0types.h
       
  7763 +++ b/storage/innobase/include/btr0types.h
       
  7764 @@ -1,6 +1,6 @@
       
  7765  /*****************************************************************************
       
  7766  
       
  7767 -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
  7768 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7769  
       
  7770  This program is free software; you can redistribute it and/or modify it under
       
  7771  the terms of the GNU General Public License as published by the Free Software
       
  7772 @@ -81,7 +81,7 @@ btr_blob_dbg_rbt_insert(
       
  7773  	dict_index_t*		index,	/*!< in/out: index tree */
       
  7774  	const btr_blob_dbg_t*	b,	/*!< in: the reference */
       
  7775  	const char*		ctx)	/*!< in: context (for logging) */
       
  7776 -	__attribute__((nonnull));
       
  7777 +	MY_ATTRIBUTE((nonnull));
       
  7778  
       
  7779  /** Remove from index->blobs a reference to an off-page column.
       
  7780  @param index	the index tree
       
  7781 @@ -94,7 +94,7 @@ btr_blob_dbg_rbt_delete(
       
  7782  	dict_index_t*		index,	/*!< in/out: index tree */
       
  7783  	const btr_blob_dbg_t*	b,	/*!< in: the reference */
       
  7784  	const char*		ctx)	/*!< in: context (for logging) */
       
  7785 -	__attribute__((nonnull));
       
  7786 +	MY_ATTRIBUTE((nonnull));
       
  7787  
       
  7788  /**************************************************************//**
       
  7789  Add to index->blobs any references to off-page columns from a record.
       
  7790 @@ -107,7 +107,7 @@ btr_blob_dbg_add_rec(
       
  7791  	dict_index_t*	index,	/*!< in/out: index */
       
  7792  	const ulint*	offsets,/*!< in: offsets */
       
  7793  	const char*	ctx)	/*!< in: context (for logging) */
       
  7794 -	__attribute__((nonnull));
       
  7795 +	MY_ATTRIBUTE((nonnull));
       
  7796  /**************************************************************//**
       
  7797  Remove from index->blobs any references to off-page columns from a record.
       
  7798  @return number of references removed */
       
  7799 @@ -119,7 +119,7 @@ btr_blob_dbg_remove_rec(
       
  7800  	dict_index_t*	index,	/*!< in/out: index */
       
  7801  	const ulint*	offsets,/*!< in: offsets */
       
  7802  	const char*	ctx)	/*!< in: context (for logging) */
       
  7803 -	__attribute__((nonnull));
       
  7804 +	MY_ATTRIBUTE((nonnull));
       
  7805  /**************************************************************//**
       
  7806  Count and add to index->blobs any references to off-page columns
       
  7807  from records on a page.
       
  7808 @@ -131,7 +131,7 @@ btr_blob_dbg_add(
       
  7809  	const page_t*	page,	/*!< in: rewritten page */
       
  7810  	dict_index_t*	index,	/*!< in/out: index */
       
  7811  	const char*	ctx)	/*!< in: context (for logging) */
       
  7812 -	__attribute__((nonnull));
       
  7813 +	MY_ATTRIBUTE((nonnull));
       
  7814  /**************************************************************//**
       
  7815  Count and remove from index->blobs any references to off-page columns
       
  7816  from records on a page.
       
  7817 @@ -144,7 +144,7 @@ btr_blob_dbg_remove(
       
  7818  	const page_t*	page,	/*!< in: b-tree page */
       
  7819  	dict_index_t*	index,	/*!< in/out: index */
       
  7820  	const char*	ctx)	/*!< in: context (for logging) */
       
  7821 -	__attribute__((nonnull));
       
  7822 +	MY_ATTRIBUTE((nonnull));
       
  7823  /**************************************************************//**
       
  7824  Restore in index->blobs any references to off-page columns
       
  7825  Used when page reorganize fails due to compressed page overflow. */
       
  7826 @@ -156,7 +156,7 @@ btr_blob_dbg_restore(
       
  7827  	const page_t*	page,	/*!< in: copy of original page */
       
  7828  	dict_index_t*	index,	/*!< in/out: index */
       
  7829  	const char*	ctx)	/*!< in: context (for logging) */
       
  7830 -	__attribute__((nonnull));
       
  7831 +	MY_ATTRIBUTE((nonnull));
       
  7832  
       
  7833  /** Operation that processes the BLOB references of an index record
       
  7834  @param[in]	rec	record on index page
       
  7835 @@ -180,7 +180,7 @@ btr_blob_dbg_op(
       
  7836  	dict_index_t*		index,	/*!< in/out: index */
       
  7837  	const char*		ctx,	/*!< in: context (for logging) */
       
  7838  	const btr_blob_dbg_op_f	op)	/*!< in: operation on records */
       
  7839 -	__attribute__((nonnull(1,3,4,5)));
       
  7840 +	MY_ATTRIBUTE((nonnull(1,3,4,5)));
       
  7841  #else /* UNIV_BLOB_DEBUG */
       
  7842  # define btr_blob_dbg_add_rec(rec, index, offsets, ctx)		((void) 0)
       
  7843  # define btr_blob_dbg_add(page, index, ctx)			((void) 0)
       
  7844 --- a/storage/innobase/include/buf0buddy.h
       
  7845 +++ b/storage/innobase/include/buf0buddy.h
       
  7846 @@ -1,6 +1,6 @@
       
  7847  /*****************************************************************************
       
  7848  
       
  7849 -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
  7850 +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7851  
       
  7852  This program is free software; you can redistribute it and/or modify it under
       
  7853  the terms of the GNU General Public License as published by the Free Software
       
  7854 @@ -54,7 +54,7 @@ buf_buddy_alloc(
       
  7855  				       	storage was allocated from the
       
  7856  				       	LRU list and buf_pool->mutex was
       
  7857  				       	temporarily released */
       
  7858 -	__attribute__((malloc, nonnull));
       
  7859 +	MY_ATTRIBUTE((malloc, nonnull));
       
  7860  
       
  7861  /**********************************************************************//**
       
  7862  Deallocate a block. */
       
  7863 @@ -68,7 +68,7 @@ buf_buddy_free(
       
  7864  					be pointed to by the buffer pool */
       
  7865  	ulint		size)		/*!< in: block size,
       
  7866  					up to UNIV_PAGE_SIZE */
       
  7867 -	__attribute__((nonnull));
       
  7868 +	MY_ATTRIBUTE((nonnull));
       
  7869  
       
  7870  #ifndef UNIV_NONINL
       
  7871  # include "buf0buddy.ic"
       
  7872 --- a/storage/innobase/include/buf0buddy.ic
       
  7873 +++ b/storage/innobase/include/buf0buddy.ic
       
  7874 @@ -1,6 +1,6 @@
       
  7875  /*****************************************************************************
       
  7876  
       
  7877 -Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
  7878 +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7879  
       
  7880  This program is free software; you can redistribute it and/or modify it under
       
  7881  the terms of the GNU General Public License as published by the Free Software
       
  7882 @@ -50,7 +50,7 @@ buf_buddy_alloc_low(
       
  7883  					allocated from the LRU list and
       
  7884  					buf_pool->mutex was temporarily
       
  7885  					released */
       
  7886 -	__attribute__((malloc, nonnull));
       
  7887 +	MY_ATTRIBUTE((malloc, nonnull));
       
  7888  
       
  7889  /**********************************************************************//**
       
  7890  Deallocate a block. */
       
  7891 @@ -63,7 +63,7 @@ buf_buddy_free_low(
       
  7892  					pointed to by the buffer pool */
       
  7893  	ulint		i)		/*!< in: index of buf_pool->zip_free[],
       
  7894  					or BUF_BUDDY_SIZES */
       
  7895 -	__attribute__((nonnull));
       
  7896 +	MY_ATTRIBUTE((nonnull));
       
  7897  
       
  7898  /**********************************************************************//**
       
  7899  Get the index of buf_pool->zip_free[] for a given block size.
       
  7900 --- a/storage/innobase/include/buf0buf.h
       
  7901 +++ b/storage/innobase/include/buf0buf.h
       
  7902 @@ -1,6 +1,6 @@
       
  7903  /*****************************************************************************
       
  7904  
       
  7905 -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  7906 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  7907  
       
  7908  This program is free software; you can redistribute it and/or modify it under
       
  7909  the terms of the GNU General Public License as published by the Free Software
       
  7910 @@ -258,7 +258,7 @@ buf_relocate(
       
  7911  				buf_page_get_state(bpage) must be
       
  7912  				BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */
       
  7913  	buf_page_t*	dpage)	/*!< in/out: destination control block */
       
  7914 -	__attribute__((nonnull));
       
  7915 +	MY_ATTRIBUTE((nonnull));
       
  7916  /*********************************************************************//**
       
  7917  Gets the current size of buffer buf_pool in bytes.
       
  7918  @return	size in bytes */
       
  7919 @@ -289,7 +289,7 @@ UNIV_INLINE
       
  7920  buf_page_t*
       
  7921  buf_page_alloc_descriptor(void)
       
  7922  /*===========================*/
       
  7923 -	__attribute__((malloc));
       
  7924 +	MY_ATTRIBUTE((malloc));
       
  7925  /********************************************************************//**
       
  7926  Free a buf_page_t descriptor. */
       
  7927  UNIV_INLINE
       
  7928 @@ -297,7 +297,7 @@ void
       
  7929  buf_page_free_descriptor(
       
  7930  /*=====================*/
       
  7931  	buf_page_t*	bpage)	/*!< in: bpage descriptor to free. */
       
  7932 -	__attribute__((nonnull));
       
  7933 +	MY_ATTRIBUTE((nonnull));
       
  7934  
       
  7935  /********************************************************************//**
       
  7936  Allocates a buffer block.
       
  7937 @@ -534,7 +534,7 @@ ulint
       
  7938  buf_page_get_freed_page_clock(
       
  7939  /*==========================*/
       
  7940  	const buf_page_t*	bpage)	/*!< in: block */
       
  7941 -	__attribute__((pure));
       
  7942 +	MY_ATTRIBUTE((pure));
       
  7943  /********************************************************************//**
       
  7944  Reads the freed_page_clock of a buffer block.
       
  7945  @return	freed_page_clock */
       
  7946 @@ -543,7 +543,7 @@ ulint
       
  7947  buf_block_get_freed_page_clock(
       
  7948  /*===========================*/
       
  7949  	const buf_block_t*	block)	/*!< in: block */
       
  7950 -	__attribute__((pure));
       
  7951 +	MY_ATTRIBUTE((pure));
       
  7952  
       
  7953  /********************************************************************//**
       
  7954  Tells if a block is still close enough to the MRU end of the LRU list
       
  7955 @@ -606,7 +606,7 @@ buf_block_buf_fix_inc_func(
       
  7956  	ulint		line,	/*!< in: line */
       
  7957  # endif /* UNIV_SYNC_DEBUG */
       
  7958  	buf_block_t*	block)	/*!< in/out: block to bufferfix */
       
  7959 -	__attribute__((nonnull));
       
  7960 +	MY_ATTRIBUTE((nonnull));
       
  7961  
       
  7962  /*******************************************************************//**
       
  7963  Increments the bufferfix count. */
       
  7964 @@ -652,7 +652,7 @@ buf_page_is_corrupted(
       
  7965  	const byte*	read_buf,	/*!< in: a database page */
       
  7966  	ulint		zip_size)	/*!< in: size of compressed page;
       
  7967  					0 for uncompressed pages */
       
  7968 -	__attribute__((nonnull, warn_unused_result));
       
  7969 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  7970  /********************************************************************//**
       
  7971  Checks if a page is all zeroes.
       
  7972  @return	TRUE if the page is all zeroes */
       
  7973 @@ -682,7 +682,7 @@ ulint
       
  7974  buf_block_get_lock_hash_val(
       
  7975  /*========================*/
       
  7976  	const buf_block_t*	block)	/*!< in: block */
       
  7977 -	__attribute__((pure));
       
  7978 +	MY_ATTRIBUTE((pure));
       
  7979  #ifdef UNIV_DEBUG
       
  7980  /*********************************************************************//**
       
  7981  Finds a block in the buffer pool that points to a
       
  7982 @@ -743,7 +743,7 @@ buf_page_print(
       
  7983  	ulint		flags)		/*!< in: 0 or
       
  7984  					BUF_PAGE_PRINT_NO_CRASH or
       
  7985  					BUF_PAGE_PRINT_NO_FULL */
       
  7986 -	UNIV_COLD __attribute__((nonnull));
       
  7987 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
  7988  /********************************************************************//**
       
  7989  Decompress a block.
       
  7990  @return	TRUE if successful */
       
  7991 @@ -870,7 +870,7 @@ enum buf_page_state
       
  7992  buf_block_get_state(
       
  7993  /*================*/
       
  7994  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  7995 -	__attribute__((pure));
       
  7996 +	MY_ATTRIBUTE((pure));
       
  7997  /*********************************************************************//**
       
  7998  Sets the state of a block. */
       
  7999  UNIV_INLINE
       
  8000 @@ -895,7 +895,7 @@ ibool
       
  8001  buf_page_in_file(
       
  8002  /*=============*/
       
  8003  	const buf_page_t*	bpage)	/*!< in: pointer to control block */
       
  8004 -	__attribute__((pure));
       
  8005 +	MY_ATTRIBUTE((pure));
       
  8006  #ifndef UNIV_HOTBACKUP
       
  8007  /*********************************************************************//**
       
  8008  Determines if a block should be on unzip_LRU list.
       
  8009 @@ -905,7 +905,7 @@ ibool
       
  8010  buf_page_belongs_to_unzip_LRU(
       
  8011  /*==========================*/
       
  8012  	const buf_page_t*	bpage)	/*!< in: pointer to control block */
       
  8013 -	__attribute__((pure));
       
  8014 +	MY_ATTRIBUTE((pure));
       
  8015  
       
  8016  /*********************************************************************//**
       
  8017  Gets the mutex of a block.
       
  8018 @@ -915,7 +915,7 @@ ib_mutex_t*
       
  8019  buf_page_get_mutex(
       
  8020  /*===============*/
       
  8021  	const buf_page_t*	bpage)	/*!< in: pointer to control block */
       
  8022 -	__attribute__((pure));
       
  8023 +	MY_ATTRIBUTE((pure));
       
  8024  
       
  8025  /*********************************************************************//**
       
  8026  Get the flush type of a page.
       
  8027 @@ -925,7 +925,7 @@ buf_flush_t
       
  8028  buf_page_get_flush_type(
       
  8029  /*====================*/
       
  8030  	const buf_page_t*	bpage)	/*!< in: buffer page */
       
  8031 -	__attribute__((pure));
       
  8032 +	MY_ATTRIBUTE((pure));
       
  8033  /*********************************************************************//**
       
  8034  Set the flush type of a page. */
       
  8035  UNIV_INLINE
       
  8036 @@ -951,7 +951,7 @@ enum buf_io_fix
       
  8037  buf_page_get_io_fix(
       
  8038  /*================*/
       
  8039  	const buf_page_t*	bpage)	/*!< in: pointer to the control block */
       
  8040 -	__attribute__((pure));
       
  8041 +	MY_ATTRIBUTE((pure));
       
  8042  /*********************************************************************//**
       
  8043  Gets the io_fix state of a block.
       
  8044  @return	io_fix state */
       
  8045 @@ -960,7 +960,7 @@ enum buf_io_fix
       
  8046  buf_block_get_io_fix(
       
  8047  /*================*/
       
  8048  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  8049 -	__attribute__((pure));
       
  8050 +	MY_ATTRIBUTE((pure));
       
  8051  /*********************************************************************//**
       
  8052  Sets the io_fix state of a block. */
       
  8053  UNIV_INLINE
       
  8054 @@ -1006,7 +1006,7 @@ ibool
       
  8055  buf_page_can_relocate(
       
  8056  /*==================*/
       
  8057  	const buf_page_t*	bpage)	/*!< control block being relocated */
       
  8058 -	__attribute__((pure));
       
  8059 +	MY_ATTRIBUTE((pure));
       
  8060  
       
  8061  /*********************************************************************//**
       
  8062  Determine if a block has been flagged old.
       
  8063 @@ -1016,7 +1016,7 @@ ibool
       
  8064  buf_page_is_old(
       
  8065  /*============*/
       
  8066  	const buf_page_t*	bpage)	/*!< in: control block */
       
  8067 -	__attribute__((pure));
       
  8068 +	MY_ATTRIBUTE((pure));
       
  8069  /*********************************************************************//**
       
  8070  Flag a block old. */
       
  8071  UNIV_INLINE
       
  8072 @@ -1033,7 +1033,7 @@ unsigned
       
  8073  buf_page_is_accessed(
       
  8074  /*=================*/
       
  8075  	const buf_page_t*	bpage)	/*!< in: control block */
       
  8076 -	__attribute__((nonnull, pure));
       
  8077 +	MY_ATTRIBUTE((nonnull, pure));
       
  8078  /*********************************************************************//**
       
  8079  Flag a block accessed. */
       
  8080  UNIV_INLINE
       
  8081 @@ -1041,7 +1041,7 @@ void
       
  8082  buf_page_set_accessed(
       
  8083  /*==================*/
       
  8084  	buf_page_t*	bpage)		/*!< in/out: control block */
       
  8085 -	__attribute__((nonnull));
       
  8086 +	MY_ATTRIBUTE((nonnull));
       
  8087  /*********************************************************************//**
       
  8088  Gets the buf_block_t handle of a buffered file block if an uncompressed
       
  8089  page frame exists, or NULL. Note: even though bpage is not declared a
       
  8090 @@ -1052,7 +1052,7 @@ buf_block_t*
       
  8091  buf_page_get_block(
       
  8092  /*===============*/
       
  8093  	buf_page_t*	bpage)	/*!< in: control block, or NULL */
       
  8094 -	__attribute__((pure));
       
  8095 +	MY_ATTRIBUTE((pure));
       
  8096  #endif /* !UNIV_HOTBACKUP */
       
  8097  #ifdef UNIV_DEBUG
       
  8098  /*********************************************************************//**
       
  8099 @@ -1063,7 +1063,7 @@ buf_frame_t*
       
  8100  buf_block_get_frame(
       
  8101  /*================*/
       
  8102  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  8103 -	__attribute__((pure));
       
  8104 +	MY_ATTRIBUTE((pure));
       
  8105  #else /* UNIV_DEBUG */
       
  8106  # define buf_block_get_frame(block) (block)->frame
       
  8107  #endif /* UNIV_DEBUG */
       
  8108 @@ -1075,7 +1075,7 @@ ulint
       
  8109  buf_page_get_space(
       
  8110  /*===============*/
       
  8111  	const buf_page_t*	bpage)	/*!< in: pointer to the control block */
       
  8112 -	__attribute__((pure));
       
  8113 +	MY_ATTRIBUTE((pure));
       
  8114  /*********************************************************************//**
       
  8115  Gets the space id of a block.
       
  8116  @return	space id */
       
  8117 @@ -1084,7 +1084,7 @@ ulint
       
  8118  buf_block_get_space(
       
  8119  /*================*/
       
  8120  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  8121 -	__attribute__((pure));
       
  8122 +	MY_ATTRIBUTE((pure));
       
  8123  /*********************************************************************//**
       
  8124  Gets the page number of a block.
       
  8125  @return	page number */
       
  8126 @@ -1093,7 +1093,7 @@ ulint
       
  8127  buf_page_get_page_no(
       
  8128  /*=================*/
       
  8129  	const buf_page_t*	bpage)	/*!< in: pointer to the control block */
       
  8130 -	__attribute__((pure));
       
  8131 +	MY_ATTRIBUTE((pure));
       
  8132  /*********************************************************************//**
       
  8133  Gets the page number of a block.
       
  8134  @return	page number */
       
  8135 @@ -1102,7 +1102,7 @@ ulint
       
  8136  buf_block_get_page_no(
       
  8137  /*==================*/
       
  8138  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  8139 -	__attribute__((pure));
       
  8140 +	MY_ATTRIBUTE((pure));
       
  8141  /*********************************************************************//**
       
  8142  Gets the compressed page size of a block.
       
  8143  @return	compressed page size, or 0 */
       
  8144 @@ -1111,7 +1111,7 @@ ulint
       
  8145  buf_page_get_zip_size(
       
  8146  /*==================*/
       
  8147  	const buf_page_t*	bpage)	/*!< in: pointer to the control block */
       
  8148 -	__attribute__((pure));
       
  8149 +	MY_ATTRIBUTE((pure));
       
  8150  /*********************************************************************//**
       
  8151  Gets the compressed page size of a block.
       
  8152  @return	compressed page size, or 0 */
       
  8153 @@ -1120,7 +1120,7 @@ ulint
       
  8154  buf_block_get_zip_size(
       
  8155  /*===================*/
       
  8156  	const buf_block_t*	block)	/*!< in: pointer to the control block */
       
  8157 -	__attribute__((pure));
       
  8158 +	MY_ATTRIBUTE((pure));
       
  8159  /*********************************************************************//**
       
  8160  Gets the compressed page descriptor corresponding to an uncompressed page
       
  8161  if applicable. */
       
  8162 @@ -1209,7 +1209,7 @@ buf_page_address_fold(
       
  8163  /*==================*/
       
  8164  	ulint	space,	/*!< in: space id */
       
  8165  	ulint	offset)	/*!< in: offset of the page within space */
       
  8166 -	__attribute__((const));
       
  8167 +	MY_ATTRIBUTE((const));
       
  8168  /********************************************************************//**
       
  8169  Calculates the index of a buffer pool to the buf_pool[] array.
       
  8170  @return	the position of the buffer pool in buf_pool[] */
       
  8171 @@ -1218,7 +1218,7 @@ ulint
       
  8172  buf_pool_index(
       
  8173  /*===========*/
       
  8174  	const buf_pool_t*	buf_pool)	/*!< in: buffer pool */
       
  8175 -	__attribute__((nonnull, const));
       
  8176 +	MY_ATTRIBUTE((nonnull, const));
       
  8177  /******************************************************************//**
       
  8178  Returns the buffer pool instance given a page instance
       
  8179  @return buf_pool */
       
  8180 @@ -1358,7 +1358,7 @@ buf_pool_watch_is_sentinel(
       
  8181  /*=======================*/
       
  8182  	buf_pool_t*		buf_pool,	/*!< buffer pool instance */
       
  8183  	const buf_page_t*	bpage)		/*!< in: block */
       
  8184 -	__attribute__((nonnull, warn_unused_result));
       
  8185 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8186  /****************************************************************//**
       
  8187  Add watch for the given page to be read in. Caller must have the buffer pool
       
  8188  @return NULL if watch set, block if the page is in the buffer pool */
       
  8189 @@ -1369,7 +1369,7 @@ buf_pool_watch_set(
       
  8190  	ulint	space,	/*!< in: space id */
       
  8191  	ulint	offset,	/*!< in: page number */
       
  8192  	ulint	fold)	/*!< in: buf_page_address_fold(space, offset) */
       
  8193 -	__attribute__((warn_unused_result));
       
  8194 +	MY_ATTRIBUTE((warn_unused_result));
       
  8195  /****************************************************************//**
       
  8196  Stop watching if the page has been read in.
       
  8197  buf_pool_watch_set(space,offset) must have returned NULL before. */
       
  8198 @@ -1390,7 +1390,7 @@ buf_pool_watch_occurred(
       
  8199  /*====================*/
       
  8200  	ulint	space,	/*!< in: space id */
       
  8201  	ulint	offset)	/*!< in: page number */
       
  8202 -	__attribute__((warn_unused_result));
       
  8203 +	MY_ATTRIBUTE((warn_unused_result));
       
  8204  /********************************************************************//**
       
  8205  Get total buffer pool statistics. */
       
  8206  UNIV_INTERN
       
  8207 --- a/storage/innobase/include/buf0flu.h
       
  8208 +++ b/storage/innobase/include/buf0flu.h
       
  8209 @@ -1,6 +1,6 @@
       
  8210  /*****************************************************************************
       
  8211  
       
  8212 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  8213 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8214  
       
  8215  This program is free software; you can redistribute it and/or modify it under
       
  8216  the terms of the GNU General Public License as published by the Free Software
       
  8217 @@ -85,7 +85,7 @@ buf_flush_page_try(
       
  8218  /*===============*/
       
  8219  	buf_pool_t*	buf_pool,	/*!< in/out: buffer pool instance */
       
  8220  	buf_block_t*	block)		/*!< in/out: buffer control block */
       
  8221 -	__attribute__((nonnull, warn_unused_result));
       
  8222 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8223  # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
       
  8224  /*******************************************************************//**
       
  8225  This utility flushes dirty blocks from the end of the flush list of
       
  8226 @@ -254,7 +254,7 @@ buf_flush_ready_for_flush(
       
  8227  	buf_page_t*	bpage,	/*!< in: buffer control block, must be
       
  8228  				buf_page_in_file(bpage) */
       
  8229  	buf_flush_t	flush_type)/*!< in: type of flush */
       
  8230 -	__attribute__((warn_unused_result));
       
  8231 +	MY_ATTRIBUTE((warn_unused_result));
       
  8232  
       
  8233  #ifdef UNIV_DEBUG
       
  8234  /******************************************************************//**
       
  8235 --- a/storage/innobase/include/buf0lru.h
       
  8236 +++ b/storage/innobase/include/buf0lru.h
       
  8237 @@ -1,6 +1,6 @@
       
  8238  /*****************************************************************************
       
  8239  
       
  8240 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  8241 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8242  
       
  8243  This program is free software; you can redistribute it and/or modify it under
       
  8244  the terms of the GNU General Public License as published by the Free Software
       
  8245 @@ -93,7 +93,7 @@ buf_LRU_free_page(
       
  8246  	buf_page_t*	bpage,	/*!< in: block to be freed */
       
  8247  	bool		zip)	/*!< in: true if should remove also the
       
  8248  				compressed page of an uncompressed page */
       
  8249 -	__attribute__((nonnull));
       
  8250 +	MY_ATTRIBUTE((nonnull));
       
  8251  /******************************************************************//**
       
  8252  Try to free a replaceable block.
       
  8253  @return	TRUE if found and freed */
       
  8254 @@ -105,7 +105,7 @@ buf_LRU_scan_and_free_block(
       
  8255  	ibool		scan_all)	/*!< in: scan whole LRU list
       
  8256  					if TRUE, otherwise scan only
       
  8257  					'old' blocks. */
       
  8258 -	__attribute__((nonnull,warn_unused_result));
       
  8259 +	MY_ATTRIBUTE((nonnull,warn_unused_result));
       
  8260  /******************************************************************//**
       
  8261  Returns a free block from the buf_pool.  The block is taken off the
       
  8262  free list.  If it is empty, returns NULL.
       
  8263 @@ -146,7 +146,7 @@ buf_block_t*
       
  8264  buf_LRU_get_free_block(
       
  8265  /*===================*/
       
  8266  	buf_pool_t*	buf_pool)	/*!< in/out: buffer pool instance */
       
  8267 -	__attribute__((nonnull,warn_unused_result));
       
  8268 +	MY_ATTRIBUTE((nonnull,warn_unused_result));
       
  8269  /******************************************************************//**
       
  8270  Determines if the unzip_LRU list should be used for evicting a victim
       
  8271  instead of the general LRU list.
       
  8272 @@ -229,7 +229,7 @@ buf_LRU_free_one_page(
       
  8273  	buf_page_t*	bpage)	/*!< in/out: block, must contain a file page and
       
  8274  				be in a state where it can be freed; there
       
  8275  				may or may not be a hash index to the page */
       
  8276 -	__attribute__((nonnull));
       
  8277 +	MY_ATTRIBUTE((nonnull));
       
  8278  
       
  8279  #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
       
  8280  /**********************************************************************//**
       
  8281 --- a/storage/innobase/include/data0data.h
       
  8282 +++ b/storage/innobase/include/data0data.h
       
  8283 @@ -1,6 +1,6 @@
       
  8284  /*****************************************************************************
       
  8285  
       
  8286 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  8287 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8288  
       
  8289  This program is free software; you can redistribute it and/or modify it under
       
  8290  the terms of the GNU General Public License as published by the Free Software
       
  8291 @@ -46,7 +46,7 @@ dtype_t*
       
  8292  dfield_get_type(
       
  8293  /*============*/
       
  8294  	const dfield_t*	field)	/*!< in: SQL data field */
       
  8295 -	__attribute__((nonnull, warn_unused_result));
       
  8296 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8297  /*********************************************************************//**
       
  8298  Gets pointer to the data in a field.
       
  8299  @return	pointer to data */
       
  8300 @@ -55,7 +55,7 @@ void*
       
  8301  dfield_get_data(
       
  8302  /*============*/
       
  8303  	const dfield_t* field)	/*!< in: field */
       
  8304 -	__attribute__((nonnull, warn_unused_result));
       
  8305 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8306  #else /* UNIV_DEBUG */
       
  8307  # define dfield_get_type(field) (&(field)->type)
       
  8308  # define dfield_get_data(field) ((field)->data)
       
  8309 @@ -68,7 +68,7 @@ dfield_set_type(
       
  8310  /*============*/
       
  8311  	dfield_t*	field,	/*!< in: SQL data field */
       
  8312  	const dtype_t*	type)	/*!< in: pointer to data type struct */
       
  8313 -	__attribute__((nonnull));
       
  8314 +	MY_ATTRIBUTE((nonnull));
       
  8315  /*********************************************************************//**
       
  8316  Gets length of field data.
       
  8317  @return	length of data; UNIV_SQL_NULL if SQL null data */
       
  8318 @@ -77,7 +77,7 @@ ulint
       
  8319  dfield_get_len(
       
  8320  /*===========*/
       
  8321  	const dfield_t* field)	/*!< in: field */
       
  8322 -	__attribute__((nonnull, warn_unused_result));
       
  8323 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8324  /*********************************************************************//**
       
  8325  Sets length in a field. */
       
  8326  UNIV_INLINE
       
  8327 @@ -86,7 +86,7 @@ dfield_set_len(
       
  8328  /*===========*/
       
  8329  	dfield_t*	field,	/*!< in: field */
       
  8330  	ulint		len)	/*!< in: length or UNIV_SQL_NULL */
       
  8331 -	__attribute__((nonnull));
       
  8332 +	MY_ATTRIBUTE((nonnull));
       
  8333  /*********************************************************************//**
       
  8334  Determines if a field is SQL NULL
       
  8335  @return	nonzero if SQL null data */
       
  8336 @@ -95,7 +95,7 @@ ulint
       
  8337  dfield_is_null(
       
  8338  /*===========*/
       
  8339  	const dfield_t* field)	/*!< in: field */
       
  8340 -	__attribute__((nonnull, warn_unused_result));
       
  8341 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8342  /*********************************************************************//**
       
  8343  Determines if a field is externally stored
       
  8344  @return	nonzero if externally stored */
       
  8345 @@ -104,7 +104,7 @@ ulint
       
  8346  dfield_is_ext(
       
  8347  /*==========*/
       
  8348  	const dfield_t* field)	/*!< in: field */
       
  8349 -	__attribute__((nonnull, warn_unused_result));
       
  8350 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8351  /*********************************************************************//**
       
  8352  Sets the "external storage" flag */
       
  8353  UNIV_INLINE
       
  8354 @@ -112,7 +112,7 @@ void
       
  8355  dfield_set_ext(
       
  8356  /*===========*/
       
  8357  	dfield_t*	field)	/*!< in/out: field */
       
  8358 -	__attribute__((nonnull));
       
  8359 +	MY_ATTRIBUTE((nonnull));
       
  8360  /*********************************************************************//**
       
  8361  Sets pointer to the data and length in a field. */
       
  8362  UNIV_INLINE
       
  8363 @@ -122,7 +122,7 @@ dfield_set_data(
       
  8364  	dfield_t*	field,	/*!< in: field */
       
  8365  	const void*	data,	/*!< in: data */
       
  8366  	ulint		len)	/*!< in: length or UNIV_SQL_NULL */
       
  8367 -	__attribute__((nonnull(1)));
       
  8368 +	MY_ATTRIBUTE((nonnull(1)));
       
  8369  /*********************************************************************//**
       
  8370  Sets a data field to SQL NULL. */
       
  8371  UNIV_INLINE
       
  8372 @@ -130,7 +130,7 @@ void
       
  8373  dfield_set_null(
       
  8374  /*============*/
       
  8375  	dfield_t*	field)	/*!< in/out: field */
       
  8376 -	__attribute__((nonnull));
       
  8377 +	MY_ATTRIBUTE((nonnull));
       
  8378  /**********************************************************************//**
       
  8379  Writes an SQL null field full of zeros. */
       
  8380  UNIV_INLINE
       
  8381 @@ -139,7 +139,7 @@ data_write_sql_null(
       
  8382  /*================*/
       
  8383  	byte*	data,	/*!< in: pointer to a buffer of size len */
       
  8384  	ulint	len)	/*!< in: SQL null size in bytes */
       
  8385 -	__attribute__((nonnull));
       
  8386 +	MY_ATTRIBUTE((nonnull));
       
  8387  /*********************************************************************//**
       
  8388  Copies the data and len fields. */
       
  8389  UNIV_INLINE
       
  8390 @@ -148,7 +148,7 @@ dfield_copy_data(
       
  8391  /*=============*/
       
  8392  	dfield_t*	field1,	/*!< out: field to copy to */
       
  8393  	const dfield_t*	field2)	/*!< in: field to copy from */
       
  8394 -	__attribute__((nonnull));
       
  8395 +	MY_ATTRIBUTE((nonnull));
       
  8396  /*********************************************************************//**
       
  8397  Copies a data field to another. */
       
  8398  UNIV_INLINE
       
  8399 @@ -157,7 +157,7 @@ dfield_copy(
       
  8400  /*========*/
       
  8401  	dfield_t*	field1,	/*!< out: field to copy to */
       
  8402  	const dfield_t*	field2)	/*!< in: field to copy from */
       
  8403 -	__attribute__((nonnull));
       
  8404 +	MY_ATTRIBUTE((nonnull));
       
  8405  /*********************************************************************//**
       
  8406  Copies the data pointed to by a data field. */
       
  8407  UNIV_INLINE
       
  8408 @@ -166,7 +166,7 @@ dfield_dup(
       
  8409  /*=======*/
       
  8410  	dfield_t*	field,	/*!< in/out: data field */
       
  8411  	mem_heap_t*	heap)	/*!< in: memory heap where allocated */
       
  8412 -	__attribute__((nonnull));
       
  8413 +	MY_ATTRIBUTE((nonnull));
       
  8414  #ifndef UNIV_HOTBACKUP
       
  8415  /*********************************************************************//**
       
  8416  Tests if two data fields are equal.
       
  8417 @@ -181,7 +181,7 @@ dfield_datas_are_binary_equal(
       
  8418  	const dfield_t*	field2,	/*!< in: field */
       
  8419  	ulint		len)	/*!< in: maximum prefix to compare,
       
  8420  				or 0 to compare the whole field length */
       
  8421 -	__attribute__((nonnull, warn_unused_result));
       
  8422 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8423  /*********************************************************************//**
       
  8424  Tests if dfield data length and content is equal to the given.
       
  8425  @return	TRUE if equal */
       
  8426 @@ -192,7 +192,7 @@ dfield_data_is_binary_equal(
       
  8427  	const dfield_t*	field,	/*!< in: field */
       
  8428  	ulint		len,	/*!< in: data length or UNIV_SQL_NULL */
       
  8429  	const byte*	data)	/*!< in: data */
       
  8430 -	__attribute__((nonnull, warn_unused_result));
       
  8431 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8432  #endif /* !UNIV_HOTBACKUP */
       
  8433  /*********************************************************************//**
       
  8434  Gets number of fields in a data tuple.
       
  8435 @@ -202,7 +202,7 @@ ulint
       
  8436  dtuple_get_n_fields(
       
  8437  /*================*/
       
  8438  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8439 -	__attribute__((nonnull, warn_unused_result));
       
  8440 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8441  #ifdef UNIV_DEBUG
       
  8442  /*********************************************************************//**
       
  8443  Gets nth field of a tuple.
       
  8444 @@ -224,7 +224,7 @@ ulint
       
  8445  dtuple_get_info_bits(
       
  8446  /*=================*/
       
  8447  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8448 -	__attribute__((nonnull, warn_unused_result));
       
  8449 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8450  /*********************************************************************//**
       
  8451  Sets info bits in a data tuple. */
       
  8452  UNIV_INLINE
       
  8453 @@ -233,7 +233,7 @@ dtuple_set_info_bits(
       
  8454  /*=================*/
       
  8455  	dtuple_t*	tuple,		/*!< in: tuple */
       
  8456  	ulint		info_bits)	/*!< in: info bits */
       
  8457 -	__attribute__((nonnull));
       
  8458 +	MY_ATTRIBUTE((nonnull));
       
  8459  /*********************************************************************//**
       
  8460  Gets number of fields used in record comparisons.
       
  8461  @return	number of fields used in comparisons in rem0cmp.* */
       
  8462 @@ -242,7 +242,7 @@ ulint
       
  8463  dtuple_get_n_fields_cmp(
       
  8464  /*====================*/
       
  8465  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8466 -	__attribute__((nonnull, warn_unused_result));
       
  8467 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8468  /*********************************************************************//**
       
  8469  Gets number of fields used in record comparisons. */
       
  8470  UNIV_INLINE
       
  8471 @@ -252,7 +252,7 @@ dtuple_set_n_fields_cmp(
       
  8472  	dtuple_t*	tuple,		/*!< in: tuple */
       
  8473  	ulint		n_fields_cmp)	/*!< in: number of fields used in
       
  8474  					comparisons in rem0cmp.* */
       
  8475 -	__attribute__((nonnull));
       
  8476 +	MY_ATTRIBUTE((nonnull));
       
  8477  
       
  8478  /* Estimate the number of bytes that are going to be allocated when
       
  8479  creating a new dtuple_t object */
       
  8480 @@ -272,7 +272,7 @@ dtuple_create_from_mem(
       
  8481  	void*	buf,		/*!< in, out: buffer to use */
       
  8482  	ulint	buf_size,	/*!< in: buffer size */
       
  8483  	ulint	n_fields)	/*!< in: number of fields */
       
  8484 -	__attribute__((nonnull, warn_unused_result));
       
  8485 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8486  
       
  8487  /**********************************************************//**
       
  8488  Creates a data tuple to a memory heap. The default value for number
       
  8489 @@ -286,7 +286,7 @@ dtuple_create(
       
  8490  				is created, DTUPLE_EST_ALLOC(n_fields)
       
  8491  				bytes will be allocated from this heap */
       
  8492  	ulint		n_fields)/*!< in: number of fields */
       
  8493 -	__attribute__((nonnull, malloc));
       
  8494 +	MY_ATTRIBUTE((nonnull, malloc));
       
  8495  
       
  8496  /*********************************************************************//**
       
  8497  Sets number of fields used in a tuple. Normally this is set in
       
  8498 @@ -297,7 +297,7 @@ dtuple_set_n_fields(
       
  8499  /*================*/
       
  8500  	dtuple_t*	tuple,		/*!< in: tuple */
       
  8501  	ulint		n_fields)	/*!< in: number of fields */
       
  8502 -	__attribute__((nonnull));
       
  8503 +	MY_ATTRIBUTE((nonnull));
       
  8504  /*********************************************************************//**
       
  8505  Copies a data tuple to another.  This is a shallow copy; if a deep copy
       
  8506  is desired, dfield_dup() will have to be invoked on each field.
       
  8507 @@ -309,7 +309,7 @@ dtuple_copy(
       
  8508  	const dtuple_t*	tuple,	/*!< in: tuple to copy from */
       
  8509  	mem_heap_t*	heap)	/*!< in: memory heap
       
  8510  				where the tuple is created */
       
  8511 -	__attribute__((nonnull, malloc));
       
  8512 +	MY_ATTRIBUTE((nonnull, malloc));
       
  8513  /**********************************************************//**
       
  8514  The following function returns the sum of data lengths of a tuple. The space
       
  8515  occupied by the field structs or the tuple struct is not counted.
       
  8516 @@ -320,7 +320,7 @@ dtuple_get_data_size(
       
  8517  /*=================*/
       
  8518  	const dtuple_t*	tuple,	/*!< in: typed data tuple */
       
  8519  	ulint		comp)	/*!< in: nonzero=ROW_FORMAT=COMPACT  */
       
  8520 -	__attribute__((nonnull));
       
  8521 +	MY_ATTRIBUTE((nonnull));
       
  8522  /*********************************************************************//**
       
  8523  Computes the number of externally stored fields in a data tuple.
       
  8524  @return	number of fields */
       
  8525 @@ -329,7 +329,7 @@ ulint
       
  8526  dtuple_get_n_ext(
       
  8527  /*=============*/
       
  8528  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8529 -	__attribute__((nonnull));
       
  8530 +	MY_ATTRIBUTE((nonnull));
       
  8531  /************************************************************//**
       
  8532  Compare two data tuples, respecting the collation of character fields.
       
  8533  @return 1, 0 , -1 if tuple1 is greater, equal, less, respectively,
       
  8534 @@ -340,7 +340,7 @@ dtuple_coll_cmp(
       
  8535  /*============*/
       
  8536  	const dtuple_t*	tuple1,	/*!< in: tuple 1 */
       
  8537  	const dtuple_t*	tuple2)	/*!< in: tuple 2 */
       
  8538 -	__attribute__((nonnull, warn_unused_result));
       
  8539 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8540  /************************************************************//**
       
  8541  Folds a prefix given as the number of fields of a tuple.
       
  8542  @return	the folded value */
       
  8543 @@ -353,7 +353,7 @@ dtuple_fold(
       
  8544  	ulint		n_bytes,/*!< in: number of bytes to fold in an
       
  8545  				incomplete last field */
       
  8546  	index_id_t	tree_id)/*!< in: index tree id */
       
  8547 -	__attribute__((nonnull, pure, warn_unused_result));
       
  8548 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  8549  /*******************************************************************//**
       
  8550  Sets types of fields binary in a tuple. */
       
  8551  UNIV_INLINE
       
  8552 @@ -362,7 +362,7 @@ dtuple_set_types_binary(
       
  8553  /*====================*/
       
  8554  	dtuple_t*	tuple,	/*!< in: data tuple */
       
  8555  	ulint		n)	/*!< in: number of fields to set */
       
  8556 -	__attribute__((nonnull));
       
  8557 +	MY_ATTRIBUTE((nonnull));
       
  8558  /**********************************************************************//**
       
  8559  Checks if a dtuple contains an SQL null value.
       
  8560  @return	TRUE if some field is SQL null */
       
  8561 @@ -371,7 +371,7 @@ ibool
       
  8562  dtuple_contains_null(
       
  8563  /*=================*/
       
  8564  	const dtuple_t*	tuple)	/*!< in: dtuple */
       
  8565 -	__attribute__((nonnull, warn_unused_result));
       
  8566 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8567  /**********************************************************//**
       
  8568  Checks that a data field is typed. Asserts an error if not.
       
  8569  @return	TRUE if ok */
       
  8570 @@ -380,7 +380,7 @@ ibool
       
  8571  dfield_check_typed(
       
  8572  /*===============*/
       
  8573  	const dfield_t*	field)	/*!< in: data field */
       
  8574 -	__attribute__((nonnull, warn_unused_result));
       
  8575 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8576  /**********************************************************//**
       
  8577  Checks that a data tuple is typed. Asserts an error if not.
       
  8578  @return	TRUE if ok */
       
  8579 @@ -389,7 +389,7 @@ ibool
       
  8580  dtuple_check_typed(
       
  8581  /*===============*/
       
  8582  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8583 -	__attribute__((nonnull, warn_unused_result));
       
  8584 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8585  /**********************************************************//**
       
  8586  Checks that a data tuple is typed.
       
  8587  @return	TRUE if ok */
       
  8588 @@ -398,7 +398,7 @@ ibool
       
  8589  dtuple_check_typed_no_assert(
       
  8590  /*=========================*/
       
  8591  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8592 -	__attribute__((nonnull, warn_unused_result));
       
  8593 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8594  #ifdef UNIV_DEBUG
       
  8595  /**********************************************************//**
       
  8596  Validates the consistency of a tuple which must be complete, i.e,
       
  8597 @@ -409,7 +409,7 @@ ibool
       
  8598  dtuple_validate(
       
  8599  /*============*/
       
  8600  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8601 -	__attribute__((nonnull, warn_unused_result));
       
  8602 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8603  #endif /* UNIV_DEBUG */
       
  8604  /*************************************************************//**
       
  8605  Pretty prints a dfield value according to its data type. */
       
  8606 @@ -418,7 +418,7 @@ void
       
  8607  dfield_print(
       
  8608  /*=========*/
       
  8609  	const dfield_t*	dfield)	/*!< in: dfield */
       
  8610 -	__attribute__((nonnull));
       
  8611 +	MY_ATTRIBUTE((nonnull));
       
  8612  /*************************************************************//**
       
  8613  Pretty prints a dfield value according to its data type. Also the hex string
       
  8614  is printed if a string contains non-printable characters. */
       
  8615 @@ -427,7 +427,7 @@ void
       
  8616  dfield_print_also_hex(
       
  8617  /*==================*/
       
  8618  	const dfield_t*	dfield)	 /*!< in: dfield */
       
  8619 -	__attribute__((nonnull));
       
  8620 +	MY_ATTRIBUTE((nonnull));
       
  8621  /**********************************************************//**
       
  8622  The following function prints the contents of a tuple. */
       
  8623  UNIV_INTERN
       
  8624 @@ -436,7 +436,7 @@ dtuple_print(
       
  8625  /*=========*/
       
  8626  	FILE*		f,	/*!< in: output stream */
       
  8627  	const dtuple_t*	tuple)	/*!< in: tuple */
       
  8628 -	__attribute__((nonnull));
       
  8629 +	MY_ATTRIBUTE((nonnull));
       
  8630  /**************************************************************//**
       
  8631  Moves parts of long fields in entry to the big record vector so that
       
  8632  the size of tuple drops below the maximum record size allowed in the
       
  8633 @@ -453,7 +453,7 @@ dtuple_convert_big_rec(
       
  8634  	dtuple_t*	entry,	/*!< in/out: index entry */
       
  8635  	ulint*		n_ext)	/*!< in/out: number of
       
  8636  				externally stored columns */
       
  8637 -	__attribute__((nonnull, malloc, warn_unused_result));
       
  8638 +	MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
       
  8639  /**************************************************************//**
       
  8640  Puts back to entry the data stored in vector. Note that to ensure the
       
  8641  fields in entry can accommodate the data, vector must have been created
       
  8642 @@ -466,7 +466,7 @@ dtuple_convert_back_big_rec(
       
  8643  	dtuple_t*	entry,	/*!< in: entry whose data was put to vector */
       
  8644  	big_rec_t*	vector)	/*!< in, own: big rec vector; it is
       
  8645  				freed in this function */
       
  8646 -	__attribute__((nonnull));
       
  8647 +	MY_ATTRIBUTE((nonnull));
       
  8648  /**************************************************************//**
       
  8649  Frees the memory in a big rec vector. */
       
  8650  UNIV_INLINE
       
  8651 @@ -475,7 +475,7 @@ dtuple_big_rec_free(
       
  8652  /*================*/
       
  8653  	big_rec_t*	vector)	/*!< in, own: big rec vector; it is
       
  8654  				freed in this function */
       
  8655 -	__attribute__((nonnull));
       
  8656 +	MY_ATTRIBUTE((nonnull));
       
  8657  
       
  8658  /*######################################################################*/
       
  8659  
       
  8660 --- a/storage/innobase/include/dict0boot.h
       
  8661 +++ b/storage/innobase/include/dict0boot.h
       
  8662 @@ -1,6 +1,6 @@
       
  8663  /*****************************************************************************
       
  8664  
       
  8665 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  8666 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8667  
       
  8668  This program is free software; you can redistribute it and/or modify it under
       
  8669  the terms of the GNU General Public License as published by the Free Software
       
  8670 @@ -95,7 +95,7 @@ UNIV_INTERN
       
  8671  dberr_t
       
  8672  dict_boot(void)
       
  8673  /*===========*/
       
  8674 -	__attribute__((warn_unused_result));
       
  8675 +	MY_ATTRIBUTE((warn_unused_result));
       
  8676  
       
  8677  /*****************************************************************//**
       
  8678  Creates and initializes the data dictionary at the server bootstrap.
       
  8679 @@ -104,7 +104,7 @@ UNIV_INTERN
       
  8680  dberr_t
       
  8681  dict_create(void)
       
  8682  /*=============*/
       
  8683 -	__attribute__((warn_unused_result));
       
  8684 +	MY_ATTRIBUTE((warn_unused_result));
       
  8685  
       
  8686  /*********************************************************************//**
       
  8687  Check if a table id belongs to  system table.
       
  8688 @@ -114,7 +114,7 @@ bool
       
  8689  dict_is_sys_table(
       
  8690  /*==============*/
       
  8691  	table_id_t	id)		/*!< in: table id to check */
       
  8692 -	__attribute__((warn_unused_result));
       
  8693 +	MY_ATTRIBUTE((warn_unused_result));
       
  8694  
       
  8695  /* Space id and page no where the dictionary header resides */
       
  8696  #define	DICT_HDR_SPACE		0	/* the SYSTEM tablespace */
       
  8697 --- a/storage/innobase/include/dict0crea.h
       
  8698 +++ b/storage/innobase/include/dict0crea.h
       
  8699 @@ -1,6 +1,6 @@
       
  8700  /*****************************************************************************
       
  8701  
       
  8702 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
  8703 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8704  
       
  8705  This program is free software; you can redistribute it and/or modify it under
       
  8706  the terms of the GNU General Public License as published by the Free Software
       
  8707 @@ -123,7 +123,7 @@ dict_create_add_foreign_id(
       
  8708  				incremented if used */
       
  8709  	const char*	name,	/*!< in: table name */
       
  8710  	dict_foreign_t*	foreign)/*!< in/out: foreign key */
       
  8711 -	__attribute__((nonnull));
       
  8712 +	MY_ATTRIBUTE((nonnull));
       
  8713  
       
  8714  /** Adds the given set of foreign key objects to the dictionary tables
       
  8715  in the database. This function does not modify the dictionary cache. The
       
  8716 @@ -142,7 +142,7 @@ dict_create_add_foreigns_to_dictionary(
       
  8717  	const dict_foreign_set&	local_fk_set,
       
  8718  	const dict_table_t*	table,
       
  8719  	trx_t*			trx)
       
  8720 -	__attribute__((nonnull, warn_unused_result));
       
  8721 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8722  /****************************************************************//**
       
  8723  Creates the tablespaces and datafiles system tables inside InnoDB
       
  8724  at server bootstrap or server start if they are not found or are
       
  8725 @@ -177,7 +177,7 @@ dict_create_add_foreign_to_dictionary(
       
  8726  	const char*		name,	/*!< in: table name */
       
  8727  	const dict_foreign_t*	foreign,/*!< in: foreign key */
       
  8728  	trx_t*			trx)	/*!< in/out: dictionary transaction */
       
  8729 -	__attribute__((nonnull, warn_unused_result));
       
  8730 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8731  
       
  8732  /* Table create node structure */
       
  8733  struct tab_node_t{
       
  8734 --- a/storage/innobase/include/dict0crea.ic
       
  8735 +++ b/storage/innobase/include/dict0crea.ic
       
  8736 @@ -1,6 +1,6 @@
       
  8737  /*****************************************************************************
       
  8738  
       
  8739 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  8740 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8741  
       
  8742  This program is free software; you can redistribute it and/or modify it under
       
  8743  the terms of the GNU General Public License as published by the Free Software
       
  8744 @@ -33,7 +33,7 @@ UNIV_INTERN
       
  8745  bool
       
  8746  row_is_mysql_tmp_table_name(
       
  8747  /*========================*/
       
  8748 -	const char*     name) __attribute__((warn_unused_result));
       
  8749 +	const char*     name) MY_ATTRIBUTE((warn_unused_result));
       
  8750  				/*!< in: table name in the form
       
  8751  				'database/tablename' */
       
  8752  
       
  8753 --- a/storage/innobase/include/dict0dict.h
       
  8754 +++ b/storage/innobase/include/dict0dict.h
       
  8755 @@ -1,6 +1,6 @@
       
  8756  /*****************************************************************************
       
  8757  
       
  8758 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  8759 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  8760  Copyright (c) 2012, Facebook Inc.
       
  8761  
       
  8762  This program is free software; you can redistribute it and/or modify it under
       
  8763 @@ -53,7 +53,7 @@ void
       
  8764  dict_casedn_str(
       
  8765  /*============*/
       
  8766  	char*	a)	/*!< in/out: string to put in lower case */
       
  8767 -	__attribute__((nonnull));
       
  8768 +	MY_ATTRIBUTE((nonnull));
       
  8769  /********************************************************************//**
       
  8770  Get the database name length in a table name.
       
  8771  @return	database name length */
       
  8772 @@ -63,7 +63,7 @@ dict_get_db_name_len(
       
  8773  /*=================*/
       
  8774  	const char*	name)	/*!< in: table name in the form
       
  8775  				dbname '/' tablename */
       
  8776 -	__attribute__((nonnull, warn_unused_result));
       
  8777 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8778  /*********************************************************************//**
       
  8779  Open a table from its database and table name, this is currently used by
       
  8780  foreign constraint parser to get the referenced table.
       
  8781 @@ -107,7 +107,7 @@ dict_remove_db_name(
       
  8782  /*================*/
       
  8783  	const char*	name)	/*!< in: table name in the form
       
  8784  				dbname '/' tablename */
       
  8785 -	__attribute__((nonnull, warn_unused_result));
       
  8786 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8787  
       
  8788  /** Operation to perform when opening a table */
       
  8789  enum dict_table_op_t {
       
  8790 @@ -130,7 +130,7 @@ dict_table_open_on_id(
       
  8791  	table_id_t	table_id,	/*!< in: table id */
       
  8792  	ibool		dict_locked,	/*!< in: TRUE=data dictionary locked */
       
  8793  	dict_table_op_t	table_op)	/*!< in: operation to perform */
       
  8794 -	__attribute__((warn_unused_result));
       
  8795 +	MY_ATTRIBUTE((warn_unused_result));
       
  8796  /********************************************************************//**
       
  8797  Decrements the count of open handles to a table. */
       
  8798  UNIV_INTERN
       
  8799 @@ -142,7 +142,7 @@ dict_table_close(
       
  8800  	ibool		try_drop)	/*!< in: TRUE=try to drop any orphan
       
  8801  					indexes after an aborted online
       
  8802  					index creation */
       
  8803 -	__attribute__((nonnull));
       
  8804 +	MY_ATTRIBUTE((nonnull));
       
  8805  /**********************************************************************//**
       
  8806  Inits the data dictionary module. */
       
  8807  UNIV_INTERN
       
  8808 @@ -167,7 +167,7 @@ ulint
       
  8809  dict_col_get_mbminlen(
       
  8810  /*==================*/
       
  8811  	const dict_col_t*	col)	/*!< in: column */
       
  8812 -	__attribute__((nonnull, warn_unused_result));
       
  8813 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8814  /*********************************************************************//**
       
  8815  Gets the maximum number of bytes per character.
       
  8816  @return maximum multi-byte char size, in bytes */
       
  8817 @@ -176,7 +176,7 @@ ulint
       
  8818  dict_col_get_mbmaxlen(
       
  8819  /*==================*/
       
  8820  	const dict_col_t*	col)	/*!< in: column */
       
  8821 -	__attribute__((nonnull, warn_unused_result));
       
  8822 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8823  /*********************************************************************//**
       
  8824  Sets the minimum and maximum number of bytes per character. */
       
  8825  UNIV_INLINE
       
  8826 @@ -188,7 +188,7 @@ dict_col_set_mbminmaxlen(
       
  8827  					character size, in bytes */
       
  8828  	ulint		mbmaxlen)	/*!< in: minimum multi-byte
       
  8829  					character size, in bytes */
       
  8830 -	__attribute__((nonnull));
       
  8831 +	MY_ATTRIBUTE((nonnull));
       
  8832  /*********************************************************************//**
       
  8833  Gets the column data type. */
       
  8834  UNIV_INLINE
       
  8835 @@ -197,7 +197,7 @@ dict_col_copy_type(
       
  8836  /*===============*/
       
  8837  	const dict_col_t*	col,	/*!< in: column */
       
  8838  	dtype_t*		type)	/*!< out: data type */
       
  8839 -	__attribute__((nonnull));
       
  8840 +	MY_ATTRIBUTE((nonnull));
       
  8841  /**********************************************************************//**
       
  8842  Determine bytes of column prefix to be stored in the undo log. Please
       
  8843  note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix
       
  8844 @@ -210,7 +210,7 @@ dict_max_field_len_store_undo(
       
  8845  	dict_table_t*		table,	/*!< in: table */
       
  8846  	const dict_col_t*	col)	/*!< in: column which index prefix
       
  8847  					is based on */
       
  8848 -	__attribute__((nonnull, warn_unused_result));
       
  8849 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8850  #endif /* !UNIV_HOTBACKUP */
       
  8851  #ifdef UNIV_DEBUG
       
  8852  /*********************************************************************//**
       
  8853 @@ -222,7 +222,7 @@ dict_col_type_assert_equal(
       
  8854  /*=======================*/
       
  8855  	const dict_col_t*	col,	/*!< in: column */
       
  8856  	const dtype_t*		type)	/*!< in: data type */
       
  8857 -	__attribute__((nonnull, warn_unused_result));
       
  8858 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8859  #endif /* UNIV_DEBUG */
       
  8860  #ifndef UNIV_HOTBACKUP
       
  8861  /***********************************************************************//**
       
  8862 @@ -233,7 +233,7 @@ ulint
       
  8863  dict_col_get_min_size(
       
  8864  /*==================*/
       
  8865  	const dict_col_t*	col)	/*!< in: column */
       
  8866 -	__attribute__((nonnull, warn_unused_result));
       
  8867 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8868  /***********************************************************************//**
       
  8869  Returns the maximum size of the column.
       
  8870  @return	maximum size */
       
  8871 @@ -242,7 +242,7 @@ ulint
       
  8872  dict_col_get_max_size(
       
  8873  /*==================*/
       
  8874  	const dict_col_t*	col)	/*!< in: column */
       
  8875 -	__attribute__((nonnull, warn_unused_result));
       
  8876 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8877  /***********************************************************************//**
       
  8878  Returns the size of a fixed size column, 0 if not a fixed size column.
       
  8879  @return	fixed size, or 0 */
       
  8880 @@ -252,7 +252,7 @@ dict_col_get_fixed_size(
       
  8881  /*====================*/
       
  8882  	const dict_col_t*	col,	/*!< in: column */
       
  8883  	ulint			comp)	/*!< in: nonzero=ROW_FORMAT=COMPACT  */
       
  8884 -	__attribute__((nonnull, warn_unused_result));
       
  8885 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8886  /***********************************************************************//**
       
  8887  Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
       
  8888  For fixed length types it is the fixed length of the type, otherwise 0.
       
  8889 @@ -263,7 +263,7 @@ dict_col_get_sql_null_size(
       
  8890  /*=======================*/
       
  8891  	const dict_col_t*	col,	/*!< in: column */
       
  8892  	ulint			comp)	/*!< in: nonzero=ROW_FORMAT=COMPACT  */
       
  8893 -	__attribute__((nonnull, warn_unused_result));
       
  8894 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8895  /*********************************************************************//**
       
  8896  Gets the column number.
       
  8897  @return	col->ind, table column position (starting from 0) */
       
  8898 @@ -272,7 +272,7 @@ ulint
       
  8899  dict_col_get_no(
       
  8900  /*============*/
       
  8901  	const dict_col_t*	col)	/*!< in: column */
       
  8902 -	__attribute__((nonnull, warn_unused_result));
       
  8903 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8904  /*********************************************************************//**
       
  8905  Gets the column position in the clustered index. */
       
  8906  UNIV_INLINE
       
  8907 @@ -281,7 +281,7 @@ dict_col_get_clust_pos(
       
  8908  /*===================*/
       
  8909  	const dict_col_t*	col,		/*!< in: table column */
       
  8910  	const dict_index_t*	clust_index)	/*!< in: clustered index */
       
  8911 -	__attribute__((nonnull, warn_unused_result));
       
  8912 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8913  /****************************************************************//**
       
  8914  If the given column name is reserved for InnoDB system columns, return
       
  8915  TRUE.
       
  8916 @@ -291,7 +291,7 @@ ibool
       
  8917  dict_col_name_is_reserved(
       
  8918  /*======================*/
       
  8919  	const char*	name)	/*!< in: column name */
       
  8920 -	__attribute__((nonnull, warn_unused_result));
       
  8921 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8922  /********************************************************************//**
       
  8923  Acquire the autoinc lock. */
       
  8924  UNIV_INTERN
       
  8925 @@ -299,7 +299,7 @@ void
       
  8926  dict_table_autoinc_lock(
       
  8927  /*====================*/
       
  8928  	dict_table_t*	table)	/*!< in/out: table */
       
  8929 -	__attribute__((nonnull));
       
  8930 +	MY_ATTRIBUTE((nonnull));
       
  8931  /********************************************************************//**
       
  8932  Unconditionally set the autoinc counter. */
       
  8933  UNIV_INTERN
       
  8934 @@ -308,7 +308,7 @@ dict_table_autoinc_initialize(
       
  8935  /*==========================*/
       
  8936  	dict_table_t*	table,	/*!< in/out: table */
       
  8937  	ib_uint64_t	value)	/*!< in: next value to assign to a row */
       
  8938 -	__attribute__((nonnull));
       
  8939 +	MY_ATTRIBUTE((nonnull));
       
  8940  
       
  8941  /** Store autoinc value when the table is evicted.
       
  8942  @param[in]	table	table evicted */
       
  8943 @@ -333,7 +333,7 @@ ib_uint64_t
       
  8944  dict_table_autoinc_read(
       
  8945  /*====================*/
       
  8946  	const dict_table_t*	table)	/*!< in: table */
       
  8947 -	__attribute__((nonnull, warn_unused_result));
       
  8948 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  8949  /********************************************************************//**
       
  8950  Updates the autoinc counter if the value supplied is greater than the
       
  8951  current value. */
       
  8952 @@ -344,7 +344,7 @@ dict_table_autoinc_update_if_greater(
       
  8953  
       
  8954  	dict_table_t*	table,	/*!< in/out: table */
       
  8955  	ib_uint64_t	value)	/*!< in: value which was assigned to a row */
       
  8956 -	__attribute__((nonnull));
       
  8957 +	MY_ATTRIBUTE((nonnull));
       
  8958  /********************************************************************//**
       
  8959  Release the autoinc lock. */
       
  8960  UNIV_INTERN
       
  8961 @@ -352,7 +352,7 @@ void
       
  8962  dict_table_autoinc_unlock(
       
  8963  /*======================*/
       
  8964  	dict_table_t*	table)	/*!< in/out: table */
       
  8965 -	__attribute__((nonnull));
       
  8966 +	MY_ATTRIBUTE((nonnull));
       
  8967  #endif /* !UNIV_HOTBACKUP */
       
  8968  /**********************************************************************//**
       
  8969  Adds system columns to a table object. */
       
  8970 @@ -362,7 +362,7 @@ dict_table_add_system_columns(
       
  8971  /*==========================*/
       
  8972  	dict_table_t*	table,	/*!< in/out: table */
       
  8973  	mem_heap_t*	heap)	/*!< in: temporary heap */
       
  8974 -	__attribute__((nonnull));
       
  8975 +	MY_ATTRIBUTE((nonnull));
       
  8976  #ifndef UNIV_HOTBACKUP
       
  8977  /**********************************************************************//**
       
  8978  Adds a table object to the dictionary cache. */
       
  8979 @@ -373,7 +373,7 @@ dict_table_add_to_cache(
       
  8980  	dict_table_t*	table,		/*!< in: table */
       
  8981  	ibool		can_be_evicted,	/*!< in: TRUE if can be evicted*/
       
  8982  	mem_heap_t*	heap)		/*!< in: temporary heap */
       
  8983 -	__attribute__((nonnull));
       
  8984 +	MY_ATTRIBUTE((nonnull));
       
  8985  /**********************************************************************//**
       
  8986  Removes a table object from the dictionary cache. */
       
  8987  UNIV_INTERN
       
  8988 @@ -381,7 +381,7 @@ void
       
  8989  dict_table_remove_from_cache(
       
  8990  /*=========================*/
       
  8991  	dict_table_t*	table)	/*!< in, own: table */
       
  8992 -	__attribute__((nonnull));
       
  8993 +	MY_ATTRIBUTE((nonnull));
       
  8994  /**********************************************************************//**
       
  8995  Removes a table object from the dictionary cache. */
       
  8996  UNIV_INTERN
       
  8997 @@ -404,7 +404,7 @@ dict_table_rename_in_cache(
       
  8998  					/*!< in: in ALTER TABLE we want
       
  8999  					to preserve the original table name
       
  9000  					in constraints which reference it */
       
  9001 -	__attribute__((nonnull, warn_unused_result));
       
  9002 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9003  /**********************************************************************//**
       
  9004  Removes an index from the dictionary cache. */
       
  9005  UNIV_INTERN
       
  9006 @@ -413,7 +413,7 @@ dict_index_remove_from_cache(
       
  9007  /*=========================*/
       
  9008  	dict_table_t*	table,	/*!< in/out: table */
       
  9009  	dict_index_t*	index)	/*!< in, own: index */
       
  9010 -	__attribute__((nonnull));
       
  9011 +	MY_ATTRIBUTE((nonnull));
       
  9012  /**********************************************************************//**
       
  9013  Change the id of a table object in the dictionary cache. This is used in
       
  9014  DISCARD TABLESPACE. */
       
  9015 @@ -423,7 +423,7 @@ dict_table_change_id_in_cache(
       
  9016  /*==========================*/
       
  9017  	dict_table_t*	table,	/*!< in/out: table object already in cache */
       
  9018  	table_id_t	new_id)	/*!< in: new id to set */
       
  9019 -	__attribute__((nonnull));
       
  9020 +	MY_ATTRIBUTE((nonnull));
       
  9021  /**********************************************************************//**
       
  9022  Removes a foreign constraint struct from the dictionary cache. */
       
  9023  UNIV_INTERN
       
  9024 @@ -431,7 +431,7 @@ void
       
  9025  dict_foreign_remove_from_cache(
       
  9026  /*===========================*/
       
  9027  	dict_foreign_t*	foreign)	/*!< in, own: foreign constraint */
       
  9028 -	__attribute__((nonnull));
       
  9029 +	MY_ATTRIBUTE((nonnull));
       
  9030  /**********************************************************************//**
       
  9031  Adds a foreign key constraint object to the dictionary cache. May free
       
  9032  the object if there already is an object with the same identifier in.
       
  9033 @@ -452,7 +452,7 @@ dict_foreign_add_to_cache(
       
  9034  				compatibility */
       
  9035  	dict_err_ignore_t	ignore_err)
       
  9036  				/*!< in: error to be ignored */
       
  9037 -	__attribute__((nonnull(1), warn_unused_result));
       
  9038 +	MY_ATTRIBUTE((nonnull(1), warn_unused_result));
       
  9039  /*********************************************************************//**
       
  9040  Checks if a table is referenced by foreign keys.
       
  9041  @return	TRUE if table is referenced by a foreign key */
       
  9042 @@ -461,7 +461,7 @@ ibool
       
  9043  dict_table_is_referenced_by_foreign_key(
       
  9044  /*====================================*/
       
  9045  	const dict_table_t*	table)	/*!< in: InnoDB table */
       
  9046 -	__attribute__((nonnull, warn_unused_result));
       
  9047 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9048  /**********************************************************************//**
       
  9049  Replace the index passed in with another equivalent index in the
       
  9050  foreign key lists of the table.
       
  9051 @@ -475,7 +475,7 @@ dict_foreign_replace_index(
       
  9052  					/*!< in: column names, or NULL
       
  9053  					to use table->col_names */
       
  9054  	const dict_index_t*	index)	/*!< in: index to be replaced */
       
  9055 -	__attribute__((nonnull(1,3), warn_unused_result));
       
  9056 +	MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
       
  9057  /**********************************************************************//**
       
  9058  Determines whether a string starts with the specified keyword.
       
  9059  @return TRUE if str starts with keyword */
       
  9060 @@ -486,7 +486,7 @@ dict_str_starts_with_keyword(
       
  9061  	THD*		thd,		/*!< in: MySQL thread handle */
       
  9062  	const char*	str,		/*!< in: string to scan for keyword */
       
  9063  	const char*	keyword)	/*!< in: keyword to look for */
       
  9064 -	__attribute__((nonnull, warn_unused_result));
       
  9065 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9066  /*********************************************************************//**
       
  9067  Scans a table create SQL string and adds to the data dictionary
       
  9068  the foreign key constraints declared in the string. This function
       
  9069 @@ -515,7 +515,7 @@ dict_create_foreign_constraints(
       
  9070  	ibool		reject_fks)	/*!< in: if TRUE, fail with error
       
  9071  					code DB_CANNOT_ADD_CONSTRAINT if
       
  9072  					any foreign keys are found. */
       
  9073 -	__attribute__((nonnull, warn_unused_result));
       
  9074 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9075  /**********************************************************************//**
       
  9076  Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement.
       
  9077  @return DB_SUCCESS or DB_CANNOT_DROP_CONSTRAINT if syntax error or the
       
  9078 @@ -532,7 +532,7 @@ dict_foreign_parse_drop_constraints(
       
  9079  						to drop */
       
  9080  	const char***	constraints_to_drop)	/*!< out: id's of the
       
  9081  						constraints to drop */
       
  9082 -	__attribute__((nonnull, warn_unused_result));
       
  9083 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9084  /**********************************************************************//**
       
  9085  Returns a table object and increments its open handle count.
       
  9086  NOTE! This is a high-level function to be used mainly from outside the
       
  9087 @@ -551,7 +551,7 @@ dict_table_open_on_name(
       
  9088  	dict_err_ignore_t
       
  9089  			ignore_err)	/*!< in: error to be ignored when
       
  9090  					loading the table */
       
  9091 -	__attribute__((nonnull, warn_unused_result));
       
  9092 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9093  
       
  9094  /*********************************************************************//**
       
  9095  Tries to find an index whose first fields are the columns in the array,
       
  9096 @@ -580,7 +580,7 @@ dict_foreign_find_index(
       
  9097  					/*!< in: nonzero if none of
       
  9098  					the columns must be declared
       
  9099  					NOT NULL */
       
  9100 -	__attribute__((nonnull(1,3), warn_unused_result));
       
  9101 +	MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
       
  9102  /**********************************************************************//**
       
  9103  Returns a column's name.
       
  9104  @return column name. NOTE: not guaranteed to stay valid if table is
       
  9105 @@ -591,7 +591,7 @@ dict_table_get_col_name(
       
  9106  /*====================*/
       
  9107  	const dict_table_t*	table,	/*!< in: table */
       
  9108  	ulint			col_nr)	/*!< in: column number */
       
  9109 -	__attribute__((nonnull, warn_unused_result));
       
  9110 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9111  /**********************************************************************//**
       
  9112  Prints a table data. */
       
  9113  UNIV_INTERN
       
  9114 @@ -599,7 +599,7 @@ void
       
  9115  dict_table_print(
       
  9116  /*=============*/
       
  9117  	dict_table_t*	table)	/*!< in: table */
       
  9118 -	__attribute__((nonnull));
       
  9119 +	MY_ATTRIBUTE((nonnull));
       
  9120  /**********************************************************************//**
       
  9121  Outputs info on foreign keys of a table. */
       
  9122  UNIV_INTERN
       
  9123 @@ -613,7 +613,7 @@ dict_print_info_on_foreign_keys(
       
  9124  	FILE*		file,	/*!< in: file where to print */
       
  9125  	trx_t*		trx,	/*!< in: transaction */
       
  9126  	dict_table_t*	table)	/*!< in: table */
       
  9127 -	__attribute__((nonnull));
       
  9128 +	MY_ATTRIBUTE((nonnull));
       
  9129  /**********************************************************************//**
       
  9130  Outputs info on a foreign key of a table in a format suitable for
       
  9131  CREATE TABLE. */
       
  9132 @@ -625,7 +625,7 @@ dict_print_info_on_foreign_key_in_create_format(
       
  9133  	trx_t*		trx,		/*!< in: transaction */
       
  9134  	dict_foreign_t*	foreign,	/*!< in: foreign key constraint */
       
  9135  	ibool		add_newline)	/*!< in: whether to add a newline */
       
  9136 -	__attribute__((nonnull(1,3)));
       
  9137 +	MY_ATTRIBUTE((nonnull(1,3)));
       
  9138  /********************************************************************//**
       
  9139  Displays the names of the index and the table. */
       
  9140  UNIV_INTERN
       
  9141 @@ -635,7 +635,7 @@ dict_index_name_print(
       
  9142  	FILE*			file,	/*!< in: output stream */
       
  9143  	const trx_t*		trx,	/*!< in: transaction */
       
  9144  	const dict_index_t*	index)	/*!< in: index to print */
       
  9145 -	__attribute__((nonnull(1,3)));
       
  9146 +	MY_ATTRIBUTE((nonnull(1,3)));
       
  9147  /*********************************************************************//**
       
  9148  Tries to find an index whose first fields are the columns in the array,
       
  9149  in the same order and is not marked for deletion and is not the same
       
  9150 @@ -664,7 +664,7 @@ dict_foreign_qualify_index(
       
  9151  					/*!< in: nonzero if none of
       
  9152  					the columns must be declared
       
  9153  					NOT NULL */
       
  9154 -	__attribute__((nonnull(1,3), warn_unused_result));
       
  9155 +	MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
       
  9156  #ifdef UNIV_DEBUG
       
  9157  /********************************************************************//**
       
  9158  Gets the first index on the table (the clustered index).
       
  9159 @@ -674,7 +674,7 @@ dict_index_t*
       
  9160  dict_table_get_first_index(
       
  9161  /*=======================*/
       
  9162  	const dict_table_t*	table)	/*!< in: table */
       
  9163 -	__attribute__((nonnull, warn_unused_result));
       
  9164 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9165  /********************************************************************//**
       
  9166  Gets the last index on the table.
       
  9167  @return	index, NULL if none exists */
       
  9168 @@ -683,7 +683,7 @@ dict_index_t*
       
  9169  dict_table_get_last_index(
       
  9170  /*=======================*/
       
  9171  	const dict_table_t*	table)	/*!< in: table */
       
  9172 -	__attribute__((nonnull, warn_unused_result));
       
  9173 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9174  /********************************************************************//**
       
  9175  Gets the next index on the table.
       
  9176  @return	index, NULL if none left */
       
  9177 @@ -692,7 +692,7 @@ dict_index_t*
       
  9178  dict_table_get_next_index(
       
  9179  /*======================*/
       
  9180  	const dict_index_t*	index)	/*!< in: index */
       
  9181 -	__attribute__((nonnull, warn_unused_result));
       
  9182 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9183  #else /* UNIV_DEBUG */
       
  9184  # define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes)
       
  9185  # define dict_table_get_last_index(table) UT_LIST_GET_LAST((table)->indexes)
       
  9186 @@ -721,7 +721,7 @@ ulint
       
  9187  dict_index_is_clust(
       
  9188  /*================*/
       
  9189  	const dict_index_t*	index)	/*!< in: index */
       
  9190 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9191 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9192  /********************************************************************//**
       
  9193  Check whether the index is unique.
       
  9194  @return	nonzero for unique index, zero for other indexes */
       
  9195 @@ -730,7 +730,7 @@ ulint
       
  9196  dict_index_is_unique(
       
  9197  /*=================*/
       
  9198  	const dict_index_t*	index)	/*!< in: index */
       
  9199 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9200 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9201  /********************************************************************//**
       
  9202  Check whether the index is the insert buffer tree.
       
  9203  @return	nonzero for insert buffer, zero for other indexes */
       
  9204 @@ -739,7 +739,7 @@ ulint
       
  9205  dict_index_is_ibuf(
       
  9206  /*===============*/
       
  9207  	const dict_index_t*	index)	/*!< in: index */
       
  9208 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9209 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9210  /********************************************************************//**
       
  9211  Check whether the index is a secondary index or the insert buffer tree.
       
  9212  @return	nonzero for insert buffer, zero for other indexes */
       
  9213 @@ -748,7 +748,7 @@ ulint
       
  9214  dict_index_is_sec_or_ibuf(
       
  9215  /*======================*/
       
  9216  	const dict_index_t*	index)	/*!< in: index */
       
  9217 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9218 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9219  
       
  9220  /************************************************************************
       
  9221  Gets the all the FTS indexes for the table. NOTE: must not be called for
       
  9222 @@ -760,7 +760,7 @@ dict_table_get_all_fts_indexes(
       
  9223  				/* out: number of indexes collected */
       
  9224  	dict_table_t*	table,	/* in: table */
       
  9225  	ib_vector_t*	indexes)/* out: vector for collecting FTS indexes */
       
  9226 -	__attribute__((nonnull));
       
  9227 +	MY_ATTRIBUTE((nonnull));
       
  9228  /********************************************************************//**
       
  9229  Gets the number of user-defined columns in a table in the dictionary
       
  9230  cache.
       
  9231 @@ -770,7 +770,7 @@ ulint
       
  9232  dict_table_get_n_user_cols(
       
  9233  /*=======================*/
       
  9234  	const dict_table_t*	table)	/*!< in: table */
       
  9235 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9236 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9237  /********************************************************************//**
       
  9238  Gets the number of system columns in a table in the dictionary cache.
       
  9239  @return	number of system (e.g., ROW_ID) columns of a table */
       
  9240 @@ -779,7 +779,7 @@ ulint
       
  9241  dict_table_get_n_sys_cols(
       
  9242  /*======================*/
       
  9243  	const dict_table_t*	table)	/*!< in: table */
       
  9244 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9245 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9246  /********************************************************************//**
       
  9247  Gets the number of all columns (also system) in a table in the dictionary
       
  9248  cache.
       
  9249 @@ -789,7 +789,7 @@ ulint
       
  9250  dict_table_get_n_cols(
       
  9251  /*==================*/
       
  9252  	const dict_table_t*	table)	/*!< in: table */
       
  9253 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9254 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9255  /********************************************************************//**
       
  9256  Gets the approximately estimated number of rows in the table.
       
  9257  @return	estimated number of rows */
       
  9258 @@ -798,7 +798,7 @@ ib_uint64_t
       
  9259  dict_table_get_n_rows(
       
  9260  /*==================*/
       
  9261  	const dict_table_t*	table)	/*!< in: table */
       
  9262 -	__attribute__((nonnull, warn_unused_result));
       
  9263 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9264  /********************************************************************//**
       
  9265  Increment the number of rows in the table by one.
       
  9266  Notice that this operation is not protected by any latch, the number is
       
  9267 @@ -808,7 +808,7 @@ void
       
  9268  dict_table_n_rows_inc(
       
  9269  /*==================*/
       
  9270  	dict_table_t*	table)	/*!< in/out: table */
       
  9271 -	__attribute__((nonnull));
       
  9272 +	MY_ATTRIBUTE((nonnull));
       
  9273  /********************************************************************//**
       
  9274  Decrement the number of rows in the table by one.
       
  9275  Notice that this operation is not protected by any latch, the number is
       
  9276 @@ -818,7 +818,7 @@ void
       
  9277  dict_table_n_rows_dec(
       
  9278  /*==================*/
       
  9279  	dict_table_t*	table)	/*!< in/out: table */
       
  9280 -	__attribute__((nonnull));
       
  9281 +	MY_ATTRIBUTE((nonnull));
       
  9282  #ifdef UNIV_DEBUG
       
  9283  /********************************************************************//**
       
  9284  Gets the nth column of a table.
       
  9285 @@ -829,7 +829,7 @@ dict_table_get_nth_col(
       
  9286  /*===================*/
       
  9287  	const dict_table_t*	table,	/*!< in: table */
       
  9288  	ulint			pos)	/*!< in: position of column */
       
  9289 -	__attribute__((nonnull, warn_unused_result));
       
  9290 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9291  /********************************************************************//**
       
  9292  Gets the given system column of a table.
       
  9293  @return	pointer to column object */
       
  9294 @@ -839,7 +839,7 @@ dict_table_get_sys_col(
       
  9295  /*===================*/
       
  9296  	const dict_table_t*	table,	/*!< in: table */
       
  9297  	ulint			sys)	/*!< in: DATA_ROW_ID, ... */
       
  9298 -	__attribute__((nonnull, warn_unused_result));
       
  9299 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9300  #else /* UNIV_DEBUG */
       
  9301  #define dict_table_get_nth_col(table, pos) \
       
  9302  ((table)->cols + (pos))
       
  9303 @@ -855,7 +855,7 @@ dict_table_get_sys_col_no(
       
  9304  /*======================*/
       
  9305  	const dict_table_t*	table,	/*!< in: table */
       
  9306  	ulint			sys)	/*!< in: DATA_ROW_ID, ... */
       
  9307 -	__attribute__((nonnull, warn_unused_result));
       
  9308 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9309  #ifndef UNIV_HOTBACKUP
       
  9310  /********************************************************************//**
       
  9311  Returns the minimum data size of an index record.
       
  9312 @@ -865,7 +865,7 @@ ulint
       
  9313  dict_index_get_min_size(
       
  9314  /*====================*/
       
  9315  	const dict_index_t*	index)	/*!< in: index */
       
  9316 -	__attribute__((nonnull, warn_unused_result));
       
  9317 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9318  #endif /* !UNIV_HOTBACKUP */
       
  9319  /********************************************************************//**
       
  9320  Check whether the table uses the compact page format.
       
  9321 @@ -875,7 +875,7 @@ ibool
       
  9322  dict_table_is_comp(
       
  9323  /*===============*/
       
  9324  	const dict_table_t*	table)	/*!< in: table */
       
  9325 -	__attribute__((nonnull, warn_unused_result));
       
  9326 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9327  /********************************************************************//**
       
  9328  Determine the file format of a table.
       
  9329  @return	file format version */
       
  9330 @@ -884,7 +884,7 @@ ulint
       
  9331  dict_table_get_format(
       
  9332  /*==================*/
       
  9333  	const dict_table_t*	table)	/*!< in: table */
       
  9334 -	__attribute__((nonnull, warn_unused_result));
       
  9335 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9336  /********************************************************************//**
       
  9337  Determine the file format from a dict_table_t::flags.
       
  9338  @return	file format version */
       
  9339 @@ -893,7 +893,7 @@ ulint
       
  9340  dict_tf_get_format(
       
  9341  /*===============*/
       
  9342  	ulint		flags)		/*!< in: dict_table_t::flags */
       
  9343 -	__attribute__((warn_unused_result));
       
  9344 +	MY_ATTRIBUTE((warn_unused_result));
       
  9345  /********************************************************************//**
       
  9346  Set the various values in a dict_table_t::flags pointer. */
       
  9347  UNIV_INLINE
       
  9348 @@ -904,7 +904,7 @@ dict_tf_set(
       
  9349  	rec_format_t	format,		/*!< in: file format */
       
  9350  	ulint		zip_ssize,	/*!< in: zip shift size */
       
  9351  	bool		remote_path)	/*!< in: table uses DATA DIRECTORY */
       
  9352 -	__attribute__((nonnull));
       
  9353 +	MY_ATTRIBUTE((nonnull));
       
  9354  /********************************************************************//**
       
  9355  Convert a 32 bit integer table flags to the 32 bit integer that is
       
  9356  written into the tablespace header at the offset FSP_SPACE_FLAGS and is
       
  9357 @@ -921,7 +921,7 @@ ulint
       
  9358  dict_tf_to_fsp_flags(
       
  9359  /*=================*/
       
  9360  	ulint	flags)	/*!< in: dict_table_t::flags */
       
  9361 -	__attribute__((const));
       
  9362 +	MY_ATTRIBUTE((const));
       
  9363  /********************************************************************//**
       
  9364  Extract the compressed page size from table flags.
       
  9365  @return	compressed page size, or 0 if not compressed */
       
  9366 @@ -930,7 +930,7 @@ ulint
       
  9367  dict_tf_get_zip_size(
       
  9368  /*=================*/
       
  9369  	ulint	flags)			/*!< in: flags */
       
  9370 -	__attribute__((const));
       
  9371 +	MY_ATTRIBUTE((const));
       
  9372  /********************************************************************//**
       
  9373  Check whether the table uses the compressed compact page format.
       
  9374  @return	compressed page size, or 0 if not compressed */
       
  9375 @@ -939,7 +939,7 @@ ulint
       
  9376  dict_table_zip_size(
       
  9377  /*================*/
       
  9378  	const dict_table_t*	table)	/*!< in: table */
       
  9379 -	__attribute__((nonnull, warn_unused_result));
       
  9380 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9381  #ifndef UNIV_HOTBACKUP
       
  9382  /*********************************************************************//**
       
  9383  Obtain exclusive locks on all index trees of the table. This is to prevent
       
  9384 @@ -950,7 +950,7 @@ void
       
  9385  dict_table_x_lock_indexes(
       
  9386  /*======================*/
       
  9387  	dict_table_t*	table)	/*!< in: table */
       
  9388 -	__attribute__((nonnull));
       
  9389 +	MY_ATTRIBUTE((nonnull));
       
  9390  /*********************************************************************//**
       
  9391  Release the exclusive locks on all index tree. */
       
  9392  UNIV_INLINE
       
  9393 @@ -958,7 +958,7 @@ void
       
  9394  dict_table_x_unlock_indexes(
       
  9395  /*========================*/
       
  9396  	dict_table_t*	table)	/*!< in: table */
       
  9397 -	__attribute__((nonnull));
       
  9398 +	MY_ATTRIBUTE((nonnull));
       
  9399  /********************************************************************//**
       
  9400  Checks if a column is in the ordering columns of the clustered index of a
       
  9401  table. Column prefixes are treated like whole columns.
       
  9402 @@ -969,7 +969,7 @@ dict_table_col_in_clustered_key(
       
  9403  /*============================*/
       
  9404  	const dict_table_t*	table,	/*!< in: table */
       
  9405  	ulint			n)	/*!< in: column number */
       
  9406 -	__attribute__((nonnull, warn_unused_result));
       
  9407 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9408  /*******************************************************************//**
       
  9409  Check if the table has an FTS index.
       
  9410  @return TRUE if table has an FTS index */
       
  9411 @@ -978,7 +978,7 @@ ibool
       
  9412  dict_table_has_fts_index(
       
  9413  /*=====================*/
       
  9414  	dict_table_t*   table)		/*!< in: table */
       
  9415 -	__attribute__((nonnull, warn_unused_result));
       
  9416 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9417  /*******************************************************************//**
       
  9418  Copies types of columns contained in table to tuple and sets all
       
  9419  fields of the tuple to the SQL NULL value.  This function should
       
  9420 @@ -989,7 +989,7 @@ dict_table_copy_types(
       
  9421  /*==================*/
       
  9422  	dtuple_t*		tuple,	/*!< in/out: data tuple */
       
  9423  	const dict_table_t*	table)	/*!< in: table */
       
  9424 -	__attribute__((nonnull));
       
  9425 +	MY_ATTRIBUTE((nonnull));
       
  9426  /********************************************************************
       
  9427  Wait until all the background threads of the given table have exited, i.e.,
       
  9428  bg_threads == 0. Note: bg_threads_mutex must be reserved when
       
  9429 @@ -1001,7 +1001,7 @@ dict_table_wait_for_bg_threads_to_exit(
       
  9430  	dict_table_t*	table,	/* in: table */
       
  9431  	ulint		delay)	/* in: time in microseconds to wait between
       
  9432  				checks of bg_threads. */
       
  9433 -	__attribute__((nonnull));
       
  9434 +	MY_ATTRIBUTE((nonnull));
       
  9435  /**********************************************************************//**
       
  9436  Looks for an index with the given id. NOTE that we do not reserve
       
  9437  the dictionary mutex: this function is for emergency purposes like
       
  9438 @@ -1012,7 +1012,7 @@ dict_index_t*
       
  9439  dict_index_find_on_id_low(
       
  9440  /*======================*/
       
  9441  	index_id_t	id)	/*!< in: index id */
       
  9442 -	__attribute__((warn_unused_result));
       
  9443 +	MY_ATTRIBUTE((warn_unused_result));
       
  9444  /**********************************************************************//**
       
  9445  Make room in the table cache by evicting an unused table. The unused table
       
  9446  should not be part of FK relationship and currently not used in any user
       
  9447 @@ -1038,7 +1038,7 @@ dict_index_add_to_cache(
       
  9448  	ibool		strict)	/*!< in: TRUE=refuse to create the index
       
  9449  				if records could be too big to fit in
       
  9450  				an B-tree page */
       
  9451 -	__attribute__((nonnull, warn_unused_result));
       
  9452 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9453  /**********************************************************************//**
       
  9454  Removes an index from the dictionary cache. */
       
  9455  UNIV_INTERN
       
  9456 @@ -1047,7 +1047,7 @@ dict_index_remove_from_cache(
       
  9457  /*=========================*/
       
  9458  	dict_table_t*	table,	/*!< in/out: table */
       
  9459  	dict_index_t*	index)	/*!< in, own: index */
       
  9460 -	__attribute__((nonnull));
       
  9461 +	MY_ATTRIBUTE((nonnull));
       
  9462  #endif /* !UNIV_HOTBACKUP */
       
  9463  /********************************************************************//**
       
  9464  Gets the number of fields in the internal representation of an index,
       
  9465 @@ -1060,7 +1060,7 @@ dict_index_get_n_fields(
       
  9466  	const dict_index_t*	index)	/*!< in: an internal
       
  9467  					representation of index (in
       
  9468  					the dictionary cache) */
       
  9469 -	__attribute__((nonnull, warn_unused_result));
       
  9470 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9471  /********************************************************************//**
       
  9472  Gets the number of fields in the internal representation of an index
       
  9473  that uniquely determine the position of an index entry in the index, if
       
  9474 @@ -1073,7 +1073,7 @@ dict_index_get_n_unique(
       
  9475  /*====================*/
       
  9476  	const dict_index_t*	index)	/*!< in: an internal representation
       
  9477  					of index (in the dictionary cache) */
       
  9478 -	__attribute__((nonnull, warn_unused_result));
       
  9479 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9480  /********************************************************************//**
       
  9481  Gets the number of fields in the internal representation of an index
       
  9482  which uniquely determine the position of an index entry in the index, if
       
  9483 @@ -1085,7 +1085,7 @@ dict_index_get_n_unique_in_tree(
       
  9484  /*============================*/
       
  9485  	const dict_index_t*	index)	/*!< in: an internal representation
       
  9486  					of index (in the dictionary cache) */
       
  9487 -	__attribute__((nonnull, warn_unused_result));
       
  9488 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9489  /********************************************************************//**
       
  9490  Gets the number of user-defined ordering fields in the index. In the internal
       
  9491  representation we add the row id to the ordering fields to make all indexes
       
  9492 @@ -1098,7 +1098,7 @@ dict_index_get_n_ordering_defined_by_user(
       
  9493  /*======================================*/
       
  9494  	const dict_index_t*	index)	/*!< in: an internal representation
       
  9495  					of index (in the dictionary cache) */
       
  9496 -	__attribute__((nonnull, warn_unused_result));
       
  9497 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9498  #ifdef UNIV_DEBUG
       
  9499  /********************************************************************//**
       
  9500  Gets the nth field of an index.
       
  9501 @@ -1109,7 +1109,7 @@ dict_index_get_nth_field(
       
  9502  /*=====================*/
       
  9503  	const dict_index_t*	index,	/*!< in: index */
       
  9504  	ulint			pos)	/*!< in: position of field */
       
  9505 -	__attribute__((nonnull, warn_unused_result));
       
  9506 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9507  #else /* UNIV_DEBUG */
       
  9508  # define dict_index_get_nth_field(index, pos) ((index)->fields + (pos))
       
  9509  #endif /* UNIV_DEBUG */
       
  9510 @@ -1122,7 +1122,7 @@ dict_index_get_nth_col(
       
  9511  /*===================*/
       
  9512  	const dict_index_t*	index,	/*!< in: index */
       
  9513  	ulint			pos)	/*!< in: position of the field */
       
  9514 -	__attribute__((nonnull, warn_unused_result));
       
  9515 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9516  /********************************************************************//**
       
  9517  Gets the column number of the nth field in an index.
       
  9518  @return	column number */
       
  9519 @@ -1132,7 +1132,7 @@ dict_index_get_nth_col_no(
       
  9520  /*======================*/
       
  9521  	const dict_index_t*	index,	/*!< in: index */
       
  9522  	ulint			pos)	/*!< in: position of the field */
       
  9523 -	__attribute__((nonnull, warn_unused_result));
       
  9524 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9525  /********************************************************************//**
       
  9526  Looks for column n in an index.
       
  9527  @return position in internal representation of the index;
       
  9528 @@ -1143,7 +1143,7 @@ dict_index_get_nth_col_pos(
       
  9529  /*=======================*/
       
  9530  	const dict_index_t*	index,	/*!< in: index */
       
  9531  	ulint			n)	/*!< in: column number */
       
  9532 -	__attribute__((nonnull, warn_unused_result));
       
  9533 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9534  /********************************************************************//**
       
  9535  Looks for column n in an index.
       
  9536  @return position in internal representation of the index;
       
  9537 @@ -1156,7 +1156,7 @@ dict_index_get_nth_col_or_prefix_pos(
       
  9538  	ulint			n,		/*!< in: column number */
       
  9539  	ibool			inc_prefix)	/*!< in: TRUE=consider
       
  9540  						column prefixes too */
       
  9541 -	__attribute__((nonnull, warn_unused_result));
       
  9542 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9543  /********************************************************************//**
       
  9544  Returns TRUE if the index contains a column or a prefix of that column.
       
  9545  @return	TRUE if contains the column or its prefix */
       
  9546 @@ -1166,7 +1166,7 @@ dict_index_contains_col_or_prefix(
       
  9547  /*==============================*/
       
  9548  	const dict_index_t*	index,	/*!< in: index */
       
  9549  	ulint			n)	/*!< in: column number */
       
  9550 -	__attribute__((nonnull, warn_unused_result));
       
  9551 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9552  /********************************************************************//**
       
  9553  Looks for a matching field in an index. The column has to be the same. The
       
  9554  column in index must be complete, or must contain a prefix longer than the
       
  9555 @@ -1181,7 +1181,7 @@ dict_index_get_nth_field_pos(
       
  9556  	const dict_index_t*	index,	/*!< in: index from which to search */
       
  9557  	const dict_index_t*	index2,	/*!< in: index */
       
  9558  	ulint			n)	/*!< in: field number in index2 */
       
  9559 -	__attribute__((nonnull, warn_unused_result));
       
  9560 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9561  /********************************************************************//**
       
  9562  Looks for column n position in the clustered index.
       
  9563  @return	position in internal representation of the clustered index */
       
  9564 @@ -1191,7 +1191,7 @@ dict_table_get_nth_col_pos(
       
  9565  /*=======================*/
       
  9566  	const dict_table_t*	table,	/*!< in: table */
       
  9567  	ulint			n)	/*!< in: column number */
       
  9568 -	__attribute__((nonnull, warn_unused_result));
       
  9569 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9570  /********************************************************************//**
       
  9571  Returns the position of a system column in an index.
       
  9572  @return	position, ULINT_UNDEFINED if not contained */
       
  9573 @@ -1201,7 +1201,7 @@ dict_index_get_sys_col_pos(
       
  9574  /*=======================*/
       
  9575  	const dict_index_t*	index,	/*!< in: index */
       
  9576  	ulint			type)	/*!< in: DATA_ROW_ID, ... */
       
  9577 -	__attribute__((nonnull, warn_unused_result));
       
  9578 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9579  /*******************************************************************//**
       
  9580  Adds a column to index. */
       
  9581  UNIV_INTERN
       
  9582 @@ -1212,7 +1212,7 @@ dict_index_add_col(
       
  9583  	const dict_table_t*	table,		/*!< in: table */
       
  9584  	dict_col_t*		col,		/*!< in: column */
       
  9585  	ulint			prefix_len)	/*!< in: column prefix length */
       
  9586 -	__attribute__((nonnull));
       
  9587 +	MY_ATTRIBUTE((nonnull));
       
  9588  #ifndef UNIV_HOTBACKUP
       
  9589  /*******************************************************************//**
       
  9590  Copies types of fields contained in index to tuple. */
       
  9591 @@ -1224,7 +1224,7 @@ dict_index_copy_types(
       
  9592  	const dict_index_t*	index,		/*!< in: index */
       
  9593  	ulint			n_fields)	/*!< in: number of
       
  9594  						field types to copy */
       
  9595 -	__attribute__((nonnull));
       
  9596 +	MY_ATTRIBUTE((nonnull));
       
  9597  #endif /* !UNIV_HOTBACKUP */
       
  9598  /*********************************************************************//**
       
  9599  Gets the field column.
       
  9600 @@ -1234,7 +1234,7 @@ const dict_col_t*
       
  9601  dict_field_get_col(
       
  9602  /*===============*/
       
  9603  	const dict_field_t*	field)	/*!< in: index field */
       
  9604 -	__attribute__((nonnull, warn_unused_result));
       
  9605 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9606  #ifndef UNIV_HOTBACKUP
       
  9607  /**********************************************************************//**
       
  9608  Returns an index object if it is found in the dictionary cache.
       
  9609 @@ -1245,7 +1245,7 @@ dict_index_t*
       
  9610  dict_index_get_if_in_cache_low(
       
  9611  /*===========================*/
       
  9612  	index_id_t	index_id)	/*!< in: index id */
       
  9613 -	__attribute__((warn_unused_result));
       
  9614 +	MY_ATTRIBUTE((warn_unused_result));
       
  9615  #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
       
  9616  /**********************************************************************//**
       
  9617  Returns an index object if it is found in the dictionary cache.
       
  9618 @@ -1255,7 +1255,7 @@ dict_index_t*
       
  9619  dict_index_get_if_in_cache(
       
  9620  /*=======================*/
       
  9621  	index_id_t	index_id)	/*!< in: index id */
       
  9622 -	__attribute__((warn_unused_result));
       
  9623 +	MY_ATTRIBUTE((warn_unused_result));
       
  9624  #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
       
  9625  #ifdef UNIV_DEBUG
       
  9626  /**********************************************************************//**
       
  9627 @@ -1268,7 +1268,7 @@ dict_index_check_search_tuple(
       
  9628  /*==========================*/
       
  9629  	const dict_index_t*	index,	/*!< in: index tree */
       
  9630  	const dtuple_t*		tuple)	/*!< in: tuple used in a search */
       
  9631 -	__attribute__((nonnull, warn_unused_result));
       
  9632 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9633  /** Whether and when to allow temporary index names */
       
  9634  enum check_name {
       
  9635  	/** Require all indexes to be complete. */
       
  9636 @@ -1288,7 +1288,7 @@ dict_table_check_for_dup_indexes(
       
  9637  					in this table */
       
  9638  	enum check_name		check)	/*!< in: whether and when to allow
       
  9639  					temporary index names */
       
  9640 -	__attribute__((nonnull));
       
  9641 +	MY_ATTRIBUTE((nonnull));
       
  9642  #endif /* UNIV_DEBUG */
       
  9643  /**********************************************************************//**
       
  9644  Builds a node pointer out of a physical record and a page number.
       
  9645 @@ -1306,7 +1306,7 @@ dict_index_build_node_ptr(
       
  9646  					created */
       
  9647  	ulint			level)	/*!< in: level of rec in tree:
       
  9648  					0 means leaf level */
       
  9649 -	__attribute__((nonnull, warn_unused_result));
       
  9650 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9651  /**********************************************************************//**
       
  9652  Copies an initial segment of a physical record, long enough to specify an
       
  9653  index entry uniquely.
       
  9654 @@ -1322,7 +1322,7 @@ dict_index_copy_rec_order_prefix(
       
  9655  	byte**			buf,	/*!< in/out: memory buffer for the
       
  9656  					copied prefix, or NULL */
       
  9657  	ulint*			buf_size)/*!< in/out: buffer size */
       
  9658 -	__attribute__((nonnull, warn_unused_result));
       
  9659 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9660  /**********************************************************************//**
       
  9661  Builds a typed data tuple out of a physical record.
       
  9662  @return	own: data tuple */
       
  9663 @@ -1334,7 +1334,7 @@ dict_index_build_data_tuple(
       
  9664  	rec_t*		rec,	/*!< in: record for which to build data tuple */
       
  9665  	ulint		n_fields,/*!< in: number of data fields */
       
  9666  	mem_heap_t*	heap)	/*!< in: memory heap where tuple created */
       
  9667 -	__attribute__((nonnull, warn_unused_result));
       
  9668 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9669  /*********************************************************************//**
       
  9670  Gets the space id of the root of the index tree.
       
  9671  @return	space id */
       
  9672 @@ -1343,7 +1343,7 @@ ulint
       
  9673  dict_index_get_space(
       
  9674  /*=================*/
       
  9675  	const dict_index_t*	index)	/*!< in: index */
       
  9676 -	__attribute__((nonnull, warn_unused_result));
       
  9677 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9678  /*********************************************************************//**
       
  9679  Sets the space id of the root of the index tree. */
       
  9680  UNIV_INLINE
       
  9681 @@ -1352,7 +1352,7 @@ dict_index_set_space(
       
  9682  /*=================*/
       
  9683  	dict_index_t*	index,	/*!< in/out: index */
       
  9684  	ulint		space)	/*!< in: space id */
       
  9685 -	__attribute__((nonnull));
       
  9686 +	MY_ATTRIBUTE((nonnull));
       
  9687  /*********************************************************************//**
       
  9688  Gets the page number of the root of the index tree.
       
  9689  @return	page number */
       
  9690 @@ -1361,7 +1361,7 @@ ulint
       
  9691  dict_index_get_page(
       
  9692  /*================*/
       
  9693  	const dict_index_t*	tree)	/*!< in: index */
       
  9694 -	__attribute__((nonnull, warn_unused_result));
       
  9695 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9696  /*********************************************************************//**
       
  9697  Gets the read-write lock of the index tree.
       
  9698  @return	read-write lock */
       
  9699 @@ -1370,7 +1370,7 @@ rw_lock_t*
       
  9700  dict_index_get_lock(
       
  9701  /*================*/
       
  9702  	dict_index_t*	index)	/*!< in: index */
       
  9703 -	__attribute__((nonnull, warn_unused_result));
       
  9704 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9705  /********************************************************************//**
       
  9706  Returns free space reserved for future updates of records. This is
       
  9707  relevant only in the case of many consecutive inserts, as updates
       
  9708 @@ -1390,7 +1390,7 @@ enum online_index_status
       
  9709  dict_index_get_online_status(
       
  9710  /*=========================*/
       
  9711  	const dict_index_t*	index)	/*!< in: secondary index */
       
  9712 -	__attribute__((nonnull, warn_unused_result));
       
  9713 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9714  /********************************************************************//**
       
  9715  Sets the status of online index creation. */
       
  9716  UNIV_INLINE
       
  9717 @@ -1399,7 +1399,7 @@ dict_index_set_online_status(
       
  9718  /*=========================*/
       
  9719  	dict_index_t*			index,	/*!< in/out: index */
       
  9720  	enum online_index_status	status)	/*!< in: status */
       
  9721 -	__attribute__((nonnull));
       
  9722 +	MY_ATTRIBUTE((nonnull));
       
  9723  /********************************************************************//**
       
  9724  Determines if a secondary index is being or has been created online,
       
  9725  or if the table is being rebuilt online, allowing concurrent modifications
       
  9726 @@ -1413,7 +1413,7 @@ bool
       
  9727  dict_index_is_online_ddl(
       
  9728  /*=====================*/
       
  9729  	const dict_index_t*	index)	/*!< in: index */
       
  9730 -	__attribute__((nonnull, warn_unused_result));
       
  9731 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9732  /*********************************************************************//**
       
  9733  Calculates the minimum record length in an index. */
       
  9734  UNIV_INTERN
       
  9735 @@ -1421,7 +1421,7 @@ ulint
       
  9736  dict_index_calc_min_rec_len(
       
  9737  /*========================*/
       
  9738  	const dict_index_t*	index)	/*!< in: index */
       
  9739 -	__attribute__((nonnull, warn_unused_result));
       
  9740 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9741  /********************************************************************//**
       
  9742  Reserves the dictionary system mutex for MySQL. */
       
  9743  UNIV_INTERN
       
  9744 @@ -1485,7 +1485,7 @@ dict_tables_have_same_db(
       
  9745  				dbname '/' tablename */
       
  9746  	const char*	name2)	/*!< in: table name in the form
       
  9747  				dbname '/' tablename */
       
  9748 -	__attribute__((nonnull, warn_unused_result));
       
  9749 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9750  /*********************************************************************//**
       
  9751  Removes an index from the cache */
       
  9752  UNIV_INTERN
       
  9753 @@ -1494,7 +1494,7 @@ dict_index_remove_from_cache(
       
  9754  /*=========================*/
       
  9755  	dict_table_t*	table,	/*!< in/out: table */
       
  9756  	dict_index_t*	index)	/*!< in, own: index */
       
  9757 -	__attribute__((nonnull));
       
  9758 +	MY_ATTRIBUTE((nonnull));
       
  9759  /**********************************************************************//**
       
  9760  Get index by name
       
  9761  @return	index, NULL if does not exist */
       
  9762 @@ -1504,7 +1504,7 @@ dict_table_get_index_on_name(
       
  9763  /*=========================*/
       
  9764  	dict_table_t*	table,	/*!< in: table */
       
  9765  	const char*	name)	/*!< in: name of the index to find */
       
  9766 -	__attribute__((nonnull, warn_unused_result));
       
  9767 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9768  /**********************************************************************//**
       
  9769  In case there is more than one index with the same name return the index
       
  9770  with the min(id).
       
  9771 @@ -1515,7 +1515,7 @@ dict_table_get_index_on_name_and_min_id(
       
  9772  /*====================================*/
       
  9773  	dict_table_t*	table,	/*!< in: table */
       
  9774  	const char*	name)	/*!< in: name of the index to find */
       
  9775 -	__attribute__((nonnull, warn_unused_result));
       
  9776 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9777  /***************************************************************
       
  9778  Check whether a column exists in an FTS index. */
       
  9779  UNIV_INLINE
       
  9780 @@ -1526,7 +1526,7 @@ dict_table_is_fts_column(
       
  9781  				the offset within the vector */
       
  9782  	ib_vector_t*	indexes,/* in: vector containing only FTS indexes */
       
  9783  	ulint		col_no)	/* in: col number to search for */
       
  9784 -	__attribute__((nonnull, warn_unused_result));
       
  9785 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9786  /**********************************************************************//**
       
  9787  Move a table to the non LRU end of the LRU list. */
       
  9788  UNIV_INTERN
       
  9789 @@ -1534,7 +1534,7 @@ void
       
  9790  dict_table_move_from_lru_to_non_lru(
       
  9791  /*================================*/
       
  9792  	dict_table_t*	table)	/*!< in: table to move from LRU to non-LRU */
       
  9793 -	__attribute__((nonnull));
       
  9794 +	MY_ATTRIBUTE((nonnull));
       
  9795  /**********************************************************************//**
       
  9796  Move a table to the LRU list from the non-LRU list. */
       
  9797  UNIV_INTERN
       
  9798 @@ -1542,7 +1542,7 @@ void
       
  9799  dict_table_move_from_non_lru_to_lru(
       
  9800  /*================================*/
       
  9801  	dict_table_t*	table)	/*!< in: table to move from non-LRU to LRU */
       
  9802 -	__attribute__((nonnull));
       
  9803 +	MY_ATTRIBUTE((nonnull));
       
  9804  /**********************************************************************//**
       
  9805  Move to the most recently used segment of the LRU list. */
       
  9806  UNIV_INTERN
       
  9807 @@ -1550,7 +1550,7 @@ void
       
  9808  dict_move_to_mru(
       
  9809  /*=============*/
       
  9810  	dict_table_t*	table)	/*!< in: table to move to MRU */
       
  9811 -	__attribute__((nonnull));
       
  9812 +	MY_ATTRIBUTE((nonnull));
       
  9813  
       
  9814  /** Maximum number of columns in a foreign key constraint. Please Note MySQL
       
  9815  has a much lower limit on the number of columns allowed in a foreign key
       
  9816 @@ -1674,7 +1674,7 @@ dict_table_schema_check(
       
  9817  						!= DB_TABLE_NOT_FOUND is
       
  9818  						returned */
       
  9819  	size_t			errstr_sz)	/*!< in: errstr size */
       
  9820 -	__attribute__((nonnull, warn_unused_result));
       
  9821 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9822  /* @} */
       
  9823  
       
  9824  /*********************************************************************//**
       
  9825 @@ -1692,7 +1692,7 @@ dict_fs2utf8(
       
  9826  	size_t		db_utf8_size,	/*!< in: dbname_utf8 size */
       
  9827  	char*		table_utf8,	/*!< out: table name, e.g. aюbØc */
       
  9828  	size_t		table_utf8_size)/*!< in: table_utf8 size */
       
  9829 -	__attribute__((nonnull));
       
  9830 +	MY_ATTRIBUTE((nonnull));
       
  9831  
       
  9832  /**********************************************************************//**
       
  9833  Closes the data dictionary module. */
       
  9834 @@ -1709,7 +1709,7 @@ ulint
       
  9835  dict_table_is_corrupted(
       
  9836  /*====================*/
       
  9837  	const dict_table_t*	table)	/*!< in: table */
       
  9838 -	__attribute__((nonnull, warn_unused_result));
       
  9839 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9840  
       
  9841  /**********************************************************************//**
       
  9842  Check whether the index is corrupted.
       
  9843 @@ -1719,7 +1719,7 @@ ulint
       
  9844  dict_index_is_corrupted(
       
  9845  /*====================*/
       
  9846  	const dict_index_t*	index)	/*!< in: index */
       
  9847 -	__attribute__((nonnull, warn_unused_result));
       
  9848 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9849  
       
  9850  #endif /* !UNIV_HOTBACKUP */
       
  9851  /**********************************************************************//**
       
  9852 @@ -1732,7 +1732,7 @@ dict_set_corrupted(
       
  9853  	dict_index_t*	index,	/*!< in/out: index */
       
  9854  	trx_t*		trx,	/*!< in/out: transaction */
       
  9855  	const char*	ctx)	/*!< in: context */
       
  9856 -	UNIV_COLD __attribute__((nonnull));
       
  9857 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
  9858  
       
  9859  /**********************************************************************//**
       
  9860  Flags an index corrupted in the data dictionary cache only. This
       
  9861 @@ -1744,7 +1744,7 @@ dict_set_corrupted_index_cache_only(
       
  9862  /*================================*/
       
  9863  	dict_index_t*	index,		/*!< in/out: index */
       
  9864  	dict_table_t*	table)		/*!< in/out: table */
       
  9865 -	__attribute__((nonnull));
       
  9866 +	MY_ATTRIBUTE((nonnull));
       
  9867  
       
  9868  /**********************************************************************//**
       
  9869  Flags a table with specified space_id corrupted in the table dictionary
       
  9870 @@ -1764,7 +1764,7 @@ bool
       
  9871  dict_tf_is_valid(
       
  9872  /*=============*/
       
  9873  	ulint		flags)		/*!< in: table flags */
       
  9874 -	__attribute__((warn_unused_result));
       
  9875 +	MY_ATTRIBUTE((warn_unused_result));
       
  9876  
       
  9877  /********************************************************************//**
       
  9878  Check if the tablespace for the table has been discarded.
       
  9879 @@ -1774,7 +1774,7 @@ bool
       
  9880  dict_table_is_discarded(
       
  9881  /*====================*/
       
  9882  	const dict_table_t*	table)	/*!< in: table to check */
       
  9883 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9884 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9885  
       
  9886  /********************************************************************//**
       
  9887  Check if it is a temporary table.
       
  9888 @@ -1784,7 +1784,7 @@ bool
       
  9889  dict_table_is_temporary(
       
  9890  /*====================*/
       
  9891  	const dict_table_t*	table)	/*!< in: table to check */
       
  9892 -	__attribute__((nonnull, pure, warn_unused_result));
       
  9893 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
  9894  
       
  9895  #ifndef UNIV_HOTBACKUP
       
  9896  /*********************************************************************//**
       
  9897 @@ -1795,7 +1795,7 @@ void
       
  9898  dict_index_zip_success(
       
  9899  /*===================*/
       
  9900  	dict_index_t*	index)	/*!< in/out: index to be updated. */
       
  9901 -	__attribute__((nonnull));
       
  9902 +	MY_ATTRIBUTE((nonnull));
       
  9903  /*********************************************************************//**
       
  9904  This function should be called whenever a page compression attempt
       
  9905  fails. Updates the compression padding information. */
       
  9906 @@ -1804,7 +1804,7 @@ void
       
  9907  dict_index_zip_failure(
       
  9908  /*===================*/
       
  9909  	dict_index_t*	index)	/*!< in/out: index to be updated. */
       
  9910 -	__attribute__((nonnull));
       
  9911 +	MY_ATTRIBUTE((nonnull));
       
  9912  /*********************************************************************//**
       
  9913  Return the optimal page size, for which page will likely compress.
       
  9914  @return page size beyond which page may not compress*/
       
  9915 @@ -1814,7 +1814,7 @@ dict_index_zip_pad_optimal_page_size(
       
  9916  /*=================================*/
       
  9917  	dict_index_t*	index)	/*!< in: index for which page size
       
  9918  				is requested */
       
  9919 -	__attribute__((nonnull, warn_unused_result));
       
  9920 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
  9921  /*************************************************************//**
       
  9922  Convert table flag to row format string.
       
  9923  @return row format name */
       
  9924 --- a/storage/innobase/include/dict0dict.ic
       
  9925 +++ b/storage/innobase/include/dict0dict.ic
       
  9926 @@ -1,6 +1,6 @@
       
  9927  /*****************************************************************************
       
  9928  
       
  9929 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  9930 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  9931  
       
  9932  This program is free software; you can redistribute it and/or modify it under
       
  9933  the terms of the GNU General Public License as published by the Free Software
       
  9934 @@ -357,7 +357,7 @@ UNIV_INLINE
       
  9935  ulint
       
  9936  dict_table_get_n_sys_cols(
       
  9937  /*======================*/
       
  9938 -	const dict_table_t*	table __attribute__((unused)))	/*!< in: table */
       
  9939 +	const dict_table_t*	table MY_ATTRIBUTE((unused)))	/*!< in: table */
       
  9940  {
       
  9941  	ut_ad(table);
       
  9942  	ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
       
  9943 --- a/storage/innobase/include/dict0load.h
       
  9944 +++ b/storage/innobase/include/dict0load.h
       
  9945 @@ -1,6 +1,6 @@
       
  9946  /*****************************************************************************
       
  9947  
       
  9948 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
  9949 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  9950  
       
  9951  This program is free software; you can redistribute it and/or modify it under
       
  9952  the terms of the GNU General Public License as published by the Free Software
       
  9953 @@ -243,7 +243,7 @@ dict_load_foreigns(
       
  9954  	bool			check_charsets,	/*!< in: whether to check
       
  9955  						charset compatibility */
       
  9956  	dict_err_ignore_t	ignore_err)	/*!< in: error to be ignored */
       
  9957 -	__attribute__((nonnull(1), warn_unused_result));
       
  9958 +	MY_ATTRIBUTE((nonnull(1), warn_unused_result));
       
  9959  /********************************************************************//**
       
  9960  Prints to the standard output information on all tables found in the data
       
  9961  dictionary system table. */
       
  9962 --- a/storage/innobase/include/dict0mem.h
       
  9963 +++ b/storage/innobase/include/dict0mem.h
       
  9964 @@ -1,6 +1,6 @@
       
  9965  /*****************************************************************************
       
  9966  
       
  9967 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
  9968 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  9969  Copyright (c) 2012, Facebook Inc.
       
  9970  
       
  9971  This program is free software; you can redistribute it and/or modify it under
       
  9972 @@ -276,7 +276,7 @@ dict_mem_table_add_col(
       
  9973  	ulint		mtype,	/*!< in: main datatype */
       
  9974  	ulint		prtype,	/*!< in: precise type */
       
  9975  	ulint		len)	/*!< in: precision */
       
  9976 -	__attribute__((nonnull(1)));
       
  9977 +	MY_ATTRIBUTE((nonnull(1)));
       
  9978  /**********************************************************************//**
       
  9979  Renames a column of a table in the data dictionary cache. */
       
  9980  UNIV_INTERN
       
  9981 @@ -287,7 +287,7 @@ dict_mem_table_col_rename(
       
  9982  	unsigned	nth_col,/*!< in: column index */
       
  9983  	const char*	from,	/*!< in: old column name */
       
  9984  	const char*	to)	/*!< in: new column name */
       
  9985 -	__attribute__((nonnull));
       
  9986 +	MY_ATTRIBUTE((nonnull));
       
  9987  /**********************************************************************//**
       
  9988  This function populates a dict_col_t memory structure with
       
  9989  supplied information. */
       
  9990 --- a/storage/innobase/include/dict0stats.h
       
  9991 +++ b/storage/innobase/include/dict0stats.h
       
  9992 @@ -1,6 +1,6 @@
       
  9993  /*****************************************************************************
       
  9994  
       
  9995 -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
  9996 +Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
  9997  
       
  9998  This program is free software; you can redistribute it and/or modify it under
       
  9999  the terms of the GNU General Public License as published by the Free Software
       
 10000 @@ -77,7 +77,7 @@ dict_stats_set_persistent(
       
 10001  	dict_table_t*	table,	/*!< in/out: table */
       
 10002  	ibool		ps_on,	/*!< in: persistent stats explicitly enabled */
       
 10003  	ibool		ps_off)	/*!< in: persistent stats explicitly disabled */
       
 10004 -	__attribute__((nonnull));
       
 10005 +	MY_ATTRIBUTE((nonnull));
       
 10006  
       
 10007  /*********************************************************************//**
       
 10008  Check whether persistent statistics is enabled for a given table.
       
 10009 @@ -87,7 +87,7 @@ ibool
       
 10010  dict_stats_is_persistent_enabled(
       
 10011  /*=============================*/
       
 10012  	const dict_table_t*	table)	/*!< in: table */
       
 10013 -	__attribute__((nonnull, warn_unused_result));
       
 10014 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10015  
       
 10016  /*********************************************************************//**
       
 10017  Set the auto recalc flag for a given table (only honored for a persistent
       
 10018 @@ -127,7 +127,7 @@ void
       
 10019  dict_stats_deinit(
       
 10020  /*==============*/
       
 10021  	dict_table_t*	table)	/*!< in/out: table */
       
 10022 -	__attribute__((nonnull));
       
 10023 +	MY_ATTRIBUTE((nonnull));
       
 10024  
       
 10025  /*********************************************************************//**
       
 10026  Calculates new estimates for table and index statistics. The statistics
       
 10027 @@ -179,7 +179,7 @@ void
       
 10028  dict_stats_update_for_index(
       
 10029  /*========================*/
       
 10030  	dict_index_t*	index)	/*!< in/out: index */
       
 10031 -	__attribute__((nonnull));
       
 10032 +	MY_ATTRIBUTE((nonnull));
       
 10033  
       
 10034  /*********************************************************************//**
       
 10035  Renames a table in InnoDB persistent stats storage.
       
 10036 --- a/storage/innobase/include/dict0stats_bg.h
       
 10037 +++ b/storage/innobase/include/dict0stats_bg.h
       
 10038 @@ -1,6 +1,6 @@
       
 10039  /*****************************************************************************
       
 10040  
       
 10041 -Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 10042 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10043  
       
 10044  This program is free software; you can redistribute it and/or modify it under
       
 10045  the terms of the GNU General Public License as published by the Free Software
       
 10046 @@ -74,7 +74,7 @@ bool
       
 10047  dict_stats_stop_bg(
       
 10048  /*===============*/
       
 10049  	dict_table_t*	table)	/*!< in/out: table */
       
 10050 -	__attribute__((warn_unused_result));
       
 10051 +	MY_ATTRIBUTE((warn_unused_result));
       
 10052  
       
 10053  /*****************************************************************//**
       
 10054  Wait until background stats thread has stopped using the specified table.
       
 10055 --- a/storage/innobase/include/dyn0dyn.h
       
 10056 +++ b/storage/innobase/include/dyn0dyn.h
       
 10057 @@ -1,6 +1,6 @@
       
 10058  /*****************************************************************************
       
 10059  
       
 10060 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 10061 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10062  
       
 10063  This program is free software; you can redistribute it and/or modify it under
       
 10064  the terms of the GNU General Public License as published by the Free Software
       
 10065 @@ -48,7 +48,7 @@ dyn_array_create(
       
 10066  /*=============*/
       
 10067  	dyn_array_t*	arr)	/*!< in/out memory buffer of
       
 10068  				size sizeof(dyn_array_t) */
       
 10069 -	__attribute__((nonnull));
       
 10070 +	MY_ATTRIBUTE((nonnull));
       
 10071  /************************************************************//**
       
 10072  Frees a dynamic array. */
       
 10073  UNIV_INLINE
       
 10074 @@ -56,7 +56,7 @@ void
       
 10075  dyn_array_free(
       
 10076  /*===========*/
       
 10077  	dyn_array_t*	arr)	/*!< in,own: dyn array */
       
 10078 -	__attribute__((nonnull));
       
 10079 +	MY_ATTRIBUTE((nonnull));
       
 10080  /*********************************************************************//**
       
 10081  Makes room on top of a dyn array and returns a pointer to a buffer in it.
       
 10082  After copying the elements, the caller must close the buffer using
       
 10083 @@ -69,7 +69,7 @@ dyn_array_open(
       
 10084  	dyn_array_t*	arr,	/*!< in: dynamic array */
       
 10085  	ulint		size)	/*!< in: size in bytes of the buffer; MUST be
       
 10086  				smaller than DYN_ARRAY_DATA_SIZE! */
       
 10087 -	__attribute__((nonnull, warn_unused_result));
       
 10088 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10089  /*********************************************************************//**
       
 10090  Closes the buffer returned by dyn_array_open. */
       
 10091  UNIV_INLINE
       
 10092 @@ -78,7 +78,7 @@ dyn_array_close(
       
 10093  /*============*/
       
 10094  	dyn_array_t*	arr,	/*!< in: dynamic array */
       
 10095  	const byte*	ptr)	/*!< in: end of used space */
       
 10096 -	__attribute__((nonnull));
       
 10097 +	MY_ATTRIBUTE((nonnull));
       
 10098  /*********************************************************************//**
       
 10099  Makes room on top of a dyn array and returns a pointer to
       
 10100  the added element. The caller must copy the element to
       
 10101 @@ -90,7 +90,7 @@ dyn_array_push(
       
 10102  /*===========*/
       
 10103  	dyn_array_t*	arr,	/*!< in/out: dynamic array */
       
 10104  	ulint		size)	/*!< in: size in bytes of the element */
       
 10105 -	__attribute__((nonnull, warn_unused_result));
       
 10106 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10107  /************************************************************//**
       
 10108  Returns pointer to an element in dyn array.
       
 10109  @return	pointer to element */
       
 10110 @@ -101,7 +101,7 @@ dyn_array_get_element(
       
 10111  	const dyn_array_t*	arr,	/*!< in: dyn array */
       
 10112  	ulint			pos)	/*!< in: position of element
       
 10113  					in bytes from array start */
       
 10114 -	__attribute__((nonnull, warn_unused_result));
       
 10115 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10116  /************************************************************//**
       
 10117  Returns the size of stored data in a dyn array.
       
 10118  @return	data size in bytes */
       
 10119 @@ -110,7 +110,7 @@ ulint
       
 10120  dyn_array_get_data_size(
       
 10121  /*====================*/
       
 10122  	const dyn_array_t*	arr)	/*!< in: dyn array */
       
 10123 -	__attribute__((nonnull, warn_unused_result, pure));
       
 10124 +	MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
       
 10125  /************************************************************//**
       
 10126  Gets the first block in a dyn array.
       
 10127  @param arr	dyn array
       
 10128 @@ -144,7 +144,7 @@ ulint
       
 10129  dyn_block_get_used(
       
 10130  /*===============*/
       
 10131  	const dyn_block_t*	block)	/*!< in: dyn array block */
       
 10132 -	__attribute__((nonnull, warn_unused_result, pure));
       
 10133 +	MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
       
 10134  /********************************************************************//**
       
 10135  Gets pointer to the start of data in a dyn array block.
       
 10136  @return	pointer to data */
       
 10137 @@ -153,7 +153,7 @@ byte*
       
 10138  dyn_block_get_data(
       
 10139  /*===============*/
       
 10140  	const dyn_block_t*	block)	/*!< in: dyn array block */
       
 10141 -	__attribute__((nonnull, warn_unused_result, pure));
       
 10142 +	MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
       
 10143  /********************************************************//**
       
 10144  Pushes n bytes to a dyn array. */
       
 10145  UNIV_INLINE
       
 10146 @@ -163,7 +163,7 @@ dyn_push_string(
       
 10147  	dyn_array_t*	arr,	/*!< in/out: dyn array */
       
 10148  	const byte*	str,	/*!< in: string to write */
       
 10149  	ulint		len)	/*!< in: string length */
       
 10150 -	__attribute__((nonnull));
       
 10151 +	MY_ATTRIBUTE((nonnull));
       
 10152  
       
 10153  /*#################################################################*/
       
 10154  
       
 10155 --- a/storage/innobase/include/dyn0dyn.ic
       
 10156 +++ b/storage/innobase/include/dyn0dyn.ic
       
 10157 @@ -1,6 +1,6 @@
       
 10158  /*****************************************************************************
       
 10159  
       
 10160 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 10161 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10162  
       
 10163  This program is free software; you can redistribute it and/or modify it under
       
 10164  the terms of the GNU General Public License as published by the Free Software
       
 10165 @@ -36,7 +36,7 @@ dyn_block_t*
       
 10166  dyn_array_add_block(
       
 10167  /*================*/
       
 10168  	dyn_array_t*	arr)	/*!< in/out: dyn array */
       
 10169 -	__attribute__((nonnull, warn_unused_result));
       
 10170 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10171  
       
 10172  /********************************************************************//**
       
 10173  Gets the number of used bytes in a dyn array block.
       
 10174 --- a/storage/innobase/include/fil0fil.h
       
 10175 +++ b/storage/innobase/include/fil0fil.h
       
 10176 @@ -1,6 +1,6 @@
       
 10177  /*****************************************************************************
       
 10178  
       
 10179 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 10180 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10181  
       
 10182  This program is free software; you can redistribute it and/or modify it under
       
 10183  the terms of the GNU General Public License as published by the Free Software
       
 10184 @@ -233,7 +233,7 @@ fil_node_create(
       
 10185  	ulint		id,	/*!< in: space id where to append */
       
 10186  	ibool		is_raw)	/*!< in: TRUE if a raw device or
       
 10187  				a raw disk partition */
       
 10188 -	__attribute__((nonnull, warn_unused_result));
       
 10189 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10190  #ifdef UNIV_LOG_ARCHIVE
       
 10191  /****************************************************************//**
       
 10192  Drops files from the start of a file space, so that its size is cut by
       
 10193 @@ -400,7 +400,7 @@ fil_read_first_page(
       
 10194  						lsn values in data files */
       
 10195  	lsn_t*		max_flushed_lsn)	/*!< out: max of flushed
       
 10196  						lsn values in data files */
       
 10197 -	__attribute__((warn_unused_result));
       
 10198 +	MY_ATTRIBUTE((warn_unused_result));
       
 10199  /*******************************************************************//**
       
 10200  Increments the count of pending operation, if space is not being deleted.
       
 10201  @return	TRUE if being deleted, and operation should be skipped */
       
 10202 @@ -488,7 +488,7 @@ dberr_t
       
 10203  fil_discard_tablespace(
       
 10204  /*===================*/
       
 10205  	ulint	id)	/*!< in: space id */
       
 10206 -	__attribute__((warn_unused_result));
       
 10207 +	MY_ATTRIBUTE((warn_unused_result));
       
 10208  #endif /* !UNIV_HOTBACKUP */
       
 10209  
       
 10210  /** Test if a tablespace file can be renamed to a new filepath by checking
       
 10211 @@ -597,7 +597,7 @@ fil_create_new_single_table_tablespace(
       
 10212  	ulint		size)		/*!< in: the initial size of the
       
 10213  					tablespace file in pages,
       
 10214  					must be >= FIL_IBD_FILE_INITIAL_SIZE */
       
 10215 -	__attribute__((nonnull, warn_unused_result));
       
 10216 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10217  #ifndef UNIV_HOTBACKUP
       
 10218  /********************************************************************//**
       
 10219  Tries to open a single-table tablespace and optionally checks the space id is
       
 10220 @@ -631,7 +631,7 @@ fil_open_single_table_tablespace(
       
 10221  	const char*	tablename,	/*!< in: table name in the
       
 10222  					databasename/tablename format */
       
 10223  	const char*	filepath)	/*!< in: tablespace filepath */
       
 10224 -	__attribute__((nonnull(5), warn_unused_result));
       
 10225 +	MY_ATTRIBUTE((nonnull(5), warn_unused_result));
       
 10226  
       
 10227  #endif /* !UNIV_HOTBACKUP */
       
 10228  /********************************************************************//**
       
 10229 @@ -780,7 +780,7 @@ fil_io(
       
 10230  				appropriately aligned */
       
 10231  	void*	message)	/*!< in: message for aio handler if non-sync
       
 10232  				aio used, else ignored */
       
 10233 -	__attribute__((nonnull(8)));
       
 10234 +	MY_ATTRIBUTE((nonnull(8)));
       
 10235  /**********************************************************************//**
       
 10236  Waits for an aio operation to complete. This function is used to write the
       
 10237  handler for completed requests. The aio array of pending requests is divided
       
 10238 @@ -975,7 +975,7 @@ fil_tablespace_iterate(
       
 10239  	dict_table_t*		table,
       
 10240  	ulint			n_io_buffers,
       
 10241  	PageCallback&		callback)
       
 10242 -	__attribute__((nonnull, warn_unused_result));
       
 10243 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10244  
       
 10245  /*******************************************************************//**
       
 10246  Checks if a single-table tablespace for a given table name exists in the
       
 10247 @@ -999,7 +999,7 @@ fil_get_space_names(
       
 10248  /*================*/
       
 10249  	space_name_list_t&	space_name_list)
       
 10250  				/*!< in/out: Vector for collecting the names. */
       
 10251 -	__attribute__((warn_unused_result));
       
 10252 +	MY_ATTRIBUTE((warn_unused_result));
       
 10253  
       
 10254  /** Generate redo log for swapping two .ibd files
       
 10255  @param[in]	old_table	old table
       
 10256 @@ -1014,7 +1014,7 @@ fil_mtr_rename_log(
       
 10257  	const dict_table_t*	new_table,
       
 10258  	const char*		tmp_name,
       
 10259  	mtr_t*			mtr)
       
 10260 -	__attribute__((nonnull));
       
 10261 +	MY_ATTRIBUTE((nonnull));
       
 10262  
       
 10263  /*******************************************************************//**
       
 10264  Finds the given page_no of the given space id from the double write buffer,
       
 10265 --- a/storage/innobase/include/fsp0fsp.h
       
 10266 +++ b/storage/innobase/include/fsp0fsp.h
       
 10267 @@ -1,6 +1,6 @@
       
 10268  /*****************************************************************************
       
 10269  
       
 10270 -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 10271 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10272  
       
 10273  This program is free software; you can redistribute it and/or modify it under
       
 10274  the terms of the GNU General Public License as published by the Free Software
       
 10275 @@ -510,7 +510,7 @@ fseg_alloc_free_page_general(
       
 10276  				in which the page should be initialized.
       
 10277  				If init_mtr!=mtr, but the page is already
       
 10278  				latched in mtr, do not initialize the page. */
       
 10279 -	__attribute__((warn_unused_result, nonnull));
       
 10280 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 10281  /**********************************************************************//**
       
 10282  Reserves free pages from a tablespace. All mini-transactions which may
       
 10283  use several pages from the tablespace should call this function beforehand
       
 10284 @@ -579,7 +579,7 @@ fseg_page_is_free(
       
 10285  	fseg_header_t*	seg_header,	/*!< in: segment header */
       
 10286  	ulint		space,		/*!< in: space id */
       
 10287  	ulint		page)		/*!< in: page offset */
       
 10288 -	__attribute__((nonnull, warn_unused_result));
       
 10289 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10290  /**********************************************************************//**
       
 10291  Frees part of a segment. This function can be used to free a segment
       
 10292  by repeatedly calling this function in different mini-transactions.
       
 10293 @@ -675,7 +675,7 @@ bool
       
 10294  fsp_flags_is_valid(
       
 10295  /*===============*/
       
 10296  	ulint	flags)		/*!< in: tablespace flags */
       
 10297 -	__attribute__((warn_unused_result, const));
       
 10298 +	MY_ATTRIBUTE((warn_unused_result, const));
       
 10299  /********************************************************************//**
       
 10300  Determine if the tablespace is compressed from dict_table_t::flags.
       
 10301  @return	TRUE if compressed, FALSE if not compressed */
       
 10302 --- a/storage/innobase/include/fts0ast.h
       
 10303 +++ b/storage/innobase/include/fts0ast.h
       
 10304 @@ -1,6 +1,6 @@
       
 10305  /*****************************************************************************
       
 10306  
       
 10307 -Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 10308 +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10309  
       
 10310  This program is free software; you can redistribute it and/or modify it under
       
 10311  the terms of the GNU General Public License as published by the Free Software
       
 10312 @@ -200,7 +200,7 @@ fts_ast_visit(
       
 10313  						and ignored processing an
       
 10314  						operator, currently we only
       
 10315  						ignore FTS_IGNORE operator */
       
 10316 -	__attribute__((nonnull, warn_unused_result));
       
 10317 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10318  /*****************************************************************//**
       
 10319  Process (nested) sub-expression, create a new result set to store the
       
 10320  sub-expression result by processing nodes under current sub-expression
       
 10321 @@ -213,7 +213,7 @@ fts_ast_visit_sub_exp(
       
 10322  	fts_ast_node_t*		node,		/*!< in: instance to traverse*/
       
 10323  	fts_ast_callback	visitor,	/*!< in: callback */
       
 10324  	void*			arg)		/*!< in: callback arg */
       
 10325 -	__attribute__((nonnull, warn_unused_result));
       
 10326 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10327  /********************************************************************
       
 10328  Create a lex instance.*/
       
 10329  UNIV_INTERN
       
 10330 @@ -223,7 +223,7 @@ fts_lexer_create(
       
 10331  	ibool		boolean_mode,		/*!< in: query type */
       
 10332  	const byte*	query,			/*!< in: query string */
       
 10333  	ulint		query_len)		/*!< in: query string len */
       
 10334 -	__attribute__((nonnull, malloc, warn_unused_result));
       
 10335 +	MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
       
 10336  /********************************************************************
       
 10337  Free an fts_lexer_t instance.*/
       
 10338  UNIV_INTERN
       
 10339 @@ -232,7 +232,7 @@ fts_lexer_free(
       
 10340  /*===========*/
       
 10341  	fts_lexer_t*	fts_lexer)		/*!< in: lexer instance to
       
 10342  						free */
       
 10343 -	__attribute__((nonnull));
       
 10344 +	MY_ATTRIBUTE((nonnull));
       
 10345  
       
 10346  /**
       
 10347  Create an ast string object, with NUL-terminator, so the string
       
 10348 --- a/storage/innobase/include/fts0fts.h
       
 10349 +++ b/storage/innobase/include/fts0fts.h
       
 10350 @@ -411,7 +411,7 @@ fts_get_next_doc_id(
       
 10351  /*================*/
       
 10352  	const dict_table_t*	table,	/*!< in: table */
       
 10353  	doc_id_t*		doc_id)	/*!< out: new document id */
       
 10354 -	__attribute__((nonnull));
       
 10355 +	MY_ATTRIBUTE((nonnull));
       
 10356  /*********************************************************************//**
       
 10357  Update the next and last Doc ID in the CONFIG table to be the input
       
 10358  "doc_id" value (+ 1). We would do so after each FTS index build or
       
 10359 @@ -424,7 +424,7 @@ fts_update_next_doc_id(
       
 10360  	const dict_table_t*	table,		/*!< in: table */
       
 10361  	const char*		table_name,	/*!< in: table name, or NULL */
       
 10362  	doc_id_t		doc_id)		/*!< in: DOC ID to set */
       
 10363 -	__attribute__((nonnull(2)));
       
 10364 +	MY_ATTRIBUTE((nonnull(2)));
       
 10365  
       
 10366  /******************************************************************//**
       
 10367  Create a new document id .
       
 10368 @@ -440,7 +440,7 @@ fts_create_doc_id(
       
 10369  						current row that is being
       
 10370  						inserted. */
       
 10371  	mem_heap_t*	heap)			/*!< in: heap */
       
 10372 -	__attribute__((nonnull));
       
 10373 +	MY_ATTRIBUTE((nonnull));
       
 10374  /******************************************************************//**
       
 10375  Create a new fts_doc_ids_t.
       
 10376  @return new fts_doc_ids_t. */
       
 10377 @@ -469,7 +469,7 @@ fts_trx_add_op(
       
 10378  	fts_row_state	state,			/*!< in: state of the row */
       
 10379  	ib_vector_t*	fts_indexes)		/*!< in: FTS indexes affected
       
 10380  						(NULL=all) */
       
 10381 -	__attribute__((nonnull(1,2)));
       
 10382 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 10383  
       
 10384  /******************************************************************//**
       
 10385  Free an FTS trx. */
       
 10386 @@ -494,7 +494,7 @@ fts_create_common_tables(
       
 10387  						index */
       
 10388  	const char*	name,			/*!< in: table name */
       
 10389  	bool		skip_doc_id_index)	/*!< in: Skip index on doc id */
       
 10390 -	__attribute__((nonnull, warn_unused_result));
       
 10391 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10392  /******************************************************************//**
       
 10393  Wrapper function of fts_create_index_tables_low(), create auxiliary
       
 10394  tables for an FTS index
       
 10395 @@ -506,7 +506,7 @@ fts_create_index_tables(
       
 10396  	trx_t*			trx,		/*!< in: transaction handle */
       
 10397  	const dict_index_t*	index)		/*!< in: the FTS index
       
 10398  						instance */
       
 10399 -	__attribute__((nonnull, warn_unused_result));
       
 10400 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10401  /******************************************************************//**
       
 10402  Creates the column specific ancillary tables needed for supporting an
       
 10403  FTS index on the given table. row_mysql_lock_data_dictionary must have
       
 10404 @@ -522,7 +522,7 @@ fts_create_index_tables_low(
       
 10405  						instance */
       
 10406  	const char*	table_name,		/*!< in: the table name */
       
 10407  	table_id_t	table_id)		/*!< in: the table id */
       
 10408 -	__attribute__((nonnull, warn_unused_result));
       
 10409 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10410  /******************************************************************//**
       
 10411  Add the FTS document id hidden column. */
       
 10412  UNIV_INTERN
       
 10413 @@ -531,7 +531,7 @@ fts_add_doc_id_column(
       
 10414  /*==================*/
       
 10415  	dict_table_t*	table,	/*!< in/out: Table with FTS index */
       
 10416  	mem_heap_t*	heap)	/*!< in: temporary memory heap, or NULL */
       
 10417 -	__attribute__((nonnull(1)));
       
 10418 +	MY_ATTRIBUTE((nonnull(1)));
       
 10419  
       
 10420  /*********************************************************************//**
       
 10421  Drops the ancillary tables needed for supporting an FTS index on the
       
 10422 @@ -545,7 +545,7 @@ fts_drop_tables(
       
 10423  	trx_t*		trx,			/*!< in: transaction */
       
 10424  	dict_table_t*	table)			/*!< in: table has the FTS
       
 10425  						index */
       
 10426 -	__attribute__((nonnull));
       
 10427 +	MY_ATTRIBUTE((nonnull));
       
 10428  /******************************************************************//**
       
 10429  The given transaction is about to be committed; do whatever is necessary
       
 10430  from the FTS system's POV.
       
 10431 @@ -555,7 +555,7 @@ dberr_t
       
 10432  fts_commit(
       
 10433  /*=======*/
       
 10434  	trx_t*		trx)			/*!< in: transaction */
       
 10435 -	__attribute__((nonnull, warn_unused_result));
       
 10436 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10437  
       
 10438  /*******************************************************************//**
       
 10439  FTS Query entry point.
       
 10440 @@ -572,7 +572,7 @@ fts_query(
       
 10441  						in bytes */
       
 10442  	fts_result_t**	result)			/*!< out: query result, to be
       
 10443  						freed by the caller.*/
       
 10444 -	__attribute__((nonnull, warn_unused_result));
       
 10445 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10446  
       
 10447  /******************************************************************//**
       
 10448  Retrieve the FTS Relevance Ranking result for doc with doc_id
       
 10449 @@ -690,7 +690,7 @@ dberr_t
       
 10450  fts_optimize_table(
       
 10451  /*===============*/
       
 10452  	dict_table_t*	table)			/*!< in: table to optimiza */
       
 10453 -	__attribute__((nonnull));
       
 10454 +	MY_ATTRIBUTE((nonnull));
       
 10455  
       
 10456  /**********************************************************************//**
       
 10457  Startup the optimize thread and create the work queue. */
       
 10458 @@ -716,7 +716,7 @@ fts_drop_index_tables(
       
 10459  /*==================*/
       
 10460  	trx_t*		trx,			/*!< in: transaction */
       
 10461  	dict_index_t*	index)			/*!< in: Index to drop */
       
 10462 -	__attribute__((nonnull, warn_unused_result));
       
 10463 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10464  
       
 10465  /******************************************************************//**
       
 10466  Remove the table from the OPTIMIZER's list. We do wait for
       
 10467 @@ -757,7 +757,7 @@ fts_savepoint_take(
       
 10468  	trx_t*		trx,			/*!< in: transaction */
       
 10469  	fts_trx_t*	fts_trx,		/*!< in: fts transaction */
       
 10470  	const char*	name)			/*!< in: savepoint name */
       
 10471 -	__attribute__((nonnull));
       
 10472 +	MY_ATTRIBUTE((nonnull));
       
 10473  /**********************************************************************//**
       
 10474  Refresh last statement savepoint. */
       
 10475  UNIV_INTERN
       
 10476 @@ -765,7 +765,7 @@ void
       
 10477  fts_savepoint_laststmt_refresh(
       
 10478  /*===========================*/
       
 10479  	trx_t*		trx)			/*!< in: transaction */
       
 10480 -	__attribute__((nonnull));
       
 10481 +	MY_ATTRIBUTE((nonnull));
       
 10482  /**********************************************************************//**
       
 10483  Release the savepoint data identified by  name. */
       
 10484  UNIV_INTERN
       
 10485 @@ -834,7 +834,7 @@ fts_drop_index_split_tables(
       
 10486  /*========================*/
       
 10487  	trx_t*		trx,			/*!< in: transaction */
       
 10488  	dict_index_t*	index)			/*!< in: fts instance */
       
 10489 -	__attribute__((nonnull, warn_unused_result));
       
 10490 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10491  
       
 10492  /** Run SYNC on the table, i.e., write out data from the cache to the
       
 10493  FTS auxiliary INDEX table and clear the cache at the end.
       
 10494 @@ -1026,7 +1026,7 @@ fts_drop_index(
       
 10495  	dict_table_t*	table,	/*!< in: Table where indexes are dropped */
       
 10496  	dict_index_t*	index,	/*!< in: Index to be dropped */
       
 10497  	trx_t*		trx)	/*!< in: Transaction for the drop */
       
 10498 -	__attribute__((nonnull));
       
 10499 +	MY_ATTRIBUTE((nonnull));
       
 10500  
       
 10501  /****************************************************************//**
       
 10502  Rename auxiliary tables for all fts index for a table
       
 10503 --- a/storage/innobase/include/fts0priv.h
       
 10504 +++ b/storage/innobase/include/fts0priv.h
       
 10505 @@ -1,6 +1,6 @@
       
 10506  /*****************************************************************************
       
 10507  
       
 10508 -Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 10509 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10510  
       
 10511  This program is free software; you can redistribute it and/or modify it under
       
 10512  the terms of the GNU General Public License as published by the Free Software
       
 10513 @@ -121,7 +121,7 @@ fts_parse_sql(
       
 10514  	fts_table_t*	fts_table,	/*!< in: FTS aux table */
       
 10515  	pars_info_t*	info,		/*!< in: info struct, or NULL */
       
 10516  	const char*	sql)		/*!< in: SQL string to evaluate */
       
 10517 -	__attribute__((nonnull(3), malloc, warn_unused_result));
       
 10518 +	MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
       
 10519  /******************************************************************//**
       
 10520  Evaluate a parsed SQL statement
       
 10521  @return DB_SUCCESS or error code */
       
 10522 @@ -131,7 +131,7 @@ fts_eval_sql(
       
 10523  /*=========*/
       
 10524  	trx_t*		trx,		/*!< in: transaction */
       
 10525  	que_t*		graph)		/*!< in: Parsed statement */
       
 10526 -	__attribute__((nonnull, warn_unused_result));
       
 10527 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10528  /******************************************************************//**
       
 10529  Construct the name of an ancillary FTS table for the given table.
       
 10530  @return own: table name, must be freed with mem_free() */
       
 10531 @@ -141,7 +141,7 @@ fts_get_table_name(
       
 10532  /*===============*/
       
 10533  	const fts_table_t*
       
 10534  			fts_table)	/*!< in: FTS aux table info */
       
 10535 -	__attribute__((nonnull, malloc, warn_unused_result));
       
 10536 +	MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
       
 10537  /******************************************************************//**
       
 10538  Construct the column specification part of the SQL string for selecting the
       
 10539  indexed FTS columns for the given table. Adds the necessary bound
       
 10540 @@ -164,7 +164,7 @@ fts_get_select_columns_str(
       
 10541  	dict_index_t*	index,		/*!< in: FTS index */
       
 10542  	pars_info_t*	info,		/*!< in/out: parser info */
       
 10543  	mem_heap_t*	heap)		/*!< in: memory heap */
       
 10544 -	__attribute__((nonnull, warn_unused_result));
       
 10545 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10546  
       
 10547  /** define for fts_doc_fetch_by_doc_id() "option" value, defines whether
       
 10548  we want to get Doc whose ID is equal to or greater or smaller than supplied
       
 10549 @@ -191,7 +191,7 @@ fts_doc_fetch_by_doc_id(
       
 10550  			callback,	/*!< in: callback to read
       
 10551  					records */
       
 10552  	void*		arg)		/*!< in: callback arg */
       
 10553 -	__attribute__((nonnull(6)));
       
 10554 +	MY_ATTRIBUTE((nonnull(6)));
       
 10555  
       
 10556  /*******************************************************************//**
       
 10557  Callback function for fetch that stores the text of an FTS document,
       
 10558 @@ -203,7 +203,7 @@ fts_query_expansion_fetch_doc(
       
 10559  /*==========================*/
       
 10560  	void*		row,		/*!< in: sel_node_t* */
       
 10561  	void*		user_arg)	/*!< in: fts_doc_t* */
       
 10562 -	__attribute__((nonnull));
       
 10563 +	MY_ATTRIBUTE((nonnull));
       
 10564  /********************************************************************
       
 10565  Write out a single word's data as new entry/entries in the INDEX table.
       
 10566  @return DB_SUCCESS if all OK. */
       
 10567 @@ -216,7 +216,7 @@ fts_write_node(
       
 10568  	fts_table_t*	fts_table,	/*!< in: the FTS aux index */
       
 10569  	fts_string_t*	word,		/*!< in: word in UTF-8 */
       
 10570  	fts_node_t*	node)		/*!< in: node columns */
       
 10571 -	__attribute__((nonnull, warn_unused_result));
       
 10572 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10573  /*******************************************************************//**
       
 10574  Tokenize a document. */
       
 10575  UNIV_INTERN
       
 10576 @@ -227,7 +227,7 @@ fts_tokenize_document(
       
 10577  					tokenize */
       
 10578  	fts_doc_t*	result)		/*!< out: if provided, save
       
 10579  					result tokens here */
       
 10580 -	__attribute__((nonnull(1)));
       
 10581 +	MY_ATTRIBUTE((nonnull(1)));
       
 10582  
       
 10583  /*******************************************************************//**
       
 10584  Continue to tokenize a document. */
       
 10585 @@ -241,7 +241,7 @@ fts_tokenize_document_next(
       
 10586  					tokens from this tokenization */
       
 10587  	fts_doc_t*	result)		/*!< out: if provided, save
       
 10588  					result tokens here */
       
 10589 -	__attribute__((nonnull(1)));
       
 10590 +	MY_ATTRIBUTE((nonnull(1)));
       
 10591  /******************************************************************//**
       
 10592  Initialize a document. */
       
 10593  UNIV_INTERN
       
 10594 @@ -249,7 +249,7 @@ void
       
 10595  fts_doc_init(
       
 10596  /*=========*/
       
 10597  	fts_doc_t*	doc)		/*!< in: doc to initialize */
       
 10598 -	__attribute__((nonnull));
       
 10599 +	MY_ATTRIBUTE((nonnull));
       
 10600  
       
 10601  /******************************************************************//**
       
 10602  Do a binary search for a doc id in the array
       
 10603 @@ -263,7 +263,7 @@ fts_bsearch(
       
 10604  	int		lower,		/*!< in: lower bound of array*/
       
 10605  	int		upper,		/*!< in: upper bound of array*/
       
 10606  	doc_id_t	doc_id)		/*!< in: doc id to lookup */
       
 10607 -	__attribute__((nonnull, warn_unused_result));
       
 10608 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10609  /******************************************************************//**
       
 10610  Free document. */
       
 10611  UNIV_INTERN
       
 10612 @@ -271,7 +271,7 @@ void
       
 10613  fts_doc_free(
       
 10614  /*=========*/
       
 10615  	fts_doc_t*	doc)		/*!< in: document */
       
 10616 -	__attribute__((nonnull));
       
 10617 +	MY_ATTRIBUTE((nonnull));
       
 10618  /******************************************************************//**
       
 10619  Free fts_optimizer_word_t instanace.*/
       
 10620  UNIV_INTERN
       
 10621 @@ -279,7 +279,7 @@ void
       
 10622  fts_word_free(
       
 10623  /*==========*/
       
 10624  	fts_word_t*	word)		/*!< in: instance to free.*/
       
 10625 -	__attribute__((nonnull));
       
 10626 +	MY_ATTRIBUTE((nonnull));
       
 10627  /******************************************************************//**
       
 10628  Read the rows from the FTS inde
       
 10629  @return DB_SUCCESS or error code */
       
 10630 @@ -293,7 +293,7 @@ fts_index_fetch_nodes(
       
 10631  	const fts_string_t*
       
 10632  			word,		/*!< in: the word to fetch */
       
 10633  	fts_fetch_t*	fetch)		/*!< in: fetch callback.*/
       
 10634 -	__attribute__((nonnull));
       
 10635 +	MY_ATTRIBUTE((nonnull));
       
 10636  /******************************************************************//**
       
 10637  Create a fts_optimizer_word_t instance.
       
 10638  @return new instance */
       
 10639 @@ -304,7 +304,7 @@ fts_word_init(
       
 10640  	fts_word_t*	word,		/*!< in: word to initialize */
       
 10641  	byte*		utf8,		/*!< in: UTF-8 string */
       
 10642  	ulint		len)		/*!< in: length of string in bytes */
       
 10643 -	__attribute__((nonnull));
       
 10644 +	MY_ATTRIBUTE((nonnull));
       
 10645  /******************************************************************//**
       
 10646  Compare two fts_trx_table_t instances, we actually compare the
       
 10647  table id's here.
       
 10648 @@ -315,7 +315,7 @@ fts_trx_table_cmp(
       
 10649  /*==============*/
       
 10650  	const void*	v1,		/*!< in: id1 */
       
 10651  	const void*	v2)		/*!< in: id2 */
       
 10652 -	__attribute__((nonnull, warn_unused_result));
       
 10653 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10654  /******************************************************************//**
       
 10655  Compare a table id with a trx_table_t table id.
       
 10656  @return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
       
 10657 @@ -325,7 +325,7 @@ fts_trx_table_id_cmp(
       
 10658  /*=================*/
       
 10659  	const void*	p1,		/*!< in: id1 */
       
 10660  	const void*	p2)		/*!< in: id2 */
       
 10661 -	__attribute__((nonnull, warn_unused_result));
       
 10662 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10663  /******************************************************************//**
       
 10664  Commit a transaction.
       
 10665  @return DB_SUCCESS if all OK */
       
 10666 @@ -334,7 +334,7 @@ dberr_t
       
 10667  fts_sql_commit(
       
 10668  /*===========*/
       
 10669  	trx_t*		trx)		/*!< in: transaction */
       
 10670 -	__attribute__((nonnull));
       
 10671 +	MY_ATTRIBUTE((nonnull));
       
 10672  /******************************************************************//**
       
 10673  Rollback a transaction.
       
 10674  @return DB_SUCCESS if all OK */
       
 10675 @@ -343,7 +343,7 @@ dberr_t
       
 10676  fts_sql_rollback(
       
 10677  /*=============*/
       
 10678  	trx_t*		trx)		/*!< in: transaction */
       
 10679 -	__attribute__((nonnull));
       
 10680 +	MY_ATTRIBUTE((nonnull));
       
 10681  /******************************************************************//**
       
 10682  Parse an SQL string. %s is replaced with the table's id. Don't acquire
       
 10683  the dict mutex
       
 10684 @@ -355,7 +355,7 @@ fts_parse_sql_no_dict_lock(
       
 10685  	fts_table_t*	fts_table,	/*!< in: table with FTS index */
       
 10686  	pars_info_t*	info,		/*!< in: parser info */
       
 10687  	const char*	sql)		/*!< in: SQL string to evaluate */
       
 10688 -	__attribute__((nonnull(3), malloc, warn_unused_result));
       
 10689 +	MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
       
 10690  /******************************************************************//**
       
 10691  Get value from config table. The caller must ensure that enough
       
 10692  space is allocated for value to hold the column contents
       
 10693 @@ -370,7 +370,7 @@ fts_config_get_value(
       
 10694  					this parameter name */
       
 10695  	fts_string_t*	value)		/*!< out: value read from
       
 10696  					config table */
       
 10697 -	__attribute__((nonnull));
       
 10698 +	MY_ATTRIBUTE((nonnull));
       
 10699  /******************************************************************//**
       
 10700  Get value specific to an FTS index from the config table. The caller
       
 10701  must ensure that enough space is allocated for value to hold the
       
 10702 @@ -386,7 +386,7 @@ fts_config_get_index_value(
       
 10703  					this parameter name */
       
 10704  	fts_string_t*	value)		/*!< out: value read from
       
 10705  					config table */
       
 10706 -	__attribute__((nonnull, warn_unused_result));
       
 10707 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10708  /******************************************************************//**
       
 10709  Set the value in the config table for name.
       
 10710  @return DB_SUCCESS or error code */
       
 10711 @@ -400,7 +400,7 @@ fts_config_set_value(
       
 10712  					this parameter name */
       
 10713  	const fts_string_t*
       
 10714  			value)		/*!< in: value to update */
       
 10715 -	__attribute__((nonnull));
       
 10716 +	MY_ATTRIBUTE((nonnull));
       
 10717  /****************************************************************//**
       
 10718  Set an ulint value in the config table.
       
 10719  @return DB_SUCCESS if all OK else error code */
       
 10720 @@ -412,7 +412,7 @@ fts_config_set_ulint(
       
 10721  	fts_table_t*	fts_table,	/*!< in: the indexed FTS table */
       
 10722  	const char*	name,		/*!< in: param name */
       
 10723  	ulint		int_value)	/*!< in: value */
       
 10724 -	__attribute__((nonnull, warn_unused_result));
       
 10725 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10726  /******************************************************************//**
       
 10727  Set the value specific to an FTS index in the config table.
       
 10728  @return DB_SUCCESS or error code */
       
 10729 @@ -426,7 +426,7 @@ fts_config_set_index_value(
       
 10730  					this parameter name */
       
 10731  	fts_string_t*	value)		/*!< out: value read from
       
 10732  					config table */
       
 10733 -	__attribute__((nonnull, warn_unused_result));
       
 10734 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10735  /******************************************************************//**
       
 10736  Increment the value in the config table for column name.
       
 10737  @return DB_SUCCESS or error code */
       
 10738 @@ -439,7 +439,7 @@ fts_config_increment_value(
       
 10739  	const char*	name,		/*!< in: increment config value
       
 10740  					for this parameter name */
       
 10741  	ulint		delta)		/*!< in: increment by this much */
       
 10742 -	__attribute__((nonnull, warn_unused_result));
       
 10743 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10744  /******************************************************************//**
       
 10745  Increment the per index value in the config table for column name.
       
 10746  @return DB_SUCCESS or error code */
       
 10747 @@ -452,7 +452,7 @@ fts_config_increment_index_value(
       
 10748  	const char*	name,		/*!< in: increment config value
       
 10749  					for this parameter name */
       
 10750  	ulint		delta)		/*!< in: increment by this much */
       
 10751 -	__attribute__((nonnull));
       
 10752 +	MY_ATTRIBUTE((nonnull));
       
 10753  /******************************************************************//**
       
 10754  Get an ulint value from the config table.
       
 10755  @return DB_SUCCESS or error code */
       
 10756 @@ -464,7 +464,7 @@ fts_config_get_index_ulint(
       
 10757  	dict_index_t*	index,		/*!< in: FTS index */
       
 10758  	const char*	name,		/*!< in: param name */
       
 10759  	ulint*		int_value)	/*!< out: value */
       
 10760 -	__attribute__((nonnull, warn_unused_result));
       
 10761 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10762  /******************************************************************//**
       
 10763  Set an ulint value int the config table.
       
 10764  @return DB_SUCCESS or error code */
       
 10765 @@ -476,7 +476,7 @@ fts_config_set_index_ulint(
       
 10766  	dict_index_t*	index,		/*!< in: FTS index */
       
 10767  	const char*	name,		/*!< in: param name */
       
 10768  	ulint		int_value)	/*!< in: value */
       
 10769 -	__attribute__((nonnull, warn_unused_result));
       
 10770 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10771  /******************************************************************//**
       
 10772  Get an ulint value from the config table.
       
 10773  @return DB_SUCCESS or error code */
       
 10774 @@ -488,7 +488,7 @@ fts_config_get_ulint(
       
 10775  	fts_table_t*	fts_table,	/*!< in: the indexed FTS table */
       
 10776  	const char*	name,		/*!< in: param name */
       
 10777  	ulint*		int_value)	/*!< out: value */
       
 10778 -	__attribute__((nonnull));
       
 10779 +	MY_ATTRIBUTE((nonnull));
       
 10780  /******************************************************************//**
       
 10781  Search cache for word.
       
 10782  @return the word node vector if found else NULL */
       
 10783 @@ -500,7 +500,7 @@ fts_cache_find_word(
       
 10784  			index_cache,	/*!< in: cache to search */
       
 10785  	const fts_string_t*
       
 10786  			text)		/*!< in: word to search for */
       
 10787 -	__attribute__((nonnull, warn_unused_result));
       
 10788 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10789  /******************************************************************//**
       
 10790  Check cache for deleted doc id.
       
 10791  @return TRUE if deleted */
       
 10792 @@ -511,7 +511,7 @@ fts_cache_is_deleted_doc_id(
       
 10793  	const fts_cache_t*
       
 10794  			cache,		/*!< in: cache ito search */
       
 10795  	doc_id_t	doc_id)		/*!< in: doc id to search for */
       
 10796 -	__attribute__((nonnull, warn_unused_result));
       
 10797 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10798  /******************************************************************//**
       
 10799  Append deleted doc ids to vector and sort the vector. */
       
 10800  UNIV_INTERN
       
 10801 @@ -546,7 +546,7 @@ fts_get_total_word_count(
       
 10802  	trx_t*		trx,		/*!< in: transaction */
       
 10803  	dict_index_t*	index,		/*!< in: for this index */
       
 10804  	ulint*		total)		/*!< out: total words */
       
 10805 -	__attribute__((nonnull, warn_unused_result));
       
 10806 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10807  #endif
       
 10808  /******************************************************************//**
       
 10809  Search the index specific cache for a particular FTS index.
       
 10810 @@ -559,7 +559,7 @@ fts_find_index_cache(
       
 10811  			cache,		/*!< in: cache to search */
       
 10812  	const dict_index_t*
       
 10813  			index)		/*!< in: index to search for */
       
 10814 -	__attribute__((nonnull, warn_unused_result));
       
 10815 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10816  /******************************************************************//**
       
 10817  Write the table id to the given buffer (including final NUL). Buffer must be
       
 10818  at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long.
       
 10819 @@ -570,10 +570,10 @@ fts_write_object_id(
       
 10820  /*================*/
       
 10821  	ib_id_t		id,		/*!< in: a table/index id */
       
 10822  	char*		str,		/*!< in: buffer to write the id to */
       
 10823 -	bool		hex_format __attribute__((unused)))
       
 10824 +	bool		hex_format MY_ATTRIBUTE((unused)))
       
 10825  					/*!< in: true for fixed hex format,
       
 10826  					false for old ambiguous format */
       
 10827 -	__attribute__((nonnull));
       
 10828 +	MY_ATTRIBUTE((nonnull));
       
 10829  /******************************************************************//**
       
 10830  Read the table id from the string generated by fts_write_object_id().
       
 10831  @return TRUE if parse successful */
       
 10832 @@ -583,7 +583,7 @@ fts_read_object_id(
       
 10833  /*===============*/
       
 10834  	ib_id_t*	id,		/*!< out: a table id */
       
 10835  	const char*	str)		/*!< in: buffer to read from */
       
 10836 -	__attribute__((nonnull, warn_unused_result));
       
 10837 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10838  /******************************************************************//**
       
 10839  Get the table id.
       
 10840  @return number of bytes written */
       
 10841 @@ -596,7 +596,7 @@ fts_get_table_id(
       
 10842  	char*		table_id)	/*!< out: table id, must be at least
       
 10843  					FTS_AUX_MIN_TABLE_ID_LENGTH bytes
       
 10844  					long */
       
 10845 -	__attribute__((nonnull, warn_unused_result));
       
 10846 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10847  /******************************************************************//**
       
 10848  Add the table to add to the OPTIMIZER's list. */
       
 10849  UNIV_INTERN
       
 10850 @@ -604,7 +604,7 @@ void
       
 10851  fts_optimize_add_table(
       
 10852  /*===================*/
       
 10853  	dict_table_t*	table)		/*!< in: table to add */
       
 10854 -	__attribute__((nonnull));
       
 10855 +	MY_ATTRIBUTE((nonnull));
       
 10856  /******************************************************************//**
       
 10857  Optimize a table. */
       
 10858  UNIV_INTERN
       
 10859 @@ -612,7 +612,7 @@ void
       
 10860  fts_optimize_do_table(
       
 10861  /*==================*/
       
 10862  	dict_table_t*	table)		/*!< in: table to optimize */
       
 10863 -	__attribute__((nonnull));
       
 10864 +	MY_ATTRIBUTE((nonnull));
       
 10865  /******************************************************************//**
       
 10866  Construct the prefix name of an FTS table.
       
 10867  @return own: table name, must be freed with mem_free() */
       
 10868 @@ -622,7 +622,7 @@ fts_get_table_name_prefix(
       
 10869  /*======================*/
       
 10870  	const fts_table_t*
       
 10871  			fts_table)	/*!< in: Auxiliary table type */
       
 10872 -	__attribute__((nonnull, malloc, warn_unused_result));
       
 10873 +	MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
       
 10874  /******************************************************************//**
       
 10875  Add node positions. */
       
 10876  UNIV_INTERN
       
 10877 @@ -633,7 +633,7 @@ fts_cache_node_add_positions(
       
 10878  	fts_node_t*	node,		/*!< in: word node */
       
 10879  	doc_id_t	doc_id,		/*!< in: doc id */
       
 10880  	ib_vector_t*	positions)	/*!< in: fts_token_t::positions */
       
 10881 -	__attribute__((nonnull(2,4)));
       
 10882 +	MY_ATTRIBUTE((nonnull(2,4)));
       
 10883  
       
 10884  /******************************************************************//**
       
 10885  Create the config table name for retrieving index specific value.
       
 10886 @@ -644,7 +644,7 @@ fts_config_create_index_param_name(
       
 10887  /*===============================*/
       
 10888  	const char*		param,		/*!< in: base name of param */
       
 10889  	const dict_index_t*	index)		/*!< in: index for config */
       
 10890 -	__attribute__((nonnull, malloc, warn_unused_result));
       
 10891 +	MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
       
 10892  
       
 10893  #ifndef UNIV_NONINL
       
 10894  #include "fts0priv.ic"
       
 10895 --- a/storage/innobase/include/fts0priv.ic
       
 10896 +++ b/storage/innobase/include/fts0priv.ic
       
 10897 @@ -1,6 +1,6 @@
       
 10898  /*****************************************************************************
       
 10899  
       
 10900 -Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 10901 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10902  
       
 10903  This program is free software; you can redistribute it and/or modify it under
       
 10904  the terms of the GNU General Public License as published by the Free Software
       
 10905 @@ -33,7 +33,7 @@ fts_write_object_id(
       
 10906  /*================*/
       
 10907  	ib_id_t		id,		/* in: a table/index id */
       
 10908  	char*		str,		/* in: buffer to write the id to */
       
 10909 -	bool		hex_format __attribute__((unused)))
       
 10910 +	bool		hex_format MY_ATTRIBUTE((unused)))
       
 10911  					/* in: true for fixed hex format,
       
 10912  					false for old ambiguous format */
       
 10913  {
       
 10914 --- a/storage/innobase/include/ha_prototypes.h
       
 10915 +++ b/storage/innobase/include/ha_prototypes.h
       
 10916 @@ -1,6 +1,6 @@
       
 10917  /*****************************************************************************
       
 10918  
       
 10919 -Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 10920 +Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 10921  
       
 10922  This program is free software; you can redistribute it and/or modify it under
       
 10923  the terms of the GNU General Public License as published by the Free Software
       
 10924 @@ -135,7 +135,7 @@ enum durability_properties
       
 10925  thd_requested_durability(
       
 10926  /*=====================*/
       
 10927  	const THD* thd)	/*!< in: thread handle */
       
 10928 -	__attribute__((nonnull, warn_unused_result));
       
 10929 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10930  
       
 10931  /******************************************************************//**
       
 10932  Returns true if the transaction this thread is processing has edited
       
 10933 @@ -176,7 +176,7 @@ innobase_mysql_cmp(
       
 10934  	const unsigned char* b,		/*!< in: data field */
       
 10935  	unsigned int	b_length)	/*!< in: data field length,
       
 10936  					not UNIV_SQL_NULL */
       
 10937 -	__attribute__((nonnull, warn_unused_result));
       
 10938 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10939  /**************************************************************//**
       
 10940  Converts a MySQL type to an InnoDB type. Note that this function returns
       
 10941  the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
       
 10942 @@ -192,7 +192,7 @@ get_innobase_type_from_mysql_type(
       
 10943  					and unsigned integer
       
 10944  					types are 'unsigned types' */
       
 10945  	const void*	field)		/*!< in: MySQL Field */
       
 10946 -	__attribute__((nonnull));
       
 10947 +	MY_ATTRIBUTE((nonnull));
       
 10948  
       
 10949  /******************************************************************//**
       
 10950  Get the variable length bounds of the given character set. */
       
 10951 @@ -290,7 +290,7 @@ innobase_get_stmt(
       
 10952  /*==============*/
       
 10953  	THD*	thd,		/*!< in: MySQL thread handle */
       
 10954  	size_t*	length)		/*!< out: length of the SQL statement */
       
 10955 -	__attribute__((nonnull));
       
 10956 +	MY_ATTRIBUTE((nonnull));
       
 10957  /******************************************************************//**
       
 10958  This function is used to find the storage length in bytes of the first n
       
 10959  characters for prefix indexes using a multibyte character set. The function
       
 10960 @@ -316,7 +316,7 @@ enum icp_result
       
 10961  innobase_index_cond(
       
 10962  /*================*/
       
 10963  	void*	file)	/*!< in/out: pointer to ha_innobase */
       
 10964 -	__attribute__((nonnull, warn_unused_result));
       
 10965 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 10966  /******************************************************************//**
       
 10967  Returns true if the thread supports XA,
       
 10968  global value of innodb_supports_xa if thd is NULL.
       
 10969 @@ -452,7 +452,7 @@ innobase_format_name(
       
 10970  	const char*	name,		/*!< in: index or table name
       
 10971  					to format */
       
 10972  	ibool		is_index_name)	/*!< in: index name */
       
 10973 -	__attribute__((nonnull));
       
 10974 +	MY_ATTRIBUTE((nonnull));
       
 10975  
       
 10976  /** Corresponds to Sql_condition:enum_warning_level. */
       
 10977  enum ib_log_level_t {
       
 10978 @@ -482,7 +482,7 @@ ib_errf(
       
 10979  	ib_uint32_t	code,		/*!< MySQL error code */
       
 10980  	const char*	format,		/*!< printf format */
       
 10981  	...)				/*!< Args */
       
 10982 -	__attribute__((format(printf, 4, 5)));
       
 10983 +	MY_ATTRIBUTE((format(printf, 4, 5)));
       
 10984  
       
 10985  /******************************************************************//**
       
 10986  Use this when the args are passed to the format string from
       
 10987 @@ -513,7 +513,7 @@ ib_logf(
       
 10988  	ib_log_level_t	level,		/*!< in: warning level */
       
 10989  	const char*	format,		/*!< printf format */
       
 10990  	...)				/*!< Args */
       
 10991 -	__attribute__((format(printf, 2, 3)));
       
 10992 +	MY_ATTRIBUTE((format(printf, 2, 3)));
       
 10993  
       
 10994  /******************************************************************//**
       
 10995  Returns the NUL terminated value of glob_hostname.
       
 10996 @@ -559,7 +559,7 @@ innobase_next_autoinc(
       
 10997  	ulonglong	step,		/*!< in: AUTOINC increment step */
       
 10998  	ulonglong	offset,		/*!< in: AUTOINC offset */
       
 10999  	ulonglong	max_value)	/*!< in: max value for type */
       
 11000 -	__attribute__((pure, warn_unused_result));
       
 11001 +	MY_ATTRIBUTE((pure, warn_unused_result));
       
 11002  
       
 11003  /********************************************************************//**
       
 11004  Get the upper limit of the MySQL integral and floating-point type.
       
 11005 @@ -569,7 +569,7 @@ ulonglong
       
 11006  innobase_get_int_col_max_value(
       
 11007  /*===========================*/
       
 11008  	const Field*	field)	/*!< in: MySQL field */
       
 11009 -	__attribute__((nonnull, pure, warn_unused_result));
       
 11010 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 11011  
       
 11012  /**********************************************************************
       
 11013  Check if the length of the identifier exceeds the maximum allowed.
       
 11014 --- a/storage/innobase/include/handler0alter.h
       
 11015 +++ b/storage/innobase/include/handler0alter.h
       
 11016 @@ -1,6 +1,6 @@
       
 11017  /*****************************************************************************
       
 11018  
       
 11019 -Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11020 +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11021  
       
 11022  This program is free software; you can redistribute it and/or modify it under
       
 11023  the terms of the GNU General Public License as published by the Free Software
       
 11024 @@ -32,7 +32,7 @@ innobase_rec_to_mysql(
       
 11025  	const dict_index_t*	index,	/*!< in: index */
       
 11026  	const ulint*		offsets)/*!< in: rec_get_offsets(
       
 11027  					rec, index, ...) */
       
 11028 -	__attribute__((nonnull));
       
 11029 +	MY_ATTRIBUTE((nonnull));
       
 11030  
       
 11031  /*************************************************************//**
       
 11032  Copies an InnoDB index entry to table->record[0]. */
       
 11033 @@ -43,7 +43,7 @@ innobase_fields_to_mysql(
       
 11034  	struct TABLE*		table,	/*!< in/out: MySQL table */
       
 11035  	const dict_index_t*	index,	/*!< in: InnoDB index */
       
 11036  	const dfield_t*		fields)	/*!< in: InnoDB index fields */
       
 11037 -	__attribute__((nonnull));
       
 11038 +	MY_ATTRIBUTE((nonnull));
       
 11039  
       
 11040  /*************************************************************//**
       
 11041  Copies an InnoDB row to table->record[0]. */
       
 11042 @@ -54,7 +54,7 @@ innobase_row_to_mysql(
       
 11043  	struct TABLE*		table,	/*!< in/out: MySQL table */
       
 11044  	const dict_table_t*	itab,	/*!< in: InnoDB table */
       
 11045  	const dtuple_t*		row)	/*!< in: InnoDB row */
       
 11046 -	__attribute__((nonnull));
       
 11047 +	MY_ATTRIBUTE((nonnull));
       
 11048  
       
 11049  /*************************************************************//**
       
 11050  Resets table->record[0]. */
       
 11051 @@ -63,7 +63,7 @@ void
       
 11052  innobase_rec_reset(
       
 11053  /*===============*/
       
 11054  	struct TABLE*		table)		/*!< in/out: MySQL table */
       
 11055 -	__attribute__((nonnull));
       
 11056 +	MY_ATTRIBUTE((nonnull));
       
 11057  
       
 11058  /** Generate the next autoinc based on a snapshot of the session
       
 11059  auto_increment_increment and auto_increment_offset variables. */
       
 11060 --- a/storage/innobase/include/ibuf0ibuf.h
       
 11061 +++ b/storage/innobase/include/ibuf0ibuf.h
       
 11062 @@ -1,6 +1,6 @@
       
 11063  /*****************************************************************************
       
 11064  
       
 11065 -Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11066 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11067  
       
 11068  This program is free software; you can redistribute it and/or modify it under
       
 11069  the terms of the GNU General Public License as published by the Free Software
       
 11070 @@ -118,7 +118,7 @@ void
       
 11071  ibuf_mtr_start(
       
 11072  /*===========*/
       
 11073  	mtr_t*	mtr)	/*!< out: mini-transaction */
       
 11074 -	__attribute__((nonnull));
       
 11075 +	MY_ATTRIBUTE((nonnull));
       
 11076  /***************************************************************//**
       
 11077  Commits an insert buffer mini-transaction. */
       
 11078  UNIV_INLINE
       
 11079 @@ -126,7 +126,7 @@ void
       
 11080  ibuf_mtr_commit(
       
 11081  /*============*/
       
 11082  	mtr_t*	mtr)	/*!< in/out: mini-transaction */
       
 11083 -	__attribute__((nonnull));
       
 11084 +	MY_ATTRIBUTE((nonnull));
       
 11085  /*********************************************************************//**
       
 11086  Initializes an ibuf bitmap page. */
       
 11087  UNIV_INTERN
       
 11088 @@ -252,7 +252,7 @@ ibool
       
 11089  ibuf_inside(
       
 11090  /*========*/
       
 11091  	const mtr_t*	mtr)	/*!< in: mini-transaction */
       
 11092 -	__attribute__((nonnull, pure));
       
 11093 +	MY_ATTRIBUTE((nonnull, pure));
       
 11094  /***********************************************************************//**
       
 11095  Checks if a page address is an ibuf bitmap page (level 3 page) address.
       
 11096  @return	TRUE if a bitmap page */
       
 11097 @@ -285,7 +285,7 @@ ibuf_page_low(
       
 11098  				is not one of the fixed address ibuf
       
 11099  				pages, or NULL, in which case a new
       
 11100  				transaction is created. */
       
 11101 -	__attribute__((warn_unused_result));
       
 11102 +	MY_ATTRIBUTE((warn_unused_result));
       
 11103  #ifdef UNIV_DEBUG
       
 11104  /** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of
       
 11105  pages.  Must not be called when recv_no_ibuf_operations==TRUE.
       
 11106 @@ -445,7 +445,7 @@ ibuf_check_bitmap_on_import(
       
 11107  /*========================*/
       
 11108  	const trx_t*	trx,		/*!< in: transaction */
       
 11109  	ulint		space_id)	/*!< in: tablespace identifier */
       
 11110 -	__attribute__((nonnull, warn_unused_result));
       
 11111 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11112  
       
 11113  #define IBUF_HEADER_PAGE_NO	FSP_IBUF_HEADER_PAGE_NO
       
 11114  #define IBUF_TREE_ROOT_PAGE_NO	FSP_IBUF_TREE_ROOT_PAGE_NO
       
 11115 --- a/storage/innobase/include/lock0lock.h
       
 11116 +++ b/storage/innobase/include/lock0lock.h
       
 11117 @@ -1,6 +1,6 @@
       
 11118  /*****************************************************************************
       
 11119  
       
 11120 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 11121 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11122  
       
 11123  This program is free software; you can redistribute it and/or modify it under
       
 11124  the terms of the GNU General Public License as published by the Free Software
       
 11125 @@ -266,7 +266,7 @@ lock_rec_expl_exist_on_page(
       
 11126  /*========================*/
       
 11127  	ulint	space,	/*!< in: space id */
       
 11128  	ulint	page_no)/*!< in: page number */
       
 11129 -	__attribute__((warn_unused_result));
       
 11130 +	MY_ATTRIBUTE((warn_unused_result));
       
 11131  /*********************************************************************//**
       
 11132  Checks if locks of other transactions prevent an immediate insert of
       
 11133  a record. If they do, first tests if the query thread should anyway
       
 11134 @@ -289,7 +289,7 @@ lock_rec_insert_check_and_lock(
       
 11135  				inserted record maybe should inherit
       
 11136  				LOCK_GAP type locks from the successor
       
 11137  				record */
       
 11138 -	__attribute__((nonnull, warn_unused_result));
       
 11139 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11140  /*********************************************************************//**
       
 11141  Checks if locks of other transactions prevent an immediate modify (update,
       
 11142  delete mark, or delete unmark) of a clustered index record. If they do,
       
 11143 @@ -310,7 +310,7 @@ lock_clust_rec_modify_check_and_lock(
       
 11144  	dict_index_t*		index,	/*!< in: clustered index */
       
 11145  	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
       
 11146  	que_thr_t*		thr)	/*!< in: query thread */
       
 11147 -	__attribute__((warn_unused_result, nonnull));
       
 11148 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 11149  /*********************************************************************//**
       
 11150  Checks if locks of other transactions prevent an immediate modify
       
 11151  (delete mark or delete unmark) of a secondary index record.
       
 11152 @@ -331,7 +331,7 @@ lock_sec_rec_modify_check_and_lock(
       
 11153  	que_thr_t*	thr,	/*!< in: query thread
       
 11154  				(can be NULL if BTR_NO_LOCKING_FLAG) */
       
 11155  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
 11156 -	__attribute__((warn_unused_result, nonnull(2,3,4,6)));
       
 11157 +	MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,4,6)));
       
 11158  /*********************************************************************//**
       
 11159  Like lock_clust_rec_read_check_and_lock(), but reads a
       
 11160  secondary index record.
       
 11161 @@ -418,7 +418,7 @@ lock_clust_rec_read_check_and_lock_alt(
       
 11162  	ulint			gap_mode,/*!< in: LOCK_ORDINARY, LOCK_GAP, or
       
 11163  					LOCK_REC_NOT_GAP */
       
 11164  	que_thr_t*		thr)	/*!< in: query thread */
       
 11165 -	__attribute__((nonnull, warn_unused_result));
       
 11166 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11167  /*********************************************************************//**
       
 11168  Checks that a record is seen in a consistent read.
       
 11169  @return true if sees, or false if an earlier version of the record
       
 11170 @@ -450,7 +450,7 @@ lock_sec_rec_cons_read_sees(
       
 11171  					should be read or passed over
       
 11172  					by a read cursor */
       
 11173  	const read_view_t*	view)	/*!< in: consistent read view */
       
 11174 -	__attribute__((nonnull, warn_unused_result));
       
 11175 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11176  /*********************************************************************//**
       
 11177  Locks the specified database table in the mode given. If the lock cannot
       
 11178  be granted immediately, the query thread is put to wait.
       
 11179 @@ -465,7 +465,7 @@ lock_table(
       
 11180  				in dictionary cache */
       
 11181  	enum lock_mode	mode,	/*!< in: lock mode */
       
 11182  	que_thr_t*	thr)	/*!< in: query thread */
       
 11183 -	__attribute__((nonnull, warn_unused_result));
       
 11184 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11185  /*********************************************************************//**
       
 11186  Creates a table IX lock object for a resurrected transaction. */
       
 11187  UNIV_INTERN
       
 11188 @@ -520,7 +520,7 @@ lock_rec_fold(
       
 11189  /*==========*/
       
 11190  	ulint	space,	/*!< in: space */
       
 11191  	ulint	page_no)/*!< in: page number */
       
 11192 -	__attribute__((const));
       
 11193 +	MY_ATTRIBUTE((const));
       
 11194  /*********************************************************************//**
       
 11195  Calculates the hash value of a page file address: used in inserting or
       
 11196  searching for a lock in the hash table.
       
 11197 @@ -570,7 +570,7 @@ lock_is_table_exclusive(
       
 11198  /*====================*/
       
 11199  	const dict_table_t*	table,	/*!< in: table */
       
 11200  	const trx_t*		trx)	/*!< in: transaction */
       
 11201 -	__attribute__((nonnull));
       
 11202 +	MY_ATTRIBUTE((nonnull));
       
 11203  /*********************************************************************//**
       
 11204  Checks if a lock request lock1 has to wait for request lock2.
       
 11205  @return	TRUE if lock1 has to wait for lock2 to be removed */
       
 11206 @@ -594,7 +594,7 @@ lock_report_trx_id_insanity(
       
 11207  	dict_index_t*	index,		/*!< in: index */
       
 11208  	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index) */
       
 11209  	trx_id_t	max_trx_id)	/*!< in: trx_sys_get_max_trx_id() */
       
 11210 -	__attribute__((nonnull));
       
 11211 +	MY_ATTRIBUTE((nonnull));
       
 11212  /*********************************************************************//**
       
 11213  Prints info of a table lock. */
       
 11214  UNIV_INTERN
       
 11215 @@ -621,7 +621,7 @@ lock_print_info_summary(
       
 11216  /*====================*/
       
 11217  	FILE*	file,	/*!< in: file where to print */
       
 11218  	ibool   nowait)	/*!< in: whether to wait for the lock mutex */
       
 11219 -	__attribute__((nonnull, warn_unused_result));
       
 11220 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11221  /*********************************************************************//**
       
 11222  Prints info of locks for each transaction. This function assumes that the
       
 11223  caller holds the lock mutex and more importantly it will release the lock
       
 11224 @@ -641,7 +641,7 @@ ulint
       
 11225  lock_number_of_rows_locked(
       
 11226  /*=======================*/
       
 11227  	const trx_lock_t*	trx_lock)	/*!< in: transaction locks */
       
 11228 -	__attribute__((nonnull, warn_unused_result));
       
 11229 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11230  
       
 11231  /*******************************************************************//**
       
 11232  Gets the type of a lock. Non-inline version for using outside of the
       
 11233 @@ -799,7 +799,7 @@ dberr_t
       
 11234  lock_trx_handle_wait(
       
 11235  /*=================*/
       
 11236  	trx_t*	trx)	/*!< in/out: trx lock state */
       
 11237 -	__attribute__((nonnull));
       
 11238 +	MY_ATTRIBUTE((nonnull));
       
 11239  /*********************************************************************//**
       
 11240  Get the number of locks on a table.
       
 11241  @return number of locks */
       
 11242 @@ -808,7 +808,7 @@ ulint
       
 11243  lock_table_get_n_locks(
       
 11244  /*===================*/
       
 11245  	const dict_table_t*	table)	/*!< in: table */
       
 11246 -	__attribute__((nonnull));
       
 11247 +	MY_ATTRIBUTE((nonnull));
       
 11248  #ifdef UNIV_DEBUG
       
 11249  /*********************************************************************//**
       
 11250  Checks that a transaction id is sensible, i.e., not in the future.
       
 11251 @@ -821,7 +821,7 @@ lock_check_trx_id_sanity(
       
 11252  	const rec_t*	rec,		/*!< in: user record */
       
 11253  	dict_index_t*	index,		/*!< in: index */
       
 11254  	const ulint*	offsets)	/*!< in: rec_get_offsets(rec, index) */
       
 11255 -	__attribute__((nonnull, warn_unused_result));
       
 11256 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11257  /*******************************************************************//**
       
 11258  Check if the transaction holds any locks on the sys tables
       
 11259  or its records.
       
 11260 @@ -831,7 +831,7 @@ const lock_t*
       
 11261  lock_trx_has_sys_table_locks(
       
 11262  /*=========================*/
       
 11263  	const trx_t*	trx)	/*!< in: transaction to check */
       
 11264 -	__attribute__((warn_unused_result));
       
 11265 +	MY_ATTRIBUTE((warn_unused_result));
       
 11266  
       
 11267  /*******************************************************************//**
       
 11268  Check if the transaction holds an exclusive lock on a record.
       
 11269 @@ -844,7 +844,7 @@ lock_trx_has_rec_x_lock(
       
 11270  	const dict_table_t*	table,	/*!< in: table to check */
       
 11271  	const buf_block_t*	block,	/*!< in: buffer block of the record */
       
 11272  	ulint			heap_no)/*!< in: record heap number */
       
 11273 -	__attribute__((nonnull, warn_unused_result));
       
 11274 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11275  #endif /* UNIV_DEBUG */
       
 11276  
       
 11277  /** Lock modes and types */
       
 11278 --- a/storage/innobase/include/lock0priv.h
       
 11279 +++ b/storage/innobase/include/lock0priv.h
       
 11280 @@ -1,6 +1,6 @@
       
 11281  /*****************************************************************************
       
 11282  
       
 11283 -Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 11284 +Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11285  
       
 11286  This program is free software; you can redistribute it and/or modify it under
       
 11287  the terms of the GNU General Public License as published by the Free Software
       
 11288 @@ -117,7 +117,7 @@ lock_clust_rec_some_has_impl(
       
 11289  	const rec_t*		rec,	/*!< in: user record */
       
 11290  	const dict_index_t*	index,	/*!< in: clustered index */
       
 11291  	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
       
 11292 -	__attribute__((nonnull, warn_unused_result));
       
 11293 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11294  
       
 11295  #ifndef UNIV_NONINL
       
 11296  #include "lock0priv.ic"
       
 11297 --- a/storage/innobase/include/log0recv.h
       
 11298 +++ b/storage/innobase/include/log0recv.h
       
 11299 @@ -1,6 +1,6 @@
       
 11300  /*****************************************************************************
       
 11301  
       
 11302 -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 11303 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11304  
       
 11305  This program is free software; you can redistribute it and/or modify it under
       
 11306  the terms of the GNU General Public License as published by the Free Software
       
 11307 @@ -51,7 +51,7 @@ recv_read_checkpoint_info_for_backup(
       
 11308  	lsn_t*		first_header_lsn)
       
 11309  				/*!< out: lsn of of the start of the
       
 11310  				first log file */
       
 11311 -	__attribute__((nonnull));
       
 11312 +	MY_ATTRIBUTE((nonnull));
       
 11313  /*******************************************************************//**
       
 11314  Scans the log segment and n_bytes_scanned is set to the length of valid
       
 11315  log scanned. */
       
 11316 --- a/storage/innobase/include/mach0data.h
       
 11317 +++ b/storage/innobase/include/mach0data.h
       
 11318 @@ -1,6 +1,6 @@
       
 11319  /*****************************************************************************
       
 11320  
       
 11321 -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
       
 11322 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11323  
       
 11324  This program is free software; you can redistribute it and/or modify it under
       
 11325  the terms of the GNU General Public License as published by the Free Software
       
 11326 @@ -53,7 +53,7 @@ ulint
       
 11327  mach_read_from_1(
       
 11328  /*=============*/
       
 11329  	const byte*	b)	/*!< in: pointer to byte */
       
 11330 -	__attribute__((nonnull, pure));
       
 11331 +	MY_ATTRIBUTE((nonnull, pure));
       
 11332  /*******************************************************//**
       
 11333  The following function is used to store data in two consecutive
       
 11334  bytes. We store the most significant byte to the lower address. */
       
 11335 @@ -72,7 +72,7 @@ ulint
       
 11336  mach_read_from_2(
       
 11337  /*=============*/
       
 11338  	const byte*	b)	/*!< in: pointer to two bytes */
       
 11339 -	__attribute__((nonnull, pure));
       
 11340 +	MY_ATTRIBUTE((nonnull, pure));
       
 11341  
       
 11342  /********************************************************//**
       
 11343  The following function is used to convert a 16-bit data item
       
 11344 @@ -84,7 +84,7 @@ uint16
       
 11345  mach_encode_2(
       
 11346  /*==========*/
       
 11347  	ulint	n)	/*!< in: integer in machine-dependent format */
       
 11348 -	__attribute__((const));
       
 11349 +	MY_ATTRIBUTE((const));
       
 11350  /********************************************************//**
       
 11351  The following function is used to convert a 16-bit data item
       
 11352  from the canonical format, for fast bytewise equality test
       
 11353 @@ -95,7 +95,7 @@ ulint
       
 11354  mach_decode_2(
       
 11355  /*==========*/
       
 11356  	uint16	n)	/*!< in: 16-bit integer in canonical format */
       
 11357 -	__attribute__((const));
       
 11358 +	MY_ATTRIBUTE((const));
       
 11359  /*******************************************************//**
       
 11360  The following function is used to store data in 3 consecutive
       
 11361  bytes. We store the most significant byte to the lowest address. */
       
 11362 @@ -114,7 +114,7 @@ ulint
       
 11363  mach_read_from_3(
       
 11364  /*=============*/
       
 11365  	const byte*	b)	/*!< in: pointer to 3 bytes */
       
 11366 -	__attribute__((nonnull, pure));
       
 11367 +	MY_ATTRIBUTE((nonnull, pure));
       
 11368  /*******************************************************//**
       
 11369  The following function is used to store data in four consecutive
       
 11370  bytes. We store the most significant byte to the lowest address. */
       
 11371 @@ -133,7 +133,7 @@ ulint
       
 11372  mach_read_from_4(
       
 11373  /*=============*/
       
 11374  	const byte*	b)	/*!< in: pointer to four bytes */
       
 11375 -	__attribute__((nonnull, pure));
       
 11376 +	MY_ATTRIBUTE((nonnull, pure));
       
 11377  /*********************************************************//**
       
 11378  Writes a ulint in a compressed form (1..5 bytes).
       
 11379  @return	stored size in bytes */
       
 11380 @@ -151,7 +151,7 @@ ulint
       
 11381  mach_get_compressed_size(
       
 11382  /*=====================*/
       
 11383  	ulint	n)	/*!< in: ulint integer to be stored */
       
 11384 -	__attribute__((const));
       
 11385 +	MY_ATTRIBUTE((const));
       
 11386  /*********************************************************//**
       
 11387  Reads a ulint in a compressed form.
       
 11388  @return	read integer */
       
 11389 @@ -160,7 +160,7 @@ ulint
       
 11390  mach_read_compressed(
       
 11391  /*=================*/
       
 11392  	const byte*	b)	/*!< in: pointer to memory from where to read */
       
 11393 -	__attribute__((nonnull, pure));
       
 11394 +	MY_ATTRIBUTE((nonnull, pure));
       
 11395  /*******************************************************//**
       
 11396  The following function is used to store data in 6 consecutive
       
 11397  bytes. We store the most significant byte to the lowest address. */
       
 11398 @@ -179,7 +179,7 @@ ib_uint64_t
       
 11399  mach_read_from_6(
       
 11400  /*=============*/
       
 11401  	const byte*	b)	/*!< in: pointer to 6 bytes */
       
 11402 -	__attribute__((nonnull, pure));
       
 11403 +	MY_ATTRIBUTE((nonnull, pure));
       
 11404  /*******************************************************//**
       
 11405  The following function is used to store data in 7 consecutive
       
 11406  bytes. We store the most significant byte to the lowest address. */
       
 11407 @@ -198,7 +198,7 @@ ib_uint64_t
       
 11408  mach_read_from_7(
       
 11409  /*=============*/
       
 11410  	const byte*	b)	/*!< in: pointer to 7 bytes */
       
 11411 -	__attribute__((nonnull, pure));
       
 11412 +	MY_ATTRIBUTE((nonnull, pure));
       
 11413  /*******************************************************//**
       
 11414  The following function is used to store data in 8 consecutive
       
 11415  bytes. We store the most significant byte to the lowest address. */
       
 11416 @@ -217,7 +217,7 @@ ib_uint64_t
       
 11417  mach_read_from_8(
       
 11418  /*=============*/
       
 11419  	const byte*	b)	/*!< in: pointer to 8 bytes */
       
 11420 -	__attribute__((nonnull, pure));
       
 11421 +	MY_ATTRIBUTE((nonnull, pure));
       
 11422  /*********************************************************//**
       
 11423  Writes a 64-bit integer in a compressed form (5..9 bytes).
       
 11424  @return	size in bytes */
       
 11425 @@ -243,7 +243,7 @@ ib_uint64_t
       
 11426  mach_ull_read_compressed(
       
 11427  /*=====================*/
       
 11428  	const byte*	b)	/*!< in: pointer to memory from where to read */
       
 11429 -	__attribute__((nonnull, pure));
       
 11430 +	MY_ATTRIBUTE((nonnull, pure));
       
 11431  /*********************************************************//**
       
 11432  Writes a 64-bit integer in a compressed form (1..11 bytes).
       
 11433  @return	size in bytes */
       
 11434 @@ -261,7 +261,7 @@ ulint
       
 11435  mach_ull_get_much_compressed_size(
       
 11436  /*==============================*/
       
 11437  	ib_uint64_t	n)	/*!< in: 64-bit integer to be stored */
       
 11438 -	__attribute__((const));
       
 11439 +	MY_ATTRIBUTE((const));
       
 11440  /*********************************************************//**
       
 11441  Reads a 64-bit integer in a compressed form.
       
 11442  @return	the value read */
       
 11443 @@ -270,7 +270,7 @@ ib_uint64_t
       
 11444  mach_ull_read_much_compressed(
       
 11445  /*==========================*/
       
 11446  	const byte*	b)	/*!< in: pointer to memory from where to read */
       
 11447 -	__attribute__((nonnull, pure));
       
 11448 +	MY_ATTRIBUTE((nonnull, pure));
       
 11449  /*********************************************************//**
       
 11450  Reads a ulint in a compressed form if the log record fully contains it.
       
 11451  @return	pointer to end of the stored field, NULL if not complete */
       
 11452 @@ -301,7 +301,7 @@ double
       
 11453  mach_double_read(
       
 11454  /*=============*/
       
 11455  	const byte*	b)	/*!< in: pointer to memory from where to read */
       
 11456 -	__attribute__((nonnull, pure));
       
 11457 +	MY_ATTRIBUTE((nonnull, pure));
       
 11458  /*********************************************************//**
       
 11459  Writes a double. It is stored in a little-endian format. */
       
 11460  UNIV_INLINE
       
 11461 @@ -318,7 +318,7 @@ float
       
 11462  mach_float_read(
       
 11463  /*============*/
       
 11464  	const byte*	b)	/*!< in: pointer to memory from where to read */
       
 11465 -	__attribute__((nonnull, pure));
       
 11466 +	MY_ATTRIBUTE((nonnull, pure));
       
 11467  /*********************************************************//**
       
 11468  Writes a float. It is stored in a little-endian format. */
       
 11469  UNIV_INLINE
       
 11470 @@ -336,7 +336,7 @@ mach_read_from_n_little_endian(
       
 11471  /*===========================*/
       
 11472  	const byte*	buf,		/*!< in: from where to read */
       
 11473  	ulint		buf_size)	/*!< in: from how many bytes to read */
       
 11474 -	__attribute__((nonnull, pure));
       
 11475 +	MY_ATTRIBUTE((nonnull, pure));
       
 11476  /*********************************************************//**
       
 11477  Writes a ulint in the little-endian format. */
       
 11478  UNIV_INLINE
       
 11479 @@ -354,7 +354,7 @@ ulint
       
 11480  mach_read_from_2_little_endian(
       
 11481  /*===========================*/
       
 11482  	const byte*	buf)		/*!< in: from where to read */
       
 11483 -	__attribute__((nonnull, pure));
       
 11484 +	MY_ATTRIBUTE((nonnull, pure));
       
 11485  /*********************************************************//**
       
 11486  Writes a ulint in the little-endian format. */
       
 11487  UNIV_INLINE
       
 11488 --- a/storage/innobase/include/mem0mem.h
       
 11489 +++ b/storage/innobase/include/mem0mem.h
       
 11490 @@ -1,6 +1,6 @@
       
 11491  /*****************************************************************************
       
 11492  
       
 11493 -Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
       
 11494 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11495  
       
 11496  This program is free software; you can redistribute it and/or modify it under
       
 11497  the terms of the GNU General Public License as published by the Free Software
       
 11498 @@ -353,7 +353,7 @@ mem_heap_printf(
       
 11499  /*============*/
       
 11500  	mem_heap_t*	heap,	/*!< in: memory heap */
       
 11501  	const char*	format,	/*!< in: format string */
       
 11502 -	...) __attribute__ ((format (printf, 2, 3)));
       
 11503 +	...) MY_ATTRIBUTE ((format (printf, 2, 3)));
       
 11504  
       
 11505  #ifdef MEM_PERIODIC_CHECK
       
 11506  /******************************************************************//**
       
 11507 --- a/storage/innobase/include/mem0mem.ic
       
 11508 +++ b/storage/innobase/include/mem0mem.ic
       
 11509 @@ -1,6 +1,6 @@
       
 11510  /*****************************************************************************
       
 11511  
       
 11512 -Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
       
 11513 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11514  
       
 11515  This program is free software; you can redistribute it and/or modify it under
       
 11516  the terms of the GNU General Public License as published by the Free Software
       
 11517 @@ -476,9 +476,9 @@ void
       
 11518  mem_heap_free_func(
       
 11519  /*===============*/
       
 11520  	mem_heap_t*	heap,		/*!< in, own: heap to be freed */
       
 11521 -	const char*	file_name __attribute__((unused)),
       
 11522 +	const char*	file_name MY_ATTRIBUTE((unused)),
       
 11523  					/*!< in: file name where freed */
       
 11524 -	ulint		line  __attribute__((unused)))
       
 11525 +	ulint		line  MY_ATTRIBUTE((unused)))
       
 11526  {
       
 11527  	mem_block_t*	block;
       
 11528  	mem_block_t*	prev_block;
       
 11529 --- a/storage/innobase/include/mtr0mtr.h
       
 11530 +++ b/storage/innobase/include/mtr0mtr.h
       
 11531 @@ -1,6 +1,6 @@
       
 11532  /*****************************************************************************
       
 11533  
       
 11534 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11535 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11536  Copyright (c) 2012, Facebook Inc.
       
 11537  
       
 11538  This program is free software; you can redistribute it and/or modify it under
       
 11539 @@ -207,7 +207,7 @@ void
       
 11540  mtr_start(
       
 11541  /*======*/
       
 11542  	mtr_t*	mtr)	/*!< out: mini-transaction */
       
 11543 -	__attribute__((nonnull));
       
 11544 +	MY_ATTRIBUTE((nonnull));
       
 11545  /***************************************************************//**
       
 11546  Commits a mini-transaction. */
       
 11547  UNIV_INTERN
       
 11548 @@ -215,7 +215,7 @@ void
       
 11549  mtr_commit(
       
 11550  /*=======*/
       
 11551  	mtr_t*	mtr)	/*!< in/out: mini-transaction */
       
 11552 -	__attribute__((nonnull));
       
 11553 +	MY_ATTRIBUTE((nonnull));
       
 11554  /**********************************************************//**
       
 11555  Sets and returns a savepoint in mtr.
       
 11556  @return	savepoint */
       
 11557 @@ -308,7 +308,7 @@ mtr_memo_release(
       
 11558  	mtr_t*	mtr,	/*!< in/out: mini-transaction */
       
 11559  	void*	object,	/*!< in: object */
       
 11560  	ulint	type)	/*!< in: object type: MTR_MEMO_S_LOCK, ... */
       
 11561 -	__attribute__((nonnull));
       
 11562 +	MY_ATTRIBUTE((nonnull));
       
 11563  #ifdef UNIV_DEBUG
       
 11564  # ifndef UNIV_HOTBACKUP
       
 11565  /**********************************************************//**
       
 11566 @@ -321,7 +321,7 @@ mtr_memo_contains(
       
 11567  	mtr_t*		mtr,	/*!< in: mtr */
       
 11568  	const void*	object,	/*!< in: object to search */
       
 11569  	ulint		type)	/*!< in: type of object */
       
 11570 -	__attribute__((warn_unused_result, nonnull));
       
 11571 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 11572  
       
 11573  /**********************************************************//**
       
 11574  Checks if memo contains the given page.
       
 11575 --- a/storage/innobase/include/mtr0mtr.ic
       
 11576 +++ b/storage/innobase/include/mtr0mtr.ic
       
 11577 @@ -1,6 +1,6 @@
       
 11578  /*****************************************************************************
       
 11579  
       
 11580 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11581 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11582  
       
 11583  This program is free software; you can redistribute it and/or modify it under
       
 11584  the terms of the GNU General Public License as published by the Free Software
       
 11585 @@ -37,7 +37,7 @@ ibool
       
 11586  mtr_block_dirtied(
       
 11587  /*==============*/
       
 11588  	const buf_block_t*	block)	/*!< in: block being x-fixed */
       
 11589 -	__attribute__((nonnull,warn_unused_result));
       
 11590 +	MY_ATTRIBUTE((nonnull,warn_unused_result));
       
 11591  
       
 11592  /***************************************************************//**
       
 11593  Starts a mini-transaction. */
       
 11594 --- a/storage/innobase/include/os0file.h
       
 11595 +++ b/storage/innobase/include/os0file.h
       
 11596 @@ -1,6 +1,6 @@
       
 11597  /***********************************************************************
       
 11598  
       
 11599 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 11600 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11601  Copyright (c) 2009, Percona Inc.
       
 11602  
       
 11603  Portions of this file contain modifications contributed and copyrighted
       
 11604 @@ -529,7 +529,7 @@ os_file_create_simple_no_error_handling_func(
       
 11605  				OS_FILE_READ_ALLOW_DELETE; the last option is
       
 11606  				used by a backup program reading the file */
       
 11607  	ibool*		success)/*!< out: TRUE if succeed, FALSE if error */
       
 11608 -	__attribute__((nonnull, warn_unused_result));
       
 11609 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11610  /****************************************************************//**
       
 11611  Tries to disable OS caching on an opened file descriptor. */
       
 11612  UNIV_INTERN
       
 11613 @@ -563,7 +563,7 @@ os_file_create_func(
       
 11614  				function source code for the exact rules */
       
 11615  	ulint		type,	/*!< in: OS_DATA_FILE or OS_LOG_FILE */
       
 11616  	ibool*		success)/*!< out: TRUE if succeed, FALSE if error */
       
 11617 -	__attribute__((nonnull, warn_unused_result));
       
 11618 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11619  /***********************************************************************//**
       
 11620  Deletes a file. The file has to be closed before calling this.
       
 11621  @return	TRUE if success */
       
 11622 @@ -629,7 +629,7 @@ pfs_os_file_create_simple_func(
       
 11623  	ibool*		success,/*!< out: TRUE if succeed, FALSE if error */
       
 11624  	const char*	src_file,/*!< in: file name where func invoked */
       
 11625  	ulint		src_line)/*!< in: line where the func invoked */
       
 11626 -	__attribute__((nonnull, warn_unused_result));
       
 11627 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11628  
       
 11629  /****************************************************************//**
       
 11630  NOTE! Please use the corresponding macro
       
 11631 @@ -654,7 +654,7 @@ pfs_os_file_create_simple_no_error_handling_func(
       
 11632  	ibool*		success,/*!< out: TRUE if succeed, FALSE if error */
       
 11633  	const char*	src_file,/*!< in: file name where func invoked */
       
 11634  	ulint		src_line)/*!< in: line where the func invoked */
       
 11635 -	__attribute__((nonnull, warn_unused_result));
       
 11636 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11637  
       
 11638  /****************************************************************//**
       
 11639  NOTE! Please use the corresponding macro os_file_create(), not directly
       
 11640 @@ -682,7 +682,7 @@ pfs_os_file_create_func(
       
 11641  	ibool*		success,/*!< out: TRUE if succeed, FALSE if error */
       
 11642  	const char*	src_file,/*!< in: file name where func invoked */
       
 11643  	ulint		src_line)/*!< in: line where the func invoked */
       
 11644 -	__attribute__((nonnull, warn_unused_result));
       
 11645 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11646  
       
 11647  /***********************************************************************//**
       
 11648  NOTE! Please use the corresponding macro os_file_close(), not directly
       
 11649 @@ -861,7 +861,7 @@ os_offset_t
       
 11650  os_file_get_size(
       
 11651  /*=============*/
       
 11652  	os_file_t	file)	/*!< in: handle to a file */
       
 11653 -	__attribute__((warn_unused_result));
       
 11654 +	MY_ATTRIBUTE((warn_unused_result));
       
 11655  /***********************************************************************//**
       
 11656  Write the specified number of zeros to a newly created file.
       
 11657  @return	TRUE if success */
       
 11658 @@ -873,7 +873,7 @@ os_file_set_size(
       
 11659  				null-terminated string */
       
 11660  	os_file_t	file,	/*!< in: handle to a file */
       
 11661  	os_offset_t	size)	/*!< in: file size */
       
 11662 -	__attribute__((nonnull, warn_unused_result));
       
 11663 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11664  /***********************************************************************//**
       
 11665  Truncates a file at its current position.
       
 11666  @return	TRUE if success */
       
 11667 --- a/storage/innobase/include/os0thread.h
       
 11668 +++ b/storage/innobase/include/os0thread.h
       
 11669 @@ -1,6 +1,6 @@
       
 11670  /*****************************************************************************
       
 11671  
       
 11672 -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 11673 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11674  
       
 11675  This program is free software; you can redistribute it and/or modify it under
       
 11676  the terms of the GNU General Public License as published by the Free Software
       
 11677 @@ -125,7 +125,7 @@ os_thread_exit(
       
 11678  /*===========*/
       
 11679  	void*	exit_value)	/*!< in: exit value; in Windows this void*
       
 11680  				is cast as a DWORD */
       
 11681 -	UNIV_COLD __attribute__((noreturn));
       
 11682 +	UNIV_COLD MY_ATTRIBUTE((noreturn));
       
 11683  /*****************************************************************//**
       
 11684  Returns the thread identifier of current thread.
       
 11685  @return	current thread identifier */
       
 11686 --- a/storage/innobase/include/page0cur.h
       
 11687 +++ b/storage/innobase/include/page0cur.h
       
 11688 @@ -1,6 +1,6 @@
       
 11689  /*****************************************************************************
       
 11690  
       
 11691 -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11692 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11693  
       
 11694  This program is free software; you can redistribute it and/or modify it under
       
 11695  the terms of the GNU General Public License as published by the Free Software
       
 11696 @@ -180,7 +180,7 @@ page_cur_tuple_insert(
       
 11697  	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
       
 11698  	ulint		n_ext,	/*!< in: number of externally stored columns */
       
 11699  	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
       
 11700 -	__attribute__((nonnull(1,2,3,4,5), warn_unused_result));
       
 11701 +	MY_ATTRIBUTE((nonnull(1,2,3,4,5), warn_unused_result));
       
 11702  #endif /* !UNIV_HOTBACKUP */
       
 11703  /***********************************************************//**
       
 11704  Inserts a record next to page cursor. Returns pointer to inserted record if
       
 11705 @@ -218,7 +218,7 @@ page_cur_insert_rec_low(
       
 11706  	const rec_t*	rec,	/*!< in: pointer to a physical record */
       
 11707  	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
       
 11708  	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
       
 11709 -	__attribute__((nonnull(1,2,3,4), warn_unused_result));
       
 11710 +	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
       
 11711  /***********************************************************//**
       
 11712  Inserts a record next to page cursor on a compressed and uncompressed
       
 11713  page. Returns pointer to inserted record if succeed, i.e.,
       
 11714 @@ -240,7 +240,7 @@ page_cur_insert_rec_zip(
       
 11715  	const rec_t*	rec,	/*!< in: pointer to a physical record */
       
 11716  	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
       
 11717  	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
       
 11718 -	__attribute__((nonnull(1,2,3,4), warn_unused_result));
       
 11719 +	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
       
 11720  /*************************************************************//**
       
 11721  Copies records from page to a newly created page, from a given record onward,
       
 11722  including that record. Infimum and supremum records are not copied.
       
 11723 --- a/storage/innobase/include/page0page.h
       
 11724 +++ b/storage/innobase/include/page0page.h
       
 11725 @@ -1,6 +1,6 @@
       
 11726  /*****************************************************************************
       
 11727  
       
 11728 -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 11729 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11730  
       
 11731  This program is free software; you can redistribute it and/or modify it under
       
 11732  the terms of the GNU General Public License as published by the Free Software
       
 11733 @@ -165,7 +165,7 @@ page_t*
       
 11734  page_align(
       
 11735  /*=======*/
       
 11736  	const void*	ptr)	/*!< in: pointer to page frame */
       
 11737 -		__attribute__((const));
       
 11738 +		MY_ATTRIBUTE((const));
       
 11739  /************************************************************//**
       
 11740  Gets the offset within a page.
       
 11741  @return	offset from the start of the page */
       
 11742 @@ -174,7 +174,7 @@ ulint
       
 11743  page_offset(
       
 11744  /*========*/
       
 11745  	const void*	ptr)	/*!< in: pointer to page frame */
       
 11746 -		__attribute__((const));
       
 11747 +		MY_ATTRIBUTE((const));
       
 11748  /*************************************************************//**
       
 11749  Returns the max trx id field value. */
       
 11750  UNIV_INLINE
       
 11751 @@ -232,7 +232,7 @@ page_header_get_offs(
       
 11752  /*=================*/
       
 11753  	const page_t*	page,	/*!< in: page */
       
 11754  	ulint		field)	/*!< in: PAGE_FREE, ... */
       
 11755 -	__attribute__((nonnull, pure));
       
 11756 +	MY_ATTRIBUTE((nonnull, pure));
       
 11757  
       
 11758  /*************************************************************//**
       
 11759  Returns the pointer stored in the given header field, or NULL. */
       
 11760 @@ -292,7 +292,7 @@ page_rec_get_nth_const(
       
 11761  /*===================*/
       
 11762  	const page_t*	page,	/*!< in: page */
       
 11763  	ulint		nth)	/*!< in: nth record */
       
 11764 -	__attribute__((nonnull, warn_unused_result));
       
 11765 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11766  /************************************************************//**
       
 11767  Returns the nth record of the record list.
       
 11768  This is the inverse function of page_rec_get_n_recs_before().
       
 11769 @@ -303,7 +303,7 @@ page_rec_get_nth(
       
 11770  /*=============*/
       
 11771  	page_t*	page,	/*< in: page */
       
 11772  	ulint	nth)	/*!< in: nth record */
       
 11773 -	__attribute__((nonnull, warn_unused_result));
       
 11774 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11775  
       
 11776  #ifndef UNIV_HOTBACKUP
       
 11777  /************************************************************//**
       
 11778 @@ -316,7 +316,7 @@ rec_t*
       
 11779  page_get_middle_rec(
       
 11780  /*================*/
       
 11781  	page_t*	page)	/*!< in: page */
       
 11782 -	__attribute__((nonnull, warn_unused_result));
       
 11783 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 11784  /*************************************************************//**
       
 11785  Compares a data tuple to a physical record. Differs from the function
       
 11786  cmp_dtuple_rec_with_match in the way that the record must reside on an
       
 11787 @@ -524,7 +524,7 @@ bool
       
 11788  page_is_leaf(
       
 11789  /*=========*/
       
 11790  	const page_t*	page)	/*!< in: page */
       
 11791 -	__attribute__((nonnull, pure));
       
 11792 +	MY_ATTRIBUTE((nonnull, pure));
       
 11793  /************************************************************//**
       
 11794  Determine whether the page is empty.
       
 11795  @return	true if the page is empty (PAGE_N_RECS = 0) */
       
 11796 @@ -533,7 +533,7 @@ bool
       
 11797  page_is_empty(
       
 11798  /*==========*/
       
 11799  	const page_t*	page)	/*!< in: page */
       
 11800 -	__attribute__((nonnull, pure));
       
 11801 +	MY_ATTRIBUTE((nonnull, pure));
       
 11802  /************************************************************//**
       
 11803  Determine whether the page contains garbage.
       
 11804  @return	true if the page contains garbage (PAGE_GARBAGE is not 0) */
       
 11805 @@ -542,7 +542,7 @@ bool
       
 11806  page_has_garbage(
       
 11807  /*=============*/
       
 11808  	const page_t*	page)	/*!< in: page */
       
 11809 -	__attribute__((nonnull, pure));
       
 11810 +	MY_ATTRIBUTE((nonnull, pure));
       
 11811  /************************************************************//**
       
 11812  Gets the pointer to the next record on the page.
       
 11813  @return	pointer to next record */
       
 11814 @@ -614,7 +614,7 @@ ibool
       
 11815  page_rec_is_user_rec_low(
       
 11816  /*=====================*/
       
 11817  	ulint	offset)	/*!< in: record offset on page */
       
 11818 -	__attribute__((const));
       
 11819 +	MY_ATTRIBUTE((const));
       
 11820  /************************************************************//**
       
 11821  TRUE if the record is the supremum record on a page.
       
 11822  @return	TRUE if the supremum record */
       
 11823 @@ -623,7 +623,7 @@ ibool
       
 11824  page_rec_is_supremum_low(
       
 11825  /*=====================*/
       
 11826  	ulint	offset)	/*!< in: record offset on page */
       
 11827 -	__attribute__((const));
       
 11828 +	MY_ATTRIBUTE((const));
       
 11829  /************************************************************//**
       
 11830  TRUE if the record is the infimum record on a page.
       
 11831  @return	TRUE if the infimum record */
       
 11832 @@ -632,7 +632,7 @@ ibool
       
 11833  page_rec_is_infimum_low(
       
 11834  /*====================*/
       
 11835  	ulint	offset)	/*!< in: record offset on page */
       
 11836 -	__attribute__((const));
       
 11837 +	MY_ATTRIBUTE((const));
       
 11838  
       
 11839  /************************************************************//**
       
 11840  TRUE if the record is a user record on the page.
       
 11841 @@ -642,7 +642,7 @@ ibool
       
 11842  page_rec_is_user_rec(
       
 11843  /*=================*/
       
 11844  	const rec_t*	rec)	/*!< in: record */
       
 11845 -	__attribute__((const));
       
 11846 +	MY_ATTRIBUTE((const));
       
 11847  /************************************************************//**
       
 11848  TRUE if the record is the supremum record on a page.
       
 11849  @return	TRUE if the supremum record */
       
 11850 @@ -651,7 +651,7 @@ ibool
       
 11851  page_rec_is_supremum(
       
 11852  /*=================*/
       
 11853  	const rec_t*	rec)	/*!< in: record */
       
 11854 -	__attribute__((const));
       
 11855 +	MY_ATTRIBUTE((const));
       
 11856  
       
 11857  /************************************************************//**
       
 11858  TRUE if the record is the infimum record on a page.
       
 11859 @@ -661,7 +661,7 @@ ibool
       
 11860  page_rec_is_infimum(
       
 11861  /*================*/
       
 11862  	const rec_t*	rec)	/*!< in: record */
       
 11863 -	__attribute__((const));
       
 11864 +	MY_ATTRIBUTE((const));
       
 11865  /***************************************************************//**
       
 11866  Looks for the record which owns the given record.
       
 11867  @return	the owner record */
       
 11868 @@ -681,7 +681,7 @@ page_rec_write_field(
       
 11869  	ulint	i,	/*!< in: index of the field to update */
       
 11870  	ulint	val,	/*!< in: value to write */
       
 11871  	mtr_t*	mtr)	/*!< in/out: mini-transaction */
       
 11872 -	__attribute__((nonnull));
       
 11873 +	MY_ATTRIBUTE((nonnull));
       
 11874  #endif /* !UNIV_HOTBACKUP */
       
 11875  /************************************************************//**
       
 11876  Returns the maximum combined size of records which can be inserted on top
       
 11877 @@ -711,7 +711,7 @@ ulint
       
 11878  page_get_free_space_of_empty(
       
 11879  /*=========================*/
       
 11880  	ulint	comp)	/*!< in: nonzero=compact page format */
       
 11881 -		__attribute__((const));
       
 11882 +		MY_ATTRIBUTE((const));
       
 11883  /**********************************************************//**
       
 11884  Returns the base extra size of a physical record.  This is the
       
 11885  size of the fixed header, independent of the record size.
       
 11886 @@ -797,7 +797,7 @@ page_create_zip(
       
 11887  	ulint		level,		/*!< in: the B-tree level of the page */
       
 11888  	trx_id_t	max_trx_id,	/*!< in: PAGE_MAX_TRX_ID */
       
 11889  	mtr_t*		mtr)		/*!< in/out: mini-transaction */
       
 11890 -	__attribute__((nonnull));
       
 11891 +	MY_ATTRIBUTE((nonnull));
       
 11892  /**********************************************************//**
       
 11893  Empty a previously created B-tree index page. */
       
 11894  UNIV_INTERN
       
 11895 @@ -807,7 +807,7 @@ page_create_empty(
       
 11896  	buf_block_t*	block,	/*!< in/out: B-tree block */
       
 11897  	dict_index_t*	index,	/*!< in: the index of the page */
       
 11898  	mtr_t*		mtr)	/*!< in/out: mini-transaction */
       
 11899 -	__attribute__((nonnull(1,2)));
       
 11900 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 11901  /*************************************************************//**
       
 11902  Differs from page_copy_rec_list_end, because this function does not
       
 11903  touch the lock table and max trx id on page or compress the page.
       
 11904 @@ -846,7 +846,7 @@ page_copy_rec_list_end(
       
 11905  	rec_t*		rec,		/*!< in: record on page */
       
 11906  	dict_index_t*	index,		/*!< in: record descriptor */
       
 11907  	mtr_t*		mtr)		/*!< in: mtr */
       
 11908 -	__attribute__((nonnull));
       
 11909 +	MY_ATTRIBUTE((nonnull));
       
 11910  /*************************************************************//**
       
 11911  Copies records from page to new_page, up to the given record, NOT
       
 11912  including that record. Infimum and supremum records are not copied.
       
 11913 @@ -868,7 +868,7 @@ page_copy_rec_list_start(
       
 11914  	rec_t*		rec,		/*!< in: record on page */
       
 11915  	dict_index_t*	index,		/*!< in: record descriptor */
       
 11916  	mtr_t*		mtr)		/*!< in: mtr */
       
 11917 -	__attribute__((nonnull));
       
 11918 +	MY_ATTRIBUTE((nonnull));
       
 11919  /*************************************************************//**
       
 11920  Deletes records from a page from a given record onward, including that record.
       
 11921  The infimum and supremum records are not deleted. */
       
 11922 @@ -885,7 +885,7 @@ page_delete_rec_list_end(
       
 11923  				records in the end of the chain to
       
 11924  				delete, or ULINT_UNDEFINED if not known */
       
 11925  	mtr_t*		mtr)	/*!< in: mtr */
       
 11926 -	__attribute__((nonnull));
       
 11927 +	MY_ATTRIBUTE((nonnull));
       
 11928  /*************************************************************//**
       
 11929  Deletes records from page, up to the given record, NOT including
       
 11930  that record. Infimum and supremum records are not deleted. */
       
 11931 @@ -897,7 +897,7 @@ page_delete_rec_list_start(
       
 11932  	buf_block_t*	block,	/*!< in: buffer block of the page */
       
 11933  	dict_index_t*	index,	/*!< in: record descriptor */
       
 11934  	mtr_t*		mtr)	/*!< in: mtr */
       
 11935 -	__attribute__((nonnull));
       
 11936 +	MY_ATTRIBUTE((nonnull));
       
 11937  /*************************************************************//**
       
 11938  Moves record list end to another page. Moved records include
       
 11939  split_rec.
       
 11940 @@ -918,7 +918,7 @@ page_move_rec_list_end(
       
 11941  	rec_t*		split_rec,	/*!< in: first record to move */
       
 11942  	dict_index_t*	index,		/*!< in: record descriptor */
       
 11943  	mtr_t*		mtr)		/*!< in: mtr */
       
 11944 -	__attribute__((nonnull(1, 2, 4, 5)));
       
 11945 +	MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
       
 11946  /*************************************************************//**
       
 11947  Moves record list start to another page. Moved records do not include
       
 11948  split_rec.
       
 11949 @@ -938,7 +938,7 @@ page_move_rec_list_start(
       
 11950  	rec_t*		split_rec,	/*!< in: first record not to move */
       
 11951  	dict_index_t*	index,		/*!< in: record descriptor */
       
 11952  	mtr_t*		mtr)		/*!< in: mtr */
       
 11953 -	__attribute__((nonnull(1, 2, 4, 5)));
       
 11954 +	MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
       
 11955  /****************************************************************//**
       
 11956  Splits a directory slot which owns too many records. */
       
 11957  UNIV_INTERN
       
 11958 @@ -949,7 +949,7 @@ page_dir_split_slot(
       
 11959  	page_zip_des_t*	page_zip,/*!< in/out: compressed page whose
       
 11960  				uncompressed part will be written, or NULL */
       
 11961  	ulint		slot_no)/*!< in: the directory slot */
       
 11962 -	__attribute__((nonnull(1)));
       
 11963 +	MY_ATTRIBUTE((nonnull(1)));
       
 11964  /*************************************************************//**
       
 11965  Tries to balance the given directory slot with too few records
       
 11966  with the upper neighbor, so that there are at least the minimum number
       
 11967 @@ -962,7 +962,7 @@ page_dir_balance_slot(
       
 11968  	page_t*		page,	/*!< in/out: index page */
       
 11969  	page_zip_des_t*	page_zip,/*!< in/out: compressed page, or NULL */
       
 11970  	ulint		slot_no)/*!< in: the directory slot */
       
 11971 -	__attribute__((nonnull(1)));
       
 11972 +	MY_ATTRIBUTE((nonnull(1)));
       
 11973  /**********************************************************//**
       
 11974  Parses a log record of a record list end or start deletion.
       
 11975  @return	end of log record or NULL */
       
 11976 --- a/storage/innobase/include/page0types.h
       
 11977 +++ b/storage/innobase/include/page0types.h
       
 11978 @@ -1,6 +1,6 @@
       
 11979  /*****************************************************************************
       
 11980  
       
 11981 -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 11982 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 11983  
       
 11984  This program is free software; you can redistribute it and/or modify it under
       
 11985  the terms of the GNU General Public License as published by the Free Software
       
 11986 @@ -129,7 +129,7 @@ page_zip_rec_set_deleted(
       
 11987  	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
       
 11988  	const byte*	rec,	/*!< in: record on the uncompressed page */
       
 11989  	ulint		flag)	/*!< in: the deleted flag (nonzero=TRUE) */
       
 11990 -	__attribute__((nonnull));
       
 11991 +	MY_ATTRIBUTE((nonnull));
       
 11992  
       
 11993  /**********************************************************************//**
       
 11994  Write the "owned" flag of a record on a compressed page.  The n_owned field
       
 11995 @@ -141,7 +141,7 @@ page_zip_rec_set_owned(
       
 11996  	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
       
 11997  	const byte*	rec,	/*!< in: record on the uncompressed page */
       
 11998  	ulint		flag)	/*!< in: the owned flag (nonzero=TRUE) */
       
 11999 -	__attribute__((nonnull));
       
 12000 +	MY_ATTRIBUTE((nonnull));
       
 12001  
       
 12002  /**********************************************************************//**
       
 12003  Shift the dense page directory when a record is deleted. */
       
 12004 @@ -154,7 +154,7 @@ page_zip_dir_delete(
       
 12005  	dict_index_t*	index,	/*!< in: index of rec */
       
 12006  	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
       
 12007  	const byte*	free)	/*!< in: previous start of the free list */
       
 12008 -	__attribute__((nonnull(1,2,3,4)));
       
 12009 +	MY_ATTRIBUTE((nonnull(1,2,3,4)));
       
 12010  
       
 12011  /**********************************************************************//**
       
 12012  Add a slot to the dense page directory. */
       
 12013 @@ -165,5 +165,5 @@ page_zip_dir_add_slot(
       
 12014  	page_zip_des_t*	page_zip,	/*!< in/out: compressed page */
       
 12015  	ulint		is_clustered)	/*!< in: nonzero for clustered index,
       
 12016  					zero for others */
       
 12017 -	__attribute__((nonnull));
       
 12018 +	MY_ATTRIBUTE((nonnull));
       
 12019  #endif
       
 12020 --- a/storage/innobase/include/page0zip.h
       
 12021 +++ b/storage/innobase/include/page0zip.h
       
 12022 @@ -1,6 +1,6 @@
       
 12023  /*****************************************************************************
       
 12024  
       
 12025 -Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 12026 +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 12027  Copyright (c) 2012, Facebook Inc.
       
 12028  
       
 12029  This program is free software; you can redistribute it and/or modify it under
       
 12030 @@ -58,7 +58,7 @@ ulint
       
 12031  page_zip_get_size(
       
 12032  /*==============*/
       
 12033  	const page_zip_des_t*	page_zip)	/*!< in: compressed page */
       
 12034 -	__attribute__((nonnull, pure));
       
 12035 +	MY_ATTRIBUTE((nonnull, pure));
       
 12036  /**********************************************************************//**
       
 12037  Set the size of a compressed page in bytes. */
       
 12038  UNIV_INLINE
       
 12039 @@ -81,7 +81,7 @@ page_zip_rec_needs_ext(
       
 12040  	ulint	n_fields,	/*!< in: number of fields in the record;
       
 12041  				ignored if zip_size == 0 */
       
 12042  	ulint	zip_size)	/*!< in: compressed page size in bytes, or 0 */
       
 12043 -	__attribute__((const));
       
 12044 +	MY_ATTRIBUTE((const));
       
 12045  
       
 12046  /**********************************************************************//**
       
 12047  Determine the guaranteed free space on an empty page.
       
 12048 @@ -92,7 +92,7 @@ page_zip_empty_size(
       
 12049  /*================*/
       
 12050  	ulint	n_fields,	/*!< in: number of columns in the index */
       
 12051  	ulint	zip_size)	/*!< in: compressed page size in bytes */
       
 12052 -	__attribute__((const));
       
 12053 +	MY_ATTRIBUTE((const));
       
 12054  #endif /* !UNIV_HOTBACKUP */
       
 12055  
       
 12056  /**********************************************************************//**
       
 12057 @@ -127,7 +127,7 @@ page_zip_compress(
       
 12058  	dict_index_t*	index,	/*!< in: index of the B-tree node */
       
 12059  	ulint		level,	/*!< in: compression level */
       
 12060  	mtr_t*		mtr)	/*!< in: mini-transaction, or NULL */
       
 12061 -	__attribute__((nonnull(1,2,3)));
       
 12062 +	MY_ATTRIBUTE((nonnull(1,2,3)));
       
 12063  
       
 12064  /**********************************************************************//**
       
 12065  Decompress a page.  This function should tolerate errors on the compressed
       
 12066 @@ -145,7 +145,7 @@ page_zip_decompress(
       
 12067  				FALSE=verify but do not copy some
       
 12068  				page header fields that should not change
       
 12069  				after page creation */
       
 12070 -	__attribute__((nonnull(1,2)));
       
 12071 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12072  
       
 12073  #ifdef UNIV_DEBUG
       
 12074  /**********************************************************************//**
       
 12075 @@ -172,7 +172,7 @@ page_zip_validate_low(
       
 12076  	const dict_index_t*	index,	/*!< in: index of the page, if known */
       
 12077  	ibool			sloppy)	/*!< in: FALSE=strict,
       
 12078  					TRUE=ignore the MIN_REC_FLAG */
       
 12079 -	__attribute__((nonnull(1,2)));
       
 12080 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12081  /**********************************************************************//**
       
 12082  Check that the compressed and decompressed pages match. */
       
 12083  UNIV_INTERN
       
 12084 @@ -182,7 +182,7 @@ page_zip_validate(
       
 12085  	const page_zip_des_t*	page_zip,/*!< in: compressed page */
       
 12086  	const page_t*		page,	/*!< in: uncompressed page */
       
 12087  	const dict_index_t*	index)	/*!< in: index of the page, if known */
       
 12088 -	__attribute__((nonnull(1,2)));
       
 12089 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12090  #endif /* UNIV_ZIP_DEBUG */
       
 12091  
       
 12092  /**********************************************************************//**
       
 12093 @@ -195,7 +195,7 @@ page_zip_max_ins_size(
       
 12094  /*==================*/
       
 12095  	const page_zip_des_t*	page_zip,/*!< in: compressed page */
       
 12096  	ibool			is_clust)/*!< in: TRUE if clustered index */
       
 12097 -	__attribute__((nonnull, pure));
       
 12098 +	MY_ATTRIBUTE((nonnull, pure));
       
 12099  
       
 12100  /**********************************************************************//**
       
 12101  Determine if enough space is available in the modification log.
       
 12102 @@ -209,7 +209,7 @@ page_zip_available(
       
 12103  	ulint			length,	/*!< in: combined size of the record */
       
 12104  	ulint			create)	/*!< in: nonzero=add the record to
       
 12105  					the heap */
       
 12106 -	__attribute__((nonnull, pure));
       
 12107 +	MY_ATTRIBUTE((nonnull, pure));
       
 12108  
       
 12109  /**********************************************************************//**
       
 12110  Write data to the uncompressed header portion of a page.  The data must
       
 12111 @@ -222,7 +222,7 @@ page_zip_write_header(
       
 12112  	const byte*	str,	/*!< in: address on the uncompressed page */
       
 12113  	ulint		length,	/*!< in: length of the data */
       
 12114  	mtr_t*		mtr)	/*!< in: mini-transaction, or NULL */
       
 12115 -	__attribute__((nonnull(1,2)));
       
 12116 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12117  
       
 12118  /**********************************************************************//**
       
 12119  Write an entire record on the compressed page.  The data must already
       
 12120 @@ -236,7 +236,7 @@ page_zip_write_rec(
       
 12121  	dict_index_t*	index,	/*!< in: the index the record belongs to */
       
 12122  	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
       
 12123  	ulint		create)	/*!< in: nonzero=insert, zero=update */
       
 12124 -	__attribute__((nonnull));
       
 12125 +	MY_ATTRIBUTE((nonnull));
       
 12126  
       
 12127  /***********************************************************//**
       
 12128  Parses a log record of writing a BLOB pointer of a record.
       
 12129 @@ -265,7 +265,7 @@ page_zip_write_blob_ptr(
       
 12130  	ulint		n,	/*!< in: column index */
       
 12131  	mtr_t*		mtr)	/*!< in: mini-transaction handle,
       
 12132  				or NULL if no logging is needed */
       
 12133 -	__attribute__((nonnull(1,2,3,4)));
       
 12134 +	MY_ATTRIBUTE((nonnull(1,2,3,4)));
       
 12135  
       
 12136  /***********************************************************//**
       
 12137  Parses a log record of writing the node pointer of a record.
       
 12138 @@ -290,7 +290,7 @@ page_zip_write_node_ptr(
       
 12139  	ulint		size,	/*!< in: data size of rec */
       
 12140  	ulint		ptr,	/*!< in: node pointer */
       
 12141  	mtr_t*		mtr)	/*!< in: mini-transaction, or NULL */
       
 12142 -	__attribute__((nonnull(1,2)));
       
 12143 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12144  
       
 12145  /**********************************************************************//**
       
 12146  Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */
       
 12147 @@ -304,7 +304,7 @@ page_zip_write_trx_id_and_roll_ptr(
       
 12148  	ulint		trx_id_col,/*!< in: column number of TRX_ID in rec */
       
 12149  	trx_id_t	trx_id,	/*!< in: transaction identifier */
       
 12150  	roll_ptr_t	roll_ptr)/*!< in: roll_ptr */
       
 12151 -	__attribute__((nonnull));
       
 12152 +	MY_ATTRIBUTE((nonnull));
       
 12153  
       
 12154  /**********************************************************************//**
       
 12155  Write the "deleted" flag of a record on a compressed page.  The flag must
       
 12156 @@ -316,7 +316,7 @@ page_zip_rec_set_deleted(
       
 12157  	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
       
 12158  	const byte*	rec,	/*!< in: record on the uncompressed page */
       
 12159  	ulint		flag)	/*!< in: the deleted flag (nonzero=TRUE) */
       
 12160 -	__attribute__((nonnull));
       
 12161 +	MY_ATTRIBUTE((nonnull));
       
 12162  
       
 12163  /**********************************************************************//**
       
 12164  Write the "owned" flag of a record on a compressed page.  The n_owned field
       
 12165 @@ -328,7 +328,7 @@ page_zip_rec_set_owned(
       
 12166  	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
       
 12167  	const byte*	rec,	/*!< in: record on the uncompressed page */
       
 12168  	ulint		flag)	/*!< in: the owned flag (nonzero=TRUE) */
       
 12169 -	__attribute__((nonnull));
       
 12170 +	MY_ATTRIBUTE((nonnull));
       
 12171  
       
 12172  /**********************************************************************//**
       
 12173  Insert a record to the dense page directory. */
       
 12174 @@ -355,7 +355,7 @@ page_zip_dir_delete(
       
 12175  	const ulint*		offsets,	/*!< in: rec_get_offsets(rec) */
       
 12176  	const byte*		free)		/*!< in: previous start of
       
 12177  						the free list */
       
 12178 -	__attribute__((nonnull(1,2,3,4)));
       
 12179 +	MY_ATTRIBUTE((nonnull(1,2,3,4)));
       
 12180  
       
 12181  /**********************************************************************//**
       
 12182  Add a slot to the dense page directory. */
       
 12183 @@ -366,7 +366,7 @@ page_zip_dir_add_slot(
       
 12184  	page_zip_des_t*	page_zip,	/*!< in/out: compressed page */
       
 12185  	ulint		is_clustered)	/*!< in: nonzero for clustered index,
       
 12186  					zero for others */
       
 12187 -	__attribute__((nonnull));
       
 12188 +	MY_ATTRIBUTE((nonnull));
       
 12189  
       
 12190  /***********************************************************//**
       
 12191  Parses a log record of writing to the header of a page.
       
 12192 @@ -394,7 +394,7 @@ page_zip_write_header(
       
 12193  	const byte*	str,	/*!< in: address on the uncompressed page */
       
 12194  	ulint		length,	/*!< in: length of the data */
       
 12195  	mtr_t*		mtr)	/*!< in: mini-transaction, or NULL */
       
 12196 -	__attribute__((nonnull(1,2)));
       
 12197 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12198  
       
 12199  /**********************************************************************//**
       
 12200  Reorganize and compress a page.  This is a low-level operation for
       
 12201 @@ -417,7 +417,7 @@ page_zip_reorganize(
       
 12202  				m_start, m_end, m_nonempty */
       
 12203  	dict_index_t*	index,	/*!< in: index of the B-tree node */
       
 12204  	mtr_t*		mtr)	/*!< in: mini-transaction */
       
 12205 -	__attribute__((nonnull));
       
 12206 +	MY_ATTRIBUTE((nonnull));
       
 12207  #ifndef UNIV_HOTBACKUP
       
 12208  /**********************************************************************//**
       
 12209  Copy the records of a page byte for byte.  Do not copy the page header
       
 12210 @@ -436,7 +436,7 @@ page_zip_copy_recs(
       
 12211  	const page_t*		src,		/*!< in: page */
       
 12212  	dict_index_t*		index,		/*!< in: index of the B-tree */
       
 12213  	mtr_t*			mtr)		/*!< in: mini-transaction */
       
 12214 -	__attribute__((nonnull));
       
 12215 +	MY_ATTRIBUTE((nonnull));
       
 12216  #endif /* !UNIV_HOTBACKUP */
       
 12217  
       
 12218  /**********************************************************************//**
       
 12219 @@ -450,7 +450,7 @@ page_zip_parse_compress(
       
 12220  	byte*		end_ptr,/*!< in: buffer end */
       
 12221  	page_t*		page,	/*!< out: uncompressed page */
       
 12222  	page_zip_des_t*	page_zip)/*!< out: compressed page */
       
 12223 -	__attribute__((nonnull(1,2)));
       
 12224 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12225  
       
 12226  /**********************************************************************//**
       
 12227  Calculate the compressed page checksum.
       
 12228 @@ -462,7 +462,7 @@ page_zip_calc_checksum(
       
 12229          const void*     data,   /*!< in: compressed page */
       
 12230          ulint           size,   /*!< in: size of compressed page */
       
 12231  	srv_checksum_algorithm_t algo) /*!< in: algorithm to use */
       
 12232 -	__attribute__((nonnull));
       
 12233 +	MY_ATTRIBUTE((nonnull));
       
 12234  
       
 12235  /**********************************************************************//**
       
 12236  Verify a compressed page's checksum.
       
 12237 @@ -496,7 +496,7 @@ page_zip_parse_compress_no_data(
       
 12238  	page_t*		page,		/*!< in: uncompressed page */
       
 12239  	page_zip_des_t*	page_zip,	/*!< out: compressed page */
       
 12240  	dict_index_t*	index)		/*!< in: index */
       
 12241 -	__attribute__((nonnull(1,2)));
       
 12242 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12243  
       
 12244  /**********************************************************************//**
       
 12245  Reset the counters used for filling
       
 12246 --- a/storage/innobase/include/pars0pars.h
       
 12247 +++ b/storage/innobase/include/pars0pars.h
       
 12248 @@ -1,6 +1,6 @@
       
 12249  /*****************************************************************************
       
 12250  
       
 12251 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 12252 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 12253  
       
 12254  This program is free software; you can redistribute it and/or modify it under
       
 12255  the terms of the GNU General Public License as published by the Free Software
       
 12256 @@ -472,7 +472,7 @@ pars_complete_graph_for_exec(
       
 12257  				query graph, or NULL for dummy graph */
       
 12258  	trx_t*		trx,	/*!< in: transaction handle */
       
 12259  	mem_heap_t*	heap)	/*!< in: memory heap from which allocated */
       
 12260 -	__attribute__((nonnull(2,3), warn_unused_result));
       
 12261 +	MY_ATTRIBUTE((nonnull(2,3), warn_unused_result));
       
 12262  
       
 12263  /****************************************************************//**
       
 12264  Create parser info struct.
       
 12265 @@ -628,7 +628,7 @@ pars_info_bind_ull_literal(
       
 12266  	pars_info_t*		info,	/*!< in: info struct */
       
 12267  	const char*		name,	/*!< in: name */
       
 12268  	const ib_uint64_t*	val)	/*!< in: value */
       
 12269 -	__attribute__((nonnull));
       
 12270 +	MY_ATTRIBUTE((nonnull));
       
 12271  
       
 12272  /****************************************************************//**
       
 12273  Add bound id. */
       
 12274 --- a/storage/innobase/include/read0read.h
       
 12275 +++ b/storage/innobase/include/read0read.h
       
 12276 @@ -1,6 +1,6 @@
       
 12277  /*****************************************************************************
       
 12278  
       
 12279 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 12280 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 12281  
       
 12282  This program is free software; you can redistribute it and/or modify it under
       
 12283  the terms of the GNU General Public License as published by the Free Software
       
 12284 @@ -82,7 +82,7 @@ read_view_sees_trx_id(
       
 12285  /*==================*/
       
 12286  	const read_view_t*	view,	/*!< in: read view */
       
 12287  	trx_id_t		trx_id)	/*!< in: trx id */
       
 12288 -	__attribute__((nonnull, warn_unused_result));
       
 12289 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 12290  /*********************************************************************//**
       
 12291  Prints a read view to stderr. */
       
 12292  UNIV_INTERN
       
 12293 --- a/storage/innobase/include/rem0cmp.h
       
 12294 +++ b/storage/innobase/include/rem0cmp.h
       
 12295 @@ -1,6 +1,6 @@
       
 12296  /*****************************************************************************
       
 12297  
       
 12298 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 12299 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 12300  
       
 12301  This program is free software; you can redistribute it and/or modify it under
       
 12302  the terms of the GNU General Public License as published by the Free Software
       
 12303 @@ -174,7 +174,7 @@ cmp_dtuple_rec_with_match_low(
       
 12304  				bytes within the first field not completely
       
 12305  				matched; when function returns, contains the
       
 12306  				value for current comparison */
       
 12307 -	__attribute__((nonnull));
       
 12308 +	MY_ATTRIBUTE((nonnull));
       
 12309  #define cmp_dtuple_rec_with_match(tuple,rec,offsets,fields,bytes)	\
       
 12310  	cmp_dtuple_rec_with_match_low(					\
       
 12311  		tuple,rec,offsets,dtuple_get_n_fields_cmp(tuple),fields,bytes)
       
 12312 @@ -218,7 +218,7 @@ cmp_rec_rec_simple(
       
 12313  	struct TABLE*		table)	/*!< in: MySQL table, for reporting
       
 12314  					duplicate key value if applicable,
       
 12315  					or NULL */
       
 12316 -	__attribute__((nonnull(1,2,3,4), warn_unused_result));
       
 12317 +	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
       
 12318  /*************************************************************//**
       
 12319  This function is used to compare two physical records. Only the common
       
 12320  first fields are compared, and if an externally stored field is
       
 12321 --- a/storage/innobase/include/rem0rec.h
       
 12322 +++ b/storage/innobase/include/rem0rec.h
       
 12323 @@ -1,6 +1,6 @@
       
 12324  /*****************************************************************************
       
 12325  
       
 12326 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 12327 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 12328  
       
 12329  This program is free software; you can redistribute it and/or modify it under
       
 12330  the terms of the GNU General Public License as published by the Free Software
       
 12331 @@ -98,7 +98,7 @@ rec_get_next_ptr_const(
       
 12332  /*===================*/
       
 12333  	const rec_t*	rec,	/*!< in: physical record */
       
 12334  	ulint		comp)	/*!< in: nonzero=compact page format */
       
 12335 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12336 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12337  /******************************************************//**
       
 12338  The following function is used to get the pointer of the next chained record
       
 12339  on the same page.
       
 12340 @@ -109,7 +109,7 @@ rec_get_next_ptr(
       
 12341  /*=============*/
       
 12342  	rec_t*	rec,	/*!< in: physical record */
       
 12343  	ulint	comp)	/*!< in: nonzero=compact page format */
       
 12344 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12345 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12346  /******************************************************//**
       
 12347  The following function is used to get the offset of the
       
 12348  next chained record on the same page.
       
 12349 @@ -120,7 +120,7 @@ rec_get_next_offs(
       
 12350  /*==============*/
       
 12351  	const rec_t*	rec,	/*!< in: physical record */
       
 12352  	ulint		comp)	/*!< in: nonzero=compact page format */
       
 12353 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12354 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12355  /******************************************************//**
       
 12356  The following function is used to set the next record offset field
       
 12357  of an old-style record. */
       
 12358 @@ -130,7 +130,7 @@ rec_set_next_offs_old(
       
 12359  /*==================*/
       
 12360  	rec_t*	rec,	/*!< in: old-style physical record */
       
 12361  	ulint	next)	/*!< in: offset of the next record */
       
 12362 -	__attribute__((nonnull));
       
 12363 +	MY_ATTRIBUTE((nonnull));
       
 12364  /******************************************************//**
       
 12365  The following function is used to set the next record offset field
       
 12366  of a new-style record. */
       
 12367 @@ -140,7 +140,7 @@ rec_set_next_offs_new(
       
 12368  /*==================*/
       
 12369  	rec_t*	rec,	/*!< in/out: new-style physical record */
       
 12370  	ulint	next)	/*!< in: offset of the next record */
       
 12371 -	__attribute__((nonnull));
       
 12372 +	MY_ATTRIBUTE((nonnull));
       
 12373  /******************************************************//**
       
 12374  The following function is used to get the number of fields
       
 12375  in an old-style record.
       
 12376 @@ -150,7 +150,7 @@ ulint
       
 12377  rec_get_n_fields_old(
       
 12378  /*=================*/
       
 12379  	const rec_t*	rec)	/*!< in: physical record */
       
 12380 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12381 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12382  /******************************************************//**
       
 12383  The following function is used to get the number of fields
       
 12384  in a record.
       
 12385 @@ -161,7 +161,7 @@ rec_get_n_fields(
       
 12386  /*=============*/
       
 12387  	const rec_t*		rec,	/*!< in: physical record */
       
 12388  	const dict_index_t*	index)	/*!< in: record descriptor */
       
 12389 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12390 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12391  /******************************************************//**
       
 12392  The following function is used to get the number of records owned by the
       
 12393  previous directory record.
       
 12394 @@ -171,7 +171,7 @@ ulint
       
 12395  rec_get_n_owned_old(
       
 12396  /*================*/
       
 12397  	const rec_t*	rec)	/*!< in: old-style physical record */
       
 12398 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12399 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12400  /******************************************************//**
       
 12401  The following function is used to set the number of owned records. */
       
 12402  UNIV_INLINE
       
 12403 @@ -180,7 +180,7 @@ rec_set_n_owned_old(
       
 12404  /*================*/
       
 12405  	rec_t*	rec,		/*!< in: old-style physical record */
       
 12406  	ulint	n_owned)	/*!< in: the number of owned */
       
 12407 -	__attribute__((nonnull));
       
 12408 +	MY_ATTRIBUTE((nonnull));
       
 12409  /******************************************************//**
       
 12410  The following function is used to get the number of records owned by the
       
 12411  previous directory record.
       
 12412 @@ -190,7 +190,7 @@ ulint
       
 12413  rec_get_n_owned_new(
       
 12414  /*================*/
       
 12415  	const rec_t*	rec)	/*!< in: new-style physical record */
       
 12416 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12417 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12418  /******************************************************//**
       
 12419  The following function is used to set the number of owned records. */
       
 12420  UNIV_INLINE
       
 12421 @@ -200,7 +200,7 @@ rec_set_n_owned_new(
       
 12422  	rec_t*		rec,	/*!< in/out: new-style physical record */
       
 12423  	page_zip_des_t*	page_zip,/*!< in/out: compressed page, or NULL */
       
 12424  	ulint		n_owned)/*!< in: the number of owned */
       
 12425 -	__attribute__((nonnull(1)));
       
 12426 +	MY_ATTRIBUTE((nonnull(1)));
       
 12427  /******************************************************//**
       
 12428  The following function is used to retrieve the info bits of
       
 12429  a record.
       
 12430 @@ -211,7 +211,7 @@ rec_get_info_bits(
       
 12431  /*==============*/
       
 12432  	const rec_t*	rec,	/*!< in: physical record */
       
 12433  	ulint		comp)	/*!< in: nonzero=compact page format */
       
 12434 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12435 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12436  /******************************************************//**
       
 12437  The following function is used to set the info bits of a record. */
       
 12438  UNIV_INLINE
       
 12439 @@ -220,7 +220,7 @@ rec_set_info_bits_old(
       
 12440  /*==================*/
       
 12441  	rec_t*	rec,	/*!< in: old-style physical record */
       
 12442  	ulint	bits)	/*!< in: info bits */
       
 12443 -	__attribute__((nonnull));
       
 12444 +	MY_ATTRIBUTE((nonnull));
       
 12445  /******************************************************//**
       
 12446  The following function is used to set the info bits of a record. */
       
 12447  UNIV_INLINE
       
 12448 @@ -229,7 +229,7 @@ rec_set_info_bits_new(
       
 12449  /*==================*/
       
 12450  	rec_t*	rec,	/*!< in/out: new-style physical record */
       
 12451  	ulint	bits)	/*!< in: info bits */
       
 12452 -	__attribute__((nonnull));
       
 12453 +	MY_ATTRIBUTE((nonnull));
       
 12454  /******************************************************//**
       
 12455  The following function retrieves the status bits of a new-style record.
       
 12456  @return	status bits */
       
 12457 @@ -238,7 +238,7 @@ ulint
       
 12458  rec_get_status(
       
 12459  /*===========*/
       
 12460  	const rec_t*	rec)	/*!< in: physical record */
       
 12461 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12462 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12463  
       
 12464  /******************************************************//**
       
 12465  The following function is used to set the status bits of a new-style record. */
       
 12466 @@ -248,7 +248,7 @@ rec_set_status(
       
 12467  /*===========*/
       
 12468  	rec_t*	rec,	/*!< in/out: physical record */
       
 12469  	ulint	bits)	/*!< in: info bits */
       
 12470 -	__attribute__((nonnull));
       
 12471 +	MY_ATTRIBUTE((nonnull));
       
 12472  
       
 12473  /******************************************************//**
       
 12474  The following function is used to retrieve the info and status
       
 12475 @@ -260,7 +260,7 @@ rec_get_info_and_status_bits(
       
 12476  /*=========================*/
       
 12477  	const rec_t*	rec,	/*!< in: physical record */
       
 12478  	ulint		comp)	/*!< in: nonzero=compact page format */
       
 12479 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12480 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12481  /******************************************************//**
       
 12482  The following function is used to set the info and status
       
 12483  bits of a record.  (Only compact records have status bits.) */
       
 12484 @@ -270,7 +270,7 @@ rec_set_info_and_status_bits(
       
 12485  /*=========================*/
       
 12486  	rec_t*	rec,	/*!< in/out: compact physical record */
       
 12487  	ulint	bits)	/*!< in: info bits */
       
 12488 -	__attribute__((nonnull));
       
 12489 +	MY_ATTRIBUTE((nonnull));
       
 12490  
       
 12491  /******************************************************//**
       
 12492  The following function tells if record is delete marked.
       
 12493 @@ -281,7 +281,7 @@ rec_get_deleted_flag(
       
 12494  /*=================*/
       
 12495  	const rec_t*	rec,	/*!< in: physical record */
       
 12496  	ulint		comp)	/*!< in: nonzero=compact page format */
       
 12497 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12498 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12499  /******************************************************//**
       
 12500  The following function is used to set the deleted bit. */
       
 12501  UNIV_INLINE
       
 12502 @@ -290,7 +290,7 @@ rec_set_deleted_flag_old(
       
 12503  /*=====================*/
       
 12504  	rec_t*	rec,	/*!< in: old-style physical record */
       
 12505  	ulint	flag)	/*!< in: nonzero if delete marked */
       
 12506 -	__attribute__((nonnull));
       
 12507 +	MY_ATTRIBUTE((nonnull));
       
 12508  /******************************************************//**
       
 12509  The following function is used to set the deleted bit. */
       
 12510  UNIV_INLINE
       
 12511 @@ -300,7 +300,7 @@ rec_set_deleted_flag_new(
       
 12512  	rec_t*		rec,	/*!< in/out: new-style physical record */
       
 12513  	page_zip_des_t*	page_zip,/*!< in/out: compressed page, or NULL */
       
 12514  	ulint		flag)	/*!< in: nonzero if delete marked */
       
 12515 -	__attribute__((nonnull(1)));
       
 12516 +	MY_ATTRIBUTE((nonnull(1)));
       
 12517  /******************************************************//**
       
 12518  The following function tells if a new-style record is a node pointer.
       
 12519  @return	TRUE if node pointer */
       
 12520 @@ -309,7 +309,7 @@ ibool
       
 12521  rec_get_node_ptr_flag(
       
 12522  /*==================*/
       
 12523  	const rec_t*	rec)	/*!< in: physical record */
       
 12524 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12525 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12526  /******************************************************//**
       
 12527  The following function is used to get the order number
       
 12528  of an old-style record in the heap of the index page.
       
 12529 @@ -319,7 +319,7 @@ ulint
       
 12530  rec_get_heap_no_old(
       
 12531  /*================*/
       
 12532  	const rec_t*	rec)	/*!< in: physical record */
       
 12533 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12534 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12535  /******************************************************//**
       
 12536  The following function is used to set the heap number
       
 12537  field in an old-style record. */
       
 12538 @@ -329,7 +329,7 @@ rec_set_heap_no_old(
       
 12539  /*================*/
       
 12540  	rec_t*	rec,	/*!< in: physical record */
       
 12541  	ulint	heap_no)/*!< in: the heap number */
       
 12542 -	__attribute__((nonnull));
       
 12543 +	MY_ATTRIBUTE((nonnull));
       
 12544  /******************************************************//**
       
 12545  The following function is used to get the order number
       
 12546  of a new-style record in the heap of the index page.
       
 12547 @@ -339,7 +339,7 @@ ulint
       
 12548  rec_get_heap_no_new(
       
 12549  /*================*/
       
 12550  	const rec_t*	rec)	/*!< in: physical record */
       
 12551 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12552 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12553  /******************************************************//**
       
 12554  The following function is used to set the heap number
       
 12555  field in a new-style record. */
       
 12556 @@ -349,7 +349,7 @@ rec_set_heap_no_new(
       
 12557  /*================*/
       
 12558  	rec_t*	rec,	/*!< in/out: physical record */
       
 12559  	ulint	heap_no)/*!< in: the heap number */
       
 12560 -	__attribute__((nonnull));
       
 12561 +	MY_ATTRIBUTE((nonnull));
       
 12562  /******************************************************//**
       
 12563  The following function is used to test whether the data offsets
       
 12564  in the record are stored in one-byte or two-byte format.
       
 12565 @@ -359,7 +359,7 @@ ibool
       
 12566  rec_get_1byte_offs_flag(
       
 12567  /*====================*/
       
 12568  	const rec_t*	rec)	/*!< in: physical record */
       
 12569 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12570 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12571  
       
 12572  /******************************************************//**
       
 12573  The following function is used to set the 1-byte offsets flag. */
       
 12574 @@ -369,7 +369,7 @@ rec_set_1byte_offs_flag(
       
 12575  /*====================*/
       
 12576  	rec_t*	rec,	/*!< in: physical record */
       
 12577  	ibool	flag)	/*!< in: TRUE if 1byte form */
       
 12578 -	__attribute__((nonnull));
       
 12579 +	MY_ATTRIBUTE((nonnull));
       
 12580  
       
 12581  /******************************************************//**
       
 12582  Returns the offset of nth field end if the record is stored in the 1-byte
       
 12583 @@ -382,7 +382,7 @@ rec_1_get_field_end_info(
       
 12584  /*=====================*/
       
 12585  	const rec_t*	rec,	/*!< in: record */
       
 12586  	ulint		n)	/*!< in: field index */
       
 12587 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12588 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12589  
       
 12590  /******************************************************//**
       
 12591  Returns the offset of nth field end if the record is stored in the 2-byte
       
 12592 @@ -396,7 +396,7 @@ rec_2_get_field_end_info(
       
 12593  /*=====================*/
       
 12594  	const rec_t*	rec,	/*!< in: record */
       
 12595  	ulint		n)	/*!< in: field index */
       
 12596 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12597 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12598  
       
 12599  /******************************************************//**
       
 12600  Returns nonzero if the field is stored off-page.
       
 12601 @@ -408,7 +408,7 @@ rec_2_is_field_extern(
       
 12602  /*==================*/
       
 12603  	const rec_t*	rec,	/*!< in: record */
       
 12604  	ulint		n)	/*!< in: field index */
       
 12605 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12606 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12607  
       
 12608  /******************************************************//**
       
 12609  Determine how many of the first n columns in a compact
       
 12610 @@ -421,7 +421,7 @@ rec_get_n_extern_new(
       
 12611  	const rec_t*		rec,	/*!< in: compact physical record */
       
 12612  	const dict_index_t*	index,	/*!< in: record descriptor */
       
 12613  	ulint			n)	/*!< in: number of columns to scan */
       
 12614 -	__attribute__((nonnull, warn_unused_result));
       
 12615 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 12616  
       
 12617  /******************************************************//**
       
 12618  The following function determines the offsets to each field
       
 12619 @@ -446,9 +446,9 @@ rec_get_offsets_func(
       
 12620  #endif /* UNIV_DEBUG */
       
 12621  	mem_heap_t**		heap)	/*!< in/out: memory heap */
       
 12622  #ifdef UNIV_DEBUG
       
 12623 -	__attribute__((nonnull(1,2,5,7),warn_unused_result));
       
 12624 +	MY_ATTRIBUTE((nonnull(1,2,5,7),warn_unused_result));
       
 12625  #else /* UNIV_DEBUG */
       
 12626 -	__attribute__((nonnull(1,2,5),warn_unused_result));
       
 12627 +	MY_ATTRIBUTE((nonnull(1,2,5),warn_unused_result));
       
 12628  #endif /* UNIV_DEBUG */
       
 12629  
       
 12630  #ifdef UNIV_DEBUG
       
 12631 @@ -475,7 +475,7 @@ rec_get_offsets_reverse(
       
 12632  					0=leaf node */
       
 12633  	ulint*			offsets)/*!< in/out: array consisting of
       
 12634  					offsets[0] allocated elements */
       
 12635 -	__attribute__((nonnull));
       
 12636 +	MY_ATTRIBUTE((nonnull));
       
 12637  #ifdef UNIV_DEBUG
       
 12638  /************************************************************//**
       
 12639  Validates offsets returned by rec_get_offsets().
       
 12640 @@ -488,7 +488,7 @@ rec_offs_validate(
       
 12641  	const dict_index_t*	index,	/*!< in: record descriptor or NULL */
       
 12642  	const ulint*		offsets)/*!< in: array returned by
       
 12643  					rec_get_offsets() */
       
 12644 -	__attribute__((nonnull(3), warn_unused_result));
       
 12645 +	MY_ATTRIBUTE((nonnull(3), warn_unused_result));
       
 12646  /************************************************************//**
       
 12647  Updates debug data in offsets, in order to avoid bogus
       
 12648  rec_offs_validate() failures. */
       
 12649 @@ -500,7 +500,7 @@ rec_offs_make_valid(
       
 12650  	const dict_index_t*	index,	/*!< in: record descriptor */
       
 12651  	ulint*			offsets)/*!< in: array returned by
       
 12652  					rec_get_offsets() */
       
 12653 -	__attribute__((nonnull));
       
 12654 +	MY_ATTRIBUTE((nonnull));
       
 12655  #else
       
 12656  # define rec_offs_make_valid(rec, index, offsets) ((void) 0)
       
 12657  #endif /* UNIV_DEBUG */
       
 12658 @@ -517,7 +517,7 @@ rec_get_nth_field_offs_old(
       
 12659  	ulint		n,	/*!< in: index of the field */
       
 12660  	ulint*		len)	/*!< out: length of the field; UNIV_SQL_NULL
       
 12661  				if SQL null */
       
 12662 -	__attribute__((nonnull));
       
 12663 +	MY_ATTRIBUTE((nonnull));
       
 12664  #define rec_get_nth_field_old(rec, n, len) \
       
 12665  ((rec) + rec_get_nth_field_offs_old(rec, n, len))
       
 12666  /************************************************************//**
       
 12667 @@ -531,7 +531,7 @@ rec_get_nth_field_size(
       
 12668  /*===================*/
       
 12669  	const rec_t*	rec,	/*!< in: record */
       
 12670  	ulint		n)	/*!< in: index of the field */
       
 12671 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12672 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12673  /************************************************************//**
       
 12674  The following function is used to get an offset to the nth
       
 12675  data field in a record.
       
 12676 @@ -544,7 +544,7 @@ rec_get_nth_field_offs(
       
 12677  	ulint		n,	/*!< in: index of the field */
       
 12678  	ulint*		len)	/*!< out: length of the field; UNIV_SQL_NULL
       
 12679  				if SQL null */
       
 12680 -	__attribute__((nonnull));
       
 12681 +	MY_ATTRIBUTE((nonnull));
       
 12682  #define rec_get_nth_field(rec, offsets, n, len) \
       
 12683  ((rec) + rec_get_nth_field_offs(offsets, n, len))
       
 12684  /******************************************************//**
       
 12685 @@ -556,7 +556,7 @@ ulint
       
 12686  rec_offs_comp(
       
 12687  /*==========*/
       
 12688  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12689 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12690 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12691  /******************************************************//**
       
 12692  Determine if the offsets are for a record containing
       
 12693  externally stored columns.
       
 12694 @@ -566,7 +566,7 @@ ulint
       
 12695  rec_offs_any_extern(
       
 12696  /*================*/
       
 12697  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12698 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12699 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12700  /******************************************************//**
       
 12701  Determine if the offsets are for a record containing null BLOB pointers.
       
 12702  @return	first field containing a null BLOB pointer, or NULL if none found */
       
 12703 @@ -576,7 +576,7 @@ rec_offs_any_null_extern(
       
 12704  /*=====================*/
       
 12705  	const rec_t*	rec,		/*!< in: record */
       
 12706  	const ulint*	offsets)	/*!< in: rec_get_offsets(rec) */
       
 12707 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12708 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12709  /******************************************************//**
       
 12710  Returns nonzero if the extern bit is set in nth field of rec.
       
 12711  @return	nonzero if externally stored */
       
 12712 @@ -586,7 +586,7 @@ rec_offs_nth_extern(
       
 12713  /*================*/
       
 12714  	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
       
 12715  	ulint		n)	/*!< in: nth field */
       
 12716 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12717 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12718  /******************************************************//**
       
 12719  Returns nonzero if the SQL NULL bit is set in nth field of rec.
       
 12720  @return	nonzero if SQL NULL */
       
 12721 @@ -596,7 +596,7 @@ rec_offs_nth_sql_null(
       
 12722  /*==================*/
       
 12723  	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
       
 12724  	ulint		n)	/*!< in: nth field */
       
 12725 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12726 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12727  /******************************************************//**
       
 12728  Gets the physical size of a field.
       
 12729  @return	length of field */
       
 12730 @@ -606,7 +606,7 @@ rec_offs_nth_size(
       
 12731  /*==============*/
       
 12732  	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
       
 12733  	ulint		n)	/*!< in: nth field */
       
 12734 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12735 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12736  
       
 12737  /******************************************************//**
       
 12738  Returns the number of extern bits set in a record.
       
 12739 @@ -616,7 +616,7 @@ ulint
       
 12740  rec_offs_n_extern(
       
 12741  /*==============*/
       
 12742  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12743 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12744 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12745  /***********************************************************//**
       
 12746  This is used to modify the value of an already existing field in a record.
       
 12747  The previous value must have exactly the same size as the new value. If len
       
 12748 @@ -636,7 +636,7 @@ rec_set_nth_field(
       
 12749  				length as the previous value.
       
 12750  				If SQL null, previous value must be
       
 12751  				SQL null. */
       
 12752 -	__attribute__((nonnull(1,2)));
       
 12753 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 12754  /**********************************************************//**
       
 12755  The following function returns the data size of an old-style physical
       
 12756  record, that is the sum of field lengths. SQL null fields
       
 12757 @@ -648,7 +648,7 @@ ulint
       
 12758  rec_get_data_size_old(
       
 12759  /*==================*/
       
 12760  	const rec_t*	rec)	/*!< in: physical record */
       
 12761 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12762 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12763  /**********************************************************//**
       
 12764  The following function returns the number of allocated elements
       
 12765  for an array of offsets.
       
 12766 @@ -658,7 +658,7 @@ ulint
       
 12767  rec_offs_get_n_alloc(
       
 12768  /*=================*/
       
 12769  	const ulint*	offsets)/*!< in: array for rec_get_offsets() */
       
 12770 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12771 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12772  /**********************************************************//**
       
 12773  The following function sets the number of allocated elements
       
 12774  for an array of offsets. */
       
 12775 @@ -669,7 +669,7 @@ rec_offs_set_n_alloc(
       
 12776  	ulint*	offsets,	/*!< out: array for rec_get_offsets(),
       
 12777  				must be allocated */
       
 12778  	ulint	n_alloc)	/*!< in: number of elements */
       
 12779 -	__attribute__((nonnull));
       
 12780 +	MY_ATTRIBUTE((nonnull));
       
 12781  #define rec_offs_init(offsets) \
       
 12782  	rec_offs_set_n_alloc(offsets, (sizeof offsets) / sizeof *offsets)
       
 12783  /**********************************************************//**
       
 12784 @@ -680,7 +680,7 @@ ulint
       
 12785  rec_offs_n_fields(
       
 12786  /*==============*/
       
 12787  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12788 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12789 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12790  /**********************************************************//**
       
 12791  The following function returns the data size of a physical
       
 12792  record, that is the sum of field lengths. SQL null fields
       
 12793 @@ -692,7 +692,7 @@ ulint
       
 12794  rec_offs_data_size(
       
 12795  /*===============*/
       
 12796  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12797 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12798 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12799  /**********************************************************//**
       
 12800  Returns the total size of record minus data size of record.
       
 12801  The value returned by the function is the distance from record
       
 12802 @@ -703,7 +703,7 @@ ulint
       
 12803  rec_offs_extra_size(
       
 12804  /*================*/
       
 12805  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12806 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12807 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12808  /**********************************************************//**
       
 12809  Returns the total size of a physical record.
       
 12810  @return	size */
       
 12811 @@ -712,7 +712,7 @@ ulint
       
 12812  rec_offs_size(
       
 12813  /*==========*/
       
 12814  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12815 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12816 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12817  #ifdef UNIV_DEBUG
       
 12818  /**********************************************************//**
       
 12819  Returns a pointer to the start of the record.
       
 12820 @@ -723,7 +723,7 @@ rec_get_start(
       
 12821  /*==========*/
       
 12822  	const rec_t*	rec,	/*!< in: pointer to record */
       
 12823  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12824 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12825 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12826  /**********************************************************//**
       
 12827  Returns a pointer to the end of the record.
       
 12828  @return	pointer to end */
       
 12829 @@ -733,7 +733,7 @@ rec_get_end(
       
 12830  /*========*/
       
 12831  	const rec_t*	rec,	/*!< in: pointer to record */
       
 12832  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12833 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12834 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12835  #else /* UNIV_DEBUG */
       
 12836  # define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets))
       
 12837  # define rec_get_end(rec, offsets) ((rec) + rec_offs_data_size(offsets))
       
 12838 @@ -748,7 +748,7 @@ rec_copy(
       
 12839  	void*		buf,	/*!< in: buffer */
       
 12840  	const rec_t*	rec,	/*!< in: physical record */
       
 12841  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12842 -	__attribute__((nonnull));
       
 12843 +	MY_ATTRIBUTE((nonnull));
       
 12844  #ifndef UNIV_HOTBACKUP
       
 12845  /**********************************************************//**
       
 12846  Determines the size of a data tuple prefix in a temporary file.
       
 12847 @@ -761,7 +761,7 @@ rec_get_converted_size_temp(
       
 12848  	const dfield_t*		fields,	/*!< in: array of data fields */
       
 12849  	ulint			n_fields,/*!< in: number of data fields */
       
 12850  	ulint*			extra)	/*!< out: extra size */
       
 12851 -	__attribute__((warn_unused_result, nonnull));
       
 12852 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 12853  
       
 12854  /******************************************************//**
       
 12855  Determine the offset to each field in temporary file.
       
 12856 @@ -774,7 +774,7 @@ rec_init_offsets_temp(
       
 12857  	const dict_index_t*	index,	/*!< in: record descriptor */
       
 12858  	ulint*			offsets)/*!< in/out: array of offsets;
       
 12859  					in: n=rec_offs_n_fields(offsets) */
       
 12860 -	__attribute__((nonnull));
       
 12861 +	MY_ATTRIBUTE((nonnull));
       
 12862  
       
 12863  /*********************************************************//**
       
 12864  Builds a temporary file record out of a data tuple.
       
 12865 @@ -787,7 +787,7 @@ rec_convert_dtuple_to_temp(
       
 12866  	const dict_index_t*	index,		/*!< in: record descriptor */
       
 12867  	const dfield_t*		fields,		/*!< in: array of data fields */
       
 12868  	ulint			n_fields)	/*!< in: number of fields */
       
 12869 -	__attribute__((nonnull));
       
 12870 +	MY_ATTRIBUTE((nonnull));
       
 12871  
       
 12872  /**************************************************************//**
       
 12873  Copies the first n fields of a physical record to a new physical record in
       
 12874 @@ -805,7 +805,7 @@ rec_copy_prefix_to_buf(
       
 12875  						for the copied prefix,
       
 12876  						or NULL */
       
 12877  	ulint*			buf_size)	/*!< in/out: buffer size */
       
 12878 -	__attribute__((nonnull));
       
 12879 +	MY_ATTRIBUTE((nonnull));
       
 12880  /************************************************************//**
       
 12881  Folds a prefix of a physical record to a ulint.
       
 12882  @return	the folded value */
       
 12883 @@ -821,7 +821,7 @@ rec_fold(
       
 12884  	ulint		n_bytes,	/*!< in: number of bytes to fold
       
 12885  					in an incomplete last field */
       
 12886  	index_id_t	tree_id)	/*!< in: index tree id */
       
 12887 -	__attribute__((nonnull, pure, warn_unused_result));
       
 12888 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 12889  #endif /* !UNIV_HOTBACKUP */
       
 12890  /*********************************************************//**
       
 12891  Builds a physical record out of a data tuple and
       
 12892 @@ -837,7 +837,7 @@ rec_convert_dtuple_to_rec(
       
 12893  	const dtuple_t*		dtuple,	/*!< in: data tuple */
       
 12894  	ulint			n_ext)	/*!< in: number of
       
 12895  					externally stored columns */
       
 12896 -	__attribute__((nonnull, warn_unused_result));
       
 12897 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 12898  /**********************************************************//**
       
 12899  Returns the extra size of an old-style physical record if we know its
       
 12900  data size and number of fields.
       
 12901 @@ -849,7 +849,7 @@ rec_get_converted_extra_size(
       
 12902  	ulint	data_size,	/*!< in: data size */
       
 12903  	ulint	n_fields,	/*!< in: number of fields */
       
 12904  	ulint	n_ext)		/*!< in: number of externally stored columns */
       
 12905 -	__attribute__((const));
       
 12906 +	MY_ATTRIBUTE((const));
       
 12907  /**********************************************************//**
       
 12908  Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
       
 12909  @return	total size */
       
 12910 @@ -861,7 +861,7 @@ rec_get_converted_size_comp_prefix(
       
 12911  	const dfield_t*		fields,	/*!< in: array of data fields */
       
 12912  	ulint			n_fields,/*!< in: number of data fields */
       
 12913  	ulint*			extra)	/*!< out: extra size */
       
 12914 -	__attribute__((warn_unused_result, nonnull(1,2)));
       
 12915 +	MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)));
       
 12916  /**********************************************************//**
       
 12917  Determines the size of a data tuple in ROW_FORMAT=COMPACT.
       
 12918  @return	total size */
       
 12919 @@ -877,7 +877,7 @@ rec_get_converted_size_comp(
       
 12920  	const dfield_t*		fields,	/*!< in: array of data fields */
       
 12921  	ulint			n_fields,/*!< in: number of data fields */
       
 12922  	ulint*			extra)	/*!< out: extra size */
       
 12923 -	__attribute__((nonnull(1,3)));
       
 12924 +	MY_ATTRIBUTE((nonnull(1,3)));
       
 12925  /**********************************************************//**
       
 12926  The following function returns the size of a data tuple when converted to
       
 12927  a physical record.
       
 12928 @@ -889,7 +889,7 @@ rec_get_converted_size(
       
 12929  	dict_index_t*	index,	/*!< in: record descriptor */
       
 12930  	const dtuple_t*	dtuple,	/*!< in: data tuple */
       
 12931  	ulint		n_ext)	/*!< in: number of externally stored columns */
       
 12932 -	__attribute__((warn_unused_result, nonnull));
       
 12933 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 12934  #ifndef UNIV_HOTBACKUP
       
 12935  /**************************************************************//**
       
 12936  Copies the first n fields of a physical record to a data tuple.
       
 12937 @@ -904,7 +904,7 @@ rec_copy_prefix_to_dtuple(
       
 12938  	ulint			n_fields,	/*!< in: number of fields
       
 12939  						to copy */
       
 12940  	mem_heap_t*		heap)		/*!< in: memory heap */
       
 12941 -	__attribute__((nonnull));
       
 12942 +	MY_ATTRIBUTE((nonnull));
       
 12943  #endif /* !UNIV_HOTBACKUP */
       
 12944  /***************************************************************//**
       
 12945  Validates the consistency of a physical record.
       
 12946 @@ -915,7 +915,7 @@ rec_validate(
       
 12947  /*=========*/
       
 12948  	const rec_t*	rec,	/*!< in: physical record */
       
 12949  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12950 -	__attribute__((nonnull));
       
 12951 +	MY_ATTRIBUTE((nonnull));
       
 12952  /***************************************************************//**
       
 12953  Prints an old-style physical record. */
       
 12954  UNIV_INTERN
       
 12955 @@ -924,7 +924,7 @@ rec_print_old(
       
 12956  /*==========*/
       
 12957  	FILE*		file,	/*!< in: file where to print */
       
 12958  	const rec_t*	rec)	/*!< in: physical record */
       
 12959 -	__attribute__((nonnull));
       
 12960 +	MY_ATTRIBUTE((nonnull));
       
 12961  #ifndef UNIV_HOTBACKUP
       
 12962  /***************************************************************//**
       
 12963  Prints a physical record in ROW_FORMAT=COMPACT.  Ignores the
       
 12964 @@ -936,7 +936,7 @@ rec_print_comp(
       
 12965  	FILE*		file,	/*!< in: file where to print */
       
 12966  	const rec_t*	rec,	/*!< in: physical record */
       
 12967  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12968 -	__attribute__((nonnull));
       
 12969 +	MY_ATTRIBUTE((nonnull));
       
 12970  /***************************************************************//**
       
 12971  Prints a physical record. */
       
 12972  UNIV_INTERN
       
 12973 @@ -946,7 +946,7 @@ rec_print_new(
       
 12974  	FILE*		file,	/*!< in: file where to print */
       
 12975  	const rec_t*	rec,	/*!< in: physical record */
       
 12976  	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
       
 12977 -	__attribute__((nonnull));
       
 12978 +	MY_ATTRIBUTE((nonnull));
       
 12979  /***************************************************************//**
       
 12980  Prints a physical record. */
       
 12981  UNIV_INTERN
       
 12982 @@ -956,7 +956,7 @@ rec_print(
       
 12983  	FILE*			file,	/*!< in: file where to print */
       
 12984  	const rec_t*		rec,	/*!< in: physical record */
       
 12985  	const dict_index_t*	index)	/*!< in: record descriptor */
       
 12986 -	__attribute__((nonnull));
       
 12987 +	MY_ATTRIBUTE((nonnull));
       
 12988  
       
 12989  # ifdef UNIV_DEBUG
       
 12990  /************************************************************//**
       
 12991 @@ -968,7 +968,7 @@ rec_get_trx_id(
       
 12992  /*===========*/
       
 12993  	const rec_t*		rec,	/*!< in: record */
       
 12994  	const dict_index_t*	index)	/*!< in: clustered index */
       
 12995 -	__attribute__((nonnull, warn_unused_result));
       
 12996 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 12997  # endif /* UNIV_DEBUG */
       
 12998  #endif /* UNIV_HOTBACKUP */
       
 12999  
       
 13000 --- a/storage/innobase/include/row0ftsort.h
       
 13001 +++ b/storage/innobase/include/row0ftsort.h
       
 13002 @@ -1,6 +1,6 @@
       
 13003  /*****************************************************************************
       
 13004  
       
 13005 -Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13006 +Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13007  
       
 13008  This program is free software; you can redistribute it and/or modify it under
       
 13009  the terms of the GNU General Public License as published by the Free Software
       
 13010 @@ -187,7 +187,7 @@ row_fts_psort_info_init(
       
 13011  					instantiated */
       
 13012  	fts_psort_t**		merge)	/*!< out: parallel merge info
       
 13013  					to be instantiated */
       
 13014 -	__attribute__((nonnull));
       
 13015 +	MY_ATTRIBUTE((nonnull));
       
 13016  /********************************************************************//**
       
 13017  Clean up and deallocate FTS parallel sort structures, and close
       
 13018  temparary merge sort files */
       
 13019 @@ -275,5 +275,5 @@ row_fts_merge_insert(
       
 13020  	fts_psort_t*	psort_info,	/*!< parallel sort info */
       
 13021  	ulint		id)		/* !< in: which auxiliary table's data
       
 13022  					to insert to */
       
 13023 -	__attribute__((nonnull));
       
 13024 +	MY_ATTRIBUTE((nonnull));
       
 13025  #endif /* row0ftsort_h */
       
 13026 --- a/storage/innobase/include/row0import.h
       
 13027 +++ b/storage/innobase/include/row0import.h
       
 13028 @@ -1,6 +1,6 @@
       
 13029  /*****************************************************************************
       
 13030  
       
 13031 -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13032 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13033  
       
 13034  This program is free software; you can redistribute it and/or modify it under
       
 13035  the terms of the GNU General Public License as published by the Free Software
       
 13036 @@ -46,7 +46,7 @@ row_import_for_mysql(
       
 13037  	dict_table_t*	table,		/*!< in/out: table */
       
 13038  	row_prebuilt_t*	prebuilt)	/*!< in: prebuilt struct
       
 13039  						in MySQL */
       
 13040 -	__attribute__((nonnull, warn_unused_result));
       
 13041 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13042  
       
 13043  /*****************************************************************//**
       
 13044  Update the DICT_TF2_DISCARDED flag in SYS_TABLES.
       
 13045 @@ -64,7 +64,7 @@ row_import_update_discarded_flag(
       
 13046  	bool		dict_locked)		/*!< in: Set to true if the
       
 13047  						caller already owns the
       
 13048  						dict_sys_t:: mutex. */
       
 13049 -	__attribute__((nonnull, warn_unused_result));
       
 13050 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13051  
       
 13052  /*****************************************************************//**
       
 13053  Update the (space, root page) of a table's indexes from the values
       
 13054 @@ -83,7 +83,7 @@ row_import_update_index_root(
       
 13055  	bool			dict_locked)	/*!< in: Set to true if the
       
 13056  						caller already owns the
       
 13057  						dict_sys_t:: mutex. */
       
 13058 -	__attribute__((nonnull, warn_unused_result));
       
 13059 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13060  #ifndef UNIV_NONINL
       
 13061  #include "row0import.ic"
       
 13062  #endif
       
 13063 --- a/storage/innobase/include/row0ins.h
       
 13064 +++ b/storage/innobase/include/row0ins.h
       
 13065 @@ -1,6 +1,6 @@
       
 13066  /*****************************************************************************
       
 13067  
       
 13068 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13069 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13070  
       
 13071  This program is free software; you can redistribute it and/or modify it under
       
 13072  the terms of the GNU General Public License as published by the Free Software
       
 13073 @@ -53,7 +53,7 @@ row_ins_check_foreign_constraint(
       
 13074  				table, else the referenced table */
       
 13075  	dtuple_t*	entry,	/*!< in: index entry for index */
       
 13076  	que_thr_t*	thr)	/*!< in: query thread */
       
 13077 -	__attribute__((nonnull, warn_unused_result));
       
 13078 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13079  /*********************************************************************//**
       
 13080  Creates an insert node struct.
       
 13081  @return	own: insert node struct */
       
 13082 @@ -98,7 +98,7 @@ row_ins_clust_index_entry_low(
       
 13083  	dtuple_t*	entry,	/*!< in/out: index entry to insert */
       
 13084  	ulint		n_ext,	/*!< in: number of externally stored columns */
       
 13085  	que_thr_t*	thr)	/*!< in: query thread or NULL */
       
 13086 -	__attribute__((nonnull, warn_unused_result));
       
 13087 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13088  /***************************************************************//**
       
 13089  Tries to insert an entry into a secondary index. If a record with exactly the
       
 13090  same fields is found, the other record is necessarily marked deleted.
       
 13091 @@ -123,7 +123,7 @@ row_ins_sec_index_entry_low(
       
 13092  	trx_id_t	trx_id,	/*!< in: PAGE_MAX_TRX_ID during
       
 13093  				row_log_table_apply(), or 0 */
       
 13094  	que_thr_t*	thr)	/*!< in: query thread */
       
 13095 -	__attribute__((nonnull, warn_unused_result));
       
 13096 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13097  /***************************************************************//**
       
 13098  Tries to insert the externally stored fields (off-page columns)
       
 13099  of a clustered index entry.
       
 13100 @@ -142,7 +142,7 @@ row_ins_index_entry_big_rec_func(
       
 13101  	const void*		thd,	/*!< in: connection, or NULL */
       
 13102  #endif /* DBUG_OFF */
       
 13103  	ulint			line)	/*!< in: line number of caller */
       
 13104 -	__attribute__((nonnull(1,2,3,4,5,6), warn_unused_result));
       
 13105 +	MY_ATTRIBUTE((nonnull(1,2,3,4,5,6), warn_unused_result));
       
 13106  #ifdef DBUG_OFF
       
 13107  # define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \
       
 13108  	row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,line)
       
 13109 @@ -164,7 +164,7 @@ row_ins_clust_index_entry(
       
 13110  	dtuple_t*	entry,	/*!< in/out: index entry to insert */
       
 13111  	que_thr_t*	thr,	/*!< in: query thread */
       
 13112  	ulint		n_ext)	/*!< in: number of externally stored columns */
       
 13113 -	__attribute__((nonnull, warn_unused_result));
       
 13114 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13115  /***************************************************************//**
       
 13116  Inserts an entry into a secondary index. Tries first optimistic,
       
 13117  then pessimistic descent down the tree. If the entry matches enough
       
 13118 @@ -178,7 +178,7 @@ row_ins_sec_index_entry(
       
 13119  	dict_index_t*	index,	/*!< in: secondary index */
       
 13120  	dtuple_t*	entry,	/*!< in/out: index entry to insert */
       
 13121  	que_thr_t*	thr)	/*!< in: query thread */
       
 13122 -	__attribute__((nonnull, warn_unused_result));
       
 13123 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13124  /***********************************************************//**
       
 13125  Inserts a row to a table. This is a high-level function used in
       
 13126  SQL execution graphs.
       
 13127 --- a/storage/innobase/include/row0log.h
       
 13128 +++ b/storage/innobase/include/row0log.h
       
 13129 @@ -1,6 +1,6 @@
       
 13130  /*****************************************************************************
       
 13131  
       
 13132 -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 13133 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13134  
       
 13135  This program is free software; you can redistribute it and/or modify it under
       
 13136  the terms of the GNU General Public License as published by the Free Software
       
 13137 @@ -54,7 +54,7 @@ row_log_allocate(
       
 13138  	const ulint*	col_map,/*!< in: mapping of old column
       
 13139  				numbers to new ones, or NULL if !table */
       
 13140  	const char*	path)	/*!< in: where to create temporary file */
       
 13141 -	__attribute__((nonnull(1), warn_unused_result));
       
 13142 +	MY_ATTRIBUTE((nonnull(1), warn_unused_result));
       
 13143  
       
 13144  /******************************************************//**
       
 13145  Free the row log for an index that was being created online. */
       
 13146 @@ -63,7 +63,7 @@ void
       
 13147  row_log_free(
       
 13148  /*=========*/
       
 13149  	row_log_t*&	log)	/*!< in,own: row log */
       
 13150 -	__attribute__((nonnull));
       
 13151 +	MY_ATTRIBUTE((nonnull));
       
 13152  
       
 13153  /******************************************************//**
       
 13154  Free the row log for an index on which online creation was aborted. */
       
 13155 @@ -72,7 +72,7 @@ void
       
 13156  row_log_abort_sec(
       
 13157  /*==============*/
       
 13158  	dict_index_t*	index)	/*!< in/out: index (x-latched) */
       
 13159 -	__attribute__((nonnull));
       
 13160 +	MY_ATTRIBUTE((nonnull));
       
 13161  
       
 13162  /******************************************************//**
       
 13163  Try to log an operation to a secondary index that is
       
 13164 @@ -87,7 +87,7 @@ row_log_online_op_try(
       
 13165  	const dtuple_t* tuple,	/*!< in: index tuple */
       
 13166  	trx_id_t	trx_id)	/*!< in: transaction ID for insert,
       
 13167  				or 0 for delete */
       
 13168 -	__attribute__((nonnull, warn_unused_result));
       
 13169 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13170  /******************************************************//**
       
 13171  Logs an operation to a secondary index that is (or was) being created. */
       
 13172  UNIV_INTERN
       
 13173 @@ -98,7 +98,7 @@ row_log_online_op(
       
 13174  	const dtuple_t*	tuple,	/*!< in: index tuple */
       
 13175  	trx_id_t	trx_id)	/*!< in: transaction ID for insert,
       
 13176  				or 0 for delete */
       
 13177 -	UNIV_COLD __attribute__((nonnull));
       
 13178 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 13179  
       
 13180  /******************************************************//**
       
 13181  Gets the error status of the online index rebuild log.
       
 13182 @@ -109,7 +109,7 @@ row_log_table_get_error(
       
 13183  /*====================*/
       
 13184  	const dict_index_t*	index)	/*!< in: clustered index of a table
       
 13185  					that is being rebuilt online */
       
 13186 -	__attribute__((nonnull, warn_unused_result));
       
 13187 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13188  
       
 13189  /******************************************************//**
       
 13190  Logs a delete operation to a table that is being rebuilt.
       
 13191 @@ -125,7 +125,7 @@ row_log_table_delete(
       
 13192  	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
       
 13193  	const byte*	sys)	/*!< in: DB_TRX_ID,DB_ROLL_PTR that should
       
 13194  				be logged, or NULL to use those in rec */
       
 13195 -	UNIV_COLD __attribute__((nonnull(1,2,3)));
       
 13196 +	UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
       
 13197  
       
 13198  /******************************************************//**
       
 13199  Logs an update operation to a table that is being rebuilt.
       
 13200 @@ -141,7 +141,7 @@ row_log_table_update(
       
 13201  	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
       
 13202  	const dtuple_t*	old_pk)	/*!< in: row_log_table_get_pk()
       
 13203  				before the update */
       
 13204 -	UNIV_COLD __attribute__((nonnull(1,2,3)));
       
 13205 +	UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
       
 13206  
       
 13207  /******************************************************//**
       
 13208  Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR
       
 13209 @@ -161,7 +161,7 @@ row_log_table_get_pk(
       
 13210  	byte*		sys,	/*!< out: DB_TRX_ID,DB_ROLL_PTR for
       
 13211  				row_log_table_delete(), or NULL */
       
 13212  	mem_heap_t**	heap)	/*!< in/out: memory heap where allocated */
       
 13213 -	UNIV_COLD __attribute__((nonnull(1,2,5), warn_unused_result));
       
 13214 +	UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,5), warn_unused_result));
       
 13215  
       
 13216  /******************************************************//**
       
 13217  Logs an insert to a table that is being rebuilt.
       
 13218 @@ -175,7 +175,7 @@ row_log_table_insert(
       
 13219  	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
       
 13220  				or X-latched */
       
 13221  	const ulint*	offsets)/*!< in: rec_get_offsets(rec,index) */
       
 13222 -	UNIV_COLD __attribute__((nonnull));
       
 13223 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 13224  /******************************************************//**
       
 13225  Notes that a BLOB is being freed during online ALTER TABLE. */
       
 13226  UNIV_INTERN
       
 13227 @@ -184,7 +184,7 @@ row_log_table_blob_free(
       
 13228  /*====================*/
       
 13229  	dict_index_t*	index,	/*!< in/out: clustered index, X-latched */
       
 13230  	ulint		page_no)/*!< in: starting page number of the BLOB */
       
 13231 -	UNIV_COLD __attribute__((nonnull));
       
 13232 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 13233  /******************************************************//**
       
 13234  Notes that a BLOB is being allocated during online ALTER TABLE. */
       
 13235  UNIV_INTERN
       
 13236 @@ -193,7 +193,7 @@ row_log_table_blob_alloc(
       
 13237  /*=====================*/
       
 13238  	dict_index_t*	index,	/*!< in/out: clustered index, X-latched */
       
 13239  	ulint		page_no)/*!< in: starting page number of the BLOB */
       
 13240 -	UNIV_COLD __attribute__((nonnull));
       
 13241 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 13242  /******************************************************//**
       
 13243  Apply the row_log_table log to a table upon completing rebuild.
       
 13244  @return DB_SUCCESS, or error code on failure */
       
 13245 @@ -206,7 +206,7 @@ row_log_table_apply(
       
 13246  				/*!< in: old table */
       
 13247  	struct TABLE*	table)	/*!< in/out: MySQL table
       
 13248  				(for reporting duplicates) */
       
 13249 -	__attribute__((nonnull, warn_unused_result));
       
 13250 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13251  
       
 13252  /******************************************************//**
       
 13253  Get the latest transaction ID that has invoked row_log_online_op()
       
 13254 @@ -217,7 +217,7 @@ trx_id_t
       
 13255  row_log_get_max_trx(
       
 13256  /*================*/
       
 13257  	dict_index_t*	index)	/*!< in: index, must be locked */
       
 13258 -	__attribute__((nonnull, warn_unused_result));
       
 13259 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13260  
       
 13261  /******************************************************//**
       
 13262  Merge the row log to the index upon completing index creation.
       
 13263 @@ -231,7 +231,7 @@ row_log_apply(
       
 13264  	dict_index_t*	index,	/*!< in/out: secondary index */
       
 13265  	struct TABLE*	table)	/*!< in/out: MySQL table
       
 13266  				(for reporting duplicates) */
       
 13267 -	__attribute__((nonnull, warn_unused_result));
       
 13268 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13269  
       
 13270  #ifndef UNIV_NONINL
       
 13271  #include "row0log.ic"
       
 13272 --- a/storage/innobase/include/row0merge.h
       
 13273 +++ b/storage/innobase/include/row0merge.h
       
 13274 @@ -1,6 +1,6 @@
       
 13275  /*****************************************************************************
       
 13276  
       
 13277 -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 13278 +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13279  
       
 13280  This program is free software; you can redistribute it and/or modify it under
       
 13281  the terms of the GNU General Public License as published by the Free Software
       
 13282 @@ -127,7 +127,7 @@ row_merge_dup_report(
       
 13283  /*=================*/
       
 13284  	row_merge_dup_t*	dup,	/*!< in/out: for reporting duplicates */
       
 13285  	const dfield_t*		entry)	/*!< in: duplicate index entry */
       
 13286 -	__attribute__((nonnull));
       
 13287 +	MY_ATTRIBUTE((nonnull));
       
 13288  /*********************************************************************//**
       
 13289  Sets an exclusive lock on a table, for the duration of creating indexes.
       
 13290  @return	error code or DB_SUCCESS */
       
 13291 @@ -138,7 +138,7 @@ row_merge_lock_table(
       
 13292  	trx_t*		trx,		/*!< in/out: transaction */
       
 13293  	dict_table_t*	table,		/*!< in: table to lock */
       
 13294  	enum lock_mode	mode)		/*!< in: LOCK_X or LOCK_S */
       
 13295 -	__attribute__((nonnull, warn_unused_result));
       
 13296 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13297  /*********************************************************************//**
       
 13298  Drop indexes that were created before an error occurred.
       
 13299  The data dictionary must have been locked exclusively by the caller,
       
 13300 @@ -149,7 +149,7 @@ row_merge_drop_indexes_dict(
       
 13301  /*========================*/
       
 13302  	trx_t*		trx,	/*!< in/out: dictionary transaction */
       
 13303  	table_id_t	table_id)/*!< in: table identifier */
       
 13304 -	__attribute__((nonnull));
       
 13305 +	MY_ATTRIBUTE((nonnull));
       
 13306  /*********************************************************************//**
       
 13307  Drop those indexes which were created before an error occurred.
       
 13308  The data dictionary must have been locked exclusively by the caller,
       
 13309 @@ -162,7 +162,7 @@ row_merge_drop_indexes(
       
 13310  	dict_table_t*	table,	/*!< in/out: table containing the indexes */
       
 13311  	ibool		locked)	/*!< in: TRUE=table locked,
       
 13312  				FALSE=may need to do a lazy drop */
       
 13313 -	__attribute__((nonnull));
       
 13314 +	MY_ATTRIBUTE((nonnull));
       
 13315  /*********************************************************************//**
       
 13316  Drop all partially created indexes during crash recovery. */
       
 13317  UNIV_INTERN
       
 13318 @@ -178,7 +178,7 @@ UNIV_INTERN
       
 13319  int
       
 13320  row_merge_file_create_low(
       
 13321  	const char*	path)
       
 13322 -	__attribute__((warn_unused_result));
       
 13323 +	MY_ATTRIBUTE((warn_unused_result));
       
 13324  /*********************************************************************//**
       
 13325  Destroy a merge file. And de-register the file from Performance Schema
       
 13326  if UNIV_PFS_IO is defined. */
       
 13327 @@ -214,7 +214,7 @@ row_merge_rename_tables_dict(
       
 13328  					old_table->name */
       
 13329  	const char*	tmp_name,	/*!< in: new name for old_table */
       
 13330  	trx_t*		trx)		/*!< in/out: dictionary transaction */
       
 13331 -	__attribute__((nonnull, warn_unused_result));
       
 13332 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13333  
       
 13334  /*********************************************************************//**
       
 13335  Rename an index in the dictionary that was created. The data
       
 13336 @@ -228,7 +228,7 @@ row_merge_rename_index_to_add(
       
 13337  	trx_t*		trx,		/*!< in/out: transaction */
       
 13338  	table_id_t	table_id,	/*!< in: table identifier */
       
 13339  	index_id_t	index_id)	/*!< in: index identifier */
       
 13340 -	__attribute__((nonnull));
       
 13341 +	MY_ATTRIBUTE((nonnull));
       
 13342  /*********************************************************************//**
       
 13343  Rename an index in the dictionary that is to be dropped. The data
       
 13344  dictionary must have been locked exclusively by the caller, because
       
 13345 @@ -241,7 +241,7 @@ row_merge_rename_index_to_drop(
       
 13346  	trx_t*		trx,		/*!< in/out: transaction */
       
 13347  	table_id_t	table_id,	/*!< in: table identifier */
       
 13348  	index_id_t	index_id)	/*!< in: index identifier */
       
 13349 -	__attribute__((nonnull));
       
 13350 +	MY_ATTRIBUTE((nonnull));
       
 13351  /*********************************************************************//**
       
 13352  Create the index and load in to the dictionary.
       
 13353  @return	index, or NULL on error */
       
 13354 @@ -274,7 +274,7 @@ row_merge_drop_table(
       
 13355  /*=================*/
       
 13356  	trx_t*		trx,		/*!< in: transaction */
       
 13357  	dict_table_t*	table)		/*!< in: table instance to drop */
       
 13358 -	__attribute__((nonnull));
       
 13359 +	MY_ATTRIBUTE((nonnull));
       
 13360  /*********************************************************************//**
       
 13361  Build indexes on a table by reading a clustered index,
       
 13362  creating a temporary file containing index entries, merge sorting
       
 13363 @@ -307,7 +307,7 @@ row_merge_build_indexes(
       
 13364  					AUTO_INCREMENT column, or
       
 13365  					ULINT_UNDEFINED if none is added */
       
 13366  	ib_sequence_t&	sequence)	/*!< in/out: autoinc sequence */
       
 13367 -	__attribute__((nonnull(1,2,3,5,6,8), warn_unused_result));
       
 13368 +	MY_ATTRIBUTE((nonnull(1,2,3,5,6,8), warn_unused_result));
       
 13369  /********************************************************************//**
       
 13370  Write a buffer to a block. */
       
 13371  UNIV_INTERN
       
 13372 @@ -317,7 +317,7 @@ row_merge_buf_write(
       
 13373  	const row_merge_buf_t*	buf,	/*!< in: sorted buffer */
       
 13374  	const merge_file_t*	of,	/*!< in: output file */
       
 13375  	row_merge_block_t*	block)	/*!< out: buffer for writing to file */
       
 13376 -	__attribute__((nonnull));
       
 13377 +	MY_ATTRIBUTE((nonnull));
       
 13378  /********************************************************************//**
       
 13379  Sort a buffer. */
       
 13380  UNIV_INTERN
       
 13381 @@ -327,7 +327,7 @@ row_merge_buf_sort(
       
 13382  	row_merge_buf_t*	buf,	/*!< in/out: sort buffer */
       
 13383  	row_merge_dup_t*	dup)	/*!< in/out: reporter of duplicates
       
 13384  					(NULL if non-unique index) */
       
 13385 -	__attribute__((nonnull(1)));
       
 13386 +	MY_ATTRIBUTE((nonnull(1)));
       
 13387  /********************************************************************//**
       
 13388  Write a merge block to the file system.
       
 13389  @return TRUE if request was successful, FALSE if fail */
       
 13390 @@ -347,7 +347,7 @@ row_merge_buf_t*
       
 13391  row_merge_buf_empty(
       
 13392  /*================*/
       
 13393  	row_merge_buf_t*	buf)	/*!< in,own: sort buffer */
       
 13394 -	__attribute__((warn_unused_result, nonnull));
       
 13395 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 13396  
       
 13397  /** Create a merge file in the given location.
       
 13398  @param[out]	merge_file	merge file structure
       
 13399 @@ -373,7 +373,7 @@ row_merge_sort(
       
 13400  					index entries */
       
 13401  	row_merge_block_t*	block,	/*!< in/out: 3 buffers */
       
 13402  	int*			tmpfd)	/*!< in/out: temporary file handle */
       
 13403 -	__attribute__((nonnull));
       
 13404 +	MY_ATTRIBUTE((nonnull));
       
 13405  /*********************************************************************//**
       
 13406  Allocate a sort buffer.
       
 13407  @return own: sort buffer */
       
 13408 @@ -382,7 +382,7 @@ row_merge_buf_t*
       
 13409  row_merge_buf_create(
       
 13410  /*=================*/
       
 13411  	dict_index_t*	index)	/*!< in: secondary index */
       
 13412 -	__attribute__((warn_unused_result, nonnull, malloc));
       
 13413 +	MY_ATTRIBUTE((warn_unused_result, nonnull, malloc));
       
 13414  /*********************************************************************//**
       
 13415  Deallocate a sort buffer. */
       
 13416  UNIV_INTERN
       
 13417 @@ -390,7 +390,7 @@ void
       
 13418  row_merge_buf_free(
       
 13419  /*===============*/
       
 13420  	row_merge_buf_t*	buf)	/*!< in,own: sort buffer to be freed */
       
 13421 -	__attribute__((nonnull));
       
 13422 +	MY_ATTRIBUTE((nonnull));
       
 13423  /*********************************************************************//**
       
 13424  Destroy a merge file. */
       
 13425  UNIV_INTERN
       
 13426 @@ -398,7 +398,7 @@ void
       
 13427  row_merge_file_destroy(
       
 13428  /*===================*/
       
 13429  	merge_file_t*	merge_file)	/*!< in/out: merge file structure */
       
 13430 -	__attribute__((nonnull));
       
 13431 +	MY_ATTRIBUTE((nonnull));
       
 13432  /********************************************************************//**
       
 13433  Read a merge block from the file system.
       
 13434  @return TRUE if request was successful, FALSE if fail */
       
 13435 @@ -428,5 +428,5 @@ row_merge_read_rec(
       
 13436  					or NULL on end of list
       
 13437  					(non-NULL on I/O error) */
       
 13438  	ulint*			offsets)/*!< out: offsets of mrec */
       
 13439 -	__attribute__((nonnull, warn_unused_result));
       
 13440 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13441  #endif /* row0merge.h */
       
 13442 --- a/storage/innobase/include/row0mysql.h
       
 13443 +++ b/storage/innobase/include/row0mysql.h
       
 13444 @@ -1,6 +1,6 @@
       
 13445  /*****************************************************************************
       
 13446  
       
 13447 -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13448 +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13449  
       
 13450  This program is free software; you can redistribute it and/or modify it under
       
 13451  the terms of the GNU General Public License as published by the Free Software
       
 13452 @@ -167,7 +167,7 @@ row_mysql_handle_errors(
       
 13453  	trx_t*		trx,	/*!< in: transaction */
       
 13454  	que_thr_t*	thr,	/*!< in: query thread, or NULL */
       
 13455  	trx_savept_t*	savept)	/*!< in: savepoint, or NULL */
       
 13456 -	__attribute__((nonnull(1,2)));
       
 13457 +	MY_ATTRIBUTE((nonnull(1,2)));
       
 13458  /********************************************************************//**
       
 13459  Create a prebuilt struct for a MySQL table handle.
       
 13460  @return	own: a prebuilt struct */
       
 13461 @@ -209,7 +209,7 @@ row_lock_table_autoinc_for_mysql(
       
 13462  /*=============================*/
       
 13463  	row_prebuilt_t*	prebuilt)	/*!< in: prebuilt struct in the MySQL
       
 13464  					table handle */
       
 13465 -	__attribute__((nonnull, warn_unused_result));
       
 13466 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13467  /*********************************************************************//**
       
 13468  Sets a table lock on the table mentioned in prebuilt.
       
 13469  @return	error code or DB_SUCCESS */
       
 13470 @@ -225,7 +225,7 @@ row_lock_table_for_mysql(
       
 13471  					prebuilt->select_lock_type */
       
 13472  	ulint		mode)		/*!< in: lock mode of table
       
 13473  					(ignored if table==NULL) */
       
 13474 -	__attribute__((nonnull(1)));
       
 13475 +	MY_ATTRIBUTE((nonnull(1)));
       
 13476  /*********************************************************************//**
       
 13477  Does an insert for MySQL.
       
 13478  @return	error code or DB_SUCCESS */
       
 13479 @@ -236,7 +236,7 @@ row_insert_for_mysql(
       
 13480  	byte*		mysql_rec,	/*!< in: row in the MySQL format */
       
 13481  	row_prebuilt_t*	prebuilt)	/*!< in: prebuilt struct in MySQL
       
 13482  					handle */
       
 13483 -	__attribute__((nonnull, warn_unused_result));
       
 13484 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13485  /*********************************************************************//**
       
 13486  Builds a dummy query graph used in selects. */
       
 13487  UNIV_INTERN
       
 13488 @@ -276,7 +276,7 @@ row_update_for_mysql(
       
 13489  					the MySQL format */
       
 13490  	row_prebuilt_t*	prebuilt)	/*!< in: prebuilt struct in MySQL
       
 13491  					handle */
       
 13492 -	__attribute__((nonnull, warn_unused_result));
       
 13493 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13494  /*********************************************************************//**
       
 13495  This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
       
 13496  session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
       
 13497 @@ -297,7 +297,7 @@ row_unlock_for_mysql(
       
 13498  					the records under pcur and
       
 13499  					clust_pcur, and we do not need
       
 13500  					to reposition the cursors. */
       
 13501 -	__attribute__((nonnull));
       
 13502 +	MY_ATTRIBUTE((nonnull));
       
 13503  /*********************************************************************//**
       
 13504  Checks if a table name contains the string "/#sql" which denotes temporary
       
 13505  tables in MySQL.
       
 13506 @@ -306,7 +306,7 @@ UNIV_INTERN
       
 13507  bool
       
 13508  row_is_mysql_tmp_table_name(
       
 13509  /*========================*/
       
 13510 -	const char*	name) __attribute__((warn_unused_result));
       
 13511 +	const char*	name) MY_ATTRIBUTE((warn_unused_result));
       
 13512  				/*!< in: table name in the form
       
 13513  				'database/tablename' */
       
 13514  
       
 13515 @@ -331,7 +331,7 @@ row_update_cascade_for_mysql(
       
 13516  	upd_node_t*	node,	/*!< in: update node used in the cascade
       
 13517  				or set null operation */
       
 13518  	dict_table_t*	table)	/*!< in: table where we do the operation */
       
 13519 -	__attribute__((nonnull, warn_unused_result));
       
 13520 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13521  /*********************************************************************//**
       
 13522  Locks the data dictionary exclusively for performing a table create or other
       
 13523  data dictionary modification operation. */
       
 13524 @@ -387,7 +387,7 @@ row_create_table_for_mysql(
       
 13525  				added to the data dictionary cache) */
       
 13526  	trx_t*		trx,	/*!< in/out: transaction */
       
 13527  	bool		commit)	/*!< in: if true, commit the transaction */
       
 13528 -	__attribute__((nonnull, warn_unused_result));
       
 13529 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13530  /*********************************************************************//**
       
 13531  Does an index creation operation for MySQL. TODO: currently failure
       
 13532  to create an index results in dropping the whole table! This is no problem
       
 13533 @@ -406,7 +406,7 @@ row_create_index_for_mysql(
       
 13534  					index columns, which are
       
 13535  					then checked for not being too
       
 13536  					large. */
       
 13537 -	__attribute__((nonnull(1,2), warn_unused_result));
       
 13538 +	MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
       
 13539  /*********************************************************************//**
       
 13540  Scans a table create SQL string and adds to the data dictionary
       
 13541  the foreign key constraints declared in the string. This function
       
 13542 @@ -432,7 +432,7 @@ row_table_add_foreign_constraints(
       
 13543  	ibool		reject_fks)	/*!< in: if TRUE, fail with error
       
 13544  					code DB_CANNOT_ADD_CONSTRAINT if
       
 13545  					any foreign keys are found. */
       
 13546 -	__attribute__((nonnull, warn_unused_result));
       
 13547 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13548  /*********************************************************************//**
       
 13549  The master thread in srv0srv.cc calls this regularly to drop tables which
       
 13550  we must drop in background after queries to them have ended. Such lazy
       
 13551 @@ -461,7 +461,7 @@ row_mysql_lock_table(
       
 13552  	dict_table_t*	table,		/*!< in: table to lock */
       
 13553  	enum lock_mode	mode,		/*!< in: LOCK_X or LOCK_S */
       
 13554  	const char*	op_info)	/*!< in: string for trx->op_info */
       
 13555 -	__attribute__((nonnull, warn_unused_result));
       
 13556 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13557  
       
 13558  /*********************************************************************//**
       
 13559  Truncates a table for MySQL.
       
 13560 @@ -472,7 +472,7 @@ row_truncate_table_for_mysql(
       
 13561  /*=========================*/
       
 13562  	dict_table_t*	table,	/*!< in: table handle */
       
 13563  	trx_t*		trx)	/*!< in: transaction handle */
       
 13564 -	__attribute__((nonnull, warn_unused_result));
       
 13565 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13566  /*********************************************************************//**
       
 13567  Drops a table for MySQL.  If the name of the dropped table ends in
       
 13568  one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
       
 13569 @@ -491,7 +491,7 @@ row_drop_table_for_mysql(
       
 13570  	bool		nonatomic = true)
       
 13571  				/*!< in: whether it is permitted
       
 13572  				to release and reacquire dict_operation_lock */
       
 13573 -	__attribute__((nonnull));
       
 13574 +	MY_ATTRIBUTE((nonnull));
       
 13575  /*********************************************************************//**
       
 13576  Drop all temporary tables during crash recovery. */
       
 13577  UNIV_INTERN
       
 13578 @@ -510,7 +510,7 @@ row_discard_tablespace_for_mysql(
       
 13579  /*=============================*/
       
 13580  	const char*	name,	/*!< in: table name */
       
 13581  	trx_t*		trx)	/*!< in: transaction handle */
       
 13582 -	__attribute__((nonnull, warn_unused_result));
       
 13583 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13584  /*****************************************************************//**
       
 13585  Imports a tablespace. The space id in the .ibd file must match the space id
       
 13586  of the table in the data dictionary.
       
 13587 @@ -521,7 +521,7 @@ row_import_tablespace_for_mysql(
       
 13588  /*============================*/
       
 13589  	dict_table_t*	table,		/*!< in/out: table */
       
 13590  	row_prebuilt_t*	prebuilt)	/*!< in: prebuilt struct in MySQL */
       
 13591 -        __attribute__((nonnull, warn_unused_result));
       
 13592 +        MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13593  /*********************************************************************//**
       
 13594  Drops a database for MySQL.
       
 13595  @return	error code or DB_SUCCESS */
       
 13596 @@ -531,7 +531,7 @@ row_drop_database_for_mysql(
       
 13597  /*========================*/
       
 13598  	const char*	name,	/*!< in: database name which ends to '/' */
       
 13599  	trx_t*		trx)	/*!< in: transaction handle */
       
 13600 -	__attribute__((nonnull));
       
 13601 +	MY_ATTRIBUTE((nonnull));
       
 13602  /*********************************************************************//**
       
 13603  Renames a table for MySQL.
       
 13604  @return	error code or DB_SUCCESS */
       
 13605 @@ -543,7 +543,7 @@ row_rename_table_for_mysql(
       
 13606  	const char*	new_name,	/*!< in: new table name */
       
 13607  	trx_t*		trx,		/*!< in/out: transaction */
       
 13608  	bool		commit)		/*!< in: whether to commit trx */
       
 13609 -	__attribute__((nonnull, warn_unused_result));
       
 13610 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13611  /*********************************************************************//**
       
 13612  Checks that the index contains entries in an ascending order, unique
       
 13613  constraint is not broken, and calculates the number of index entries
       
 13614 @@ -558,7 +558,7 @@ row_check_index_for_mysql(
       
 13615  	const dict_index_t*	index,		/*!< in: index */
       
 13616  	ulint*			n_rows)		/*!< out: number of entries
       
 13617  						seen in the consistent read */
       
 13618 -	__attribute__((nonnull, warn_unused_result));
       
 13619 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13620  /*********************************************************************//**
       
 13621  Determines if a table is a magic monitor table.
       
 13622  @return	true if monitor table */
       
 13623 @@ -568,7 +568,7 @@ row_is_magic_monitor_table(
       
 13624  /*=======================*/
       
 13625  	const char*	table_name)	/*!< in: name of the table, in the
       
 13626  					form database/table_name */
       
 13627 -	__attribute__((nonnull, warn_unused_result));
       
 13628 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13629  /*********************************************************************//**
       
 13630  Initialize this module */
       
 13631  UNIV_INTERN
       
 13632 @@ -593,7 +593,7 @@ row_mysql_table_id_reassign(
       
 13633  	dict_table_t*	table,	/*!< in/out: table */
       
 13634  	trx_t*		trx,	/*!< in/out: transaction */
       
 13635  	table_id_t*	new_id) /*!< out: new table id */
       
 13636 -        __attribute__((nonnull, warn_unused_result));
       
 13637 +        MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13638  
       
 13639  /* A struct describing a place for an individual column in the MySQL
       
 13640  row format which is presented to the table handler in ha_innobase.
       
 13641 --- a/storage/innobase/include/row0purge.h
       
 13642 +++ b/storage/innobase/include/row0purge.h
       
 13643 @@ -1,6 +1,6 @@
       
 13644  /*****************************************************************************
       
 13645  
       
 13646 -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 13647 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13648  
       
 13649  This program is free software; you can redistribute it and/or modify it under
       
 13650  the terms of the GNU General Public License as published by the Free Software
       
 13651 @@ -47,7 +47,7 @@ row_purge_node_create(
       
 13652  	que_thr_t*	parent,		/*!< in: parent node, i.e., a
       
 13653  					thr node */
       
 13654  	mem_heap_t*	heap)		/*!< in: memory heap where created */
       
 13655 -	__attribute__((nonnull, warn_unused_result));
       
 13656 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13657  /***********************************************************//**
       
 13658  Determines if it is possible to remove a secondary index entry.
       
 13659  Removal is possible if the secondary index entry does not refer to any
       
 13660 @@ -70,7 +70,7 @@ row_purge_poss_sec(
       
 13661  	purge_node_t*	node,	/*!< in/out: row purge node */
       
 13662  	dict_index_t*	index,	/*!< in: secondary index */
       
 13663  	const dtuple_t*	entry)	/*!< in: secondary index entry */
       
 13664 -	__attribute__((nonnull, warn_unused_result));
       
 13665 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13666  /***************************************************************
       
 13667  Does the purge operation for a single undo log record. This is a high-level
       
 13668  function used in an SQL execution graph.
       
 13669 @@ -80,7 +80,7 @@ que_thr_t*
       
 13670  row_purge_step(
       
 13671  /*===========*/
       
 13672  	que_thr_t*	thr)	/*!< in: query thread */
       
 13673 -	__attribute__((nonnull, warn_unused_result));
       
 13674 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13675  
       
 13676  /* Purge node structure */
       
 13677  
       
 13678 --- a/storage/innobase/include/row0quiesce.h
       
 13679 +++ b/storage/innobase/include/row0quiesce.h
       
 13680 @@ -1,6 +1,6 @@
       
 13681  /*****************************************************************************
       
 13682  
       
 13683 -Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13684 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13685  
       
 13686  This program is free software; you can redistribute it and/or modify it under
       
 13687  the terms of the GNU General Public License as published by the Free Software
       
 13688 @@ -43,7 +43,7 @@ row_quiesce_table_start(
       
 13689  /*====================*/
       
 13690  	dict_table_t*	table,		/*!< in: quiesce this table */
       
 13691  	trx_t*		trx)		/*!< in/out: transaction/session */
       
 13692 -        __attribute__((nonnull));
       
 13693 +        MY_ATTRIBUTE((nonnull));
       
 13694  
       
 13695  /*********************************************************************//**
       
 13696  Set a table's quiesce state.
       
 13697 @@ -55,7 +55,7 @@ row_quiesce_set_state(
       
 13698  	dict_table_t*	table,		/*!< in: quiesce this table */
       
 13699  	ib_quiesce_t	state,		/*!< in: quiesce state to set */
       
 13700  	trx_t*		trx)		/*!< in/out: transaction */
       
 13701 -        __attribute__((nonnull, warn_unused_result));
       
 13702 +        MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13703  
       
 13704  /*********************************************************************//**
       
 13705  Cleanup after table quiesce. */
       
 13706 @@ -65,7 +65,7 @@ row_quiesce_table_complete(
       
 13707  /*=======================*/
       
 13708  	dict_table_t*	table,		/*!< in: quiesce this table */
       
 13709  	trx_t*		trx)		/*!< in/out: transaction/session */
       
 13710 -        __attribute__((nonnull));
       
 13711 +        MY_ATTRIBUTE((nonnull));
       
 13712  
       
 13713  #ifndef UNIV_NONINL
       
 13714  #include "row0quiesce.ic"
       
 13715 --- a/storage/innobase/include/row0row.h
       
 13716 +++ b/storage/innobase/include/row0row.h
       
 13717 @@ -1,6 +1,6 @@
       
 13718  /*****************************************************************************
       
 13719  
       
 13720 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13721 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13722  
       
 13723  This program is free software; you can redistribute it and/or modify it under
       
 13724  the terms of the GNU General Public License as published by the Free Software
       
 13725 @@ -47,7 +47,7 @@ row_get_trx_id_offset(
       
 13726  /*==================*/
       
 13727  	const dict_index_t*	index,	/*!< in: clustered index */
       
 13728  	const ulint*		offsets)/*!< in: record offsets */
       
 13729 -	__attribute__((nonnull, warn_unused_result));
       
 13730 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13731  /*********************************************************************//**
       
 13732  Reads the trx id field from a clustered index record.
       
 13733  @return	value of the field */
       
 13734 @@ -58,7 +58,7 @@ row_get_rec_trx_id(
       
 13735  	const rec_t*		rec,	/*!< in: record */
       
 13736  	const dict_index_t*	index,	/*!< in: clustered index */
       
 13737  	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
       
 13738 -	__attribute__((nonnull, warn_unused_result));
       
 13739 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13740  /*********************************************************************//**
       
 13741  Reads the roll pointer field from a clustered index record.
       
 13742  @return	value of the field */
       
 13743 @@ -69,7 +69,7 @@ row_get_rec_roll_ptr(
       
 13744  	const rec_t*		rec,	/*!< in: record */
       
 13745  	const dict_index_t*	index,	/*!< in: clustered index */
       
 13746  	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
       
 13747 -	__attribute__((nonnull, warn_unused_result));
       
 13748 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13749  /*****************************************************************//**
       
 13750  When an insert or purge to a table is performed, this function builds
       
 13751  the entry to be inserted into or purged from an index on the table.
       
 13752 @@ -88,7 +88,7 @@ row_build_index_entry_low(
       
 13753  	mem_heap_t*		heap)	/*!< in: memory heap from which
       
 13754  					the memory for the index entry
       
 13755  					is allocated */
       
 13756 -	__attribute__((warn_unused_result, nonnull(1,3,4)));
       
 13757 +	MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
       
 13758  /*****************************************************************//**
       
 13759  When an insert or purge to a table is performed, this function builds
       
 13760  the entry to be inserted into or purged from an index on the table.
       
 13761 @@ -107,7 +107,7 @@ row_build_index_entry(
       
 13762  	mem_heap_t*		heap)	/*!< in: memory heap from which
       
 13763  					the memory for the index entry
       
 13764  					is allocated */
       
 13765 -	__attribute__((warn_unused_result, nonnull(1,3,4)));
       
 13766 +	MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
       
 13767  /*******************************************************************//**
       
 13768  An inverse function to row_build_index_entry. Builds a row from a
       
 13769  record in a clustered index.
       
 13770 @@ -155,7 +155,7 @@ row_build(
       
 13771  					prefixes, or NULL */
       
 13772  	mem_heap_t*		heap)	/*!< in: memory heap from which
       
 13773  					the memory needed is allocated */
       
 13774 -	__attribute__((nonnull(2,3,9)));
       
 13775 +	MY_ATTRIBUTE((nonnull(2,3,9)));
       
 13776  /*******************************************************************//**
       
 13777  Converts an index record to a typed data tuple.
       
 13778  @return index entry built; does not set info_bits, and the data fields
       
 13779 @@ -171,7 +171,7 @@ row_rec_to_index_entry_low(
       
 13780  					stored columns */
       
 13781  	mem_heap_t*		heap)	/*!< in: memory heap from which
       
 13782  					the memory needed is allocated */
       
 13783 -	__attribute__((nonnull, warn_unused_result));
       
 13784 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13785  /*******************************************************************//**
       
 13786  Converts an index record to a typed data tuple. NOTE that externally
       
 13787  stored (often big) fields are NOT copied to heap.
       
 13788 @@ -187,7 +187,7 @@ row_rec_to_index_entry(
       
 13789  					stored columns */
       
 13790  	mem_heap_t*		heap)	/*!< in: memory heap from which
       
 13791  					the memory needed is allocated */
       
 13792 -	__attribute__((nonnull, warn_unused_result));
       
 13793 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13794  /*******************************************************************//**
       
 13795  Builds from a secondary index record a row reference with which we can
       
 13796  search the clustered index record.
       
 13797 @@ -210,7 +210,7 @@ row_build_row_ref(
       
 13798  				as long as the row reference is used! */
       
 13799  	mem_heap_t*	heap)	/*!< in: memory heap from which the memory
       
 13800  				needed is allocated */
       
 13801 -	__attribute__((nonnull, warn_unused_result));
       
 13802 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13803  /*******************************************************************//**
       
 13804  Builds from a secondary index record a row reference with which we can
       
 13805  search the clustered index record. */
       
 13806 @@ -232,7 +232,7 @@ row_build_row_ref_in_tuple(
       
 13807  	ulint*			offsets,/*!< in: rec_get_offsets(rec, index)
       
 13808  					or NULL */
       
 13809  	trx_t*			trx)	/*!< in: transaction or NULL */
       
 13810 -	__attribute__((nonnull(1,2,3)));
       
 13811 +	MY_ATTRIBUTE((nonnull(1,2,3)));
       
 13812  /*******************************************************************//**
       
 13813  Builds from a secondary index record a row reference with which we can
       
 13814  search the clustered index record. */
       
 13815 @@ -263,7 +263,7 @@ row_search_on_row_ref(
       
 13816  	const dict_table_t*	table,	/*!< in: table */
       
 13817  	const dtuple_t*		ref,	/*!< in: row reference */
       
 13818  	mtr_t*			mtr)	/*!< in/out: mtr */
       
 13819 -	__attribute__((nonnull, warn_unused_result));
       
 13820 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13821  /*********************************************************************//**
       
 13822  Fetches the clustered index record for a secondary index record. The latches
       
 13823  on the secondary index record are preserved.
       
 13824 @@ -277,7 +277,7 @@ row_get_clust_rec(
       
 13825  	dict_index_t*	index,	/*!< in: secondary index */
       
 13826  	dict_index_t**	clust_index,/*!< out: clustered index */
       
 13827  	mtr_t*		mtr)	/*!< in: mtr */
       
 13828 -	__attribute__((nonnull, warn_unused_result));
       
 13829 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13830  
       
 13831  /** Result of row_search_index_entry */
       
 13832  enum row_search_result {
       
 13833 @@ -305,7 +305,7 @@ row_search_index_entry(
       
 13834  	btr_pcur_t*	pcur,	/*!< in/out: persistent cursor, which must
       
 13835  				be closed by the caller */
       
 13836  	mtr_t*		mtr)	/*!< in: mtr */
       
 13837 -	__attribute__((nonnull, warn_unused_result));
       
 13838 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13839  
       
 13840  #define ROW_COPY_DATA		1
       
 13841  #define ROW_COPY_POINTERS	2
       
 13842 @@ -334,7 +334,7 @@ row_raw_format(
       
 13843  	char*			buf,		/*!< out: output buffer */
       
 13844  	ulint			buf_size)	/*!< in: output buffer size
       
 13845  						in bytes */
       
 13846 -	__attribute__((nonnull, warn_unused_result));
       
 13847 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13848  
       
 13849  #ifndef UNIV_NONINL
       
 13850  #include "row0row.ic"
       
 13851 --- a/storage/innobase/include/row0sel.h
       
 13852 +++ b/storage/innobase/include/row0sel.h
       
 13853 @@ -1,6 +1,6 @@
       
 13854  /*****************************************************************************
       
 13855  
       
 13856 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13857 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13858  
       
 13859  This program is free software; you can redistribute it and/or modify it under
       
 13860  the terms of the GNU General Public License as published by the Free Software
       
 13861 @@ -168,7 +168,7 @@ row_search_for_mysql(
       
 13862  					then prebuilt must have a pcur
       
 13863  					with stored position! In opening of a
       
 13864  					cursor 'direction' should be 0. */
       
 13865 -	__attribute__((nonnull, warn_unused_result));
       
 13866 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13867  /*******************************************************************//**
       
 13868  Checks if MySQL at the moment is allowed for this table to retrieve a
       
 13869  consistent read result, or store it to the query cache.
       
 13870 @@ -190,7 +190,7 @@ row_search_max_autoinc(
       
 13871  	dict_index_t*	index,		/*!< in: index to search */
       
 13872  	const char*	col_name,	/*!< in: autoinc column name */
       
 13873  	ib_uint64_t*	value)		/*!< out: AUTOINC value read */
       
 13874 -	__attribute__((nonnull, warn_unused_result));
       
 13875 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13876  
       
 13877  /** A structure for caching column values for prefetched rows */
       
 13878  struct sel_buf_t{
       
 13879 --- a/storage/innobase/include/row0uins.h
       
 13880 +++ b/storage/innobase/include/row0uins.h
       
 13881 @@ -1,6 +1,6 @@
       
 13882  /*****************************************************************************
       
 13883  
       
 13884 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13885 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13886  
       
 13887  This program is free software; you can redistribute it and/or modify it under
       
 13888  the terms of the GNU General Public License as published by the Free Software
       
 13889 @@ -46,7 +46,7 @@ dberr_t
       
 13890  row_undo_ins(
       
 13891  /*=========*/
       
 13892  	undo_node_t*	node)	/*!< in: row undo node */
       
 13893 -	__attribute__((nonnull, warn_unused_result));
       
 13894 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13895  #ifndef UNIV_NONINL
       
 13896  #include "row0uins.ic"
       
 13897  #endif
       
 13898 --- a/storage/innobase/include/row0umod.h
       
 13899 +++ b/storage/innobase/include/row0umod.h
       
 13900 @@ -1,6 +1,6 @@
       
 13901  /*****************************************************************************
       
 13902  
       
 13903 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13904 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13905  
       
 13906  This program is free software; you can redistribute it and/or modify it under
       
 13907  the terms of the GNU General Public License as published by the Free Software
       
 13908 @@ -43,7 +43,7 @@ row_undo_mod(
       
 13909  /*=========*/
       
 13910  	undo_node_t*	node,	/*!< in: row undo node */
       
 13911  	que_thr_t*	thr)	/*!< in: query thread */
       
 13912 -	__attribute__((nonnull, warn_unused_result));
       
 13913 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13914  
       
 13915  #ifndef UNIV_NONINL
       
 13916  #include "row0umod.ic"
       
 13917 --- a/storage/innobase/include/row0upd.h
       
 13918 +++ b/storage/innobase/include/row0upd.h
       
 13919 @@ -1,6 +1,6 @@
       
 13920  /*****************************************************************************
       
 13921  
       
 13922 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 13923 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 13924  
       
 13925  This program is free software; you can redistribute it and/or modify it under
       
 13926  the terms of the GNU General Public License as published by the Free Software
       
 13927 @@ -91,7 +91,7 @@ upd_get_field_by_field_no(
       
 13928  /*======================*/
       
 13929  	const upd_t*	update,	/*!< in: update vector */
       
 13930  	ulint		no)	/*!< in: field_no */
       
 13931 -	__attribute__((nonnull, pure));
       
 13932 +	MY_ATTRIBUTE((nonnull, pure));
       
 13933  /*********************************************************************//**
       
 13934  Writes into the redo log the values of trx id and roll ptr and enough info
       
 13935  to determine their positions within a clustered index record.
       
 13936 @@ -174,7 +174,7 @@ bool
       
 13937  row_upd_changes_disowned_external(
       
 13938  /*==============================*/
       
 13939  	const upd_t*	update)	/*!< in: update vector */
       
 13940 -	__attribute__((nonnull, warn_unused_result));
       
 13941 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13942  #endif /* !UNIV_HOTBACKUP */
       
 13943  /***********************************************************//**
       
 13944  Replaces the new column values stored in the update vector to the
       
 13945 @@ -207,7 +207,7 @@ row_upd_build_sec_rec_difference_binary(
       
 13946  	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
       
 13947  	const dtuple_t*	entry,	/*!< in: entry to insert */
       
 13948  	mem_heap_t*	heap)	/*!< in: memory heap from which allocated */
       
 13949 -	__attribute__((warn_unused_result, nonnull));
       
 13950 +	MY_ATTRIBUTE((warn_unused_result, nonnull));
       
 13951  /***************************************************************//**
       
 13952  Builds an update vector from those fields, excluding the roll ptr and
       
 13953  trx id fields, which in an index entry differ from a record that has
       
 13954 @@ -227,7 +227,7 @@ row_upd_build_difference_binary(
       
 13955  	trx_t*		trx,	/*!< in: transaction (for diagnostics),
       
 13956  				or NULL */
       
 13957  	mem_heap_t*	heap)	/*!< in: memory heap from which allocated */
       
 13958 -	__attribute__((nonnull(1,2,3,7), warn_unused_result));
       
 13959 +	MY_ATTRIBUTE((nonnull(1,2,3,7), warn_unused_result));
       
 13960  /***********************************************************//**
       
 13961  Replaces the new column values stored in the update vector to the index entry
       
 13962  given. */
       
 13963 @@ -250,7 +250,7 @@ row_upd_index_replace_new_col_vals_index_pos(
       
 13964  				does not work for non-clustered indexes. */
       
 13965  	mem_heap_t*	heap)	/*!< in: memory heap for allocating and
       
 13966  				copying the new values */
       
 13967 -	__attribute__((nonnull));
       
 13968 +	MY_ATTRIBUTE((nonnull));
       
 13969  /***********************************************************//**
       
 13970  Replaces the new column values stored in the update vector to the index entry
       
 13971  given. */
       
 13972 @@ -269,7 +269,7 @@ row_upd_index_replace_new_col_vals(
       
 13973  				an upd_field is the clustered index position */
       
 13974  	mem_heap_t*	heap)	/*!< in: memory heap for allocating and
       
 13975  				copying the new values */
       
 13976 -	__attribute__((nonnull));
       
 13977 +	MY_ATTRIBUTE((nonnull));
       
 13978  /***********************************************************//**
       
 13979  Replaces the new column values stored in the update vector. */
       
 13980  UNIV_INTERN
       
 13981 @@ -311,7 +311,7 @@ row_upd_changes_ord_field_binary_func(
       
 13982  				compile time */
       
 13983  	const row_ext_t*ext)	/*!< NULL, or prefixes of the externally
       
 13984  				stored columns in the old row */
       
 13985 -	__attribute__((nonnull(1,2), warn_unused_result));
       
 13986 +	MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
       
 13987  #ifdef UNIV_DEBUG
       
 13988  # define row_upd_changes_ord_field_binary(index,update,thr,row,ext)	\
       
 13989  	row_upd_changes_ord_field_binary_func(index,update,thr,row,ext)
       
 13990 @@ -338,7 +338,7 @@ row_upd_changes_doc_id(
       
 13991  /*===================*/
       
 13992  	dict_table_t*	table,		/*!< in: table */
       
 13993  	upd_field_t*	upd_field)	/*!< in: field to check */
       
 13994 -	__attribute__((nonnull, warn_unused_result));
       
 13995 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 13996  /***********************************************************//**
       
 13997  Checks if an update vector changes an ordering field of an index record.
       
 13998  This function is fast if the update vector is short or the number of ordering
       
 13999 --- a/storage/innobase/include/row0vers.h
       
 14000 +++ b/storage/innobase/include/row0vers.h
       
 14001 @@ -1,6 +1,6 @@
       
 14002  /*****************************************************************************
       
 14003  
       
 14004 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 14005 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14006  
       
 14007  This program is free software; you can redistribute it and/or modify it under
       
 14008  the terms of the GNU General Public License as published by the Free Software
       
 14009 @@ -110,7 +110,7 @@ row_vers_build_for_consistent_read(
       
 14010  				if the history is missing or the record
       
 14011  				does not exist in the view, that is,
       
 14012  				it was freshly inserted afterwards */
       
 14013 -	__attribute__((nonnull(1,2,3,4,5,6,7)));
       
 14014 +	MY_ATTRIBUTE((nonnull(1,2,3,4,5,6,7)));
       
 14015  
       
 14016  /*****************************************************************//**
       
 14017  Constructs the last committed version of a clustered index record,
       
 14018 @@ -136,7 +136,7 @@ row_vers_build_for_semi_consistent_read(
       
 14019  	const rec_t**	old_vers)/*!< out: rec, old version, or NULL if the
       
 14020  				record does not exist in the view, that is,
       
 14021  				it was freshly inserted afterwards */
       
 14022 -	__attribute__((nonnull(1,2,3,4,5)));
       
 14023 +	MY_ATTRIBUTE((nonnull(1,2,3,4,5)));
       
 14024  
       
 14025  
       
 14026  #ifndef UNIV_NONINL
       
 14027 --- a/storage/innobase/include/srv0srv.h
       
 14028 +++ b/storage/innobase/include/srv0srv.h
       
 14029 @@ -1,6 +1,6 @@
       
 14030  /*****************************************************************************
       
 14031  
       
 14032 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
       
 14033 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
       
 14034  Copyright (c) 2008, 2009, Google Inc.
       
 14035  Copyright (c) 2009, Percona Inc.
       
 14036  
       
 14037 @@ -734,7 +734,7 @@ UNIV_INTERN
       
 14038  os_thread_ret_t
       
 14039  DECLARE_THREAD(srv_purge_coordinator_thread)(
       
 14040  /*=========================================*/
       
 14041 -	void*	arg __attribute__((unused)));	/*!< in: a dummy parameter
       
 14042 +	void*	arg MY_ATTRIBUTE((unused)));	/*!< in: a dummy parameter
       
 14043  						required by os_thread_create */
       
 14044  
       
 14045  /*********************************************************************//**
       
 14046 @@ -744,7 +744,7 @@ UNIV_INTERN
       
 14047  os_thread_ret_t
       
 14048  DECLARE_THREAD(srv_worker_thread)(
       
 14049  /*==============================*/
       
 14050 -	void*	arg __attribute__((unused)));	/*!< in: a dummy parameter
       
 14051 +	void*	arg MY_ATTRIBUTE((unused)));	/*!< in: a dummy parameter
       
 14052  						required by os_thread_create */
       
 14053  } /* extern "C" */
       
 14054  
       
 14055 --- a/storage/innobase/include/srv0start.h
       
 14056 +++ b/storage/innobase/include/srv0start.h
       
 14057 @@ -1,6 +1,6 @@
       
 14058  /*****************************************************************************
       
 14059  
       
 14060 -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 14061 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14062  
       
 14063  This program is free software; you can redistribute it and/or modify it under
       
 14064  the terms of the GNU General Public License as published by the Free Software
       
 14065 @@ -105,7 +105,7 @@ srv_path_copy(
       
 14066  	ulint		dest_len,	/*!< in: max bytes to copy */
       
 14067  	const char*	basedir,	/*!< in: base directory */
       
 14068  	const char*	table_name)	/*!< in: source table name */
       
 14069 -	__attribute__((nonnull, warn_unused_result));
       
 14070 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14071  
       
 14072  /*****************************************************************//**
       
 14073  Get the meta-data filename from the table name. */
       
 14074 @@ -116,7 +116,7 @@ srv_get_meta_data_filename(
       
 14075  	dict_table_t*	table,		/*!< in: table */
       
 14076  	char*			filename,	/*!< out: filename */
       
 14077  	ulint			max_len)	/*!< in: filename max length */
       
 14078 -	__attribute__((nonnull));
       
 14079 +	MY_ATTRIBUTE((nonnull));
       
 14080  
       
 14081  /** Log sequence number at shutdown */
       
 14082  extern	lsn_t	srv_shutdown_lsn;
       
 14083 --- a/storage/innobase/include/sync0arr.h
       
 14084 +++ b/storage/innobase/include/sync0arr.h
       
 14085 @@ -1,6 +1,6 @@
       
 14086  /*****************************************************************************
       
 14087  
       
 14088 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14089 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14090  
       
 14091  This program is free software; you can redistribute it and/or modify it under
       
 14092  the terms of the GNU General Public License as published by the Free Software
       
 14093 @@ -110,7 +110,7 @@ sync_array_print_long_waits(
       
 14094  /*========================*/
       
 14095  	os_thread_id_t*	waiter,	/*!< out: longest waiting thread */
       
 14096  	const void**	sema)	/*!< out: longest-waited-for semaphore */
       
 14097 -	__attribute__((nonnull));
       
 14098 +	MY_ATTRIBUTE((nonnull));
       
 14099  /********************************************************************//**
       
 14100  Validates the integrity of the wait array. Checks
       
 14101  that the number of reserved cells equals the count variable. */
       
 14102 --- a/storage/innobase/include/sync0rw.h
       
 14103 +++ b/storage/innobase/include/sync0rw.h
       
 14104 @@ -1,6 +1,6 @@
       
 14105  /*****************************************************************************
       
 14106  
       
 14107 -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 14108 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14109  Copyright (c) 2008, Google Inc.
       
 14110  
       
 14111  Portions of this file contain modifications contributed and copyrighted by
       
 14112 @@ -333,7 +333,7 @@ ibool
       
 14113  rw_lock_s_lock_low(
       
 14114  /*===============*/
       
 14115  	rw_lock_t*	lock,	/*!< in: pointer to rw-lock */
       
 14116 -	ulint		pass __attribute__((unused)),
       
 14117 +	ulint		pass MY_ATTRIBUTE((unused)),
       
 14118  				/*!< in: pass value; != 0, if the lock will be
       
 14119  				passed to another thread to unlock */
       
 14120  	const char*	file_name, /*!< in: file name where lock requested */
       
 14121 @@ -501,7 +501,7 @@ rw_lock_own(
       
 14122  	rw_lock_t*	lock,		/*!< in: rw-lock */
       
 14123  	ulint		lock_type)	/*!< in: lock type: RW_LOCK_SHARED,
       
 14124  					RW_LOCK_EX */
       
 14125 -	__attribute__((warn_unused_result));
       
 14126 +	MY_ATTRIBUTE((warn_unused_result));
       
 14127  #endif /* UNIV_SYNC_DEBUG */
       
 14128  /******************************************************************//**
       
 14129  Checks if somebody has locked the rw-lock in the specified mode. */
       
 14130 --- a/storage/innobase/include/sync0rw.ic
       
 14131 +++ b/storage/innobase/include/sync0rw.ic
       
 14132 @@ -1,6 +1,6 @@
       
 14133  /*****************************************************************************
       
 14134  
       
 14135 -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 14136 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14137  Copyright (c) 2008, Google Inc.
       
 14138  
       
 14139  Portions of this file contain modifications contributed and copyrighted by
       
 14140 @@ -306,7 +306,7 @@ ibool
       
 14141  rw_lock_s_lock_low(
       
 14142  /*===============*/
       
 14143  	rw_lock_t*	lock,	/*!< in: pointer to rw-lock */
       
 14144 -	ulint		pass __attribute__((unused)),
       
 14145 +	ulint		pass MY_ATTRIBUTE((unused)),
       
 14146  				/*!< in: pass value; != 0, if the lock will be
       
 14147  				passed to another thread to unlock */
       
 14148  	const char*	file_name, /*!< in: file name where lock requested */
       
 14149 --- a/storage/innobase/include/sync0sync.h
       
 14150 +++ b/storage/innobase/include/sync0sync.h
       
 14151 @@ -1,6 +1,6 @@
       
 14152  /*****************************************************************************
       
 14153  
       
 14154 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14155 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14156  Copyright (c) 2008, Google Inc.
       
 14157  Copyright (c) 2012, Facebook Inc.
       
 14158  
       
 14159 @@ -400,7 +400,7 @@ ibool
       
 14160  mutex_own(
       
 14161  /*======*/
       
 14162  	const ib_mutex_t*	mutex)	/*!< in: mutex */
       
 14163 -	__attribute__((warn_unused_result));
       
 14164 +	MY_ATTRIBUTE((warn_unused_result));
       
 14165  #endif /* UNIV_DEBUG */
       
 14166  #ifdef UNIV_SYNC_DEBUG
       
 14167  /******************************************************************//**
       
 14168 @@ -415,7 +415,7 @@ sync_thread_add_level(
       
 14169  	ulint	level,	/*!< in: level in the latching order; if
       
 14170  			SYNC_LEVEL_VARYING, nothing is done */
       
 14171  	ibool	relock)	/*!< in: TRUE if re-entering an x-lock */
       
 14172 -	__attribute__((nonnull));
       
 14173 +	MY_ATTRIBUTE((nonnull));
       
 14174  /******************************************************************//**
       
 14175  Removes a latch from the thread level array if it is found there.
       
 14176  @return TRUE if found in the array; it is no error if the latch is
       
 14177 @@ -445,7 +445,7 @@ sync_thread_levels_nonempty_gen(
       
 14178  /*============================*/
       
 14179  	ibool	dict_mutex_allowed)	/*!< in: TRUE if dictionary mutex is
       
 14180  					allowed to be owned by the thread */
       
 14181 -	__attribute__((warn_unused_result));
       
 14182 +	MY_ATTRIBUTE((warn_unused_result));
       
 14183  /******************************************************************//**
       
 14184  Checks if the level array for the current thread is empty,
       
 14185  except for data dictionary latches. */
       
 14186 @@ -462,7 +462,7 @@ sync_thread_levels_nonempty_trx(
       
 14187  	ibool	has_search_latch)
       
 14188  				/*!< in: TRUE if and only if the thread
       
 14189  				is supposed to hold btr_search_latch */
       
 14190 -	__attribute__((warn_unused_result));
       
 14191 +	MY_ATTRIBUTE((warn_unused_result));
       
 14192  
       
 14193  /******************************************************************//**
       
 14194  Gets the debug information for a reserved mutex. */
       
 14195 --- a/storage/innobase/include/trx0rec.h
       
 14196 +++ b/storage/innobase/include/trx0rec.h
       
 14197 @@ -1,6 +1,6 @@
       
 14198  /*****************************************************************************
       
 14199  
       
 14200 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14201 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14202  
       
 14203  This program is free software; you can redistribute it and/or modify it under
       
 14204  the terms of the GNU General Public License as published by the Free Software
       
 14205 @@ -86,7 +86,7 @@ ulint
       
 14206  trx_undo_rec_get_offset(
       
 14207  /*====================*/
       
 14208  	undo_no_t	undo_no)	/*!< in: undo no read from node */
       
 14209 -	__attribute__((const));
       
 14210 +	MY_ATTRIBUTE((const));
       
 14211  
       
 14212  /**********************************************************************//**
       
 14213  Returns the start of the undo record data area. */
       
 14214 @@ -109,7 +109,7 @@ trx_undo_rec_get_pars(
       
 14215  					externally stored fild */
       
 14216  	undo_no_t*	undo_no,	/*!< out: undo log record number */
       
 14217  	table_id_t*	table_id)	/*!< out: table id */
       
 14218 -	__attribute__((nonnull));
       
 14219 +	MY_ATTRIBUTE((nonnull));
       
 14220  /*******************************************************************//**
       
 14221  Builds a row reference from an undo log record.
       
 14222  @return	pointer to remaining part of undo record */
       
 14223 @@ -201,7 +201,7 @@ trx_undo_rec_get_partial_row(
       
 14224  				only in the assertion. */
       
 14225  	mem_heap_t*	heap)	/*!< in: memory heap from which the memory
       
 14226  				needed is allocated */
       
 14227 -	__attribute__((nonnull, warn_unused_result));
       
 14228 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14229  /***********************************************************************//**
       
 14230  Writes information to an undo log about an insert, update, or a delete marking
       
 14231  of a clustered index record. This information is used in a rollback of the
       
 14232 @@ -233,7 +233,7 @@ trx_undo_report_row_operation(
       
 14233  					inserted undo log record,
       
 14234  					0 if BTR_NO_UNDO_LOG
       
 14235  					flag was specified */
       
 14236 -	__attribute__((nonnull(3,4,10), warn_unused_result));
       
 14237 +	MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result));
       
 14238  /******************************************************************//**
       
 14239  Copies an undo record to heap. This function can be called if we know that
       
 14240  the undo log record exists.
       
 14241 @@ -244,7 +244,7 @@ trx_undo_get_undo_rec_low(
       
 14242  /*======================*/
       
 14243  	roll_ptr_t	roll_ptr,	/*!< in: roll pointer to record */
       
 14244  	mem_heap_t*	heap)		/*!< in: memory heap where copied */
       
 14245 -	__attribute__((nonnull, warn_unused_result));
       
 14246 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14247  /*******************************************************************//**
       
 14248  Build a previous version of a clustered index record. The caller must
       
 14249  hold a latch on the index page of the clustered index record.
       
 14250 @@ -268,7 +268,7 @@ trx_undo_prev_version_build(
       
 14251  	rec_t**		old_vers)/*!< out, own: previous version, or NULL if
       
 14252  				rec is the first inserted version, or if
       
 14253  				history data has been deleted */
       
 14254 -	__attribute__((nonnull));
       
 14255 +	MY_ATTRIBUTE((nonnull));
       
 14256  #endif /* !UNIV_HOTBACKUP */
       
 14257  /***********************************************************//**
       
 14258  Parses a redo log record of adding an undo log record.
       
 14259 --- a/storage/innobase/include/trx0roll.h
       
 14260 +++ b/storage/innobase/include/trx0roll.h
       
 14261 @@ -1,6 +1,6 @@
       
 14262  /*****************************************************************************
       
 14263  
       
 14264 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 14265 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14266  
       
 14267  This program is free software; you can redistribute it and/or modify it under
       
 14268  the terms of the GNU General Public License as published by the Free Software
       
 14269 @@ -125,7 +125,7 @@ extern "C" UNIV_INTERN
       
 14270  os_thread_ret_t
       
 14271  DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
       
 14272  /*================================================*/
       
 14273 -	void*	arg __attribute__((unused)));
       
 14274 +	void*	arg MY_ATTRIBUTE((unused)));
       
 14275  			/*!< in: a dummy parameter required by
       
 14276  			os_thread_create */
       
 14277  /*********************************************************************//**
       
 14278 @@ -152,7 +152,7 @@ dberr_t
       
 14279  trx_rollback_for_mysql(
       
 14280  /*===================*/
       
 14281  	trx_t*	trx)	/*!< in/out: transaction */
       
 14282 -	__attribute__((nonnull));
       
 14283 +	MY_ATTRIBUTE((nonnull));
       
 14284  /*******************************************************************//**
       
 14285  Rollback the latest SQL statement for MySQL.
       
 14286  @return	error code or DB_SUCCESS */
       
 14287 @@ -161,7 +161,7 @@ dberr_t
       
 14288  trx_rollback_last_sql_stat_for_mysql(
       
 14289  /*=================================*/
       
 14290  	trx_t*	trx)	/*!< in/out: transaction */
       
 14291 -	__attribute__((nonnull));
       
 14292 +	MY_ATTRIBUTE((nonnull));
       
 14293  /*******************************************************************//**
       
 14294  Rollback a transaction to a given savepoint or do a complete rollback.
       
 14295  @return	error code or DB_SUCCESS */
       
 14296 @@ -173,7 +173,7 @@ trx_rollback_to_savepoint(
       
 14297  	trx_savept_t*	savept)	/*!< in: pointer to savepoint undo number, if
       
 14298  				partial rollback requested, or NULL for
       
 14299  				complete rollback */
       
 14300 -	__attribute__((nonnull(1)));
       
 14301 +	MY_ATTRIBUTE((nonnull(1)));
       
 14302  /*******************************************************************//**
       
 14303  Rolls back a transaction back to a named savepoint. Modifications after the
       
 14304  savepoint are undone but InnoDB does NOT release the corresponding locks
       
 14305 @@ -195,7 +195,7 @@ trx_rollback_to_savepoint_for_mysql(
       
 14306  						information to remove the
       
 14307  						binlog entries of the queries
       
 14308  						executed after the savepoint */
       
 14309 -	__attribute__((nonnull, warn_unused_result));
       
 14310 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14311  /*******************************************************************//**
       
 14312  Creates a named savepoint. If the transaction is not yet started, starts it.
       
 14313  If there is already a savepoint of the same name, this call erases that old
       
 14314 @@ -212,7 +212,7 @@ trx_savepoint_for_mysql(
       
 14315  						position corresponding to this
       
 14316  						connection at the time of the
       
 14317  						savepoint */
       
 14318 -	__attribute__((nonnull));
       
 14319 +	MY_ATTRIBUTE((nonnull));
       
 14320  /*******************************************************************//**
       
 14321  Releases a named savepoint. Savepoints which
       
 14322  were set after this savepoint are deleted.
       
 14323 @@ -224,7 +224,7 @@ trx_release_savepoint_for_mysql(
       
 14324  /*============================*/
       
 14325  	trx_t*		trx,			/*!< in: transaction handle */
       
 14326  	const char*	savepoint_name)		/*!< in: savepoint name */
       
 14327 -	__attribute__((nonnull, warn_unused_result));
       
 14328 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14329  /*******************************************************************//**
       
 14330  Frees savepoint structs starting from savep. */
       
 14331  UNIV_INTERN
       
 14332 --- a/storage/innobase/include/trx0sys.h
       
 14333 +++ b/storage/innobase/include/trx0sys.h
       
 14334 @@ -1,6 +1,6 @@
       
 14335  /*****************************************************************************
       
 14336  
       
 14337 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 14338 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14339  
       
 14340  This program is free software; you can redistribute it and/or modify it under
       
 14341  the terms of the GNU General Public License as published by the Free Software
       
 14342 @@ -267,7 +267,7 @@ ibool
       
 14343  trx_in_trx_list(
       
 14344  /*============*/
       
 14345  	const trx_t*	in_trx)		/*!< in: transaction */
       
 14346 -	__attribute__((nonnull, warn_unused_result));
       
 14347 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14348  #endif /* UNIV_DEBUG */
       
 14349  #if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
       
 14350  /***********************************************************//**
       
 14351 @@ -278,7 +278,7 @@ ibool
       
 14352  trx_assert_recovered(
       
 14353  /*=================*/
       
 14354  	trx_id_t	trx_id)		/*!< in: transaction identifier */
       
 14355 -	__attribute__((warn_unused_result));
       
 14356 +	MY_ATTRIBUTE((warn_unused_result));
       
 14357  #endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
       
 14358  /*****************************************************************//**
       
 14359  Updates the offset information about the end of the MySQL binlog entry
       
 14360 --- a/storage/innobase/include/trx0trx.h
       
 14361 +++ b/storage/innobase/include/trx0trx.h
       
 14362 @@ -1,6 +1,6 @@
       
 14363  /*****************************************************************************
       
 14364  
       
 14365 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14366 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14367  
       
 14368  This program is free software; you can redistribute it and/or modify it under
       
 14369  the terms of the GNU General Public License as published by the Free Software
       
 14370 @@ -103,7 +103,7 @@ void
       
 14371  trx_free_prepared(
       
 14372  /*==============*/
       
 14373  	trx_t*	trx)	/*!< in, own: trx object */
       
 14374 -	UNIV_COLD __attribute__((nonnull));
       
 14375 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 14376  /********************************************************************//**
       
 14377  Frees a transaction object for MySQL. */
       
 14378  UNIV_INTERN
       
 14379 @@ -169,7 +169,7 @@ trx_start_for_ddl_low(
       
 14380  /*==================*/
       
 14381  	trx_t*		trx,	/*!< in/out: transaction */
       
 14382  	trx_dict_op_t	op)	/*!< in: dictionary operation type */
       
 14383 -	__attribute__((nonnull));
       
 14384 +	MY_ATTRIBUTE((nonnull));
       
 14385  
       
 14386  #ifdef UNIV_DEBUG
       
 14387  #define trx_start_for_ddl(t, o)					\
       
 14388 @@ -191,7 +191,7 @@ void
       
 14389  trx_commit(
       
 14390  /*=======*/
       
 14391  	trx_t*	trx)	/*!< in/out: transaction */
       
 14392 -	__attribute__((nonnull));
       
 14393 +	MY_ATTRIBUTE((nonnull));
       
 14394  /****************************************************************//**
       
 14395  Commits a transaction and a mini-transaction. */
       
 14396  UNIV_INTERN
       
 14397 @@ -201,7 +201,7 @@ trx_commit_low(
       
 14398  	trx_t*	trx,	/*!< in/out: transaction */
       
 14399  	mtr_t*	mtr)	/*!< in/out: mini-transaction (will be committed),
       
 14400  			or NULL if trx made no modifications */
       
 14401 -	__attribute__((nonnull(1)));
       
 14402 +	MY_ATTRIBUTE((nonnull(1)));
       
 14403  /****************************************************************//**
       
 14404  Cleans up a transaction at database startup. The cleanup is needed if
       
 14405  the transaction already got to the middle of a commit when the database
       
 14406 @@ -255,7 +255,7 @@ void
       
 14407  trx_commit_complete_for_mysql(
       
 14408  /*==========================*/
       
 14409  	trx_t*	trx)	/*!< in/out: transaction */
       
 14410 -	__attribute__((nonnull));
       
 14411 +	MY_ATTRIBUTE((nonnull));
       
 14412  /**********************************************************************//**
       
 14413  Marks the latest SQL statement ended. */
       
 14414  UNIV_INTERN
       
 14415 @@ -317,7 +317,7 @@ trx_print_low(
       
 14416  			/*!< in: length of trx->lock.trx_locks */
       
 14417  	ulint		heap_size)
       
 14418  			/*!< in: mem_heap_get_size(trx->lock.lock_heap) */
       
 14419 -	__attribute__((nonnull));
       
 14420 +	MY_ATTRIBUTE((nonnull));
       
 14421  
       
 14422  /**********************************************************************//**
       
 14423  Prints info about a transaction.
       
 14424 @@ -331,7 +331,7 @@ trx_print_latched(
       
 14425  	const trx_t*	trx,		/*!< in: transaction */
       
 14426  	ulint		max_query_len)	/*!< in: max query length to print,
       
 14427  					or 0 to use the default max length */
       
 14428 -	__attribute__((nonnull));
       
 14429 +	MY_ATTRIBUTE((nonnull));
       
 14430  
       
 14431  /**********************************************************************//**
       
 14432  Prints info about a transaction.
       
 14433 @@ -344,7 +344,7 @@ trx_print(
       
 14434  	const trx_t*	trx,		/*!< in: transaction */
       
 14435  	ulint		max_query_len)	/*!< in: max query length to print,
       
 14436  					or 0 to use the default max length */
       
 14437 -	__attribute__((nonnull));
       
 14438 +	MY_ATTRIBUTE((nonnull));
       
 14439  
       
 14440  /**********************************************************************//**
       
 14441  Determine if a transaction is a dictionary operation.
       
 14442 @@ -354,7 +354,7 @@ enum trx_dict_op_t
       
 14443  trx_get_dict_operation(
       
 14444  /*===================*/
       
 14445  	const trx_t*	trx)	/*!< in: transaction */
       
 14446 -	__attribute__((pure));
       
 14447 +	MY_ATTRIBUTE((pure));
       
 14448  /**********************************************************************//**
       
 14449  Flag a transaction a dictionary operation. */
       
 14450  UNIV_INLINE
       
 14451 @@ -383,7 +383,7 @@ trx_state_eq(
       
 14452  				if state != TRX_STATE_NOT_STARTED
       
 14453  				asserts that
       
 14454  				trx->state != TRX_STATE_NOT_STARTED */
       
 14455 -	__attribute__((nonnull, warn_unused_result));
       
 14456 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14457  # ifdef UNIV_DEBUG
       
 14458  /**********************************************************************//**
       
 14459  Asserts that a transaction has been started.
       
 14460 @@ -394,7 +394,7 @@ ibool
       
 14461  trx_assert_started(
       
 14462  /*===============*/
       
 14463  	const trx_t*	trx)	/*!< in: transaction */
       
 14464 -	__attribute__((nonnull, warn_unused_result));
       
 14465 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14466  # endif /* UNIV_DEBUG */
       
 14467  
       
 14468  /**********************************************************************//**
       
 14469 --- a/storage/innobase/include/trx0undo.h
       
 14470 +++ b/storage/innobase/include/trx0undo.h
       
 14471 @@ -1,6 +1,6 @@
       
 14472  /*****************************************************************************
       
 14473  
       
 14474 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14475 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14476  
       
 14477  This program is free software; you can redistribute it and/or modify it under
       
 14478  the terms of the GNU General Public License as published by the Free Software
       
 14479 @@ -73,7 +73,7 @@ bool
       
 14480  trx_undo_trx_id_is_insert(
       
 14481  /*======================*/
       
 14482  	const byte*	trx_id)	/*!< in: DB_TRX_ID, followed by DB_ROLL_PTR */
       
 14483 -	__attribute__((nonnull, pure, warn_unused_result));
       
 14484 +	MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
       
 14485  #endif /* !UNIV_HOTBACKUP */
       
 14486  /*****************************************************************//**
       
 14487  Writes a roll ptr to an index page. In case that the size changes in
       
 14488 @@ -214,7 +214,7 @@ trx_undo_add_page(
       
 14489  	mtr_t*		mtr)	/*!< in: mtr which does not have a latch to any
       
 14490  				undo log page; the caller must have reserved
       
 14491  				the rollback segment mutex */
       
 14492 -	__attribute__((nonnull, warn_unused_result));
       
 14493 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14494  /********************************************************************//**
       
 14495  Frees the last undo log page.
       
 14496  The caller must hold the rollback segment mutex. */
       
 14497 @@ -229,7 +229,7 @@ trx_undo_free_last_page_func(
       
 14498  	mtr_t*		mtr)	/*!< in/out: mini-transaction which does not
       
 14499  				have a latch to any undo log page or which
       
 14500  				has allocated the undo log page */
       
 14501 -	__attribute__((nonnull));
       
 14502 +	MY_ATTRIBUTE((nonnull));
       
 14503  #ifdef UNIV_DEBUG
       
 14504  # define trx_undo_free_last_page(trx,undo,mtr)	\
       
 14505  	trx_undo_free_last_page_func(trx,undo,mtr)
       
 14506 @@ -251,7 +251,7 @@ trx_undo_truncate_end_func(
       
 14507  	trx_undo_t*	undo,	/*!< in/out: undo log */
       
 14508  	undo_no_t	limit)	/*!< in: all undo records with undo number
       
 14509  				>= this value should be truncated */
       
 14510 -	__attribute__((nonnull));
       
 14511 +	MY_ATTRIBUTE((nonnull));
       
 14512  #ifdef UNIV_DEBUG
       
 14513  # define trx_undo_truncate_end(trx,undo,limit)		\
       
 14514  	trx_undo_truncate_end_func(trx,undo,limit)
       
 14515 @@ -300,7 +300,7 @@ trx_undo_assign_undo(
       
 14516  /*=================*/
       
 14517  	trx_t*		trx,	/*!< in: transaction */
       
 14518  	ulint		type)	/*!< in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
       
 14519 -	__attribute__((nonnull, warn_unused_result));
       
 14520 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14521  /******************************************************************//**
       
 14522  Sets the state of the undo log segment at a transaction finish.
       
 14523  @return	undo log segment header page, x-latched */
       
 14524 @@ -350,7 +350,7 @@ void
       
 14525  trx_undo_free_prepared(
       
 14526  /*===================*/
       
 14527  	trx_t*	trx)	/*!< in/out: PREPARED transaction */
       
 14528 -	UNIV_COLD __attribute__((nonnull));
       
 14529 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 14530  #endif /* !UNIV_HOTBACKUP */
       
 14531  /***********************************************************//**
       
 14532  Parses the redo log entry of an undo log page initialization.
       
 14533 --- a/storage/innobase/include/univ.i
       
 14534 +++ b/storage/innobase/include/univ.i
       
 14535 @@ -1,6 +1,6 @@
       
 14536  /*****************************************************************************
       
 14537  
       
 14538 -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14539 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14540  Copyright (c) 2008, Google Inc.
       
 14541  
       
 14542  Portions of this file contain modifications contributed and copyrighted by
       
 14543 @@ -249,7 +249,7 @@ that are only referenced from within InnoDB, not from MySQL. We disable the
       
 14544  GCC visibility directive on all Sun operating systems because there is no
       
 14545  easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */
       
 14546  #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(sun) || defined(__INTEL_COMPILER)
       
 14547 -# define UNIV_INTERN __attribute__((visibility ("hidden")))
       
 14548 +# define UNIV_INTERN MY_ATTRIBUTE((visibility ("hidden")))
       
 14549  #else
       
 14550  # define UNIV_INTERN
       
 14551  #endif
       
 14552 @@ -264,7 +264,7 @@ appears close together improving code locality of non-cold parts of
       
 14553  program.  The paths leading to call of cold functions within code are
       
 14554  marked as unlikely by the branch prediction mechanism.  optimize a
       
 14555  rarely invoked function for size instead for speed. */
       
 14556 -# define UNIV_COLD __attribute__((cold))
       
 14557 +# define UNIV_COLD MY_ATTRIBUTE((cold))
       
 14558  #else
       
 14559  # define UNIV_COLD /* empty */
       
 14560  #endif
       
 14561 @@ -528,7 +528,7 @@ contains the sum of the following flag and the locally stored len. */
       
 14562  #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
       
 14563  #define HAVE_GCC_GT_2
       
 14564  /* Tell the compiler that variable/function is unused. */
       
 14565 -# define UNIV_UNUSED    __attribute__ ((unused))
       
 14566 +# define UNIV_UNUSED    MY_ATTRIBUTE ((unused))
       
 14567  #else
       
 14568  # define UNIV_UNUSED
       
 14569  #endif /* CHECK FOR GCC VER_GT_2 */
       
 14570 --- a/storage/innobase/include/ut0byte.h
       
 14571 +++ b/storage/innobase/include/ut0byte.h
       
 14572 @@ -1,6 +1,6 @@
       
 14573  /*****************************************************************************
       
 14574  
       
 14575 -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
       
 14576 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14577  
       
 14578  This program is free software; you can redistribute it and/or modify it under
       
 14579  the terms of the GNU General Public License as published by the Free Software
       
 14580 @@ -39,7 +39,7 @@ ut_ull_create(
       
 14581  /*==========*/
       
 14582  	ulint	high,	/*!< in: high-order 32 bits */
       
 14583  	ulint	low)	/*!< in: low-order 32 bits */
       
 14584 -	__attribute__((const));
       
 14585 +	MY_ATTRIBUTE((const));
       
 14586  
       
 14587  /********************************************************//**
       
 14588  Rounds a 64-bit integer downward to a multiple of a power of 2.
       
 14589 @@ -80,7 +80,7 @@ ut_align_down(
       
 14590  /*==========*/
       
 14591  	const void*	ptr,		/*!< in: pointer */
       
 14592  	ulint		align_no)	/*!< in: align by this number */
       
 14593 -		__attribute__((const));
       
 14594 +		MY_ATTRIBUTE((const));
       
 14595  /*********************************************************//**
       
 14596  The following function computes the offset of a pointer from the nearest
       
 14597  aligned address.
       
 14598 @@ -91,7 +91,7 @@ ut_align_offset(
       
 14599  /*============*/
       
 14600  	const void*	ptr,		/*!< in: pointer */
       
 14601  	ulint		align_no)	/*!< in: align by this number */
       
 14602 -			__attribute__((const));
       
 14603 +			MY_ATTRIBUTE((const));
       
 14604  /*****************************************************************//**
       
 14605  Gets the nth bit of a ulint.
       
 14606  @return	TRUE if nth bit is 1; 0th bit is defined to be the least significant */
       
 14607 --- a/storage/innobase/include/ut0dbg.h
       
 14608 +++ b/storage/innobase/include/ut0dbg.h
       
 14609 @@ -1,6 +1,6 @@
       
 14610  /*****************************************************************************
       
 14611  
       
 14612 -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
       
 14613 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14614  
       
 14615  This program is free software; you can redistribute it and/or modify it under
       
 14616  the terms of the GNU General Public License as published by the Free Software
       
 14617 @@ -59,7 +59,7 @@ ut_dbg_assertion_failed(
       
 14618  	const char*	expr,	/*!< in: the failed assertion */
       
 14619  	const char*	file,	/*!< in: source file containing the assertion */
       
 14620  	ulint		line)	/*!< in: line number of the assertion */
       
 14621 -	UNIV_COLD __attribute__((nonnull(2)));
       
 14622 +	UNIV_COLD MY_ATTRIBUTE((nonnull(2)));
       
 14623  
       
 14624  /** Abort the execution. */
       
 14625  # define UT_DBG_PANIC abort()
       
 14626 --- a/storage/innobase/include/ut0mem.h
       
 14627 +++ b/storage/innobase/include/ut0mem.h
       
 14628 @@ -1,6 +1,6 @@
       
 14629  /*****************************************************************************
       
 14630  
       
 14631 -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 14632 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14633  
       
 14634  This program is free software; you can redistribute it and/or modify it under
       
 14635  the terms of the GNU General Public License as published by the Free Software
       
 14636 @@ -87,7 +87,7 @@ ut_malloc_low(
       
 14637  	ulint	n,			/*!< in: number of bytes to allocate */
       
 14638  	ibool	assert_on_error)	/*!< in: if TRUE, we crash mysqld if
       
 14639  					the memory cannot be allocated */
       
 14640 -	__attribute__((malloc));
       
 14641 +	MY_ATTRIBUTE((malloc));
       
 14642  /**********************************************************************//**
       
 14643  Allocates memory. */
       
 14644  #define ut_malloc(n) ut_malloc_low(n, TRUE)
       
 14645 --- a/storage/innobase/include/ut0rnd.h
       
 14646 +++ b/storage/innobase/include/ut0rnd.h
       
 14647 @@ -1,6 +1,6 @@
       
 14648  /*****************************************************************************
       
 14649  
       
 14650 -Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
       
 14651 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14652  
       
 14653  This program is free software; you can redistribute it and/or modify it under
       
 14654  the terms of the GNU General Public License as published by the Free Software
       
 14655 @@ -96,7 +96,7 @@ ulint
       
 14656  ut_fold_ull(
       
 14657  /*========*/
       
 14658  	ib_uint64_t	d)	/*!< in: 64-bit integer */
       
 14659 -	__attribute__((const));
       
 14660 +	MY_ATTRIBUTE((const));
       
 14661  /*************************************************************//**
       
 14662  Folds a character string ending in the null character.
       
 14663  @return	folded value */
       
 14664 @@ -105,7 +105,7 @@ ulint
       
 14665  ut_fold_string(
       
 14666  /*===========*/
       
 14667  	const char*	str)	/*!< in: null-terminated string */
       
 14668 -	__attribute__((pure));
       
 14669 +	MY_ATTRIBUTE((pure));
       
 14670  /***********************************************************//**
       
 14671  Looks for a prime number slightly greater than the given argument.
       
 14672  The prime is chosen so that it is not near any power of 2.
       
 14673 @@ -115,7 +115,7 @@ ulint
       
 14674  ut_find_prime(
       
 14675  /*==========*/
       
 14676  	ulint	n)	/*!< in: positive number > 100 */
       
 14677 -	__attribute__((const));
       
 14678 +	MY_ATTRIBUTE((const));
       
 14679  
       
 14680  #endif /* !UNIV_INNOCHECKSUM */
       
 14681  
       
 14682 @@ -128,7 +128,7 @@ ut_fold_ulint_pair(
       
 14683  /*===============*/
       
 14684  	ulint	n1,	/*!< in: ulint */
       
 14685  	ulint	n2)	/*!< in: ulint */
       
 14686 -	__attribute__((const));
       
 14687 +	MY_ATTRIBUTE((const));
       
 14688  /*************************************************************//**
       
 14689  Folds a binary string.
       
 14690  @return	folded value */
       
 14691 @@ -138,7 +138,7 @@ ut_fold_binary(
       
 14692  /*===========*/
       
 14693  	const byte*	str,	/*!< in: string of bytes */
       
 14694  	ulint		len)	/*!< in: length */
       
 14695 -	__attribute__((pure));
       
 14696 +	MY_ATTRIBUTE((pure));
       
 14697  
       
 14698  
       
 14699  #ifndef UNIV_NONINL
       
 14700 --- a/storage/innobase/include/ut0ut.h
       
 14701 +++ b/storage/innobase/include/ut0ut.h
       
 14702 @@ -1,6 +1,6 @@
       
 14703  /*****************************************************************************
       
 14704  
       
 14705 -Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 14706 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14707  
       
 14708  This program is free software; you can redistribute it and/or modify it under
       
 14709  the terms of the GNU General Public License as published by the Free Software
       
 14710 @@ -217,7 +217,7 @@ ulint
       
 14711  ut_2_power_up(
       
 14712  /*==========*/
       
 14713  	ulint	n)	/*!< in: number != 0 */
       
 14714 -	__attribute__((const));
       
 14715 +	MY_ATTRIBUTE((const));
       
 14716  
       
 14717  /** Determine how many bytes (groups of 8 bits) are needed to
       
 14718  store the given number of bits.
       
 14719 @@ -297,7 +297,7 @@ void
       
 14720  ut_print_timestamp(
       
 14721  /*===============*/
       
 14722  	FILE*	file)	/*!< in: file where to print */
       
 14723 -	UNIV_COLD __attribute__((nonnull));
       
 14724 +	UNIV_COLD MY_ATTRIBUTE((nonnull));
       
 14725  
       
 14726  #ifndef UNIV_INNOCHECKSUM
       
 14727  
       
 14728 @@ -485,7 +485,7 @@ ut_ulint_sort(
       
 14729  	ulint*	aux_arr,	/*!< in/out: aux array to use in sort */
       
 14730  	ulint	low,		/*!< in: lower bound */
       
 14731  	ulint	high)		/*!< in: upper bound */
       
 14732 -	__attribute__((nonnull));
       
 14733 +	MY_ATTRIBUTE((nonnull));
       
 14734  
       
 14735  #ifndef UNIV_NONINL
       
 14736  #include "ut0ut.ic"
       
 14737 --- a/storage/innobase/lock/lock0lock.cc
       
 14738 +++ b/storage/innobase/lock/lock0lock.cc
       
 14739 @@ -1,6 +1,6 @@
       
 14740  /*****************************************************************************
       
 14741  
       
 14742 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14743 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14744  
       
 14745  This program is free software; you can redistribute it and/or modify it under
       
 14746  the terms of the GNU General Public License as published by the Free Software
       
 14747 @@ -409,7 +409,7 @@ ibool
       
 14748  lock_rec_validate_page(
       
 14749  /*===================*/
       
 14750  	const buf_block_t*	block)	/*!< in: buffer block */
       
 14751 -	__attribute__((nonnull, warn_unused_result));
       
 14752 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 14753  #endif /* UNIV_DEBUG */
       
 14754  
       
 14755  /* The lock system */
       
 14756 @@ -493,7 +493,7 @@ Checks that a transaction id is sensible, i.e., not in the future.
       
 14757  #ifdef UNIV_DEBUG
       
 14758  UNIV_INTERN
       
 14759  #else
       
 14760 -static __attribute__((nonnull, warn_unused_result))
       
 14761 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 14762  #endif
       
 14763  bool
       
 14764  lock_check_trx_id_sanity(
       
 14765 @@ -5779,7 +5779,7 @@ lock_validate_table_locks(
       
 14766  /*********************************************************************//**
       
 14767  Validate record locks up to a limit.
       
 14768  @return lock at limit or NULL if no more locks in the hash bucket */
       
 14769 -static __attribute__((nonnull, warn_unused_result))
       
 14770 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 14771  const lock_t*
       
 14772  lock_rec_validate(
       
 14773  /*==============*/
       
 14774 --- a/storage/innobase/lock/lock0wait.cc
       
 14775 +++ b/storage/innobase/lock/lock0wait.cc
       
 14776 @@ -1,6 +1,6 @@
       
 14777  /*****************************************************************************
       
 14778  
       
 14779 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14780 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14781  
       
 14782  This program is free software; you can redistribute it and/or modify it under
       
 14783  the terms of the GNU General Public License as published by the Free Software
       
 14784 @@ -479,7 +479,7 @@ extern "C" UNIV_INTERN
       
 14785  os_thread_ret_t
       
 14786  DECLARE_THREAD(lock_wait_timeout_thread)(
       
 14787  /*=====================================*/
       
 14788 -	void*	arg __attribute__((unused)))
       
 14789 +	void*	arg MY_ATTRIBUTE((unused)))
       
 14790  			/* in: a dummy parameter required by
       
 14791  			os_thread_create */
       
 14792  {
       
 14793 --- a/storage/innobase/log/log0log.cc
       
 14794 +++ b/storage/innobase/log/log0log.cc
       
 14795 @@ -1,6 +1,6 @@
       
 14796  /*****************************************************************************
       
 14797  
       
 14798 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14799 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14800  Copyright (c) 2009, Google Inc.
       
 14801  
       
 14802  Portions of this file contain modifications contributed and copyrighted by
       
 14803 @@ -975,7 +975,7 @@ log_group_init(
       
 14804  	ulint	space_id,		/*!< in: space id of the file space
       
 14805  					which contains the log files of this
       
 14806  					group */
       
 14807 -	ulint	archive_space_id __attribute__((unused)))
       
 14808 +	ulint	archive_space_id MY_ATTRIBUTE((unused)))
       
 14809  					/*!< in: space id of the file space
       
 14810  					which contains some archived log
       
 14811  					files for this group; currently, only
       
 14812 @@ -2352,7 +2352,7 @@ void
       
 14813  log_archived_file_name_gen(
       
 14814  /*=======================*/
       
 14815  	char*	buf,	/*!< in: buffer where to write */
       
 14816 -	ulint	id __attribute__((unused)),
       
 14817 +	ulint	id MY_ATTRIBUTE((unused)),
       
 14818  			/*!< in: group id;
       
 14819  			currently we only archive the first group */
       
 14820  	ulint	file_no)/*!< in: file number */
       
 14821 --- a/storage/innobase/log/log0recv.cc
       
 14822 +++ b/storage/innobase/log/log0recv.cc
       
 14823 @@ -1,6 +1,6 @@
       
 14824  /*****************************************************************************
       
 14825  
       
 14826 -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14827 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14828  Copyright (c) 2012, Facebook Inc.
       
 14829  
       
 14830  This program is free software; you can redistribute it and/or modify it under
       
 14831 @@ -328,7 +328,7 @@ extern "C" UNIV_INTERN
       
 14832  os_thread_ret_t
       
 14833  DECLARE_THREAD(recv_writer_thread)(
       
 14834  /*===============================*/
       
 14835 -	void*	arg __attribute__((unused)))
       
 14836 +	void*	arg MY_ATTRIBUTE((unused)))
       
 14837  			/*!< in: a dummy parameter required by
       
 14838  			os_thread_create */
       
 14839  {
       
 14840 @@ -742,7 +742,7 @@ recv_check_cp_is_consistent(
       
 14841  /********************************************************//**
       
 14842  Looks for the maximum consistent checkpoint from the log groups.
       
 14843  @return	error code or DB_SUCCESS */
       
 14844 -static __attribute__((nonnull, warn_unused_result))
       
 14845 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 14846  dberr_t
       
 14847  recv_find_max_checkpoint(
       
 14848  /*=====================*/
       
 14849 --- a/storage/innobase/mem/mem0dbg.cc
       
 14850 +++ b/storage/innobase/mem/mem0dbg.cc
       
 14851 @@ -1,6 +1,6 @@
       
 14852  /*****************************************************************************
       
 14853  
       
 14854 -Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 14855 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14856  
       
 14857  This program is free software; you can redistribute it and/or modify it under
       
 14858  the terms of the GNU General Public License as published by the Free Software
       
 14859 @@ -248,7 +248,7 @@ void
       
 14860  mem_field_erase(
       
 14861  /*============*/
       
 14862  	byte*	buf,	/*!< in: memory field */
       
 14863 -	ulint	n __attribute__((unused)))
       
 14864 +	ulint	n MY_ATTRIBUTE((unused)))
       
 14865  			/*!< in: how many bytes the user requested */
       
 14866  {
       
 14867  	byte*	usr_buf;
       
 14868 @@ -450,7 +450,7 @@ void
       
 14869  mem_heap_validate_or_print(
       
 14870  /*=======================*/
       
 14871  	mem_heap_t*	heap,	/*!< in: memory heap */
       
 14872 -	byte*		top __attribute__((unused)),
       
 14873 +	byte*		top MY_ATTRIBUTE((unused)),
       
 14874  				/*!< in: calculate and validate only until
       
 14875  				this top pointer in the heap is reached,
       
 14876  				if this pointer is NULL, ignored */
       
 14877 --- a/storage/innobase/mtr/mtr0mtr.cc
       
 14878 +++ b/storage/innobase/mtr/mtr0mtr.cc
       
 14879 @@ -1,6 +1,6 @@
       
 14880  /*****************************************************************************
       
 14881  
       
 14882 -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 14883 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14884  
       
 14885  This program is free software; you can redistribute it and/or modify it under
       
 14886  the terms of the GNU General Public License as published by the Free Software
       
 14887 @@ -58,7 +58,7 @@ mtr_block_dirtied(
       
 14888  
       
 14889  /*****************************************************************//**
       
 14890  Releases the item in the slot given. */
       
 14891 -static __attribute__((nonnull))
       
 14892 +static MY_ATTRIBUTE((nonnull))
       
 14893  void
       
 14894  mtr_memo_slot_release_func(
       
 14895  /*=======================*/
       
 14896 @@ -105,7 +105,7 @@ mtr_memo_slot_release_func(
       
 14897  Releases the mlocks and other objects stored in an mtr memo.
       
 14898  They are released in the order opposite to which they were pushed
       
 14899  to the memo. */
       
 14900 -static __attribute__((nonnull))
       
 14901 +static MY_ATTRIBUTE((nonnull))
       
 14902  void
       
 14903  mtr_memo_pop_all(
       
 14904  /*=============*/
       
 14905 @@ -395,7 +395,7 @@ mtr_read_ulint(
       
 14906  /*===========*/
       
 14907  	const byte*	ptr,	/*!< in: pointer from where to read */
       
 14908  	ulint		type,	/*!< in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
       
 14909 -	mtr_t*		mtr __attribute__((unused)))
       
 14910 +	mtr_t*		mtr MY_ATTRIBUTE((unused)))
       
 14911  				/*!< in: mini-transaction handle */
       
 14912  {
       
 14913  	ut_ad(mtr->state == MTR_ACTIVE);
       
 14914 --- a/storage/innobase/os/os0file.cc
       
 14915 +++ b/storage/innobase/os/os0file.cc
       
 14916 @@ -1,6 +1,6 @@
       
 14917  /***********************************************************************
       
 14918  
       
 14919 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14920 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14921  Copyright (c) 2009, Percona Inc.
       
 14922  
       
 14923  Portions of this file contain modifications contributed and copyrighted
       
 14924 @@ -1469,11 +1469,11 @@ void
       
 14925  os_file_set_nocache(
       
 14926  /*================*/
       
 14927  	int		fd		/*!< in: file descriptor to alter */
       
 14928 -					__attribute__((unused)),
       
 14929 +					MY_ATTRIBUTE((unused)),
       
 14930  	const char*	file_name	/*!< in: used in the diagnostic
       
 14931  					message */
       
 14932 -					__attribute__((unused)),
       
 14933 -	const char*	operation_name __attribute__((unused)))
       
 14934 +					MY_ATTRIBUTE((unused)),
       
 14935 +	const char*	operation_name MY_ATTRIBUTE((unused)))
       
 14936  					/*!< in: "open" or "create"; used
       
 14937  					in the diagnostic message */
       
 14938  {
       
 14939 @@ -2353,7 +2353,7 @@ os_file_flush_func(
       
 14940  /*******************************************************************//**
       
 14941  Does a synchronous read operation in Posix.
       
 14942  @return	number of bytes read, -1 if error */
       
 14943 -static __attribute__((nonnull, warn_unused_result))
       
 14944 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 14945  ssize_t
       
 14946  os_file_pread(
       
 14947  /*==========*/
       
 14948 @@ -2464,7 +2464,7 @@ os_file_pread(
       
 14949  /*******************************************************************//**
       
 14950  Does a synchronous write operation in Posix.
       
 14951  @return	number of bytes written, -1 if error */
       
 14952 -static __attribute__((nonnull, warn_unused_result))
       
 14953 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 14954  ssize_t
       
 14955  os_file_pwrite(
       
 14956  /*===========*/
       
 14957 --- a/storage/innobase/page/page0page.cc
       
 14958 +++ b/storage/innobase/page/page0page.cc
       
 14959 @@ -1,6 +1,6 @@
       
 14960  /*****************************************************************************
       
 14961  
       
 14962 -Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14963 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14964  Copyright (c) 2012, Facebook Inc.
       
 14965  
       
 14966  This program is free software; you can redistribute it and/or modify it under
       
 14967 @@ -304,7 +304,7 @@ byte*
       
 14968  page_parse_create(
       
 14969  /*==============*/
       
 14970  	byte*		ptr,	/*!< in: buffer */
       
 14971 -	byte*		end_ptr __attribute__((unused)), /*!< in: buffer end */
       
 14972 +	byte*		end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
       
 14973  	ulint		comp,	/*!< in: nonzero=compact page format */
       
 14974  	buf_block_t*	block,	/*!< in: block or NULL */
       
 14975  	mtr_t*		mtr)	/*!< in: mtr or NULL */
       
 14976 --- a/storage/innobase/page/page0zip.cc
       
 14977 +++ b/storage/innobase/page/page0zip.cc
       
 14978 @@ -1,6 +1,6 @@
       
 14979  /*****************************************************************************
       
 14980  
       
 14981 -Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 14982 +Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 14983  Copyright (c) 2012, Facebook Inc.
       
 14984  
       
 14985  This program is free software; you can redistribute it and/or modify it under
       
 14986 @@ -119,7 +119,7 @@ Compare at most sizeof(field_ref_zero) bytes.
       
 14987  independently of any UNIV_ debugging conditions. */
       
 14988  #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
       
 14989  # include <stdarg.h>
       
 14990 -__attribute__((format (printf, 1, 2)))
       
 14991 +MY_ATTRIBUTE((format (printf, 1, 2)))
       
 14992  /**********************************************************************//**
       
 14993  Report a failure to decompress or compress.
       
 14994  @return	number of characters printed */
       
 14995 @@ -738,8 +738,8 @@ static
       
 14996  void
       
 14997  page_zip_free(
       
 14998  /*==========*/
       
 14999 -	void*	opaque __attribute__((unused)),	/*!< in: memory heap */
       
 15000 -	void*	address __attribute__((unused)))/*!< in: object to free */
       
 15001 +	void*	opaque MY_ATTRIBUTE((unused)),	/*!< in: memory heap */
       
 15002 +	void*	address MY_ATTRIBUTE((unused)))/*!< in: object to free */
       
 15003  {
       
 15004  }
       
 15005  
       
 15006 --- a/storage/innobase/pars/lexyy.cc
       
 15007 +++ b/storage/innobase/pars/lexyy.cc
       
 15008 @@ -295,7 +295,7 @@ static int yy_start = 0;	/* start state number */
       
 15009  static int yy_did_buffer_switch_on_eof;
       
 15010  
       
 15011  void yyrestart (FILE *input_file  );
       
 15012 -__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
       
 15013 +MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
       
 15014  static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
       
 15015  void yy_delete_buffer (YY_BUFFER_STATE b  );
       
 15016  void yy_flush_buffer (YY_BUFFER_STATE b  );
       
 15017 @@ -916,7 +916,7 @@ char *yytext;
       
 15018  #line 1 "pars0lex.l"
       
 15019  /*****************************************************************************
       
 15020  
       
 15021 -Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 15022 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15023  
       
 15024  This program is free software; you can redistribute it and/or modify it under
       
 15025  the terms of the GNU General Public License as published by the Free Software
       
 15026 @@ -1027,7 +1027,7 @@ static int yy_init_globals (void );
       
 15027  /* Accessor methods to globals.
       
 15028     These are made visible to non-reentrant scanners for convenience. */
       
 15029  
       
 15030 -__attribute__((unused)) static int yylex_destroy (void );
       
 15031 +MY_ATTRIBUTE((unused)) static int yylex_destroy (void );
       
 15032  
       
 15033  int yyget_debug (void );
       
 15034  
       
 15035 @@ -2664,7 +2664,7 @@ static int yy_get_next_buffer (void)
       
 15036   * @param new_buffer The new input buffer.
       
 15037   *
       
 15038   */
       
 15039 -    __attribute__((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
       
 15040 +    MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
       
 15041  {
       
 15042  
       
 15043  	/* TODO. We should be able to replace this entire function body
       
 15044 @@ -3042,7 +3042,7 @@ static int yy_init_globals (void)
       
 15045  }
       
 15046  
       
 15047  /* yylex_destroy is for both reentrant and non-reentrant scanners. */
       
 15048 -__attribute__((unused)) static int yylex_destroy  (void)
       
 15049 +MY_ATTRIBUTE((unused)) static int yylex_destroy  (void)
       
 15050  {
       
 15051  
       
 15052      /* Pop the buffer stack, destroying each element. */
       
 15053 --- a/storage/innobase/pars/make_flex.sh
       
 15054 +++ b/storage/innobase/pars/make_flex.sh
       
 15055 @@ -1,6 +1,6 @@
       
 15056  #!/bin/bash
       
 15057  #
       
 15058 -# Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
       
 15059 +# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15060  #
       
 15061  # This program is free software; you can redistribute it and/or modify it under
       
 15062  # the terms of the GNU General Public License as published by the Free Software
       
 15063 @@ -33,15 +33,15 @@ sed -e '
       
 15064  s/'"$TMPFILE"'/'"$OUTFILE"'/;
       
 15065  s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
       
 15066  s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
       
 15067 -s/\(void yy_switch_to_buffer\)/__attribute__((unused)) static \1/;
       
 15068 -s/\(void yy\(push\|pop\)_buffer_state\)/__attribute__((unused)) static \1/;
       
 15069 +s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
       
 15070 +s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
       
 15071  s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
       
 15072 -s/\(\(int\|void\) yy[gs]et_\)/__attribute__((unused)) static \1/;
       
 15073 +s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
       
 15074  s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
       
 15075  s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/;
       
 15076 -s/\(int yylex_destroy\)/__attribute__((unused)) static \1/;
       
 15077 +s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
       
 15078  s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/;
       
 15079 -s/^\(\(FILE\|char\) *\* *yyget\)/__attribute__((unused)) static \1/;
       
 15080 +s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
       
 15081  s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/;
       
 15082  ' < $TMPFILE >> $OUTFILE
       
 15083  
       
 15084 --- a/storage/innobase/pars/pars0pars.cc
       
 15085 +++ b/storage/innobase/pars/pars0pars.cc
       
 15086 @@ -1,6 +1,6 @@
       
 15087  /*****************************************************************************
       
 15088  
       
 15089 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 15090 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15091  
       
 15092  This program is free software; you can redistribute it and/or modify it under
       
 15093  the terms of the GNU General Public License as published by the Free Software
       
 15094 @@ -1925,7 +1925,7 @@ pars_create_table(
       
 15095  	sym_node_t*	column_defs,	/*!< in: list of column names */
       
 15096  	sym_node_t*	compact,	/* in: non-NULL if COMPACT table. */
       
 15097  	sym_node_t*	block_size,	/* in: block size (can be NULL) */
       
 15098 -	void*		not_fit_in_memory __attribute__((unused)))
       
 15099 +	void*		not_fit_in_memory MY_ATTRIBUTE((unused)))
       
 15100  					/*!< in: a non-NULL pointer means that
       
 15101  					this is a table which in simulations
       
 15102  					should be simulated as not fitting
       
 15103 @@ -2141,7 +2141,7 @@ UNIV_INTERN
       
 15104  que_fork_t*
       
 15105  pars_stored_procedure_call(
       
 15106  /*=======================*/
       
 15107 -	sym_node_t*	sym_node __attribute__((unused)))
       
 15108 +	sym_node_t*	sym_node MY_ATTRIBUTE((unused)))
       
 15109  					/*!< in: stored procedure name */
       
 15110  {
       
 15111  	ut_error;
       
 15112 @@ -2201,7 +2201,7 @@ UNIV_INTERN
       
 15113  void
       
 15114  yyerror(
       
 15115  /*====*/
       
 15116 -	const char*	s __attribute__((unused)))
       
 15117 +	const char*	s MY_ATTRIBUTE((unused)))
       
 15118  				/*!< in: error message string */
       
 15119  {
       
 15120  	ut_ad(s);
       
 15121 --- a/storage/innobase/rem/rem0cmp.cc
       
 15122 +++ b/storage/innobase/rem/rem0cmp.cc
       
 15123 @@ -1,6 +1,6 @@
       
 15124  /*****************************************************************************
       
 15125  
       
 15126 -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 15127 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15128  
       
 15129  This program is free software; you can redistribute it and/or modify it under
       
 15130  the terms of the GNU General Public License as published by the Free Software
       
 15131 @@ -75,7 +75,7 @@ cmp_debug_dtuple_rec_with_match(
       
 15132  				completely  matched fields; when function
       
 15133  				returns, contains the value for current
       
 15134  				comparison */
       
 15135 -	__attribute__((nonnull, warn_unused_result));
       
 15136 +	MY_ATTRIBUTE((nonnull, warn_unused_result));
       
 15137  #endif /* UNIV_DEBUG */
       
 15138  /*************************************************************//**
       
 15139  This function is used to compare two data fields for which the data type
       
 15140 @@ -920,7 +920,7 @@ Compare two physical record fields.
       
 15141  @retval 1 if rec1 field is greater than rec2
       
 15142  @retval -1 if rec1 field is less than rec2
       
 15143  @retval 0 if rec1 field equals to rec2 */
       
 15144 -static __attribute__((nonnull, warn_unused_result))
       
 15145 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15146  int
       
 15147  cmp_rec_rec_simple_field(
       
 15148  /*=====================*/
       
 15149 --- a/storage/innobase/rem/rem0rec.cc
       
 15150 +++ b/storage/innobase/rem/rem0rec.cc
       
 15151 @@ -1,6 +1,6 @@
       
 15152  /*****************************************************************************
       
 15153  
       
 15154 -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 15155 +Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15156  
       
 15157  This program is free software; you can redistribute it and/or modify it under
       
 15158  the terms of the GNU General Public License as published by the Free Software
       
 15159 @@ -241,7 +241,7 @@ rec_get_n_extern_new(
       
 15160  Determine the offset to each field in a leaf-page record
       
 15161  in ROW_FORMAT=COMPACT.  This is a special case of
       
 15162  rec_init_offsets() and rec_get_offsets_func(). */
       
 15163 -UNIV_INLINE __attribute__((nonnull))
       
 15164 +UNIV_INLINE MY_ATTRIBUTE((nonnull))
       
 15165  void
       
 15166  rec_init_offsets_comp_ordinary(
       
 15167  /*===========================*/
       
 15168 @@ -785,7 +785,7 @@ rec_get_nth_field_offs_old(
       
 15169  /**********************************************************//**
       
 15170  Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
       
 15171  @return	total size */
       
 15172 -UNIV_INLINE __attribute__((warn_unused_result, nonnull(1,2)))
       
 15173 +UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)))
       
 15174  ulint
       
 15175  rec_get_converted_size_comp_prefix_low(
       
 15176  /*===================================*/
       
 15177 @@ -1130,7 +1130,7 @@ rec_convert_dtuple_to_rec_old(
       
 15178  
       
 15179  /*********************************************************//**
       
 15180  Builds a ROW_FORMAT=COMPACT record out of a data tuple. */
       
 15181 -UNIV_INLINE __attribute__((nonnull))
       
 15182 +UNIV_INLINE MY_ATTRIBUTE((nonnull))
       
 15183  void
       
 15184  rec_convert_dtuple_to_rec_comp(
       
 15185  /*===========================*/
       
 15186 --- a/storage/innobase/row/row0ftsort.cc
       
 15187 +++ b/storage/innobase/row/row0ftsort.cc
       
 15188 @@ -1,6 +1,6 @@
       
 15189  /*****************************************************************************
       
 15190  
       
 15191 -Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15192 +Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15193  
       
 15194  This program is free software; you can redistribute it and/or modify it under
       
 15195  the terms of the GNU General Public License as published by the Free Software
       
 15196 @@ -976,7 +976,7 @@ row_fts_start_parallel_merge(
       
 15197  /********************************************************************//**
       
 15198  Insert processed FTS data to auxillary index tables.
       
 15199  @return	DB_SUCCESS if insertion runs fine */
       
 15200 -static __attribute__((nonnull))
       
 15201 +static MY_ATTRIBUTE((nonnull))
       
 15202  dberr_t
       
 15203  row_merge_write_fts_word(
       
 15204  /*=====================*/
       
 15205 --- a/storage/innobase/row/row0import.cc
       
 15206 +++ b/storage/innobase/row/row0import.cc
       
 15207 @@ -1,6 +1,6 @@
       
 15208  /*****************************************************************************
       
 15209  
       
 15210 -Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15211 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15212  
       
 15213  This program is free software; you can redistribute it and/or modify it under
       
 15214  the terms of the GNU General Public License as published by the Free Software
       
 15215 @@ -2179,7 +2179,7 @@ PageConverter::operator() (
       
 15216  Clean up after import tablespace failure, this function will acquire
       
 15217  the dictionary latches on behalf of the transaction if the transaction
       
 15218  hasn't already acquired them. */
       
 15219 -static	__attribute__((nonnull))
       
 15220 +static	MY_ATTRIBUTE((nonnull))
       
 15221  void
       
 15222  row_import_discard_changes(
       
 15223  /*=======================*/
       
 15224 @@ -2230,7 +2230,7 @@ row_import_discard_changes(
       
 15225  
       
 15226  /*****************************************************************//**
       
 15227  Clean up after import tablespace. */
       
 15228 -static	__attribute__((nonnull, warn_unused_result))
       
 15229 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15230  dberr_t
       
 15231  row_import_cleanup(
       
 15232  /*===============*/
       
 15233 @@ -2265,7 +2265,7 @@ row_import_cleanup(
       
 15234  
       
 15235  /*****************************************************************//**
       
 15236  Report error during tablespace import. */
       
 15237 -static	__attribute__((nonnull, warn_unused_result))
       
 15238 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15239  dberr_t
       
 15240  row_import_error(
       
 15241  /*=============*/
       
 15242 @@ -2293,7 +2293,7 @@ row_import_error(
       
 15243  Adjust the root page index node and leaf node segment headers, update
       
 15244  with the new space id. For all the table's secondary indexes.
       
 15245  @return error code */
       
 15246 -static	__attribute__((nonnull, warn_unused_result))
       
 15247 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15248  dberr_t
       
 15249  row_import_adjust_root_pages_of_secondary_indexes(
       
 15250  /*==============================================*/
       
 15251 @@ -2409,7 +2409,7 @@ row_import_adjust_root_pages_of_secondary_indexes(
       
 15252  /*****************************************************************//**
       
 15253  Ensure that dict_sys->row_id exceeds SELECT MAX(DB_ROW_ID).
       
 15254  @return error code */
       
 15255 -static	__attribute__((nonnull, warn_unused_result))
       
 15256 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15257  dberr_t
       
 15258  row_import_set_sys_max_row_id(
       
 15259  /*==========================*/
       
 15260 @@ -2559,7 +2559,7 @@ row_import_cfg_read_string(
       
 15261  /*********************************************************************//**
       
 15262  Write the meta data (index user fields) config file.
       
 15263  @return DB_SUCCESS or error code. */
       
 15264 -static	__attribute__((nonnull, warn_unused_result))
       
 15265 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15266  dberr_t
       
 15267  row_import_cfg_read_index_fields(
       
 15268  /*=============================*/
       
 15269 @@ -2642,7 +2642,7 @@ row_import_cfg_read_index_fields(
       
 15270  Read the index names and root page numbers of the indexes and set the values.
       
 15271  Row format [root_page_no, len of str, str ... ]
       
 15272  @return DB_SUCCESS or error code. */
       
 15273 -static __attribute__((nonnull, warn_unused_result))
       
 15274 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15275  dberr_t
       
 15276  row_import_read_index_data(
       
 15277  /*=======================*/
       
 15278 @@ -2837,7 +2837,7 @@ row_import_read_indexes(
       
 15279  /*********************************************************************//**
       
 15280  Read the meta data (table columns) config file. Deserialise the contents of
       
 15281  dict_col_t structure, along with the column name. */
       
 15282 -static	__attribute__((nonnull, warn_unused_result))
       
 15283 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15284  dberr_t
       
 15285  row_import_read_columns(
       
 15286  /*====================*/
       
 15287 @@ -2962,7 +2962,7 @@ row_import_read_columns(
       
 15288  /*****************************************************************//**
       
 15289  Read the contents of the <tablespace>.cfg file.
       
 15290  @return DB_SUCCESS or error code. */
       
 15291 -static	__attribute__((nonnull, warn_unused_result))
       
 15292 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15293  dberr_t
       
 15294  row_import_read_v1(
       
 15295  /*===============*/
       
 15296 @@ -3128,7 +3128,7 @@ row_import_read_v1(
       
 15297  /**
       
 15298  Read the contents of the <tablespace>.cfg file.
       
 15299  @return DB_SUCCESS or error code. */
       
 15300 -static	__attribute__((nonnull, warn_unused_result))
       
 15301 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15302  dberr_t
       
 15303  row_import_read_meta_data(
       
 15304  /*======================*/
       
 15305 @@ -3171,7 +3171,7 @@ row_import_read_meta_data(
       
 15306  /**
       
 15307  Read the contents of the <tablename>.cfg file.
       
 15308  @return DB_SUCCESS or error code. */
       
 15309 -static	__attribute__((nonnull, warn_unused_result))
       
 15310 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15311  dberr_t
       
 15312  row_import_read_cfg(
       
 15313  /*================*/
       
 15314 --- a/storage/innobase/row/row0ins.cc
       
 15315 +++ b/storage/innobase/row/row0ins.cc
       
 15316 @@ -1,6 +1,6 @@
       
 15317  /*****************************************************************************
       
 15318  
       
 15319 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15320 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15321  
       
 15322  This program is free software; you can redistribute it and/or modify it under
       
 15323  the terms of the GNU General Public License as published by the Free Software
       
 15324 @@ -224,7 +224,7 @@ Does an insert operation by updating a delete-marked existing record
       
 15325  in the index. This situation can occur if the delete-marked record is
       
 15326  kept in the index for consistent reads.
       
 15327  @return	DB_SUCCESS or error code */
       
 15328 -static __attribute__((nonnull, warn_unused_result))
       
 15329 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15330  dberr_t
       
 15331  row_ins_sec_index_entry_by_modify(
       
 15332  /*==============================*/
       
 15333 @@ -319,7 +319,7 @@ Does an insert operation by delete unmarking and updating a delete marked
       
 15334  existing record in the index. This situation can occur if the delete marked
       
 15335  record is kept in the index for consistent reads.
       
 15336  @return	DB_SUCCESS, DB_FAIL, or error code */
       
 15337 -static __attribute__((nonnull, warn_unused_result))
       
 15338 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15339  dberr_t
       
 15340  row_ins_clust_index_entry_by_modify(
       
 15341  /*================================*/
       
 15342 @@ -427,7 +427,7 @@ row_ins_cascade_ancestor_updates_table(
       
 15343  Returns the number of ancestor UPDATE or DELETE nodes of a
       
 15344  cascaded update/delete node.
       
 15345  @return	number of ancestors */
       
 15346 -static __attribute__((nonnull, warn_unused_result))
       
 15347 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15348  ulint
       
 15349  row_ins_cascade_n_ancestors(
       
 15350  /*========================*/
       
 15351 @@ -453,7 +453,7 @@ a cascaded update.
       
 15352  can also be 0 if no foreign key fields changed; the returned value is
       
 15353  ULINT_UNDEFINED if the column type in the child table is too short to
       
 15354  fit the new value in the parent table: that means the update fails */
       
 15355 -static __attribute__((nonnull, warn_unused_result))
       
 15356 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15357  ulint
       
 15358  row_ins_cascade_calc_update_vec(
       
 15359  /*============================*/
       
 15360 @@ -926,7 +926,7 @@ Perform referential actions or checks when a parent row is deleted or updated
       
 15361  and the constraint had an ON DELETE or ON UPDATE condition which was not
       
 15362  RESTRICT.
       
 15363  @return	DB_SUCCESS, DB_LOCK_WAIT, or error code */
       
 15364 -static __attribute__((nonnull, warn_unused_result))
       
 15365 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15366  dberr_t
       
 15367  row_ins_foreign_check_on_constraint(
       
 15368  /*================================*/
       
 15369 @@ -1747,7 +1747,7 @@ Otherwise does searches to the indexes of referenced tables and
       
 15370  sets shared locks which lock either the success or the failure of
       
 15371  a constraint.
       
 15372  @return	DB_SUCCESS or error code */
       
 15373 -static __attribute__((nonnull, warn_unused_result))
       
 15374 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15375  dberr_t
       
 15376  row_ins_check_foreign_constraints(
       
 15377  /*==============================*/
       
 15378 @@ -1888,7 +1888,7 @@ Scans a unique non-clustered index at a given index entry to determine
       
 15379  whether a uniqueness violation has occurred for the key value of the entry.
       
 15380  Set shared locks on possible duplicate records.
       
 15381  @return	DB_SUCCESS, DB_DUPLICATE_KEY, or DB_LOCK_WAIT */
       
 15382 -static __attribute__((nonnull, warn_unused_result))
       
 15383 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15384  dberr_t
       
 15385  row_ins_scan_sec_index_for_duplicate(
       
 15386  /*=================================*/
       
 15387 @@ -2030,7 +2030,7 @@ end_scan:
       
 15388  @retval DB_SUCCESS_LOCKED_REC	when rec is an exact match of entry or
       
 15389  a newer version of entry (the entry should not be inserted)
       
 15390  @retval DB_DUPLICATE_KEY	when entry is a duplicate of rec */
       
 15391 -static __attribute__((nonnull, warn_unused_result))
       
 15392 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15393  dberr_t
       
 15394  row_ins_duplicate_online(
       
 15395  /*=====================*/
       
 15396 @@ -2071,7 +2071,7 @@ row_ins_duplicate_online(
       
 15397  @retval DB_SUCCESS_LOCKED_REC	when rec is an exact match of entry or
       
 15398  a newer version of entry (the entry should not be inserted)
       
 15399  @retval DB_DUPLICATE_KEY	when entry is a duplicate of rec */
       
 15400 -static __attribute__((nonnull, warn_unused_result))
       
 15401 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15402  dberr_t
       
 15403  row_ins_duplicate_error_in_clust_online(
       
 15404  /*====================================*/
       
 15405 @@ -2114,7 +2114,7 @@ for a clustered index!
       
 15406  record
       
 15407  @retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found
       
 15408  in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */
       
 15409 -static __attribute__((nonnull, warn_unused_result))
       
 15410 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15411  dberr_t
       
 15412  row_ins_duplicate_error_in_clust(
       
 15413  /*=============================*/
       
 15414 @@ -2532,7 +2532,7 @@ func_exit:
       
 15415  /***************************************************************//**
       
 15416  Starts a mini-transaction and checks if the index will be dropped.
       
 15417  @return true if the index is to be dropped */
       
 15418 -static __attribute__((nonnull, warn_unused_result))
       
 15419 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15420  bool
       
 15421  row_ins_sec_mtr_start_and_check_if_aborted(
       
 15422  /*=======================================*/
       
 15423 @@ -2973,7 +2973,7 @@ row_ins_index_entry(
       
 15424  /***********************************************************//**
       
 15425  Sets the values of the dtuple fields in entry from the values of appropriate
       
 15426  columns in row. */
       
 15427 -static __attribute__((nonnull))
       
 15428 +static MY_ATTRIBUTE((nonnull))
       
 15429  void
       
 15430  row_ins_index_entry_set_vals(
       
 15431  /*=========================*/
       
 15432 @@ -3026,7 +3026,7 @@ row_ins_index_entry_set_vals(
       
 15433  Inserts a single index entry to the table.
       
 15434  @return DB_SUCCESS if operation successfully completed, else error
       
 15435  code or DB_LOCK_WAIT */
       
 15436 -static __attribute__((nonnull, warn_unused_result))
       
 15437 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15438  dberr_t
       
 15439  row_ins_index_entry_step(
       
 15440  /*=====================*/
       
 15441 @@ -3149,7 +3149,7 @@ row_ins_get_row_from_select(
       
 15442  Inserts a row to a table.
       
 15443  @return DB_SUCCESS if operation successfully completed, else error
       
 15444  code or DB_LOCK_WAIT */
       
 15445 -static __attribute__((nonnull, warn_unused_result))
       
 15446 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15447  dberr_t
       
 15448  row_ins(
       
 15449  /*====*/
       
 15450 --- a/storage/innobase/row/row0log.cc
       
 15451 +++ b/storage/innobase/row/row0log.cc
       
 15452 @@ -1,6 +1,6 @@
       
 15453  /*****************************************************************************
       
 15454  
       
 15455 -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15456 +Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15457  
       
 15458  This program is free software; you can redistribute it and/or modify it under
       
 15459  the terms of the GNU General Public License as published by the Free Software
       
 15460 @@ -201,7 +201,7 @@ struct row_log_t {
       
 15461  /** Create the file or online log if it does not exist.
       
 15462  @param[in,out]	log	online rebuild log
       
 15463  @return file descriptor. */
       
 15464 -static __attribute__((warn_unused_result))
       
 15465 +static MY_ATTRIBUTE((warn_unused_result))
       
 15466  int
       
 15467  row_log_tmpfile(
       
 15468  	row_log_t*	log)
       
 15469 @@ -217,7 +217,7 @@ row_log_tmpfile(
       
 15470  /** Allocate the memory for the log buffer.
       
 15471  @param[in,out]	log_buf	Buffer used for log operation
       
 15472  @return TRUE if success, false if not */
       
 15473 -static __attribute__((warn_unused_result))
       
 15474 +static MY_ATTRIBUTE((warn_unused_result))
       
 15475  bool
       
 15476  row_log_block_allocate(
       
 15477  	row_log_buf_t&	log_buf)
       
 15478 @@ -407,7 +407,7 @@ row_log_table_get_error(
       
 15479  /******************************************************//**
       
 15480  Starts logging an operation to a table that is being rebuilt.
       
 15481  @return pointer to log, or NULL if no logging is necessary */
       
 15482 -static __attribute__((nonnull, warn_unused_result))
       
 15483 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15484  byte*
       
 15485  row_log_table_open(
       
 15486  /*===============*/
       
 15487 @@ -442,7 +442,7 @@ err_exit:
       
 15488  
       
 15489  /******************************************************//**
       
 15490  Stops logging an operation to a table that is being rebuilt. */
       
 15491 -static __attribute__((nonnull))
       
 15492 +static MY_ATTRIBUTE((nonnull))
       
 15493  void
       
 15494  row_log_table_close_func(
       
 15495  /*=====================*/
       
 15496 @@ -812,7 +812,7 @@ row_log_table_low_redundant(
       
 15497  
       
 15498  /******************************************************//**
       
 15499  Logs an insert or update to a table that is being rebuilt. */
       
 15500 -static __attribute__((nonnull(1,2,3)))
       
 15501 +static MY_ATTRIBUTE((nonnull(1,2,3)))
       
 15502  void
       
 15503  row_log_table_low(
       
 15504  /*==============*/
       
 15505 @@ -1312,7 +1312,7 @@ row_log_table_blob_alloc(
       
 15506  /******************************************************//**
       
 15507  Converts a log record to a table row.
       
 15508  @return converted row, or NULL if the conversion fails */
       
 15509 -static __attribute__((nonnull, warn_unused_result))
       
 15510 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15511  const dtuple_t*
       
 15512  row_log_table_apply_convert_mrec(
       
 15513  /*=============================*/
       
 15514 @@ -1466,7 +1466,7 @@ blob_done:
       
 15515  /******************************************************//**
       
 15516  Replays an insert operation on a table that was rebuilt.
       
 15517  @return DB_SUCCESS or error code */
       
 15518 -static __attribute__((nonnull, warn_unused_result))
       
 15519 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15520  dberr_t
       
 15521  row_log_table_apply_insert_low(
       
 15522  /*===========================*/
       
 15523 @@ -1548,7 +1548,7 @@ row_log_table_apply_insert_low(
       
 15524  /******************************************************//**
       
 15525  Replays an insert operation on a table that was rebuilt.
       
 15526  @return DB_SUCCESS or error code */
       
 15527 -static __attribute__((nonnull, warn_unused_result))
       
 15528 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15529  dberr_t
       
 15530  row_log_table_apply_insert(
       
 15531  /*=======================*/
       
 15532 @@ -1600,7 +1600,7 @@ row_log_table_apply_insert(
       
 15533  /******************************************************//**
       
 15534  Deletes a record from a table that is being rebuilt.
       
 15535  @return DB_SUCCESS or error code */
       
 15536 -static __attribute__((nonnull(1, 2, 4, 5), warn_unused_result))
       
 15537 +static MY_ATTRIBUTE((nonnull(1, 2, 4, 5), warn_unused_result))
       
 15538  dberr_t
       
 15539  row_log_table_apply_delete_low(
       
 15540  /*===========================*/
       
 15541 @@ -1698,7 +1698,7 @@ flag_ok:
       
 15542  /******************************************************//**
       
 15543  Replays a delete operation on a table that was rebuilt.
       
 15544  @return DB_SUCCESS or error code */
       
 15545 -static __attribute__((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
       
 15546 +static MY_ATTRIBUTE((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
       
 15547  dberr_t
       
 15548  row_log_table_apply_delete(
       
 15549  /*=======================*/
       
 15550 @@ -1820,7 +1820,7 @@ all_done:
       
 15551  /******************************************************//**
       
 15552  Replays an update operation on a table that was rebuilt.
       
 15553  @return DB_SUCCESS or error code */
       
 15554 -static __attribute__((nonnull, warn_unused_result))
       
 15555 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15556  dberr_t
       
 15557  row_log_table_apply_update(
       
 15558  /*=======================*/
       
 15559 @@ -2183,7 +2183,7 @@ func_exit_committed:
       
 15560  Applies an operation to a table that was rebuilt.
       
 15561  @return NULL on failure (mrec corruption) or when out of data;
       
 15562  pointer to next record on success */
       
 15563 -static __attribute__((nonnull, warn_unused_result))
       
 15564 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15565  const mrec_t*
       
 15566  row_log_table_apply_op(
       
 15567  /*===================*/
       
 15568 @@ -2474,7 +2474,7 @@ row_log_table_apply_op(
       
 15569  /******************************************************//**
       
 15570  Applies operations to a table was rebuilt.
       
 15571  @return DB_SUCCESS, or error code on failure */
       
 15572 -static __attribute__((nonnull, warn_unused_result))
       
 15573 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15574  dberr_t
       
 15575  row_log_table_apply_ops(
       
 15576  /*====================*/
       
 15577 @@ -2971,7 +2971,7 @@ row_log_get_max_trx(
       
 15578  
       
 15579  /******************************************************//**
       
 15580  Applies an operation to a secondary index that was being created. */
       
 15581 -static __attribute__((nonnull))
       
 15582 +static MY_ATTRIBUTE((nonnull))
       
 15583  void
       
 15584  row_log_apply_op_low(
       
 15585  /*=================*/
       
 15586 @@ -3198,7 +3198,7 @@ func_exit:
       
 15587  Applies an operation to a secondary index that was being created.
       
 15588  @return NULL on failure (mrec corruption) or when out of data;
       
 15589  pointer to next record on success */
       
 15590 -static __attribute__((nonnull, warn_unused_result))
       
 15591 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15592  const mrec_t*
       
 15593  row_log_apply_op(
       
 15594  /*=============*/
       
 15595 @@ -3323,7 +3323,7 @@ corrupted:
       
 15596  /******************************************************//**
       
 15597  Applies operations to a secondary index that was being created.
       
 15598  @return DB_SUCCESS, or error code on failure */
       
 15599 -static __attribute__((nonnull))
       
 15600 +static MY_ATTRIBUTE((nonnull))
       
 15601  dberr_t
       
 15602  row_log_apply_ops(
       
 15603  /*==============*/
       
 15604 --- a/storage/innobase/row/row0merge.cc
       
 15605 +++ b/storage/innobase/row/row0merge.cc
       
 15606 @@ -70,7 +70,7 @@ UNIV_INTERN char	srv_disable_sort_file_cache;
       
 15607  #ifdef UNIV_DEBUG
       
 15608  /******************************************************//**
       
 15609  Display a merge tuple. */
       
 15610 -static __attribute__((nonnull))
       
 15611 +static MY_ATTRIBUTE((nonnull))
       
 15612  void
       
 15613  row_merge_tuple_print(
       
 15614  /*==================*/
       
 15615 @@ -105,7 +105,7 @@ row_merge_tuple_print(
       
 15616  
       
 15617  /******************************************************//**
       
 15618  Encode an index record. */
       
 15619 -static __attribute__((nonnull))
       
 15620 +static MY_ATTRIBUTE((nonnull))
       
 15621  void
       
 15622  row_merge_buf_encode(
       
 15623  /*=================*/
       
 15624 @@ -142,7 +142,7 @@ row_merge_buf_encode(
       
 15625  /******************************************************//**
       
 15626  Allocate a sort buffer.
       
 15627  @return	own: sort buffer */
       
 15628 -static __attribute__((malloc, nonnull))
       
 15629 +static MY_ATTRIBUTE((malloc, nonnull))
       
 15630  row_merge_buf_t*
       
 15631  row_merge_buf_create_low(
       
 15632  /*=====================*/
       
 15633 @@ -642,7 +642,7 @@ row_merge_dup_report(
       
 15634  /*************************************************************//**
       
 15635  Compare two tuples.
       
 15636  @return	1, 0, -1 if a is greater, equal, less, respectively, than b */
       
 15637 -static __attribute__((warn_unused_result))
       
 15638 +static MY_ATTRIBUTE((warn_unused_result))
       
 15639  int
       
 15640  row_merge_tuple_cmp(
       
 15641  /*================*/
       
 15642 @@ -721,7 +721,7 @@ UT_SORT_FUNCTION_BODY().
       
 15643  
       
 15644  /**********************************************************************//**
       
 15645  Merge sort the tuple buffer in main memory. */
       
 15646 -static __attribute__((nonnull(4,5)))
       
 15647 +static MY_ATTRIBUTE((nonnull(4,5)))
       
 15648  void
       
 15649  row_merge_tuple_sort(
       
 15650  /*=================*/
       
 15651 @@ -1245,7 +1245,7 @@ row_merge_write_eof(
       
 15652  @param[in,out]	tmpfd	temporary file handle
       
 15653  @param[in]	path	path to create temporary file
       
 15654  @return file descriptor, or -1 on failure */
       
 15655 -static __attribute__((warn_unused_result))
       
 15656 +static MY_ATTRIBUTE((warn_unused_result))
       
 15657  int
       
 15658  row_merge_tmpfile_if_needed(
       
 15659  	int*		tmpfd,
       
 15660 @@ -1264,7 +1264,7 @@ row_merge_tmpfile_if_needed(
       
 15661  @param[in]	nrec	number of records in the file
       
 15662  @param[in]	path	path to create temporary files
       
 15663  @return file descriptor, or -1 on failure */
       
 15664 -static __attribute__((warn_unused_result))
       
 15665 +static MY_ATTRIBUTE((warn_unused_result))
       
 15666  int
       
 15667  row_merge_file_create_if_needed(
       
 15668  	merge_file_t*	file,
       
 15669 @@ -1310,7 +1310,7 @@ containing the index entries for the indexes to be built.
       
 15670  @param[in,out] block		file buffer
       
 15671  @param[in,out] tmpfd		temporary file handle
       
 15672  return	DB_SUCCESS or error */
       
 15673 -static __attribute__((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
       
 15674 +static MY_ATTRIBUTE((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
       
 15675  dberr_t
       
 15676  row_merge_read_clustered_index(
       
 15677  	trx_t*			trx,
       
 15678 @@ -2028,7 +2028,7 @@ wait_again:
       
 15679  /*************************************************************//**
       
 15680  Merge two blocks of records on disk and write a bigger block.
       
 15681  @return	DB_SUCCESS or error code */
       
 15682 -static __attribute__((nonnull, warn_unused_result))
       
 15683 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15684  dberr_t
       
 15685  row_merge_blocks(
       
 15686  /*=============*/
       
 15687 @@ -2139,7 +2139,7 @@ done1:
       
 15688  /*************************************************************//**
       
 15689  Copy a block of index entries.
       
 15690  @return	TRUE on success, FALSE on failure */
       
 15691 -static __attribute__((nonnull, warn_unused_result))
       
 15692 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15693  ibool
       
 15694  row_merge_blocks_copy(
       
 15695  /*==================*/
       
 15696 @@ -2212,7 +2212,7 @@ done0:
       
 15697  /*************************************************************//**
       
 15698  Merge disk files.
       
 15699  @return	DB_SUCCESS or error code */
       
 15700 -static __attribute__((nonnull))
       
 15701 +static MY_ATTRIBUTE((nonnull))
       
 15702  dberr_t
       
 15703  row_merge(
       
 15704  /*======*/
       
 15705 @@ -2398,7 +2398,7 @@ row_merge_sort(
       
 15706  
       
 15707  /*************************************************************//**
       
 15708  Copy externally stored columns to the data tuple. */
       
 15709 -static __attribute__((nonnull))
       
 15710 +static MY_ATTRIBUTE((nonnull))
       
 15711  void
       
 15712  row_merge_copy_blobs(
       
 15713  /*=================*/
       
 15714 @@ -2443,7 +2443,7 @@ row_merge_copy_blobs(
       
 15715  Read sorted file containing index data tuples and insert these data
       
 15716  tuples to the index
       
 15717  @return	DB_SUCCESS or error number */
       
 15718 -static __attribute__((nonnull, warn_unused_result))
       
 15719 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15720  dberr_t
       
 15721  row_merge_insert_index_tuples(
       
 15722  /*==========================*/
       
 15723 @@ -3456,7 +3456,7 @@ row_merge_rename_tables_dict(
       
 15724  /*********************************************************************//**
       
 15725  Create and execute a query graph for creating an index.
       
 15726  @return	DB_SUCCESS or error code */
       
 15727 -static __attribute__((nonnull, warn_unused_result))
       
 15728 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15729  dberr_t
       
 15730  row_merge_create_index_graph(
       
 15731  /*=========================*/
       
 15732 --- a/storage/innobase/row/row0mysql.cc
       
 15733 +++ b/storage/innobase/row/row0mysql.cc
       
 15734 @@ -4476,7 +4476,7 @@ row_mysql_drop_temp_tables(void)
       
 15735  Drop all foreign keys in a database, see Bug#18942.
       
 15736  Called at the end of row_drop_database_for_mysql().
       
 15737  @return	error code or DB_SUCCESS */
       
 15738 -static __attribute__((nonnull, warn_unused_result))
       
 15739 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15740  dberr_t
       
 15741  drop_all_foreign_keys_in_db(
       
 15742  /*========================*/
       
 15743 @@ -4668,7 +4668,7 @@ loop:
       
 15744  Checks if a table name contains the string "/#sql" which denotes temporary
       
 15745  tables in MySQL.
       
 15746  @return	true if temporary table */
       
 15747 -UNIV_INTERN __attribute__((warn_unused_result))
       
 15748 +UNIV_INTERN MY_ATTRIBUTE((warn_unused_result))
       
 15749  bool
       
 15750  row_is_mysql_tmp_table_name(
       
 15751  /*========================*/
       
 15752 @@ -4682,7 +4682,7 @@ row_is_mysql_tmp_table_name(
       
 15753  /****************************************************************//**
       
 15754  Delete a single constraint.
       
 15755  @return	error code or DB_SUCCESS */
       
 15756 -static __attribute__((nonnull, warn_unused_result))
       
 15757 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15758  dberr_t
       
 15759  row_delete_constraint_low(
       
 15760  /*======================*/
       
 15761 @@ -4705,7 +4705,7 @@ row_delete_constraint_low(
       
 15762  /****************************************************************//**
       
 15763  Delete a single constraint.
       
 15764  @return	error code or DB_SUCCESS */
       
 15765 -static __attribute__((nonnull, warn_unused_result))
       
 15766 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15767  dberr_t
       
 15768  row_delete_constraint(
       
 15769  /*==================*/
       
 15770 --- a/storage/innobase/row/row0purge.cc
       
 15771 +++ b/storage/innobase/row/row0purge.cc
       
 15772 @@ -1,6 +1,6 @@
       
 15773  /*****************************************************************************
       
 15774  
       
 15775 -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15776 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15777  
       
 15778  This program is free software; you can redistribute it and/or modify it under
       
 15779  the terms of the GNU General Public License as published by the Free Software
       
 15780 @@ -120,7 +120,7 @@ row_purge_reposition_pcur(
       
 15781  Removes a delete marked clustered index record if possible.
       
 15782  @retval true if the row was not found, or it was successfully removed
       
 15783  @retval false if the row was modified after the delete marking */
       
 15784 -static __attribute__((nonnull, warn_unused_result))
       
 15785 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15786  bool
       
 15787  row_purge_remove_clust_if_poss_low(
       
 15788  /*===============================*/
       
 15789 @@ -202,7 +202,7 @@ marking.
       
 15790  @retval true if the row was not found, or it was successfully removed
       
 15791  @retval false the purge needs to be suspended because of running out
       
 15792  of file space. */
       
 15793 -static __attribute__((nonnull, warn_unused_result))
       
 15794 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15795  bool
       
 15796  row_purge_remove_clust_if_poss(
       
 15797  /*===========================*/
       
 15798 @@ -274,7 +274,7 @@ row_purge_poss_sec(
       
 15799  Removes a secondary index entry if possible, by modifying the
       
 15800  index tree.  Does not try to buffer the delete.
       
 15801  @return	TRUE if success or if not found */
       
 15802 -static __attribute__((nonnull, warn_unused_result))
       
 15803 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15804  ibool
       
 15805  row_purge_remove_sec_if_poss_tree(
       
 15806  /*==============================*/
       
 15807 @@ -396,7 +396,7 @@ Removes a secondary index entry without modifying the index tree,
       
 15808  if possible.
       
 15809  @retval	true if success or if not found
       
 15810  @retval	false if row_purge_remove_sec_if_poss_tree() should be invoked */
       
 15811 -static __attribute__((nonnull, warn_unused_result))
       
 15812 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15813  bool
       
 15814  row_purge_remove_sec_if_poss_leaf(
       
 15815  /*==============================*/
       
 15816 @@ -507,7 +507,7 @@ row_purge_remove_sec_if_poss_leaf(
       
 15817  
       
 15818  /***********************************************************//**
       
 15819  Removes a secondary index entry if possible. */
       
 15820 -UNIV_INLINE __attribute__((nonnull(1,2)))
       
 15821 +UNIV_INLINE MY_ATTRIBUTE((nonnull(1,2)))
       
 15822  void
       
 15823  row_purge_remove_sec_if_poss(
       
 15824  /*=========================*/
       
 15825 @@ -554,7 +554,7 @@ Purges a delete marking of a record.
       
 15826  @retval true if the row was not found, or it was successfully removed
       
 15827  @retval false the purge needs to be suspended because of
       
 15828  running out of file space */
       
 15829 -static __attribute__((nonnull, warn_unused_result))
       
 15830 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15831  bool
       
 15832  row_purge_del_mark(
       
 15833  /*===============*/
       
 15834 @@ -830,7 +830,7 @@ err_exit:
       
 15835  /***********************************************************//**
       
 15836  Purges the parsed record.
       
 15837  @return true if purged, false if skipped */
       
 15838 -static __attribute__((nonnull, warn_unused_result))
       
 15839 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15840  bool
       
 15841  row_purge_record_func(
       
 15842  /*==================*/
       
 15843 @@ -895,7 +895,7 @@ row_purge_record_func(
       
 15844  Fetches an undo log record and does the purge for the recorded operation.
       
 15845  If none left, or the current purge completed, returns the control to the
       
 15846  parent node, which is always a query thread node. */
       
 15847 -static __attribute__((nonnull))
       
 15848 +static MY_ATTRIBUTE((nonnull))
       
 15849  void
       
 15850  row_purge(
       
 15851  /*======*/
       
 15852 --- a/storage/innobase/row/row0quiesce.cc
       
 15853 +++ b/storage/innobase/row/row0quiesce.cc
       
 15854 @@ -1,6 +1,6 @@
       
 15855  /*****************************************************************************
       
 15856  
       
 15857 -Copyright (c) 2012, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 15858 +Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15859  
       
 15860  This program is free software; you can redistribute it and/or modify it under
       
 15861  the terms of the GNU General Public License as published by the Free Software
       
 15862 @@ -37,7 +37,7 @@ Created 2012-02-08 by Sunny Bains.
       
 15863  /*********************************************************************//**
       
 15864  Write the meta data (index user fields) config file.
       
 15865  @return DB_SUCCESS or error code. */
       
 15866 -static	__attribute__((nonnull, warn_unused_result))
       
 15867 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15868  dberr_t
       
 15869  row_quiesce_write_index_fields(
       
 15870  /*===========================*/
       
 15871 @@ -97,7 +97,7 @@ row_quiesce_write_index_fields(
       
 15872  /*********************************************************************//**
       
 15873  Write the meta data config file index information.
       
 15874  @return DB_SUCCESS or error code. */
       
 15875 -static	__attribute__((nonnull, warn_unused_result))
       
 15876 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15877  dberr_t
       
 15878  row_quiesce_write_indexes(
       
 15879  /*======================*/
       
 15880 @@ -210,7 +210,7 @@ Write the meta data (table columns) config file. Serialise the contents of
       
 15881  dict_col_t structure, along with the column name. All fields are serialized
       
 15882  as ib_uint32_t.
       
 15883  @return DB_SUCCESS or error code. */
       
 15884 -static	__attribute__((nonnull, warn_unused_result))
       
 15885 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15886  dberr_t
       
 15887  row_quiesce_write_table(
       
 15888  /*====================*/
       
 15889 @@ -293,7 +293,7 @@ row_quiesce_write_table(
       
 15890  /*********************************************************************//**
       
 15891  Write the meta data config file header.
       
 15892  @return DB_SUCCESS or error code. */
       
 15893 -static	__attribute__((nonnull, warn_unused_result))
       
 15894 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15895  dberr_t
       
 15896  row_quiesce_write_header(
       
 15897  /*=====================*/
       
 15898 @@ -415,7 +415,7 @@ row_quiesce_write_header(
       
 15899  /*********************************************************************//**
       
 15900  Write the table meta data after quiesce.
       
 15901  @return DB_SUCCESS or error code */
       
 15902 -static	__attribute__((nonnull, warn_unused_result))
       
 15903 +static	MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15904  dberr_t
       
 15905  row_quiesce_write_cfg(
       
 15906  /*==================*/
       
 15907 --- a/storage/innobase/row/row0sel.cc
       
 15908 +++ b/storage/innobase/row/row0sel.cc
       
 15909 @@ -1,6 +1,6 @@
       
 15910  /*****************************************************************************
       
 15911  
       
 15912 -Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 15913 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 15914  Copyright (c) 2008, Google Inc.
       
 15915  
       
 15916  Portions of this file contain modifications contributed and copyrighted by
       
 15917 @@ -675,7 +675,7 @@ sel_enqueue_prefetched_row(
       
 15918  /*********************************************************************//**
       
 15919  Builds a previous version of a clustered index record for a consistent read
       
 15920  @return	DB_SUCCESS or error code */
       
 15921 -static __attribute__((nonnull, warn_unused_result))
       
 15922 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15923  dberr_t
       
 15924  row_sel_build_prev_vers(
       
 15925  /*====================*/
       
 15926 @@ -710,7 +710,7 @@ row_sel_build_prev_vers(
       
 15927  /*********************************************************************//**
       
 15928  Builds the last committed version of a clustered index record for a
       
 15929  semi-consistent read. */
       
 15930 -static __attribute__((nonnull))
       
 15931 +static MY_ATTRIBUTE((nonnull))
       
 15932  void
       
 15933  row_sel_build_committed_vers_for_mysql(
       
 15934  /*===================================*/
       
 15935 @@ -808,7 +808,7 @@ row_sel_test_other_conds(
       
 15936  Retrieves the clustered index record corresponding to a record in a
       
 15937  non-clustered index. Does the necessary locking.
       
 15938  @return	DB_SUCCESS or error code */
       
 15939 -static __attribute__((nonnull, warn_unused_result))
       
 15940 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15941  dberr_t
       
 15942  row_sel_get_clust_rec(
       
 15943  /*==================*/
       
 15944 @@ -1312,7 +1312,7 @@ func_exit:
       
 15945  /*********************************************************************//**
       
 15946  Performs a select step.
       
 15947  @return	DB_SUCCESS or error code */
       
 15948 -static __attribute__((nonnull, warn_unused_result))
       
 15949 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15950  dberr_t
       
 15951  row_sel(
       
 15952  /*====*/
       
 15953 @@ -2563,7 +2563,7 @@ row_sel_store_row_id_to_prebuilt(
       
 15954  /**************************************************************//**
       
 15955  Stores a non-SQL-NULL field in the MySQL format. The counterpart of this
       
 15956  function is row_mysql_store_col_in_innobase_format() in row0mysql.cc. */
       
 15957 -static __attribute__((nonnull))
       
 15958 +static MY_ATTRIBUTE((nonnull))
       
 15959  void
       
 15960  row_sel_field_store_in_mysql_format_func(
       
 15961  /*=====================================*/
       
 15962 @@ -2752,7 +2752,7 @@ row_sel_field_store_in_mysql_format_func(
       
 15963  #endif /* UNIV_DEBUG */
       
 15964  /**************************************************************//**
       
 15965  Convert a field in the Innobase format to a field in the MySQL format. */
       
 15966 -static __attribute__((warn_unused_result))
       
 15967 +static MY_ATTRIBUTE((warn_unused_result))
       
 15968  ibool
       
 15969  row_sel_store_mysql_field_func(
       
 15970  /*===========================*/
       
 15971 @@ -2902,7 +2902,7 @@ Note that the template in prebuilt may advise us to copy only a few
       
 15972  columns to mysql_rec, other columns are left blank. All columns may not
       
 15973  be needed in the query.
       
 15974  @return TRUE on success, FALSE if not all columns could be retrieved */
       
 15975 -static __attribute__((warn_unused_result))
       
 15976 +static MY_ATTRIBUTE((warn_unused_result))
       
 15977  ibool
       
 15978  row_sel_store_mysql_rec(
       
 15979  /*====================*/
       
 15980 @@ -2964,7 +2964,7 @@ row_sel_store_mysql_rec(
       
 15981  /*********************************************************************//**
       
 15982  Builds a previous version of a clustered index record for a consistent read
       
 15983  @return	DB_SUCCESS or error code */
       
 15984 -static __attribute__((nonnull, warn_unused_result))
       
 15985 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15986  dberr_t
       
 15987  row_sel_build_prev_vers_for_mysql(
       
 15988  /*==============================*/
       
 15989 @@ -3001,7 +3001,7 @@ Retrieves the clustered index record corresponding to a record in a
       
 15990  non-clustered index. Does the necessary locking. Used in the MySQL
       
 15991  interface.
       
 15992  @return	DB_SUCCESS, DB_SUCCESS_LOCKED_REC, or error code */
       
 15993 -static __attribute__((nonnull, warn_unused_result))
       
 15994 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 15995  dberr_t
       
 15996  row_sel_get_clust_rec_for_mysql(
       
 15997  /*============================*/
       
 15998 --- a/storage/innobase/row/row0uins.cc
       
 15999 +++ b/storage/innobase/row/row0uins.cc
       
 16000 @@ -1,6 +1,6 @@
       
 16001  /*****************************************************************************
       
 16002  
       
 16003 -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 16004 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16005  
       
 16006  This program is free software; you can redistribute it and/or modify it under
       
 16007  the terms of the GNU General Public License as published by the Free Software
       
 16008 @@ -61,7 +61,7 @@ introduced where a call to log_free_check() is bypassed. */
       
 16009  Removes a clustered index record. The pcur in node was positioned on the
       
 16010  record, now it is detached.
       
 16011  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16012 -static  __attribute__((nonnull, warn_unused_result))
       
 16013 +static  MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16014  dberr_t
       
 16015  row_undo_ins_remove_clust_rec(
       
 16016  /*==========================*/
       
 16017 @@ -176,7 +176,7 @@ func_exit:
       
 16018  /***************************************************************//**
       
 16019  Removes a secondary index entry if found.
       
 16020  @return	DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
       
 16021 -static __attribute__((nonnull, warn_unused_result))
       
 16022 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16023  dberr_t
       
 16024  row_undo_ins_remove_sec_low(
       
 16025  /*========================*/
       
 16026 @@ -251,7 +251,7 @@ func_exit_no_pcur:
       
 16027  Removes a secondary index entry from the index if found. Tries first
       
 16028  optimistic, then pessimistic descent down the tree.
       
 16029  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16030 -static __attribute__((nonnull, warn_unused_result))
       
 16031 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16032  dberr_t
       
 16033  row_undo_ins_remove_sec(
       
 16034  /*====================*/
       
 16035 @@ -350,7 +350,7 @@ close_table:
       
 16036  /***************************************************************//**
       
 16037  Removes secondary index records.
       
 16038  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16039 -static __attribute__((nonnull, warn_unused_result))
       
 16040 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16041  dberr_t
       
 16042  row_undo_ins_remove_sec_rec(
       
 16043  /*========================*/
       
 16044 --- a/storage/innobase/row/row0umod.cc
       
 16045 +++ b/storage/innobase/row/row0umod.cc
       
 16046 @@ -1,6 +1,6 @@
       
 16047  /*****************************************************************************
       
 16048  
       
 16049 -Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 16050 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16051  
       
 16052  This program is free software; you can redistribute it and/or modify it under
       
 16053  the terms of the GNU General Public License as published by the Free Software
       
 16054 @@ -72,7 +72,7 @@ introduced where a call to log_free_check() is bypassed. */
       
 16055  /***********************************************************//**
       
 16056  Undoes a modify in a clustered index record.
       
 16057  @return	DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
       
 16058 -static __attribute__((nonnull, warn_unused_result))
       
 16059 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16060  dberr_t
       
 16061  row_undo_mod_clust_low(
       
 16062  /*===================*/
       
 16063 @@ -154,7 +154,7 @@ This is attempted when the record was inserted by updating a
       
 16064  delete-marked record and there no longer exist transactions
       
 16065  that would see the delete-marked record.
       
 16066  @return	DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
       
 16067 -static __attribute__((nonnull, warn_unused_result))
       
 16068 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16069  dberr_t
       
 16070  row_undo_mod_remove_clust_low(
       
 16071  /*==========================*/
       
 16072 @@ -243,7 +243,7 @@ row_undo_mod_remove_clust_low(
       
 16073  Undoes a modify in a clustered index record. Sets also the node state for the
       
 16074  next round of undo.
       
 16075  @return	DB_SUCCESS or error code: we may run out of file space */
       
 16076 -static __attribute__((nonnull, warn_unused_result))
       
 16077 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16078  dberr_t
       
 16079  row_undo_mod_clust(
       
 16080  /*===============*/
       
 16081 @@ -380,7 +380,7 @@ row_undo_mod_clust(
       
 16082  /***********************************************************//**
       
 16083  Delete marks or removes a secondary index entry if found.
       
 16084  @return	DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
       
 16085 -static __attribute__((nonnull, warn_unused_result))
       
 16086 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16087  dberr_t
       
 16088  row_undo_mod_del_mark_or_remove_sec_low(
       
 16089  /*====================================*/
       
 16090 @@ -516,7 +516,7 @@ not cause problems because in row0sel.cc, in queries we always retrieve the
       
 16091  clustered index record or an earlier version of it, if the secondary index
       
 16092  record through which we do the search is delete-marked.
       
 16093  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16094 -static __attribute__((nonnull, warn_unused_result))
       
 16095 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16096  dberr_t
       
 16097  row_undo_mod_del_mark_or_remove_sec(
       
 16098  /*================================*/
       
 16099 @@ -549,7 +549,7 @@ fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'.
       
 16100  @retval	DB_OUT_OF_FILE_SPACE when running out of tablespace
       
 16101  @retval	DB_DUPLICATE_KEY if the value was missing
       
 16102  	and an insert would lead to a duplicate exists */
       
 16103 -static __attribute__((nonnull, warn_unused_result))
       
 16104 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16105  dberr_t
       
 16106  row_undo_mod_del_unmark_sec_and_undo_update(
       
 16107  /*========================================*/
       
 16108 @@ -745,7 +745,7 @@ func_exit_no_pcur:
       
 16109  
       
 16110  /***********************************************************//**
       
 16111  Flags a secondary index corrupted. */
       
 16112 -static __attribute__((nonnull))
       
 16113 +static MY_ATTRIBUTE((nonnull))
       
 16114  void
       
 16115  row_undo_mod_sec_flag_corrupted(
       
 16116  /*============================*/
       
 16117 @@ -777,7 +777,7 @@ row_undo_mod_sec_flag_corrupted(
       
 16118  /***********************************************************//**
       
 16119  Undoes a modify in secondary indexes when undo record type is UPD_DEL.
       
 16120  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16121 -static __attribute__((nonnull, warn_unused_result))
       
 16122 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16123  dberr_t
       
 16124  row_undo_mod_upd_del_sec(
       
 16125  /*=====================*/
       
 16126 @@ -844,7 +844,7 @@ row_undo_mod_upd_del_sec(
       
 16127  /***********************************************************//**
       
 16128  Undoes a modify in secondary indexes when undo record type is DEL_MARK.
       
 16129  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16130 -static __attribute__((nonnull, warn_unused_result))
       
 16131 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16132  dberr_t
       
 16133  row_undo_mod_del_mark_sec(
       
 16134  /*======================*/
       
 16135 @@ -912,7 +912,7 @@ row_undo_mod_del_mark_sec(
       
 16136  /***********************************************************//**
       
 16137  Undoes a modify in secondary indexes when undo record type is UPD_EXIST.
       
 16138  @return	DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
       
 16139 -static __attribute__((nonnull, warn_unused_result))
       
 16140 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16141  dberr_t
       
 16142  row_undo_mod_upd_exist_sec(
       
 16143  /*=======================*/
       
 16144 @@ -1028,7 +1028,7 @@ row_undo_mod_upd_exist_sec(
       
 16145  
       
 16146  /***********************************************************//**
       
 16147  Parses the row reference and other info in a modify undo log record. */
       
 16148 -static __attribute__((nonnull))
       
 16149 +static MY_ATTRIBUTE((nonnull))
       
 16150  void
       
 16151  row_undo_mod_parse_undo_rec(
       
 16152  /*========================*/
       
 16153 --- a/storage/innobase/row/row0undo.cc
       
 16154 +++ b/storage/innobase/row/row0undo.cc
       
 16155 @@ -1,6 +1,6 @@
       
 16156  /*****************************************************************************
       
 16157  
       
 16158 -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 16159 +Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16160  
       
 16161  This program is free software; you can redistribute it and/or modify it under
       
 16162  the terms of the GNU General Public License as published by the Free Software
       
 16163 @@ -245,7 +245,7 @@ Fetches an undo log record and does the undo for the recorded operation.
       
 16164  If none left, or a partial rollback completed, returns control to the
       
 16165  parent node, which is always a query thread node.
       
 16166  @return	DB_SUCCESS if operation successfully completed, else error code */
       
 16167 -static __attribute__((nonnull, warn_unused_result))
       
 16168 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16169  dberr_t
       
 16170  row_undo(
       
 16171  /*=====*/
       
 16172 --- a/storage/innobase/row/row0upd.cc
       
 16173 +++ b/storage/innobase/row/row0upd.cc
       
 16174 @@ -1,6 +1,6 @@
       
 16175  /*****************************************************************************
       
 16176  
       
 16177 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 16178 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16179  
       
 16180  This program is free software; you can redistribute it and/or modify it under
       
 16181  the terms of the GNU General Public License as published by the Free Software
       
 16182 @@ -170,7 +170,7 @@ NOTE that this function will temporarily commit mtr and lose the
       
 16183  pcur position!
       
 16184  
       
 16185  @return	DB_SUCCESS or an error code */
       
 16186 -static __attribute__((nonnull, warn_unused_result))
       
 16187 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16188  dberr_t
       
 16189  row_upd_check_references_constraints(
       
 16190  /*=================================*/
       
 16191 @@ -607,7 +607,7 @@ row_upd_write_sys_vals_to_log(
       
 16192  	roll_ptr_t	roll_ptr,/*!< in: roll ptr of the undo log record */
       
 16193  	byte*		log_ptr,/*!< pointer to a buffer of size > 20 opened
       
 16194  				in mlog */
       
 16195 -	mtr_t*		mtr __attribute__((unused))) /*!< in: mtr */
       
 16196 +	mtr_t*		mtr MY_ATTRIBUTE((unused))) /*!< in: mtr */
       
 16197  {
       
 16198  	ut_ad(dict_index_is_clust(index));
       
 16199  	ut_ad(mtr);
       
 16200 @@ -1642,7 +1642,7 @@ row_upd_store_row(
       
 16201  Updates a secondary index entry of a row.
       
 16202  @return DB_SUCCESS if operation successfully completed, else error
       
 16203  code or DB_LOCK_WAIT */
       
 16204 -static __attribute__((nonnull, warn_unused_result))
       
 16205 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16206  dberr_t
       
 16207  row_upd_sec_index_entry(
       
 16208  /*====================*/
       
 16209 @@ -1844,7 +1844,7 @@ Updates the secondary index record if it is changed in the row update or
       
 16210  deletes it if this is a delete.
       
 16211  @return DB_SUCCESS if operation successfully completed, else error
       
 16212  code or DB_LOCK_WAIT */
       
 16213 -static __attribute__((nonnull, warn_unused_result))
       
 16214 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16215  dberr_t
       
 16216  row_upd_sec_step(
       
 16217  /*=============*/
       
 16218 @@ -1877,7 +1877,7 @@ updated. We must mark them as inherited in entry, so that they are not
       
 16219  freed in a rollback. A limited version of this function used to be
       
 16220  called btr_cur_mark_dtuple_inherited_extern().
       
 16221  @return TRUE if any columns were inherited */
       
 16222 -static __attribute__((warn_unused_result))
       
 16223 +static MY_ATTRIBUTE((warn_unused_result))
       
 16224  ibool
       
 16225  row_upd_clust_rec_by_insert_inherit_func(
       
 16226  /*=====================================*/
       
 16227 @@ -1956,7 +1956,7 @@ fields of the clustered index record change. This should be quite rare in
       
 16228  database applications.
       
 16229  @return DB_SUCCESS if operation successfully completed, else error
       
 16230  code or DB_LOCK_WAIT */
       
 16231 -static __attribute__((nonnull, warn_unused_result))
       
 16232 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16233  dberr_t
       
 16234  row_upd_clust_rec_by_insert(
       
 16235  /*========================*/
       
 16236 @@ -2081,7 +2081,7 @@ Updates a clustered index record of a row when the ordering fields do
       
 16237  not change.
       
 16238  @return DB_SUCCESS if operation successfully completed, else error
       
 16239  code or DB_LOCK_WAIT */
       
 16240 -static __attribute__((nonnull, warn_unused_result))
       
 16241 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16242  dberr_t
       
 16243  row_upd_clust_rec(
       
 16244  /*==============*/
       
 16245 @@ -2240,7 +2240,7 @@ func_exit:
       
 16246  /***********************************************************//**
       
 16247  Delete marks a clustered index record.
       
 16248  @return	DB_SUCCESS if operation successfully completed, else error code */
       
 16249 -static __attribute__((nonnull, warn_unused_result))
       
 16250 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16251  dberr_t
       
 16252  row_upd_del_mark_clust_rec(
       
 16253  /*=======================*/
       
 16254 @@ -2292,7 +2292,7 @@ row_upd_del_mark_clust_rec(
       
 16255  Updates the clustered index record.
       
 16256  @return DB_SUCCESS if operation successfully completed, DB_LOCK_WAIT
       
 16257  in case of a lock wait, else error code */
       
 16258 -static __attribute__((nonnull, warn_unused_result))
       
 16259 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16260  dberr_t
       
 16261  row_upd_clust_step(
       
 16262  /*===============*/
       
 16263 @@ -2488,7 +2488,7 @@ to this node, we assume that we have a persistent cursor which was on a
       
 16264  record, and the position of the cursor is stored in the cursor.
       
 16265  @return DB_SUCCESS if operation successfully completed, else error
       
 16266  code or DB_LOCK_WAIT */
       
 16267 -static __attribute__((nonnull, warn_unused_result))
       
 16268 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16269  dberr_t
       
 16270  row_upd(
       
 16271  /*====*/
       
 16272 --- a/storage/innobase/srv/srv0srv.cc
       
 16273 +++ b/storage/innobase/srv/srv0srv.cc
       
 16274 @@ -1497,7 +1497,7 @@ extern "C" UNIV_INTERN
       
 16275  os_thread_ret_t
       
 16276  DECLARE_THREAD(srv_monitor_thread)(
       
 16277  /*===============================*/
       
 16278 -	void*	arg __attribute__((unused)))
       
 16279 +	void*	arg MY_ATTRIBUTE((unused)))
       
 16280  			/*!< in: a dummy parameter required by
       
 16281  			os_thread_create */
       
 16282  {
       
 16283 @@ -1674,7 +1674,7 @@ extern "C" UNIV_INTERN
       
 16284  os_thread_ret_t
       
 16285  DECLARE_THREAD(srv_error_monitor_thread)(
       
 16286  /*=====================================*/
       
 16287 -	void*	arg __attribute__((unused)))
       
 16288 +	void*	arg MY_ATTRIBUTE((unused)))
       
 16289  			/*!< in: a dummy parameter required by
       
 16290  			os_thread_create */
       
 16291  {
       
 16292 @@ -2310,7 +2310,7 @@ extern "C" UNIV_INTERN
       
 16293  os_thread_ret_t
       
 16294  DECLARE_THREAD(srv_master_thread)(
       
 16295  /*==============================*/
       
 16296 -	void*	arg __attribute__((unused)))
       
 16297 +	void*	arg MY_ATTRIBUTE((unused)))
       
 16298  			/*!< in: a dummy parameter required by
       
 16299  			os_thread_create */
       
 16300  {
       
 16301 @@ -2454,7 +2454,7 @@ extern "C" UNIV_INTERN
       
 16302  os_thread_ret_t
       
 16303  DECLARE_THREAD(srv_worker_thread)(
       
 16304  /*==============================*/
       
 16305 -	void*	arg __attribute__((unused)))	/*!< in: a dummy parameter
       
 16306 +	void*	arg MY_ATTRIBUTE((unused)))	/*!< in: a dummy parameter
       
 16307  						required by os_thread_create */
       
 16308  {
       
 16309  	srv_slot_t*	slot;
       
 16310 @@ -2712,7 +2712,7 @@ extern "C" UNIV_INTERN
       
 16311  os_thread_ret_t
       
 16312  DECLARE_THREAD(srv_purge_coordinator_thread)(
       
 16313  /*=========================================*/
       
 16314 -	void*	arg __attribute__((unused)))	/*!< in: a dummy parameter
       
 16315 +	void*	arg MY_ATTRIBUTE((unused)))	/*!< in: a dummy parameter
       
 16316  						required by os_thread_create */
       
 16317  {
       
 16318  	srv_slot_t*	slot;
       
 16319 --- a/storage/innobase/srv/srv0start.cc
       
 16320 +++ b/storage/innobase/srv/srv0start.cc
       
 16321 @@ -1,6 +1,6 @@
       
 16322  /*****************************************************************************
       
 16323  
       
 16324 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
       
 16325 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16326  Copyright (c) 2008, Google Inc.
       
 16327  Copyright (c) 2009, Percona Inc.
       
 16328  
       
 16329 @@ -509,7 +509,7 @@ UNIV_INTERN
       
 16330  void
       
 16331  srv_normalize_path_for_win(
       
 16332  /*=======================*/
       
 16333 -	char*	str __attribute__((unused)))	/*!< in/out: null-terminated
       
 16334 +	char*	str MY_ATTRIBUTE((unused)))	/*!< in/out: null-terminated
       
 16335  						character string */
       
 16336  {
       
 16337  #ifdef __WIN__
       
 16338 @@ -526,7 +526,7 @@ srv_normalize_path_for_win(
       
 16339  /*********************************************************************//**
       
 16340  Creates a log file.
       
 16341  @return	DB_SUCCESS or error code */
       
 16342 -static __attribute__((nonnull, warn_unused_result))
       
 16343 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16344  dberr_t
       
 16345  create_log_file(
       
 16346  /*============*/
       
 16347 @@ -733,7 +733,7 @@ create_log_files_rename(
       
 16348  /*********************************************************************//**
       
 16349  Opens a log file.
       
 16350  @return	DB_SUCCESS or error code */
       
 16351 -static __attribute__((nonnull, warn_unused_result))
       
 16352 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16353  dberr_t
       
 16354  open_log_file(
       
 16355  /*==========*/
       
 16356 @@ -761,7 +761,7 @@ open_log_file(
       
 16357  /*********************************************************************//**
       
 16358  Creates or opens database data files and closes them.
       
 16359  @return	DB_SUCCESS or error code */
       
 16360 -static __attribute__((nonnull, warn_unused_result))
       
 16361 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16362  dberr_t
       
 16363  open_or_create_data_files(
       
 16364  /*======================*/
       
 16365 --- a/storage/innobase/sync/sync0sync.cc
       
 16366 +++ b/storage/innobase/sync/sync0sync.cc
       
 16367 @@ -1,6 +1,6 @@
       
 16368  /*****************************************************************************
       
 16369  
       
 16370 -Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 16371 +Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16372  Copyright (c) 2008, Google Inc.
       
 16373  
       
 16374  Portions of this file contain modifications contributed and copyrighted by
       
 16375 @@ -387,10 +387,10 @@ ulint
       
 16376  mutex_enter_nowait_func(
       
 16377  /*====================*/
       
 16378  	ib_mutex_t*	mutex,		/*!< in: pointer to mutex */
       
 16379 -	const char*	file_name __attribute__((unused)),
       
 16380 +	const char*	file_name MY_ATTRIBUTE((unused)),
       
 16381  					/*!< in: file name where mutex
       
 16382  					requested */
       
 16383 -	ulint		line __attribute__((unused)))
       
 16384 +	ulint		line MY_ATTRIBUTE((unused)))
       
 16385  					/*!< in: line where requested */
       
 16386  {
       
 16387  	ut_ad(mutex_validate(mutex));
       
 16388 --- a/storage/innobase/trx/trx0purge.cc
       
 16389 +++ b/storage/innobase/trx/trx0purge.cc
       
 16390 @@ -1,6 +1,6 @@
       
 16391  /*****************************************************************************
       
 16392  
       
 16393 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 16394 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16395  
       
 16396  This program is free software; you can redistribute it and/or modify it under
       
 16397  the terms of the GNU General Public License as published by the Free Software
       
 16398 @@ -913,7 +913,7 @@ Fetches the next undo log record from the history list to purge. It must be
       
 16399  released with the corresponding release function.
       
 16400  @return copy of an undo log record or pointer to trx_purge_dummy_rec,
       
 16401  if the whole undo log can skipped in purge; NULL if none left */
       
 16402 -static __attribute__((warn_unused_result, nonnull))
       
 16403 +static MY_ATTRIBUTE((warn_unused_result, nonnull))
       
 16404  trx_undo_rec_t*
       
 16405  trx_purge_fetch_next_rec(
       
 16406  /*=====================*/
       
 16407 --- a/storage/innobase/trx/trx0rec.cc
       
 16408 +++ b/storage/innobase/trx/trx0rec.cc
       
 16409 @@ -1,6 +1,6 @@
       
 16410  /*****************************************************************************
       
 16411  
       
 16412 -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
       
 16413 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16414  
       
 16415  This program is free software; you can redistribute it and/or modify it under
       
 16416  the terms of the GNU General Public License as published by the Free Software
       
 16417 @@ -1132,7 +1132,7 @@ trx_undo_rec_get_partial_row(
       
 16418  /***********************************************************************//**
       
 16419  Erases the unused undo log page end.
       
 16420  @return TRUE if the page contained something, FALSE if it was empty */
       
 16421 -static __attribute__((nonnull))
       
 16422 +static MY_ATTRIBUTE((nonnull))
       
 16423  ibool
       
 16424  trx_undo_erase_page_end(
       
 16425  /*====================*/
       
 16426 @@ -1158,7 +1158,7 @@ byte*
       
 16427  trx_undo_parse_erase_page_end(
       
 16428  /*==========================*/
       
 16429  	byte*	ptr,	/*!< in: buffer */
       
 16430 -	byte*	end_ptr __attribute__((unused)), /*!< in: buffer end */
       
 16431 +	byte*	end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
       
 16432  	page_t*	page,	/*!< in: page or NULL */
       
 16433  	mtr_t*	mtr)	/*!< in: mtr or NULL */
       
 16434  {
       
 16435 @@ -1441,7 +1441,7 @@ NOTE: the caller must have latches on the clustered index page.
       
 16436  @retval true if the undo log has been
       
 16437  truncated and we cannot fetch the old version
       
 16438  @retval false if the undo log record is available  */
       
 16439 -static __attribute__((nonnull, warn_unused_result))
       
 16440 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16441  bool
       
 16442  trx_undo_get_undo_rec(
       
 16443  /*==================*/
       
 16444 @@ -1469,7 +1469,7 @@ trx_undo_get_undo_rec(
       
 16445  #ifdef UNIV_DEBUG
       
 16446  #define ATTRIB_USED_ONLY_IN_DEBUG
       
 16447  #else /* UNIV_DEBUG */
       
 16448 -#define ATTRIB_USED_ONLY_IN_DEBUG	__attribute__((unused))
       
 16449 +#define ATTRIB_USED_ONLY_IN_DEBUG	MY_ATTRIBUTE((unused))
       
 16450  #endif /* UNIV_DEBUG */
       
 16451  
       
 16452  /*******************************************************************//**
       
 16453 --- a/storage/innobase/trx/trx0roll.cc
       
 16454 +++ b/storage/innobase/trx/trx0roll.cc
       
 16455 @@ -1,6 +1,6 @@
       
 16456  /*****************************************************************************
       
 16457  
       
 16458 -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
       
 16459 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16460  
       
 16461  This program is free software; you can redistribute it and/or modify it under
       
 16462  the terms of the GNU General Public License as published by the Free Software
       
 16463 @@ -336,7 +336,7 @@ the row, these locks are naturally released in the rollback. Savepoints which
       
 16464  were set after this savepoint are deleted.
       
 16465  @return if no savepoint of the name found then DB_NO_SAVEPOINT,
       
 16466  otherwise DB_SUCCESS */
       
 16467 -static __attribute__((nonnull, warn_unused_result))
       
 16468 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16469  dberr_t
       
 16470  trx_rollback_to_savepoint_for_mysql_low(
       
 16471  /*====================================*/
       
 16472 @@ -796,7 +796,7 @@ extern "C" UNIV_INTERN
       
 16473  os_thread_ret_t
       
 16474  DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
       
 16475  /*================================================*/
       
 16476 -	void*	arg __attribute__((unused)))
       
 16477 +	void*	arg MY_ATTRIBUTE((unused)))
       
 16478  			/*!< in: a dummy parameter required by
       
 16479  			os_thread_create */
       
 16480  {
       
 16481 --- a/storage/innobase/trx/trx0trx.cc
       
 16482 +++ b/storage/innobase/trx/trx0trx.cc
       
 16483 @@ -1,6 +1,6 @@
       
 16484  /*****************************************************************************
       
 16485  
       
 16486 -Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
       
 16487 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16488  
       
 16489  This program is free software; you can redistribute it and/or modify it under
       
 16490  the terms of the GNU General Public License as published by the Free Software
       
 16491 @@ -959,7 +959,7 @@ trx_serialisation_number_get(
       
 16492  /****************************************************************//**
       
 16493  Assign the transaction its history serialisation number and write the
       
 16494  update UNDO log record to the assigned rollback segment. */
       
 16495 -static __attribute__((nonnull))
       
 16496 +static MY_ATTRIBUTE((nonnull))
       
 16497  void
       
 16498  trx_write_serialisation_history(
       
 16499  /*============================*/
       
 16500 @@ -1030,7 +1030,7 @@ trx_write_serialisation_history(
       
 16501  
       
 16502  /********************************************************************
       
 16503  Finalize a transaction containing updates for a FTS table. */
       
 16504 -static __attribute__((nonnull))
       
 16505 +static MY_ATTRIBUTE((nonnull))
       
 16506  void
       
 16507  trx_finalize_for_fts_table(
       
 16508  /*=======================*/
       
 16509 @@ -1063,7 +1063,7 @@ trx_finalize_for_fts_table(
       
 16510  
       
 16511  /******************************************************************//**
       
 16512  Finalize a transaction containing updates to FTS tables. */
       
 16513 -static __attribute__((nonnull))
       
 16514 +static MY_ATTRIBUTE((nonnull))
       
 16515  void
       
 16516  trx_finalize_for_fts(
       
 16517  /*=================*/
       
 16518 @@ -1130,7 +1130,7 @@ trx_flush_log_if_needed_low(
       
 16519  /**********************************************************************//**
       
 16520  If required, flushes the log to disk based on the value of
       
 16521  innodb_flush_log_at_trx_commit. */
       
 16522 -static __attribute__((nonnull))
       
 16523 +static MY_ATTRIBUTE((nonnull))
       
 16524  void
       
 16525  trx_flush_log_if_needed(
       
 16526  /*====================*/
       
 16527 @@ -1145,7 +1145,7 @@ trx_flush_log_if_needed(
       
 16528  
       
 16529  /****************************************************************//**
       
 16530  Commits a transaction in memory. */
       
 16531 -static __attribute__((nonnull))
       
 16532 +static MY_ATTRIBUTE((nonnull))
       
 16533  void
       
 16534  trx_commit_in_memory(
       
 16535  /*=================*/
       
 16536 @@ -2136,7 +2136,7 @@ which is in the prepared state
       
 16537  @return	trx on match, the trx->xid will be invalidated;
       
 16538  note that the trx may have been committed, unless the caller is
       
 16539  holding lock_sys->mutex */
       
 16540 -static __attribute__((nonnull, warn_unused_result))
       
 16541 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16542  trx_t*
       
 16543  trx_get_trx_by_xid_low(
       
 16544  /*===================*/
       
 16545 --- a/storage/innobase/trx/trx0undo.cc
       
 16546 +++ b/storage/innobase/trx/trx0undo.cc
       
 16547 @@ -1,6 +1,6 @@
       
 16548  /*****************************************************************************
       
 16549  
       
 16550 -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
       
 16551 +Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
       
 16552  
       
 16553  This program is free software; you can redistribute it and/or modify it under
       
 16554  the terms of the GNU General Public License as published by the Free Software
       
 16555 @@ -419,11 +419,11 @@ trx_undo_page_init(
       
 16556  Creates a new undo log segment in file.
       
 16557  @return DB_SUCCESS if page creation OK possible error codes are:
       
 16558  DB_TOO_MANY_CONCURRENT_TRXS DB_OUT_OF_FILE_SPACE */
       
 16559 -static __attribute__((nonnull, warn_unused_result))
       
 16560 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16561  dberr_t
       
 16562  trx_undo_seg_create(
       
 16563  /*================*/
       
 16564 -	trx_rseg_t*	rseg __attribute__((unused)),/*!< in: rollback segment */
       
 16565 +	trx_rseg_t*	rseg MY_ATTRIBUTE((unused)),/*!< in: rollback segment */
       
 16566  	trx_rsegf_t*	rseg_hdr,/*!< in: rollback segment header, page
       
 16567  				x-latched */
       
 16568  	ulint		type,	/*!< in: type of the segment: TRX_UNDO_INSERT or
       
 16569 @@ -827,7 +827,7 @@ byte*
       
 16570  trx_undo_parse_discard_latest(
       
 16571  /*==========================*/
       
 16572  	byte*	ptr,	/*!< in: buffer */
       
 16573 -	byte*	end_ptr __attribute__((unused)), /*!< in: buffer end */
       
 16574 +	byte*	end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
       
 16575  	page_t*	page,	/*!< in: page or NULL */
       
 16576  	mtr_t*	mtr)	/*!< in: mtr or NULL */
       
 16577  {
       
 16578 @@ -1557,7 +1557,7 @@ Creates a new undo log.
       
 16579  @return DB_SUCCESS if successful in creating the new undo lob object,
       
 16580  possible error codes are: DB_TOO_MANY_CONCURRENT_TRXS
       
 16581  DB_OUT_OF_FILE_SPACE DB_OUT_OF_MEMORY */
       
 16582 -static __attribute__((nonnull, warn_unused_result))
       
 16583 +static MY_ATTRIBUTE((nonnull, warn_unused_result))
       
 16584  dberr_t
       
 16585  trx_undo_create(
       
 16586  /*============*/
       
 16587 --- a/storage/myisam/ft_boolean_search.c
       
 16588 +++ b/storage/myisam/ft_boolean_search.c
       
 16589 @@ -332,7 +332,7 @@ static int _ftb_parse_query(FTB *ftb, uchar *query, uint len,
       
 16590  }
       
 16591  
       
 16592  
       
 16593 -static int _ftb_no_dupes_cmp(const void* not_used __attribute__((unused)),
       
 16594 +static int _ftb_no_dupes_cmp(const void* not_used MY_ATTRIBUTE((unused)),
       
 16595                               const void *a,const void *b)
       
 16596  {
       
 16597    return CMP_NUM((*((my_off_t*)a)), (*((my_off_t*)b)));
       
 16598 @@ -643,7 +643,7 @@ typedef struct st_my_ftb_phrase_param
       
 16599  
       
 16600  static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param,
       
 16601                                 char *word, int word_len,
       
 16602 -    MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
       
 16603 +    MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
       
 16604  {
       
 16605    MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam;
       
 16606    FT_WORD *w= (FT_WORD *)phrase_param->document->data;
       
 16607 @@ -901,7 +901,7 @@ typedef struct st_my_ftb_find_param
       
 16608  
       
 16609  static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
       
 16610                                         char *word, int len,
       
 16611 -             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
       
 16612 +             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
       
 16613  {
       
 16614    MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
       
 16615    FT_INFO *ftb= ftb_param->ftb;
       
 16616 --- a/storage/myisam/ft_nlq_search.c
       
 16617 +++ b/storage/myisam/ft_nlq_search.c
       
 16618 @@ -1,4 +1,4 @@
       
 16619 -/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
       
 16620 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16621  
       
 16622     This program is free software; you can redistribute it and/or modify
       
 16623     it under the terms of the GNU General Public License as published by
       
 16624 @@ -51,7 +51,7 @@ typedef struct st_ft_superdoc
       
 16625      double   tmp_weight;
       
 16626  } FT_SUPERDOC;
       
 16627  
       
 16628 -static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
       
 16629 +static int FT_SUPERDOC_cmp(void* cmp_arg MY_ATTRIBUTE((unused)),
       
 16630  			   FT_SUPERDOC *p1, FT_SUPERDOC *p2)
       
 16631  {
       
 16632    if (p1->doc.dpos < p2->doc.dpos)
       
 16633 @@ -189,7 +189,7 @@ do_skip:
       
 16634  
       
 16635  
       
 16636  static int walk_and_copy(FT_SUPERDOC *from,
       
 16637 -			 uint32 count __attribute__((unused)), FT_DOC **to)
       
 16638 +			 uint32 count MY_ATTRIBUTE((unused)), FT_DOC **to)
       
 16639  {
       
 16640    DBUG_ENTER("walk_and_copy");
       
 16641    from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
       
 16642 @@ -200,7 +200,7 @@ static int walk_and_copy(FT_SUPERDOC *from,
       
 16643  }
       
 16644  
       
 16645  static int walk_and_push(FT_SUPERDOC *from,
       
 16646 -			 uint32 count __attribute__((unused)), QUEUE *best)
       
 16647 +			 uint32 count MY_ATTRIBUTE((unused)), QUEUE *best)
       
 16648  {
       
 16649    DBUG_ENTER("walk_and_copy");
       
 16650    from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
       
 16651 @@ -210,7 +210,7 @@ static int walk_and_push(FT_SUPERDOC *from,
       
 16652  }
       
 16653  
       
 16654  
       
 16655 -static int FT_DOC_cmp(void *unused __attribute__((unused)),
       
 16656 +static int FT_DOC_cmp(void *unused MY_ATTRIBUTE((unused)),
       
 16657                        FT_DOC *a, FT_DOC *b)
       
 16658  {
       
 16659    double c= b->weight - a->weight;
       
 16660 @@ -345,8 +345,8 @@ int ft_nlq_read_next(FT_INFO *handler, char *record)
       
 16661  
       
 16662  
       
 16663  float ft_nlq_find_relevance(FT_INFO *handler,
       
 16664 -			    uchar *record __attribute__((unused)),
       
 16665 -			    uint length __attribute__((unused)))
       
 16666 +			    uchar *record MY_ATTRIBUTE((unused)),
       
 16667 +			    uint length MY_ATTRIBUTE((unused)))
       
 16668  {
       
 16669    int a,b,c;
       
 16670    FT_DOC  *docs=handler->doc;
       
 16671 --- a/storage/myisam/ft_parser.c
       
 16672 +++ b/storage/myisam/ft_parser.c
       
 16673 @@ -1,4 +1,4 @@
       
 16674 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
       
 16675 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
       
 16676     reserved.
       
 16677  
       
 16678     This program is free software; you can redistribute it and/or modify
       
 16679 @@ -259,7 +259,7 @@ void ft_parse_init(TREE *wtree, const CHARSET_INFO *cs)
       
 16680  
       
 16681  static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
       
 16682                         char *word, int word_len,
       
 16683 -             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
       
 16684 +             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
       
 16685  {
       
 16686    TREE *wtree;
       
 16687    FT_WORD w;
       
 16688 --- a/storage/myisam/ft_stopwords.c
       
 16689 +++ b/storage/myisam/ft_stopwords.c
       
 16690 @@ -1,4 +1,4 @@
       
 16691 -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       
 16692 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16693  
       
 16694     This program is free software; you can redistribute it and/or modify
       
 16695     it under the terms of the GNU General Public License as published by
       
 16696 @@ -30,7 +30,7 @@ typedef struct st_ft_stopwords
       
 16697  
       
 16698  static TREE *stopwords3=NULL;
       
 16699  
       
 16700 -static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)),
       
 16701 +static int FT_STOPWORD_cmp(void* cmp_arg MY_ATTRIBUTE((unused)),
       
 16702  			   FT_STOPWORD *w1, FT_STOPWORD *w2)
       
 16703  {
       
 16704    return ha_compare_text(ft_stopword_cs,
       
 16705 @@ -39,7 +39,7 @@ static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)),
       
 16706  }
       
 16707  
       
 16708  static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action,
       
 16709 -                             void *arg __attribute__((unused)))
       
 16710 +                             void *arg MY_ATTRIBUTE((unused)))
       
 16711  {
       
 16712    if (action == free_free)
       
 16713      my_free((void*)w->pos);
       
 16714 --- a/storage/myisam/ha_myisam.cc
       
 16715 +++ b/storage/myisam/ha_myisam.cc
       
 16716 @@ -1,5 +1,5 @@
       
 16717  /*
       
 16718 -   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 16719 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16720  
       
 16721     This program is free software; you can redistribute it and/or modify
       
 16722     it under the terms of the GNU General Public License as published by
       
 16723 @@ -1725,8 +1725,8 @@ int ha_myisam::index_last(uchar *buf)
       
 16724  }
       
 16725  
       
 16726  int ha_myisam::index_next_same(uchar *buf,
       
 16727 -			       const uchar *key __attribute__((unused)),
       
 16728 -			       uint length __attribute__((unused)))
       
 16729 +			       const uchar *key MY_ATTRIBUTE((unused)),
       
 16730 +			       uint length MY_ATTRIBUTE((unused)))
       
 16731  {
       
 16732    int error;
       
 16733    DBUG_ASSERT(inited==INDEX);
       
 16734 --- a/storage/myisam/mi_check.c
       
 16735 +++ b/storage/myisam/mi_check.c
       
 16736 @@ -1,5 +1,5 @@
       
 16737  /*
       
 16738 -   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
 16739 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16740  
       
 16741     This program is free software; you can redistribute it and/or modify
       
 16742     it under the terms of the GNU General Public License as published by
       
 16743 @@ -1902,7 +1902,7 @@ int movepoint(register MI_INFO *info, uchar *record, my_off_t oldpos,
       
 16744  
       
 16745  	/* Tell system that we want all memory for our cache */
       
 16746  
       
 16747 -void lock_memory(MI_CHECK *param __attribute__((unused)))
       
 16748 +void lock_memory(MI_CHECK *param MY_ATTRIBUTE((unused)))
       
 16749  {
       
 16750  #ifdef SUN_OS				/* Key-cacheing thrases on sun 4.1 */
       
 16751    if (param->opt_lock_memory)
       
 16752 --- a/storage/myisam/mi_extrafunc.h
       
 16753 +++ b/storage/myisam/mi_extrafunc.h
       
 16754 @@ -1,5 +1,4 @@
       
 16755 -/* Copyright (c) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc.
       
 16756 -   Use is subject to license terms.
       
 16757 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16758  
       
 16759     This program is free software; you can redistribute it and/or modify
       
 16760     it under the terms of the GNU General Public License as published by
       
 16761 @@ -14,9 +13,9 @@
       
 16762     along with this program; if not, write to the Free Software
       
 16763     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
       
 16764  
       
 16765 -void _mi_report_crashed(MI_INFO *file __attribute__((unused)),
       
 16766 -                        const char *message __attribute__((unused)),
       
 16767 -                        const char *sfile __attribute__((unused)),
       
 16768 -                        uint sline __attribute__((unused)))
       
 16769 +void _mi_report_crashed(MI_INFO *file MY_ATTRIBUTE((unused)),
       
 16770 +                        const char *message MY_ATTRIBUTE((unused)),
       
 16771 +                        const char *sfile MY_ATTRIBUTE((unused)),
       
 16772 +                        uint sline MY_ATTRIBUTE((unused)))
       
 16773  {
       
 16774  }
       
 16775 --- a/storage/myisam/mi_keycache.c
       
 16776 +++ b/storage/myisam/mi_keycache.c
       
 16777 @@ -1,5 +1,4 @@
       
 16778 -/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc.
       
 16779 -   Use is subject to license terms.
       
 16780 +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16781  
       
 16782     This program is free software; you can redistribute it and/or modify
       
 16783     it under the terms of the GNU General Public License as published by
       
 16784 @@ -48,7 +47,7 @@
       
 16785  */
       
 16786  
       
 16787  int mi_assign_to_key_cache(MI_INFO *info,
       
 16788 -			   ulonglong key_map __attribute__((unused)),
       
 16789 +			   ulonglong key_map MY_ATTRIBUTE((unused)),
       
 16790  			   KEY_CACHE *key_cache)
       
 16791  {
       
 16792    int error= 0;
       
 16793 --- a/storage/myisam/mi_open.c
       
 16794 +++ b/storage/myisam/mi_open.c
       
 16795 @@ -1,4 +1,4 @@
       
 16796 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
 16797 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16798  
       
 16799     This program is free software; you can redistribute it and/or modify
       
 16800     it under the terms of the GNU General Public License as published by
       
 16801 @@ -1229,7 +1229,7 @@ exist a dup()-like call that would give us two different file descriptors.
       
 16802  *************************************************************************/
       
 16803  
       
 16804  int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *org_name,
       
 16805 -                     File file_to_dup __attribute__((unused)))
       
 16806 +                     File file_to_dup MY_ATTRIBUTE((unused)))
       
 16807  {
       
 16808    char *data_name= share->data_file_name;
       
 16809    char real_data_name[FN_REFLEN];
       
 16810 --- a/storage/myisam/mi_packrec.c
       
 16811 +++ b/storage/myisam/mi_packrec.c
       
 16812 @@ -1,4 +1,4 @@
       
 16813 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 16814 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16815  
       
 16816     This program is free software; you can redistribute it and/or modify
       
 16817     it under the terms of the GNU General Public License as published by
       
 16818 @@ -1009,7 +1009,7 @@ static void uf_zerofill_normal(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *
       
 16819  }
       
 16820  
       
 16821  static void uf_constant(MI_COLUMNDEF *rec,
       
 16822 -			MI_BIT_BUFF *bit_buff __attribute__((unused)),
       
 16823 +			MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)),
       
 16824  			uchar *to,
       
 16825  			uchar *end)
       
 16826  {
       
 16827 @@ -1027,8 +1027,8 @@ static void uf_intervall(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
       
 16828  
       
 16829  
       
 16830  /*ARGSUSED*/
       
 16831 -static void uf_zero(MI_COLUMNDEF *rec __attribute__((unused)),
       
 16832 -		    MI_BIT_BUFF *bit_buff __attribute__((unused)),
       
 16833 +static void uf_zero(MI_COLUMNDEF *rec MY_ATTRIBUTE((unused)),
       
 16834 +		    MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)),
       
 16835  		    uchar *to, uchar *end)
       
 16836  {
       
 16837    memset(to, 0, (end-to));
       
 16838 @@ -1058,7 +1058,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
       
 16839  
       
 16840  
       
 16841  static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
       
 16842 -		       uchar *to, uchar *end __attribute__((unused)))
       
 16843 +		       uchar *to, uchar *end MY_ATTRIBUTE((unused)))
       
 16844  {
       
 16845    if (get_bit(bit_buff))
       
 16846      to[0]= 0;				/* Zero lengths */
       
 16847 @@ -1072,7 +1072,7 @@ static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
       
 16848  
       
 16849  
       
 16850  static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
       
 16851 -		       uchar *to, uchar *end __attribute__((unused)))
       
 16852 +		       uchar *to, uchar *end MY_ATTRIBUTE((unused)))
       
 16853  {
       
 16854    if (get_bit(bit_buff))
       
 16855      to[0]=to[1]=0;				/* Zero lengths */
       
 16856 @@ -1607,7 +1607,7 @@ static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf)
       
 16857  static int _mi_read_rnd_mempack_record(MI_INFO *info, uchar *buf,
       
 16858  				       register my_off_t filepos,
       
 16859  				       my_bool skip_deleted_blocks
       
 16860 -				       __attribute__((unused)))
       
 16861 +				       MY_ATTRIBUTE((unused)))
       
 16862  {
       
 16863    MI_BLOCK_INFO block_info;
       
 16864    MYISAM_SHARE *share=info->s;
       
 16865 --- a/storage/myisam/mi_search.c
       
 16866 +++ b/storage/myisam/mi_search.c
       
 16867 @@ -1,4 +1,4 @@
       
 16868 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 16869 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16870  
       
 16871     This program is free software; you can redistribute it and/or modify
       
 16872     it under the terms of the GNU General Public License as published by
       
 16873 @@ -180,7 +180,7 @@ err:
       
 16874  
       
 16875  int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
       
 16876                     uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
       
 16877 -                   uchar *buff __attribute__((unused)), my_bool *last_key)
       
 16878 +                   uchar *buff MY_ATTRIBUTE((unused)), my_bool *last_key)
       
 16879  {
       
 16880    reg4 int start,mid,end,save_end;
       
 16881    int flag;
       
 16882 @@ -1420,9 +1420,9 @@ int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
       
 16883  
       
 16884  int
       
 16885  _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
       
 16886 -                           uchar *next_pos  __attribute__((unused)),
       
 16887 -                           uchar *org_key  __attribute__((unused)),
       
 16888 -                           uchar *prev_key __attribute__((unused)),
       
 16889 +                           uchar *next_pos  MY_ATTRIBUTE((unused)),
       
 16890 +                           uchar *org_key  MY_ATTRIBUTE((unused)),
       
 16891 +                           uchar *prev_key MY_ATTRIBUTE((unused)),
       
 16892                             uchar *key, MI_KEY_PARAM *s_temp)
       
 16893  {
       
 16894    s_temp->key=key;
       
 16895 @@ -1433,9 +1433,9 @@ _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
       
 16896  
       
 16897  int
       
 16898  _mi_calc_var_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
       
 16899 -                        uchar *next_pos  __attribute__((unused)),
       
 16900 -                        uchar *org_key  __attribute__((unused)),
       
 16901 -                        uchar *prev_key __attribute__((unused)),
       
 16902 +                        uchar *next_pos  MY_ATTRIBUTE((unused)),
       
 16903 +                        uchar *org_key  MY_ATTRIBUTE((unused)),
       
 16904 +                        uchar *prev_key MY_ATTRIBUTE((unused)),
       
 16905                          uchar *key, MI_KEY_PARAM *s_temp)
       
 16906  {
       
 16907    s_temp->key=key;
       
 16908 @@ -1825,7 +1825,7 @@ _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
       
 16909  
       
 16910  /* store key without compression */
       
 16911  
       
 16912 -void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)),
       
 16913 +void _mi_store_static_key(MI_KEYDEF *keyinfo MY_ATTRIBUTE((unused)),
       
 16914                            register uchar *key_pos,
       
 16915                            register MI_KEY_PARAM *s_temp)
       
 16916  {
       
 16917 @@ -1840,7 +1840,7 @@ void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)),
       
 16918    { *((pos)++) = (uchar) ((length) >> 8); *((pos)++) = (uchar) (length);  } }
       
 16919  
       
 16920  
       
 16921 -void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
       
 16922 +void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  MY_ATTRIBUTE((unused)),
       
 16923                              register uchar *key_pos,
       
 16924                              register MI_KEY_PARAM *s_temp)
       
 16925  {
       
 16926 @@ -1903,7 +1903,7 @@ void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
       
 16927  
       
 16928  /* variable length key with prefix compression */
       
 16929  
       
 16930 -void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
       
 16931 +void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo  MY_ATTRIBUTE((unused)),
       
 16932                              register uchar *key_pos,
       
 16933                              register MI_KEY_PARAM *s_temp)
       
 16934  {
       
 16935 --- a/storage/myisam/mi_static.c
       
 16936 +++ b/storage/myisam/mi_static.c
       
 16937 @@ -1,4 +1,4 @@
       
 16938 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 16939 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16940  
       
 16941     This program is free software; you can redistribute it and/or modify
       
 16942     it under the terms of the GNU General Public License as published by
       
 16943 @@ -41,7 +41,7 @@ ulonglong myisam_max_temp_length= MAX_FILE_SIZE;
       
 16944  ulong    myisam_data_pointer_size=4;
       
 16945  ulonglong    myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0;
       
 16946  
       
 16947 -static int always_valid(const char *filename __attribute__((unused)))
       
 16948 +static int always_valid(const char *filename MY_ATTRIBUTE((unused)))
       
 16949  {
       
 16950    return 0;
       
 16951  }
       
 16952 --- a/storage/myisam/mi_test1.c
       
 16953 +++ b/storage/myisam/mi_test1.c
       
 16954 @@ -1,5 +1,5 @@
       
 16955  /*
       
 16956 -   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 16957 +   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16958  
       
 16959     This program is free software; you can redistribute it and/or modify
       
 16960     it under the terms of the GNU General Public License as published by
       
 16961 @@ -586,8 +586,8 @@ static struct my_option my_long_options[] =
       
 16962  
       
 16963  
       
 16964  static my_bool
       
 16965 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 16966 -	       char *argument __attribute__((unused)))
       
 16967 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 16968 +	       char *argument MY_ATTRIBUTE((unused)))
       
 16969  {
       
 16970    switch(optid) {
       
 16971    case 'a':
       
 16972 --- a/storage/myisam/myisam_ftdump.c
       
 16973 +++ b/storage/myisam/myisam_ftdump.c
       
 16974 @@ -1,4 +1,4 @@
       
 16975 -/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
       
 16976 +/* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16977  
       
 16978     This program is free software; you can redistribute it and/or modify
       
 16979     it under the terms of the GNU General Public License as published by
       
 16980 @@ -226,8 +226,8 @@ err:
       
 16981  
       
 16982  
       
 16983  static my_bool
       
 16984 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 16985 -	       char *argument __attribute__((unused)))
       
 16986 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 16987 +	       char *argument MY_ATTRIBUTE((unused)))
       
 16988  {
       
 16989    switch(optid) {
       
 16990    case 'd':
       
 16991 --- a/storage/myisam/myisamchk.c
       
 16992 +++ b/storage/myisam/myisamchk.c
       
 16993 @@ -1,4 +1,4 @@
       
 16994 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 16995 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 16996  
       
 16997     This program is free software; you can redistribute it and/or modify
       
 16998     it under the terms of the GNU General Public License as published by
       
 16999 @@ -466,7 +466,7 @@ TYPELIB myisam_stats_method_typelib= {
       
 17000  
       
 17001  static my_bool
       
 17002  get_one_option(int optid,
       
 17003 -	       const struct my_option *opt __attribute__((unused)),
       
 17004 +	       const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17005  	       char *argument)
       
 17006  {
       
 17007    switch (optid) {
       
 17008 @@ -1711,7 +1711,7 @@ err:
       
 17009  
       
 17010  static int not_killed= 0;
       
 17011  
       
 17012 -volatile int *killed_ptr(MI_CHECK *param __attribute__((unused)))
       
 17013 +volatile int *killed_ptr(MI_CHECK *param MY_ATTRIBUTE((unused)))
       
 17014  {
       
 17015    return &not_killed;			/* always NULL */
       
 17016  }
       
 17017 @@ -1719,7 +1719,7 @@ volatile int *killed_ptr(MI_CHECK *param __attribute__((unused)))
       
 17018  	/* print warnings and errors */
       
 17019  	/* VARARGS */
       
 17020  
       
 17021 -void mi_check_print_info(MI_CHECK *param __attribute__((unused)),
       
 17022 +void mi_check_print_info(MI_CHECK *param MY_ATTRIBUTE((unused)),
       
 17023  			 const char *fmt,...)
       
 17024  {
       
 17025    va_list args;
       
 17026 --- a/storage/myisam/myisamlog.c
       
 17027 +++ b/storage/myisam/myisamlog.c
       
 17028 @@ -1,4 +1,4 @@
       
 17029 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17030 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17031  
       
 17032     This program is free software; you can redistribute it and/or modify
       
 17033     it under the terms of the GNU General Public License as published by
       
 17034 @@ -695,7 +695,7 @@ static int read_string(IO_CACHE *file, register uchar* *to, register uint length
       
 17035  }				/* read_string */
       
 17036  
       
 17037  
       
 17038 -static int file_info_compare(void* cmp_arg __attribute__((unused)),
       
 17039 +static int file_info_compare(void* cmp_arg MY_ATTRIBUTE((unused)),
       
 17040  			     void *a, void *b)
       
 17041  {
       
 17042    long lint;
       
 17043 @@ -709,7 +709,7 @@ static int file_info_compare(void* cmp_arg __attribute__((unused)),
       
 17044  	/* ARGSUSED */
       
 17045  
       
 17046  static int test_if_open (struct file_info *key,
       
 17047 -			 element_count count __attribute__((unused)),
       
 17048 +			 element_count count MY_ATTRIBUTE((unused)),
       
 17049  			 struct test_if_open_param *param)
       
 17050  {
       
 17051    if (!strcmp(key->name,param->name) && key->id > param->max_id)
       
 17052 @@ -737,7 +737,7 @@ static void fix_blob_pointers(MI_INFO *info, uchar *record)
       
 17053  	/* ARGSUSED */
       
 17054  
       
 17055  static int test_when_accessed (struct file_info *key,
       
 17056 -			       element_count count __attribute__((unused)),
       
 17057 +			       element_count count MY_ATTRIBUTE((unused)),
       
 17058  			       struct st_access_param *access_param)
       
 17059  {
       
 17060    if (key->accessed < access_param->min_accessed && ! key->closed)
       
 17061 --- a/storage/myisam/myisampack.c
       
 17062 +++ b/storage/myisam/myisampack.c
       
 17063 @@ -1,4 +1,4 @@
       
 17064 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 17065 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17066  
       
 17067     This program is free software; you can redistribute it and/or modify
       
 17068     it under the terms of the GNU General Public License as published by
       
 17069 @@ -29,6 +29,7 @@
       
 17070  #endif
       
 17071  #include <my_getopt.h>
       
 17072  #include <assert.h>
       
 17073 +#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
       
 17074  
       
 17075  #if SIZEOF_LONG_LONG > 4
       
 17076  #define BITS_SAVED 64
       
 17077 @@ -130,7 +131,7 @@ static void free_counts_and_tree_and_queue(HUFF_TREE *huff_trees,
       
 17078  					   uint trees,
       
 17079  					   HUFF_COUNTS *huff_counts,
       
 17080  					   uint fields);
       
 17081 -static int compare_tree(void* cmp_arg __attribute__((unused)),
       
 17082 +static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)),
       
 17083  			const uchar *s,const uchar *t);
       
 17084  static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts);
       
 17085  static void check_counts(HUFF_COUNTS *huff_counts,uint trees,
       
 17086 @@ -300,9 +301,7 @@ static void print_version(void)
       
 17087  static void usage(void)
       
 17088  {
       
 17089    print_version();
       
 17090 -  puts("Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
       
 17091 -  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
       
 17092 -  puts("and you are welcome to modify and redistribute it under the GPL license\n");
       
 17093 +  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2002"));
       
 17094  
       
 17095    puts("Pack a MyISAM-table to take much less space.");
       
 17096    puts("Keys are not updated, you must run myisamchk -rq on the datafile");
       
 17097 @@ -317,7 +316,7 @@ static void usage(void)
       
 17098  
       
 17099  
       
 17100  static my_bool
       
 17101 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 17102 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17103  	       char *argument)
       
 17104  {
       
 17105    uint length;
       
 17106 @@ -1176,7 +1175,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
       
 17107    DBUG_RETURN(error != HA_ERR_END_OF_FILE);
       
 17108  }
       
 17109  
       
 17110 -static int compare_huff_elements(void *not_used __attribute__((unused)),
       
 17111 +static int compare_huff_elements(void *not_used MY_ATTRIBUTE((unused)),
       
 17112  				 uchar *a, uchar *b)
       
 17113  {
       
 17114    return *((my_off_t*) a) < *((my_off_t*) b) ? -1 :
       
 17115 @@ -1693,7 +1692,7 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts)
       
 17116    return 0;
       
 17117  }
       
 17118  
       
 17119 -static int compare_tree(void* cmp_arg __attribute__((unused)),
       
 17120 +static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)),
       
 17121  			register const uchar *s, register const uchar *t)
       
 17122  {
       
 17123    uint length;
       
 17124 --- a/storage/myisam/rt_test.c
       
 17125 +++ b/storage/myisam/rt_test.c
       
 17126 @@ -1,4 +1,4 @@
       
 17127 -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17128 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17129     
       
 17130     This program is free software; you can redistribute it and/or modify
       
 17131     it under the terms of the GNU General Public License as published by
       
 17132 @@ -79,7 +79,7 @@ static double rt_data[]=
       
 17133    -1
       
 17134  };
       
 17135  
       
 17136 -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
       
 17137 +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
       
 17138  {
       
 17139    MY_INIT(argv[0]);
       
 17140    exit(run_test("rt_test"));
       
 17141 @@ -367,7 +367,7 @@ static int read_with_pos (MI_INFO * file,int silent)
       
 17142  
       
 17143  
       
 17144  static void print_record(uchar * record,
       
 17145 -			 my_off_t offs __attribute__((unused)),
       
 17146 +			 my_off_t offs MY_ATTRIBUTE((unused)),
       
 17147  			 const char * tail)
       
 17148  {
       
 17149    int i;
       
 17150 @@ -420,7 +420,7 @@ static void create_record(uchar *record,uint rownr)
       
 17151  }
       
 17152  
       
 17153  #else
       
 17154 -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
       
 17155 +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
       
 17156  {
       
 17157    exit(0);
       
 17158  }
       
 17159 --- a/storage/myisam/sort.c
       
 17160 +++ b/storage/myisam/sort.c
       
 17161 @@ -1,4 +1,4 @@
       
 17162 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17163 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17164  
       
 17165     This program is free software; you can redistribute it and/or modify
       
 17166     it under the terms of the GNU General Public License as published by
       
 17167 @@ -886,7 +886,7 @@ static int write_merge_key_varlen(MI_SORT_PARAM *info,
       
 17168  }
       
 17169  
       
 17170  
       
 17171 -static int write_merge_key(MI_SORT_PARAM *info __attribute__((unused)),
       
 17172 +static int write_merge_key(MI_SORT_PARAM *info MY_ATTRIBUTE((unused)),
       
 17173                             IO_CACHE *to_file, uchar *key,
       
 17174                             uint sort_length, uint count)
       
 17175  {
       
 17176 --- a/storage/myisam/sp_key.c
       
 17177 +++ b/storage/myisam/sp_key.c
       
 17178 @@ -1,4 +1,4 @@
       
 17179 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17180 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17181     
       
 17182     This program is free software; you can redistribute it and/or modify
       
 17183     it under the terms of the GNU General Public License as published by
       
 17184 @@ -118,7 +118,7 @@ static int sp_mbr_from_wkb(uchar *wkb, uint size, uint n_dims, double *mbr)
       
 17185  */
       
 17186  
       
 17187  static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, 
       
 17188 -			       uchar byte_order __attribute__((unused)),
       
 17189 +			       uchar byte_order MY_ATTRIBUTE((unused)),
       
 17190  			       double *mbr)
       
 17191  {
       
 17192    double ord;
       
 17193 --- a/storage/myisam/sp_test.c
       
 17194 +++ b/storage/myisam/sp_test.c
       
 17195 @@ -1,4 +1,4 @@
       
 17196 -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17197 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17198     
       
 17199     This program is free software; you can redistribute it and/or modify
       
 17200     it under the terms of the GNU General Public License as published by
       
 17201 @@ -40,7 +40,7 @@ static  void rtree_PrintWKB(uchar *wkb, uint n_dims);
       
 17202  static char blob_key[MAX_REC_LENGTH];
       
 17203  
       
 17204  
       
 17205 -int main(int argc  __attribute__((unused)),char *argv[])
       
 17206 +int main(int argc  MY_ATTRIBUTE((unused)),char *argv[])
       
 17207  {
       
 17208    MY_INIT(argv[0]);
       
 17209    exit(run_test("sp_test"));
       
 17210 @@ -487,7 +487,7 @@ static void rtree_PrintWKB(uchar *wkb, uint n_dims)
       
 17211  }
       
 17212  
       
 17213  #else
       
 17214 -int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
       
 17215 +int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
       
 17216  {
       
 17217    exit(0);
       
 17218  }
       
 17219 --- a/storage/myisammrg/ha_myisammrg.cc
       
 17220 +++ b/storage/myisammrg/ha_myisammrg.cc
       
 17221 @@ -1,4 +1,4 @@
       
 17222 -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       
 17223 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17224  
       
 17225     This program is free software; you can redistribute it and/or modify
       
 17226     it under the terms of the GNU General Public License as published by
       
 17227 @@ -347,7 +347,7 @@ CPP_UNNAMED_NS_END
       
 17228    and adds a child list of TABLE_LIST to the parent handler.
       
 17229  */
       
 17230  
       
 17231 -int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
       
 17232 +int ha_myisammrg::open(const char *name, int mode MY_ATTRIBUTE((unused)),
       
 17233                         uint test_if_locked_arg)
       
 17234  {
       
 17235    DBUG_ENTER("ha_myisammrg::open");
       
 17236 @@ -1183,8 +1183,8 @@ int ha_myisammrg::index_last(uchar * buf)
       
 17237  }
       
 17238  
       
 17239  int ha_myisammrg::index_next_same(uchar * buf,
       
 17240 -                                  const uchar *key __attribute__((unused)),
       
 17241 -                                  uint length __attribute__((unused)))
       
 17242 +                                  const uchar *key MY_ATTRIBUTE((unused)),
       
 17243 +                                  uint length MY_ATTRIBUTE((unused)))
       
 17244  {
       
 17245    int error;
       
 17246    DBUG_ASSERT(this->file->children_attached);
       
 17247 --- a/storage/ndb/include/ndb_global.h
       
 17248 +++ b/storage/ndb/include/ndb_global.h
       
 17249 @@ -1,5 +1,5 @@
       
 17250  /*
       
 17251 -   Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       
 17252 +   Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17253  
       
 17254     This program is free software; you can redistribute it and/or modify
       
 17255     it under the terms of the GNU General Public License as published by
       
 17256 @@ -251,19 +251,19 @@ extern "C" {
       
 17257  #endif
       
 17258  
       
 17259  /**
       
 17260 - *  __attribute__((noreturn)) was introduce in gcc 2.5
       
 17261 + *  MY_ATTRIBUTE((noreturn)) was introduce in gcc 2.5
       
 17262   */
       
 17263  #if (GCC_VERSION >= 2005)
       
 17264 -#define ATTRIBUTE_NORETURN __attribute__((noreturn))
       
 17265 +#define ATTRIBUTE_NORETURN MY_ATTRIBUTE((noreturn))
       
 17266  #else
       
 17267  #define ATTRIBUTE_NORETURN
       
 17268  #endif
       
 17269  
       
 17270  /**
       
 17271 - *  __attribute__((noinline)) was introduce in gcc 3.1
       
 17272 + *  MY_ATTRIBUTE((noinline)) was introduce in gcc 3.1
       
 17273   */
       
 17274  #if (GCC_VERSION >= 3001)
       
 17275 -#define ATTRIBUTE_NOINLINE __attribute__((noinline))
       
 17276 +#define ATTRIBUTE_NOINLINE MY_ATTRIBUTE((noinline))
       
 17277  #else
       
 17278  #define ATTRIBUTE_NOINLINE
       
 17279  #endif
       
 17280 --- a/storage/ndb/include/util/ndb_opts.h
       
 17281 +++ b/storage/ndb/include/util/ndb_opts.h
       
 17282 @@ -1,5 +1,5 @@
       
 17283  /*
       
 17284 -   Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       
 17285 +   Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17286  
       
 17287     This program is free software; you can redistribute it and/or modify
       
 17288     it under the terms of the GNU General Public License as published by
       
 17289 @@ -123,7 +123,7 @@ void ndb_opt_set_usage_funcs(void (*short_usage)(void),
       
 17290                               void (*usage)(void));
       
 17291  my_bool
       
 17292  ndb_std_get_one_option(int optid,
       
 17293 -		       const struct my_option *opt __attribute__((unused)),
       
 17294 +		       const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17295                         char *argument);
       
 17296  
       
 17297  void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
       
 17298 --- a/storage/ndb/src/common/util/ndb_opts.c
       
 17299 +++ b/storage/ndb/src/common/util/ndb_opts.c
       
 17300 @@ -1,5 +1,5 @@
       
 17301  /*
       
 17302 -   Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
       
 17303 +   Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17304  
       
 17305     This program is free software; you can redistribute it and/or modify
       
 17306     it under the terms of the GNU General Public License as published by
       
 17307 @@ -82,8 +82,8 @@ void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
       
 17308  
       
 17309  my_bool
       
 17310  ndb_std_get_one_option(int optid,
       
 17311 -                       const struct my_option *opt __attribute__((unused)),
       
 17312 -                       char *argument __attribute__((unused)))
       
 17313 +                       const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17314 +                       char *argument MY_ATTRIBUTE((unused)))
       
 17315  {
       
 17316    switch (optid) {
       
 17317  #ifndef DBUG_OFF
       
 17318 --- a/storage/ndb/src/cw/cpcd/main.cpp
       
 17319 +++ b/storage/ndb/src/cw/cpcd/main.cpp
       
 17320 @@ -1,5 +1,5 @@
       
 17321  /*
       
 17322 -   Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       
 17323 +   Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17324  
       
 17325     This program is free software; you can redistribute it and/or modify
       
 17326     it under the terms of the GNU General Public License as published by
       
 17327 @@ -63,7 +63,7 @@ static struct my_option my_long_options[] =
       
 17328  };
       
 17329  
       
 17330  static my_bool
       
 17331 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 17332 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17333  	       char *argument)
       
 17334  {
       
 17335    return 0;
       
 17336 --- a/storage/ndb/tools/restore/restore_main.cpp
       
 17337 +++ b/storage/ndb/tools/restore/restore_main.cpp
       
 17338 @@ -1,5 +1,5 @@
       
 17339  /*
       
 17340 -   Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       
 17341 +   Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17342  
       
 17343     This program is free software; you can redistribute it and/or modify
       
 17344     it under the terms of the GNU General Public License as published by
       
 17345 @@ -415,7 +415,7 @@ static void usage()
       
 17346  }
       
 17347  
       
 17348  static my_bool
       
 17349 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 17350 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 17351  	       char *argument)
       
 17352  {
       
 17353  #ifndef DBUG_OFF
       
 17354 --- a/strings/conf_to_src.c
       
 17355 +++ b/strings/conf_to_src.c
       
 17356 @@ -1,4 +1,4 @@
       
 17357 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17358 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17359  
       
 17360     This program is free software; you can redistribute it and/or modify
       
 17361     it under the terms of the GNU General Public License as published by
       
 17362 @@ -145,8 +145,8 @@ static int add_collation(CHARSET_INFO *cs)
       
 17363  
       
 17364  
       
 17365  static void
       
 17366 -default_reporter(enum loglevel level  __attribute__ ((unused)),
       
 17367 -                 const char *format  __attribute__ ((unused)),
       
 17368 +default_reporter(enum loglevel level  MY_ATTRIBUTE ((unused)),
       
 17369 +                 const char *format  MY_ATTRIBUTE ((unused)),
       
 17370                   ...)
       
 17371  {
       
 17372  }
       
 17373 @@ -271,7 +271,7 @@ static void
       
 17374  fprint_copyright(FILE *file)
       
 17375  {
       
 17376    fprintf(file,
       
 17377 -"/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.\n"
       
 17378 +"/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.\n"
       
 17379  "\n"
       
 17380  "   This program is free software; you can redistribute it and/or modify\n"
       
 17381  "   it under the terms of the GNU General Public License as published by\n"
       
 17382 @@ -290,7 +290,7 @@ fprint_copyright(FILE *file)
       
 17383  
       
 17384  
       
 17385  int
       
 17386 -main(int argc, char **argv  __attribute__((unused)))
       
 17387 +main(int argc, char **argv  MY_ATTRIBUTE((unused)))
       
 17388  {
       
 17389    CHARSET_INFO  ncs;
       
 17390    CHARSET_INFO  *cs;
       
 17391 --- a/strings/ctype-big5.c
       
 17392 +++ b/strings/ctype-big5.c
       
 17393 @@ -1,4 +1,4 @@
       
 17394 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17395 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17396  
       
 17397     This program is free software; you can redistribute it and/or modify
       
 17398     it under the terms of the GNU General Public License as published by
       
 17399 @@ -872,7 +872,7 @@ static int my_strnncoll_big5_internal(const uchar **a_res,
       
 17400  
       
 17401  /* Compare strings */
       
 17402  
       
 17403 -static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)), 
       
 17404 +static int my_strnncoll_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
       
 17405  			     const uchar *a, size_t a_length,
       
 17406                               const uchar *b, size_t b_length,
       
 17407                               my_bool b_is_prefix)
       
 17408 @@ -885,7 +885,7 @@ static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17409  
       
 17410  /* compare strings, ignore end space */
       
 17411  
       
 17412 -static int my_strnncollsp_big5(const CHARSET_INFO* cs __attribute__((unused)),
       
 17413 +static int my_strnncollsp_big5(const CHARSET_INFO* cs MY_ATTRIBUTE((unused)),
       
 17414  			       const uchar *a, size_t a_length, 
       
 17415  			       const uchar *b, size_t b_length,
       
 17416                                 my_bool diff_if_only_endspace_difference)
       
 17417 @@ -957,14 +957,14 @@ my_strnxfrm_big5(const CHARSET_INFO *cs,
       
 17418  }
       
 17419  
       
 17420  
       
 17421 -static uint ismbchar_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17422 +static uint ismbchar_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17423                           const char* p, const char *e)
       
 17424  {
       
 17425    return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0);
       
 17426  }
       
 17427  
       
 17428  
       
 17429 -static uint mbcharlen_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17430 +static uint mbcharlen_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17431                             uint c)
       
 17432  {
       
 17433    return (isbig5head(c)? 2 : 1);
       
 17434 @@ -6742,7 +6742,7 @@ static int func_uni_big5_onechar(int code){
       
 17435  
       
 17436  
       
 17437  static int
       
 17438 -my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17439 +my_wc_mb_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17440  	      my_wc_t wc, uchar *s, uchar *e)
       
 17441  {
       
 17442  
       
 17443 @@ -6771,7 +6771,7 @@ my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17444  
       
 17445  
       
 17446  static int 
       
 17447 -my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17448 +my_mb_wc_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17449  	      my_wc_t *pwc,const uchar *s,const uchar *e)
       
 17450  {
       
 17451  
       
 17452 @@ -6801,7 +6801,7 @@ my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17453    CP950 and HKSCS additional characters are also accepted.
       
 17454  */
       
 17455  static
       
 17456 -size_t my_well_formed_len_big5(const CHARSET_INFO *cs __attribute__((unused)),
       
 17457 +size_t my_well_formed_len_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17458                                 const char *b, const char *e,
       
 17459                                 size_t pos, int *error)
       
 17460  {
       
 17461 --- a/strings/ctype-bin.c
       
 17462 +++ b/strings/ctype-bin.c
       
 17463 @@ -1,5 +1,5 @@
       
 17464  /* Copyright (c) 2002 MySQL AB & [email protected]
       
 17465 -   Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
       
 17466 +   Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17467     
       
 17468     This library is free software; you can redistribute it and/or
       
 17469     modify it under the terms of the GNU Library General Public
       
 17470 @@ -69,13 +69,13 @@ static uchar bin_char_array[] =
       
 17471  
       
 17472  static my_bool 
       
 17473  my_coll_init_8bit_bin(CHARSET_INFO *cs,
       
 17474 -                      MY_CHARSET_LOADER *loader __attribute__((unused)))
       
 17475 +                      MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused)))
       
 17476  {
       
 17477    cs->max_sort_char=255; 
       
 17478    return FALSE;
       
 17479  }
       
 17480  
       
 17481 -static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)),
       
 17482 +static int my_strnncoll_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17483                                 const uchar *s, size_t slen,
       
 17484                                 const uchar *t, size_t tlen,
       
 17485                                 my_bool t_is_prefix)
       
 17486 @@ -86,8 +86,8 @@ static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)),
       
 17487  }
       
 17488  
       
 17489  
       
 17490 -size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)),
       
 17491 -                          const char *ptr __attribute__((unused)),
       
 17492 +size_t my_lengthsp_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17493 +                          const char *ptr MY_ATTRIBUTE((unused)),
       
 17494                            size_t length)
       
 17495  {
       
 17496    return length;
       
 17497 @@ -117,18 +117,18 @@ size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)),
       
 17498  */
       
 17499  
       
 17500  static int my_strnncollsp_binary(const CHARSET_INFO *cs
       
 17501 -                                 __attribute__((unused)),
       
 17502 +                                 MY_ATTRIBUTE((unused)),
       
 17503                                   const uchar *s, size_t slen,
       
 17504                                   const uchar *t, size_t tlen,
       
 17505                                   my_bool diff_if_only_endspace_difference
       
 17506 -                                 __attribute__((unused)))
       
 17507 +                                 MY_ATTRIBUTE((unused)))
       
 17508  {
       
 17509    return my_strnncoll_binary(cs,s,slen,t,tlen,0);
       
 17510  }
       
 17511  
       
 17512  
       
 17513  static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs
       
 17514 -                                 __attribute__((unused)),
       
 17515 +                                 MY_ATTRIBUTE((unused)),
       
 17516                                   const uchar *s, size_t slen,
       
 17517                                   const uchar *t, size_t tlen,
       
 17518                                   my_bool t_is_prefix)
       
 17519 @@ -165,7 +165,7 @@ static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs
       
 17520  */
       
 17521  
       
 17522  static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs
       
 17523 -                                   __attribute__((unused)),
       
 17524 +                                   MY_ATTRIBUTE((unused)),
       
 17525                                     const uchar *a, size_t a_length, 
       
 17526                                     const uchar *b, size_t b_length,
       
 17527                                     my_bool diff_if_only_endspace_difference)
       
 17528 @@ -214,41 +214,41 @@ static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs
       
 17529  
       
 17530  /* This function is used for all conversion functions */
       
 17531  
       
 17532 -static size_t my_case_str_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17533 -                              char *str __attribute__((unused)))
       
 17534 +static size_t my_case_str_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17535 +                              char *str MY_ATTRIBUTE((unused)))
       
 17536  {
       
 17537    return 0;
       
 17538  }
       
 17539  
       
 17540  
       
 17541 -static size_t my_case_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17542 -                          char *src __attribute__((unused)),
       
 17543 +static size_t my_case_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17544 +                          char *src MY_ATTRIBUTE((unused)),
       
 17545                            size_t srclen,
       
 17546 -                          char *dst __attribute__((unused)),
       
 17547 -                          size_t dstlen __attribute__((unused)))
       
 17548 +                          char *dst MY_ATTRIBUTE((unused)),
       
 17549 +                          size_t dstlen MY_ATTRIBUTE((unused)))
       
 17550  {
       
 17551    return srclen;
       
 17552  }
       
 17553  
       
 17554  
       
 17555 -static int my_strcasecmp_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17556 +static int my_strcasecmp_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17557  			     const char *s, const char *t)
       
 17558  {
       
 17559    return strcmp(s,t);
       
 17560  }
       
 17561  
       
 17562  
       
 17563 -uint my_mbcharlen_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 17564 -                      uint c __attribute__((unused)))
       
 17565 +uint my_mbcharlen_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17566 +                      uint c MY_ATTRIBUTE((unused)))
       
 17567  {
       
 17568    return 1;
       
 17569  }
       
 17570  
       
 17571  
       
 17572 -static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17573 +static int my_mb_wc_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17574  			my_wc_t *wc,
       
 17575  			const uchar *str,
       
 17576 -			const uchar *end __attribute__((unused)))
       
 17577 +			const uchar *end MY_ATTRIBUTE((unused)))
       
 17578  {
       
 17579    if (str >= end)
       
 17580      return MY_CS_TOOSMALL;
       
 17581 @@ -258,10 +258,10 @@ static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17582  }
       
 17583  
       
 17584  
       
 17585 -static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17586 +static int my_wc_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17587  			my_wc_t wc,
       
 17588  			uchar *s,
       
 17589 -			uchar *e __attribute__((unused)))
       
 17590 +			uchar *e MY_ATTRIBUTE((unused)))
       
 17591  {
       
 17592    if (s >= e)
       
 17593      return MY_CS_TOOSMALL;
       
 17594 @@ -275,7 +275,7 @@ static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17595  }
       
 17596  
       
 17597  
       
 17598 -void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17599 +void my_hash_sort_8bit_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17600                             const uchar *key, size_t len,
       
 17601                             ulong *nr1, ulong *nr2)
       
 17602  {
       
 17603 @@ -296,7 +296,7 @@ void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17604  }
       
 17605  
       
 17606  
       
 17607 -void my_hash_sort_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17608 +void my_hash_sort_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17609  		      const uchar *key, size_t len,ulong *nr1, ulong *nr2)
       
 17610  {
       
 17611    const uchar *pos = key;
       
 17612 @@ -428,7 +428,7 @@ my_strnxfrm_8bit_bin(const CHARSET_INFO *cs,
       
 17613  
       
 17614  
       
 17615  static
       
 17616 -uint my_instr_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 17617 +uint my_instr_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17618  		  const char *b, size_t b_length,
       
 17619  		  const char *s, size_t s_length,
       
 17620  		  my_match_t *match, uint nmatch)
       
 17621 --- a/strings/ctype-cp932.c
       
 17622 +++ b/strings/ctype-cp932.c
       
 17623 @@ -1,4 +1,4 @@
       
 17624 -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17625 +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17626  
       
 17627     This program is free software; you can redistribute it and/or modify
       
 17628     it under the terms of the GNU General Public License as published by
       
 17629 @@ -182,13 +182,13 @@ static uchar sort_order_cp932[]=
       
 17630                         (0x80<=(c) && (c)<=0xfc))
       
 17631  
       
 17632  
       
 17633 -static uint ismbchar_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17634 +static uint ismbchar_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17635  			 const char* p, const char *e)
       
 17636  {
       
 17637    return (iscp932head((uchar) *p) && (e-p)>1 && iscp932tail((uchar)p[1]) ? 2: 0);
       
 17638  }
       
 17639  
       
 17640 -static uint mbcharlen_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17641 +static uint mbcharlen_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17642                              uint c)
       
 17643  {
       
 17644    return (iscp932head((uchar) c) ? 2 : 1);
       
 17645 @@ -1742,7 +1742,7 @@ static int my_strnncoll_cp932_internal(const CHARSET_INFO *cs,
       
 17646  }
       
 17647  
       
 17648  
       
 17649 -static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17650 +static int my_strnncoll_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17651  			      const uchar *a, size_t a_length, 
       
 17652  			      const uchar *b, size_t b_length,
       
 17653                                my_bool b_is_prefix)
       
 17654 @@ -1755,11 +1755,11 @@ static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17655  
       
 17656  
       
 17657  static int my_strnncollsp_cp932(const CHARSET_INFO *cs
       
 17658 -                                __attribute__((unused)),
       
 17659 +                                MY_ATTRIBUTE((unused)),
       
 17660                                  const uchar *a, size_t a_length, 
       
 17661                                  const uchar *b, size_t b_length,
       
 17662                                  my_bool diff_if_only_endspace_difference
       
 17663 -                                __attribute__((unused)))
       
 17664 +                                MY_ATTRIBUTE((unused)))
       
 17665  {
       
 17666    const uchar *a_end= a + a_length;
       
 17667    const uchar *b_end= b + b_length;
       
 17668 @@ -34601,7 +34601,7 @@ static uint16 unicode_to_cp932[65536]=
       
 17669  */
       
 17670  
       
 17671  static int
       
 17672 -my_mb_wc_cp932(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17673 +my_mb_wc_cp932(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 17674  	       my_wc_t *pwc, const uchar *s, const uchar *e){
       
 17675    int hi;
       
 17676  
       
 17677 @@ -34645,7 +34645,7 @@ my_mb_wc_cp932(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17678    @retval   MY_CS_ILUNI    If the Unicode character does not exist in CP932
       
 17679  */
       
 17680  static int
       
 17681 -my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17682 +my_wc_mb_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17683  	       my_wc_t wc, uchar *s, uchar *e)
       
 17684  {
       
 17685    int code;
       
 17686 @@ -34685,7 +34685,7 @@ my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17687  
       
 17688  
       
 17689  static
       
 17690 -size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17691 +size_t my_numcells_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17692                        const char *str, const char *str_end)
       
 17693  {
       
 17694    size_t clen= 0;
       
 17695 @@ -34720,7 +34720,7 @@ size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)),
       
 17696  
       
 17697  static
       
 17698  size_t my_well_formed_len_cp932(const CHARSET_INFO *cs
       
 17699 -                                __attribute__((unused)),
       
 17700 +                                MY_ATTRIBUTE((unused)),
       
 17701                                  const char *b, const char *e,
       
 17702                                  size_t pos, int *error)
       
 17703  {
       
 17704 --- a/strings/ctype-czech.c
       
 17705 +++ b/strings/ctype-czech.c
       
 17706 @@ -1,4 +1,4 @@
       
 17707 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17708 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17709  
       
 17710     This program is free software; you can redistribute it and/or modify
       
 17711     it under the terms of the GNU General Public License as published by
       
 17712 @@ -228,7 +228,7 @@ while (1)						\
       
 17713    the length of the strings being specified
       
 17714  */
       
 17715  
       
 17716 -static int my_strnncoll_czech(const CHARSET_INFO *cs __attribute__((unused)),
       
 17717 +static int my_strnncoll_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17718  			      const uchar *s1, size_t len1, 
       
 17719  			      const uchar *s2, size_t len2,
       
 17720                                my_bool s2_is_prefix)
       
 17721 @@ -266,7 +266,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs,
       
 17722                           const uchar *s, size_t slen, 
       
 17723                           const uchar *t, size_t tlen,
       
 17724                           my_bool diff_if_only_endspace_difference
       
 17725 -                         __attribute__((unused)))
       
 17726 +                         MY_ATTRIBUTE((unused)))
       
 17727  {
       
 17728    for ( ; slen && s[slen-1] == ' ' ; slen--);
       
 17729    for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
       
 17730 @@ -279,7 +279,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs,
       
 17731  */
       
 17732  static size_t
       
 17733  my_strnxfrmlen_czech(const CHARSET_INFO *cs
       
 17734 -                     __attribute__((unused)), size_t len)
       
 17735 +                     MY_ATTRIBUTE((unused)), size_t len)
       
 17736  {
       
 17737    return len * 4 + 4;
       
 17738  }
       
 17739 @@ -291,9 +291,9 @@ my_strnxfrmlen_czech(const CHARSET_INFO *cs
       
 17740  */
       
 17741  
       
 17742  static size_t
       
 17743 -my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)), 
       
 17744 +my_strnxfrm_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
       
 17745                    uchar *dest, size_t len,
       
 17746 -                  uint nweights_arg __attribute__((unused)),
       
 17747 +                  uint nweights_arg MY_ATTRIBUTE((unused)),
       
 17748                    const uchar *src, size_t srclen, uint flags)
       
 17749  {
       
 17750    int value;
       
 17751 @@ -369,7 +369,7 @@ my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)),
       
 17752  
       
 17753  
       
 17754  static my_bool my_like_range_czech(const CHARSET_INFO *cs
       
 17755 -                                   __attribute__((unused)),
       
 17756 +                                   MY_ATTRIBUTE((unused)),
       
 17757  				   const char *ptr,size_t ptr_length,
       
 17758  				   pbool escape, pbool w_one, pbool w_many,
       
 17759  				   size_t res_length, char *min_str,
       
 17760 --- a/strings/ctype-euc_kr.c
       
 17761 +++ b/strings/ctype-euc_kr.c
       
 17762 @@ -1,4 +1,4 @@
       
 17763 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17764 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17765  
       
 17766     This program is free software; you can redistribute it and/or modify
       
 17767     it under the terms of the GNU General Public License as published by
       
 17768 @@ -202,7 +202,7 @@ static uchar sort_order_euc_kr[]=
       
 17769                                iseuc_kr_tail3(c))
       
 17770  
       
 17771  
       
 17772 -static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17773 +static uint ismbchar_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17774                              const char* p, const char *e)
       
 17775  {
       
 17776    return ((*(uchar*)(p)<0x80)? 0:\
       
 17777 @@ -210,7 +210,7 @@ static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17778            0);
       
 17779  }
       
 17780  
       
 17781 -static uint mbcharlen_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17782 +static uint mbcharlen_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17783                               uint c)
       
 17784  {
       
 17785    return (iseuc_kr_head(c) ? 2 : 1);
       
 17786 @@ -9877,7 +9877,7 @@ static int func_uni_ksc5601_onechar(int code){
       
 17787  
       
 17788  
       
 17789  static int
       
 17790 -my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17791 +my_wc_mb_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17792  		 my_wc_t wc, uchar *s, uchar *e)
       
 17793  {
       
 17794    int code;
       
 17795 @@ -9905,7 +9905,7 @@ my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17796  
       
 17797  
       
 17798  static int 
       
 17799 -my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17800 +my_mb_wc_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17801  		 my_wc_t *pwc, const uchar *s, const uchar *e)
       
 17802  {
       
 17803    
       
 17804 @@ -9934,7 +9934,7 @@ my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17805    Returns well formed length of a EUC-KR string.
       
 17806  */
       
 17807  static size_t
       
 17808 -my_well_formed_len_euckr(const CHARSET_INFO *cs __attribute__((unused)),
       
 17809 +my_well_formed_len_euckr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17810                           const char *b, const char *e,
       
 17811                           size_t pos, int *error)
       
 17812  {
       
 17813 --- a/strings/ctype-eucjpms.c
       
 17814 +++ b/strings/ctype-eucjpms.c
       
 17815 @@ -1,5 +1,5 @@
       
 17816  /* Copyright (c) 2002 MySQL AB & [email protected]
       
 17817 -   Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
       
 17818 +   Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17819     
       
 17820     This library is free software; you can redistribute it and/or
       
 17821     modify it under the terms of the GNU Library General Public
       
 17822 @@ -185,7 +185,7 @@ static uchar sort_order_eucjpms[]=
       
 17823  #define iseucjpms_ss3(c) (((c)&0xff) == 0x8f)
       
 17824  
       
 17825  
       
 17826 -static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17827 +static uint ismbchar_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17828  		  const char* p, const char *e)
       
 17829  {
       
 17830    return ((*(uchar*)(p)<0x80)? 0:\
       
 17831 @@ -195,7 +195,7 @@ static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17832      0);
       
 17833  }
       
 17834  
       
 17835 -static uint mbcharlen_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17836 +static uint mbcharlen_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17837                                uint c)
       
 17838  {
       
 17839    return (iseucjpms(c)? 2: iseucjpms_ss2(c)? 2: iseucjpms_ss3(c)? 3: 1);
       
 17840 @@ -67311,7 +67311,7 @@ static uint16 unicode_to_jisx0212_eucjpms[65536]=
       
 17841    @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
       
 17842  */
       
 17843  static int
       
 17844 -my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17845 +my_mb_wc_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17846                   my_wc_t *pwc, const uchar *s, const uchar *e)
       
 17847  {
       
 17848    int hi;
       
 17849 @@ -67371,7 +67371,7 @@ my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17850    @retval   MY_CS_ILUNI    If the Unicode character does not exist in EUCJPMS
       
 17851  */
       
 17852  static int
       
 17853 -my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17854 +my_wc_mb_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17855                   my_wc_t wc, uchar *s, uchar *e)
       
 17856  {
       
 17857    int jp;
       
 17858 @@ -67427,7 +67427,7 @@ my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17859  
       
 17860  static
       
 17861  size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs
       
 17862 -                                  __attribute__((unused)),
       
 17863 +                                  MY_ATTRIBUTE((unused)),
       
 17864                                    const char *beg, const char *end, size_t pos,
       
 17865                                    int *error)
       
 17866  {
       
 17867 @@ -67475,7 +67475,7 @@ size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs
       
 17868  
       
 17869  
       
 17870  static
       
 17871 -size_t my_numcells_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
       
 17872 +size_t my_numcells_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17873                             const char *str, const char *str_end)
       
 17874  {
       
 17875    size_t clen;
       
 17876 --- a/strings/ctype-gb2312.c
       
 17877 +++ b/strings/ctype-gb2312.c
       
 17878 @@ -1,4 +1,4 @@
       
 17879 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17880 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17881  
       
 17882     This program is free software; you can redistribute it and/or modify
       
 17883     it under the terms of the GNU General Public License as published by
       
 17884 @@ -165,13 +165,13 @@ static uchar sort_order_gb2312[]=
       
 17885  #define isgb2312tail(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xfe)
       
 17886  
       
 17887  
       
 17888 -static uint ismbchar_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
       
 17889 +static uint ismbchar_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17890  		    const char* p, const char *e)
       
 17891  {
       
 17892    return (isgb2312head(*(p)) && (e)-(p)>1 && isgb2312tail(*((p)+1))? 2: 0);
       
 17893  }
       
 17894  
       
 17895 -static uint mbcharlen_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
       
 17896 +static uint mbcharlen_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17897                               uint c)
       
 17898  {
       
 17899    return (isgb2312head(c)? 2 : 1);
       
 17900 @@ -6282,7 +6282,7 @@ static int func_uni_gb2312_onechar(int code){
       
 17901  
       
 17902  
       
 17903  static int
       
 17904 -my_wc_mb_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17905 +my_wc_mb_gb2312(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 17906  		my_wc_t wc, uchar *s, uchar *e)
       
 17907  {
       
 17908    int code;
       
 17909 @@ -6310,7 +6310,7 @@ my_wc_mb_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17910  
       
 17911  
       
 17912  static int 
       
 17913 -my_mb_wc_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17914 +my_mb_wc_gb2312(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 17915  		my_wc_t *pwc, const uchar *s, const uchar *e){
       
 17916    int hi;
       
 17917    
       
 17918 @@ -6337,7 +6337,7 @@ my_mb_wc_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17919    Returns well formed length of a EUC-KR string.
       
 17920  */
       
 17921  static size_t
       
 17922 -my_well_formed_len_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
       
 17923 +my_well_formed_len_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17924                            const char *b, const char *e,
       
 17925                            size_t pos, int *error)
       
 17926  {
       
 17927 --- a/strings/ctype-gbk.c
       
 17928 +++ b/strings/ctype-gbk.c
       
 17929 @@ -1,4 +1,4 @@
       
 17930 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 17931 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 17932  
       
 17933     This program is free software; you can redistribute it and/or modify
       
 17934     it under the terms of the GNU General Public License as published by
       
 17935 @@ -3475,7 +3475,7 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
       
 17936  
       
 17937  
       
 17938  
       
 17939 -int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17940 +int my_strnncoll_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17941  		     const uchar *a, size_t a_length,
       
 17942                       const uchar *b, size_t b_length,
       
 17943                       my_bool b_is_prefix)
       
 17944 @@ -3486,7 +3486,7 @@ int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17945  }
       
 17946  
       
 17947  
       
 17948 -static int my_strnncollsp_gbk(const CHARSET_INFO * cs __attribute__((unused)),
       
 17949 +static int my_strnncollsp_gbk(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
       
 17950  			      const uchar *a, size_t a_length, 
       
 17951  			      const uchar *b, size_t b_length,
       
 17952                                my_bool diff_if_only_endspace_difference)
       
 17953 @@ -3558,13 +3558,13 @@ my_strnxfrm_gbk(const CHARSET_INFO *cs,
       
 17954  }
       
 17955  
       
 17956  
       
 17957 -static uint ismbchar_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17958 +static uint ismbchar_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17959  		 const char* p, const char *e)
       
 17960  {
       
 17961    return (isgbkhead(*(p)) && (e)-(p)>1 && isgbktail(*((p)+1))? 2: 0);
       
 17962  }
       
 17963  
       
 17964 -static uint mbcharlen_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17965 +static uint mbcharlen_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17966                            uint c)
       
 17967  {
       
 17968    return (isgbkhead(c)? 2 : 1);
       
 17969 @@ -10675,7 +10675,7 @@ static int func_uni_gbk_onechar(int code){
       
 17970  }
       
 17971  
       
 17972  static int
       
 17973 -my_wc_mb_gbk(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17974 +my_wc_mb_gbk(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 17975  	      my_wc_t wc, uchar *s, uchar *e)
       
 17976  {
       
 17977    int code;
       
 17978 @@ -10701,7 +10701,7 @@ my_wc_mb_gbk(const CHARSET_INFO *cs  __attribute__((unused)),
       
 17979  }
       
 17980  
       
 17981  static int
       
 17982 -my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17983 +my_mb_wc_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17984  	      my_wc_t *pwc, const uchar *s, const uchar *e)
       
 17985  {
       
 17986    int hi;
       
 17987 @@ -10732,7 +10732,7 @@ my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17988    Returns well formed length of a GBK string.
       
 17989  */
       
 17990  static
       
 17991 -size_t my_well_formed_len_gbk(const CHARSET_INFO *cs __attribute__((unused)),
       
 17992 +size_t my_well_formed_len_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 17993                                const char *b, const char *e,
       
 17994                                size_t pos, int *error)
       
 17995  {
       
 17996 --- a/strings/ctype-latin1.c
       
 17997 +++ b/strings/ctype-latin1.c
       
 17998 @@ -1,4 +1,4 @@
       
 17999 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 18000 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18001  
       
 18002     This program is free software; you can redistribute it and/or modify
       
 18003     it under the terms of the GNU General Public License as published by
       
 18004 @@ -356,10 +356,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
       
 18005  };
       
 18006  
       
 18007  static
       
 18008 -int my_mb_wc_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18009 +int my_mb_wc_latin1(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18010  		    my_wc_t *wc,
       
 18011  		    const uchar *str,
       
 18012 -		    const uchar *end __attribute__((unused)))
       
 18013 +		    const uchar *end MY_ATTRIBUTE((unused)))
       
 18014  {
       
 18015    if (str >= end)
       
 18016      return MY_CS_TOOSMALL;
       
 18017 @@ -369,10 +369,10 @@ int my_mb_wc_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18018  }
       
 18019  
       
 18020  static
       
 18021 -int my_wc_mb_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18022 +int my_wc_mb_latin1(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18023  		    my_wc_t wc,
       
 18024  		    uchar *str,
       
 18025 -		    uchar *end __attribute__((unused)))
       
 18026 +		    uchar *end MY_ATTRIBUTE((unused)))
       
 18027  {
       
 18028    uchar *pl;
       
 18029    
       
 18030 @@ -547,7 +547,7 @@ uchar combo2map[]={
       
 18031  
       
 18032  
       
 18033  static int my_strnncoll_latin1_de(const CHARSET_INFO *cs
       
 18034 -                                  __attribute__((unused)),
       
 18035 +                                  MY_ATTRIBUTE((unused)),
       
 18036  				  const uchar *a, size_t a_length,
       
 18037  				  const uchar *b, size_t b_length,
       
 18038                                    my_bool b_is_prefix)
       
 18039 @@ -589,7 +589,7 @@ static int my_strnncoll_latin1_de(const CHARSET_INFO *cs
       
 18040  
       
 18041  
       
 18042  static int my_strnncollsp_latin1_de(const CHARSET_INFO *cs
       
 18043 -                                    __attribute__((unused)),
       
 18044 +                                    MY_ATTRIBUTE((unused)),
       
 18045  				    const uchar *a, size_t a_length,
       
 18046  				    const uchar *b, size_t b_length,
       
 18047                                      my_bool diff_if_only_endspace_difference)
       
 18048 @@ -683,7 +683,7 @@ my_strnxfrm_latin1_de(const CHARSET_INFO *cs,
       
 18049  }
       
 18050  
       
 18051  
       
 18052 -void my_hash_sort_latin1_de(const CHARSET_INFO *cs __attribute__((unused)),
       
 18053 +void my_hash_sort_latin1_de(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18054  			    const uchar *key, size_t len,
       
 18055  			    ulong *nr1, ulong *nr2)
       
 18056  {
       
 18057 --- a/strings/ctype-mb.c
       
 18058 +++ b/strings/ctype-mb.c
       
 18059 @@ -1,4 +1,4 @@
       
 18060 -/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
       
 18061 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18062  
       
 18063     This program is free software; you can redistribute it and/or modify
       
 18064     it under the terms of the GNU General Public License as published by
       
 18065 @@ -74,8 +74,8 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint page, uint offs)
       
 18066    For character sets which don't change octet length in case conversion.
       
 18067  */
       
 18068  size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18069 -                    char *dst __attribute__((unused)),
       
 18070 -                    size_t dstlen __attribute__((unused)))
       
 18071 +                    char *dst MY_ATTRIBUTE((unused)),
       
 18072 +                    size_t dstlen MY_ATTRIBUTE((unused)))
       
 18073  {
       
 18074    register uint32 l;
       
 18075    register char *srcend= src + srclen;
       
 18076 @@ -109,8 +109,8 @@ size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18077  
       
 18078  
       
 18079  size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18080 -                    char *dst __attribute__((unused)),
       
 18081 -                    size_t dstlen __attribute__((unused)))
       
 18082 +                    char *dst MY_ATTRIBUTE((unused)),
       
 18083 +                    size_t dstlen MY_ATTRIBUTE((unused)))
       
 18084  {
       
 18085    register uint32 l;
       
 18086    register char *srcend= src + srclen;
       
 18087 @@ -155,7 +155,7 @@ size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18088  static size_t
       
 18089  my_casefold_mb_varlen(const CHARSET_INFO *cs,
       
 18090                        char *src, size_t srclen,
       
 18091 -                      char *dst, size_t dstlen __attribute__((unused)),
       
 18092 +                      char *dst, size_t dstlen MY_ATTRIBUTE((unused)),
       
 18093                        uchar *map,
       
 18094                        size_t is_upper)
       
 18095  {
       
 18096 @@ -373,7 +373,7 @@ int my_wildcmp_mb(const CHARSET_INFO *cs,
       
 18097  }
       
 18098  
       
 18099  
       
 18100 -size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)),
       
 18101 +size_t my_numchars_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18102  		      const char *pos, const char *end)
       
 18103  {
       
 18104    register size_t count= 0;
       
 18105 @@ -387,7 +387,7 @@ size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)),
       
 18106  }
       
 18107  
       
 18108  
       
 18109 -size_t my_charpos_mb(const CHARSET_INFO *cs __attribute__((unused)),
       
 18110 +size_t my_charpos_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18111  		     const char *pos, const char *end, size_t length)
       
 18112  {
       
 18113    const char *start= pos;
       
 18114 @@ -482,7 +482,7 @@ uint my_instr_mb(const CHARSET_INFO *cs,
       
 18115  /* BINARY collations handlers for MB charsets */
       
 18116  
       
 18117  int
       
 18118 -my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18119 +my_strnncoll_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18120                      const uchar *s, size_t slen,
       
 18121                      const uchar *t, size_t tlen,
       
 18122                      my_bool t_is_prefix)
       
 18123 @@ -519,7 +519,7 @@ my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18124  */
       
 18125  
       
 18126  int
       
 18127 -my_strnncollsp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18128 +my_strnncollsp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18129                        const uchar *a, size_t a_length, 
       
 18130                        const uchar *b, size_t b_length,
       
 18131                        my_bool diff_if_only_endspace_difference)
       
 18132 @@ -670,7 +670,7 @@ pad:
       
 18133  
       
 18134  
       
 18135  int
       
 18136 -my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18137 +my_strcasecmp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18138                       const char *s, const char *t)
       
 18139  {
       
 18140    return strcmp(s,t);
       
 18141 @@ -678,7 +678,7 @@ my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18142  
       
 18143  
       
 18144  void
       
 18145 -my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18146 +my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18147                      const uchar *key, size_t len,ulong *nr1, ulong *nr2)
       
 18148  {
       
 18149    const uchar *pos = key;
       
 18150 --- a/strings/ctype-simple.c
       
 18151 +++ b/strings/ctype-simple.c
       
 18152 @@ -1,4 +1,4 @@
       
 18153 -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
       
 18154 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18155  
       
 18156     This program is free software; you can redistribute it and/or modify
       
 18157     it under the terms of the GNU General Public License as published by
       
 18158 @@ -216,8 +216,8 @@ size_t my_casedn_str_8bit(const CHARSET_INFO *cs,char *str)
       
 18159  
       
 18160  
       
 18161  size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18162 -                      char *dst __attribute__((unused)),
       
 18163 -                      size_t dstlen __attribute__((unused)))
       
 18164 +                      char *dst MY_ATTRIBUTE((unused)),
       
 18165 +                      size_t dstlen MY_ATTRIBUTE((unused)))
       
 18166  {
       
 18167    char *end= src + srclen;
       
 18168    register uchar *map= cs->to_upper;
       
 18169 @@ -229,8 +229,8 @@ size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18170  
       
 18171  
       
 18172  size_t my_casedn_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18173 -                      char *dst __attribute__((unused)),
       
 18174 -                      size_t dstlen __attribute__((unused)))
       
 18175 +                      char *dst MY_ATTRIBUTE((unused)),
       
 18176 +                      size_t dstlen MY_ATTRIBUTE((unused)))
       
 18177  {
       
 18178    char *end= src + srclen;
       
 18179    register uchar *map=cs->to_lower;
       
 18180 @@ -251,7 +251,7 @@ int my_strcasecmp_8bit(const CHARSET_INFO *cs,const char *s, const char *t)
       
 18181  
       
 18182  int my_mb_wc_8bit(const CHARSET_INFO *cs,my_wc_t *wc,
       
 18183  		  const uchar *str,
       
 18184 -		  const uchar *end __attribute__((unused)))
       
 18185 +		  const uchar *end MY_ATTRIBUTE((unused)))
       
 18186  {
       
 18187    if (str >= end)
       
 18188      return MY_CS_TOOSMALL;
       
 18189 @@ -288,8 +288,8 @@ int my_wc_mb_8bit(const CHARSET_INFO *cs,my_wc_t wc,
       
 18190     end buffer must be checked.
       
 18191  */
       
 18192  
       
 18193 -size_t my_snprintf_8bit(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18194 -                        char* to, size_t n  __attribute__((unused)),
       
 18195 +size_t my_snprintf_8bit(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18196 +                        char* to, size_t n  MY_ATTRIBUTE((unused)),
       
 18197  		     const char* fmt, ...)
       
 18198  {
       
 18199    va_list args;
       
 18200 @@ -506,7 +506,7 @@ noconv:
       
 18201  }
       
 18202  
       
 18203  
       
 18204 -longlong my_strntoll_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18205 +longlong my_strntoll_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18206  			  const char *nptr, size_t l, int base,
       
 18207  			  char **endptr,int *err)
       
 18208  {
       
 18209 @@ -714,7 +714,7 @@ noconv:
       
 18210  */
       
 18211  
       
 18212  
       
 18213 -double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18214 +double my_strntod_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18215  		       char *str, size_t length,
       
 18216  		       char **end, int *err)
       
 18217  {
       
 18218 @@ -731,7 +731,7 @@ double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18219    Assume len >= 1
       
 18220  */
       
 18221  
       
 18222 -size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18223 +size_t my_long10_to_str_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18224                               char *dst, size_t len, int radix, long int val)
       
 18225  {
       
 18226    char buffer[66];
       
 18227 @@ -773,7 +773,7 @@ size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18228  
       
 18229  
       
 18230  size_t my_longlong10_to_str_8bit(const CHARSET_INFO *cs
       
 18231 -                                 __attribute__((unused)),
       
 18232 +                                 MY_ATTRIBUTE((unused)),
       
 18233                                   char *dst, size_t len, int radix,
       
 18234                                   longlong val)
       
 18235  {
       
 18236 @@ -1030,37 +1030,37 @@ size_t my_scan_8bit(const CHARSET_INFO *cs, const char *str, const char *end,
       
 18237  }
       
 18238  
       
 18239  
       
 18240 -void my_fill_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18241 +void my_fill_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18242  		   char *s, size_t l, int fill)
       
 18243  {
       
 18244    memset(s, fill, l);
       
 18245  }
       
 18246  
       
 18247  
       
 18248 -size_t my_numchars_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18249 +size_t my_numchars_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18250  		      const char *b, const char *e)
       
 18251  {
       
 18252    return (size_t) (e - b);
       
 18253  }
       
 18254  
       
 18255  
       
 18256 -size_t my_numcells_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18257 +size_t my_numcells_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18258                          const char *b, const char *e)
       
 18259  {
       
 18260    return (size_t) (e - b);
       
 18261  }
       
 18262  
       
 18263  
       
 18264 -size_t my_charpos_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18265 -                       const char *b  __attribute__((unused)),
       
 18266 -                       const char *e  __attribute__((unused)),
       
 18267 +size_t my_charpos_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18268 +                       const char *b  MY_ATTRIBUTE((unused)),
       
 18269 +                       const char *e  MY_ATTRIBUTE((unused)),
       
 18270                         size_t pos)
       
 18271  {
       
 18272    return pos;
       
 18273  }
       
 18274  
       
 18275  
       
 18276 -size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18277 +size_t my_well_formed_len_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18278                                 const char *start, const char *end,
       
 18279                                 size_t nchars, int *error)
       
 18280  {
       
 18281 @@ -1070,7 +1070,7 @@ size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18282  }
       
 18283  
       
 18284  
       
 18285 -size_t my_lengthsp_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18286 +size_t my_lengthsp_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18287                          const char *ptr, size_t length)
       
 18288  {
       
 18289    const char *end;
       
 18290 @@ -1274,14 +1274,14 @@ static void set_max_sort_char(CHARSET_INFO *cs)
       
 18291  
       
 18292  static my_bool
       
 18293  my_coll_init_simple(CHARSET_INFO *cs,
       
 18294 -                    MY_CHARSET_LOADER *loader __attribute__((unused)))
       
 18295 +                    MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused)))
       
 18296  {
       
 18297    set_max_sort_char(cs);
       
 18298    return FALSE;
       
 18299  }
       
 18300  
       
 18301  
       
 18302 -longlong my_strtoll10_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18303 +longlong my_strtoll10_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18304                             const char *nptr, char **endptr, int *error)
       
 18305  {
       
 18306    return my_strtoll10(nptr, endptr, error);
       
 18307 @@ -1387,7 +1387,7 @@ static ulonglong d10[DIGITS_IN_ULONGLONG]=
       
 18308  */
       
 18309  
       
 18310  ulonglong
       
 18311 -my_strntoull10rnd_8bit(const CHARSET_INFO *cs __attribute__((unused)),
       
 18312 +my_strntoull10rnd_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18313                         const char *str, size_t length, int unsigned_flag,
       
 18314                         char **endptr, int *error)
       
 18315  {
       
 18316 @@ -1665,17 +1665,17 @@ ret_too_big:
       
 18317  
       
 18318  
       
 18319  
       
 18320 -my_bool my_propagate_simple(const CHARSET_INFO *cs __attribute__((unused)),
       
 18321 -                            const uchar *str __attribute__((unused)),
       
 18322 -                            size_t length __attribute__((unused)))
       
 18323 +my_bool my_propagate_simple(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18324 +                            const uchar *str MY_ATTRIBUTE((unused)),
       
 18325 +                            size_t length MY_ATTRIBUTE((unused)))
       
 18326  {
       
 18327    return 1;
       
 18328  }
       
 18329  
       
 18330  
       
 18331 -my_bool my_propagate_complex(const CHARSET_INFO *cs __attribute__((unused)),
       
 18332 -                             const uchar *str __attribute__((unused)),
       
 18333 -                             size_t length __attribute__((unused)))
       
 18334 +my_bool my_propagate_complex(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18335 +                             const uchar *str MY_ATTRIBUTE((unused)),
       
 18336 +                             size_t length MY_ATTRIBUTE((unused)))
       
 18337  {
       
 18338    return 0;
       
 18339  }
       
 18340 --- a/strings/ctype-sjis.c
       
 18341 +++ b/strings/ctype-sjis.c
       
 18342 @@ -1,4 +1,4 @@
       
 18343 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 18344 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18345  
       
 18346     This program is free software; you can redistribute it and/or modify
       
 18347     it under the terms of the GNU General Public License as published by
       
 18348 @@ -182,13 +182,13 @@ static uchar sort_order_sjis[]=
       
 18349                         (0x80<=(c) && (c)<=0xfc))
       
 18350  
       
 18351  
       
 18352 -static uint ismbchar_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18353 +static uint ismbchar_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18354  			 const char* p, const char *e)
       
 18355  {
       
 18356    return (issjishead((uchar) *p) && (e-p)>1 && issjistail((uchar)p[1]) ? 2: 0);
       
 18357  }
       
 18358  
       
 18359 -static uint mbcharlen_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18360 +static uint mbcharlen_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18361                             uint c)
       
 18362  {
       
 18363    return (issjishead((uchar) c) ? 2 : 1);
       
 18364 @@ -1112,7 +1112,7 @@ static int my_strnncoll_sjis_internal(const CHARSET_INFO *cs,
       
 18365  }
       
 18366  
       
 18367  
       
 18368 -static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18369 +static int my_strnncoll_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18370                               const uchar *a, size_t a_length, 
       
 18371                               const uchar *b, size_t b_length,
       
 18372                               my_bool b_is_prefix)
       
 18373 @@ -1124,7 +1124,7 @@ static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18374  }
       
 18375  
       
 18376  
       
 18377 -static int my_strnncollsp_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18378 +static int my_strnncollsp_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18379  			       const uchar *a, size_t a_length, 
       
 18380  			       const uchar *b, size_t b_length,
       
 18381                                 my_bool diff_if_only_endspace_difference)
       
 18382 @@ -33968,7 +33968,7 @@ static uint16 unicode_to_sjis[65536]=
       
 18383    @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
       
 18384  */
       
 18385  static int
       
 18386 -my_mb_wc_sjis(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18387 +my_mb_wc_sjis(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18388  	      my_wc_t *pwc, const uchar *s, const uchar *e){
       
 18389    int hi;
       
 18390  
       
 18391 @@ -34012,7 +34012,7 @@ my_mb_wc_sjis(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18392    @retval   MY_CS_ILUNI    If the Unicode character does not exist in SJIS
       
 18393  */
       
 18394  static int
       
 18395 -my_wc_mb_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18396 +my_wc_mb_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18397  	      my_wc_t wc, uchar *s, uchar *e)
       
 18398  {
       
 18399    int code;
       
 18400 @@ -34061,7 +34061,7 @@ mb:
       
 18401  
       
 18402  
       
 18403  static
       
 18404 -size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18405 +size_t my_numcells_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18406                        const char *str, const char *str_end)
       
 18407  {
       
 18408    size_t clen;
       
 18409 @@ -34094,7 +34094,7 @@ size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18410    CP932 additional characters are also accepted.
       
 18411  */
       
 18412  static
       
 18413 -size_t my_well_formed_len_sjis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18414 +size_t my_well_formed_len_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18415                                 const char *b, const char *e,
       
 18416                                 size_t pos, int *error)
       
 18417  {
       
 18418 --- a/strings/ctype-tis620.c
       
 18419 +++ b/strings/ctype-tis620.c
       
 18420 @@ -1,4 +1,4 @@
       
 18421 -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
       
 18422 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18423  
       
 18424     This program is free software; you can redistribute it and/or modify
       
 18425     it under the terms of the GNU General Public License as published by
       
 18426 @@ -526,7 +526,7 @@ static size_t thai2sortable(uchar *tstr, size_t len)
       
 18427  */
       
 18428  
       
 18429  static
       
 18430 -int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)),
       
 18431 +int my_strnncoll_tis620(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18432                          const uchar *s1, size_t len1, 
       
 18433                          const uchar *s2, size_t len2,
       
 18434                          my_bool s2_is_prefix)
       
 18435 @@ -556,7 +556,7 @@ int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)),
       
 18436  
       
 18437  
       
 18438  static
       
 18439 -int my_strnncollsp_tis620(const CHARSET_INFO * cs __attribute__((unused)),
       
 18440 +int my_strnncollsp_tis620(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
       
 18441  			  const uchar *a0, size_t a_length, 
       
 18442  			  const uchar *b0, size_t b_length,
       
 18443                            my_bool diff_if_only_endspace_difference)
       
 18444 @@ -841,10 +841,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,plFF
       
 18445  
       
 18446  
       
 18447  static
       
 18448 -int my_mb_wc_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18449 +int my_mb_wc_tis620(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18450  		  my_wc_t *wc,
       
 18451  		  const uchar *str,
       
 18452 -		  const uchar *end __attribute__((unused)))
       
 18453 +		  const uchar *end MY_ATTRIBUTE((unused)))
       
 18454  {
       
 18455    if (str >= end)
       
 18456      return MY_CS_TOOSMALL;
       
 18457 @@ -854,10 +854,10 @@ int my_mb_wc_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18458  }
       
 18459  
       
 18460  static
       
 18461 -int my_wc_mb_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18462 +int my_wc_mb_tis620(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18463  		  my_wc_t wc,
       
 18464  		  uchar *str,
       
 18465 -		  uchar *end __attribute__((unused)))
       
 18466 +		  uchar *end MY_ATTRIBUTE((unused)))
       
 18467  {
       
 18468    uchar *pl;
       
 18469    
       
 18470 --- a/strings/ctype-ucs2.c
       
 18471 +++ b/strings/ctype-ucs2.c
       
 18472 @@ -1,4 +1,4 @@
       
 18473 -/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
       
 18474 +/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18475     
       
 18476     This library is free software; you can redistribute it and/or
       
 18477     modify it under the terms of the GNU Library General Public
       
 18478 @@ -64,8 +64,8 @@ my_bincmp(const uchar *s, const uchar *se,
       
 18479  
       
 18480  
       
 18481  static size_t
       
 18482 -my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  __attribute__((unused)), 
       
 18483 -                         char * s __attribute__((unused)))
       
 18484 +my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  MY_ATTRIBUTE((unused)), 
       
 18485 +                         char * s MY_ATTRIBUTE((unused)))
       
 18486  {
       
 18487    DBUG_ASSERT(0);
       
 18488    return 0;
       
 18489 @@ -73,8 +73,8 @@ my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  __attribute__((unused)),
       
 18490  
       
 18491  
       
 18492  static size_t
       
 18493 -my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)), 
       
 18494 -                         char * s __attribute__((unused)))
       
 18495 +my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
       
 18496 +                         char * s MY_ATTRIBUTE((unused)))
       
 18497  {
       
 18498    DBUG_ASSERT(0);
       
 18499    return 0;
       
 18500 @@ -82,9 +82,9 @@ my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 18501  
       
 18502  
       
 18503  static int
       
 18504 -my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 18505 -                         const char *s __attribute__((unused)),
       
 18506 -                         const char *t __attribute__((unused)))
       
 18507 +my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18508 +                         const char *s MY_ATTRIBUTE((unused)),
       
 18509 +                         const char *t MY_ATTRIBUTE((unused)))
       
 18510  {
       
 18511    DBUG_ASSERT(0);
       
 18512    return 0;
       
 18513 @@ -1047,7 +1047,7 @@ my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap)
       
 18514  
       
 18515  
       
 18516  static size_t
       
 18517 -my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18518 +my_snprintf_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18519                  char* to, size_t n, const char* fmt, ...)
       
 18520  {
       
 18521    size_t retval;
       
 18522 @@ -1060,7 +1060,7 @@ my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18523  
       
 18524  
       
 18525  static size_t
       
 18526 -my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18527 +my_lengthsp_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18528                  const char *ptr, size_t length)
       
 18529  {
       
 18530    const char *end= ptr + length;
       
 18531 @@ -1102,7 +1102,7 @@ my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18532                                    ((c & 3) << 8) + d + 0x10000)
       
 18533  
       
 18534  static int
       
 18535 -my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18536 +my_utf16_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18537               my_wc_t *pwc, const uchar *s, const uchar *e)
       
 18538  {
       
 18539    if (s + 2 > e)
       
 18540 @@ -1135,7 +1135,7 @@ my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18541  
       
 18542  
       
 18543  static int
       
 18544 -my_uni_utf16(const CHARSET_INFO *cs __attribute__((unused)),
       
 18545 +my_uni_utf16(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18546               my_wc_t wc, uchar *s, uchar *e)
       
 18547  {
       
 18548    if (wc <= 0xFFFF)
       
 18549 @@ -1201,8 +1201,8 @@ my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
       
 18550  
       
 18551  static size_t
       
 18552  my_caseup_utf16(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18553 -                char *dst __attribute__((unused)),
       
 18554 -                size_t dstlen __attribute__((unused)))
       
 18555 +                char *dst MY_ATTRIBUTE((unused)),
       
 18556 +                size_t dstlen MY_ATTRIBUTE((unused)))
       
 18557  {
       
 18558    my_wc_t wc;
       
 18559    int res;
       
 18560 @@ -1246,8 +1246,8 @@ my_hash_sort_utf16(const CHARSET_INFO *cs, const uchar *s, size_t slen,
       
 18561  
       
 18562  static size_t
       
 18563  my_casedn_utf16(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18564 -                char *dst __attribute__((unused)),
       
 18565 -                size_t dstlen __attribute__((unused)))
       
 18566 +                char *dst MY_ATTRIBUTE((unused)),
       
 18567 +                size_t dstlen MY_ATTRIBUTE((unused)))
       
 18568  {
       
 18569    my_wc_t wc;
       
 18570    int res;
       
 18571 @@ -1415,8 +1415,8 @@ my_ismbchar_utf16(const CHARSET_INFO *cs, const char *b, const char *e)
       
 18572  
       
 18573  
       
 18574  static uint
       
 18575 -my_mbcharlen_utf16(const CHARSET_INFO *cs  __attribute__((unused)),
       
 18576 -                   uint c __attribute__((unused)))
       
 18577 +my_mbcharlen_utf16(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 18578 +                   uint c MY_ATTRIBUTE((unused)))
       
 18579  {
       
 18580    DBUG_ASSERT(0);
       
 18581    return MY_UTF16_HIGH_HEAD(c) ? 4 : 2;
       
 18582 @@ -1749,7 +1749,7 @@ CHARSET_INFO my_charset_utf16_bin=
       
 18583  
       
 18584  
       
 18585  static int
       
 18586 -my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18587 +my_utf16le_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18588                 my_wc_t *pwc, const uchar *s, const uchar *e)
       
 18589  {
       
 18590    my_wc_t lo;
       
 18591 @@ -1779,7 +1779,7 @@ my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18592  
       
 18593  
       
 18594  static int
       
 18595 -my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
       
 18596 +my_uni_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18597                 my_wc_t wc, uchar *s, uchar *e)
       
 18598  {
       
 18599    if (wc < MY_UTF16_SURROGATE_HIGH_FIRST ||
       
 18600 @@ -1806,7 +1806,7 @@ my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
       
 18601  
       
 18602  
       
 18603  static size_t
       
 18604 -my_lengthsp_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
       
 18605 +my_lengthsp_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18606                      const char *ptr, size_t length)
       
 18607  {
       
 18608    const char *end= ptr + length;
       
 18609 @@ -1922,7 +1922,7 @@ CHARSET_INFO my_charset_utf16le_bin=
       
 18610  #ifdef HAVE_CHARSET_utf32
       
 18611  
       
 18612  static int
       
 18613 -my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18614 +my_utf32_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18615               my_wc_t *pwc, const uchar *s, const uchar *e)
       
 18616  {
       
 18617    if (s + 4 > e)
       
 18618 @@ -1933,7 +1933,7 @@ my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18619  
       
 18620  
       
 18621  static int
       
 18622 -my_uni_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18623 +my_uni_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18624               my_wc_t wc, uchar *s, uchar *e)
       
 18625  {
       
 18626    if (s + 4 > e) 
       
 18627 @@ -1983,8 +1983,8 @@ my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
       
 18628  
       
 18629  static size_t
       
 18630  my_caseup_utf32(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18631 -                char *dst __attribute__((unused)),
       
 18632 -                size_t dstlen __attribute__((unused)))
       
 18633 +                char *dst MY_ATTRIBUTE((unused)),
       
 18634 +                size_t dstlen MY_ATTRIBUTE((unused)))
       
 18635  {
       
 18636    my_wc_t wc;
       
 18637    int res;
       
 18638 @@ -2039,8 +2039,8 @@ my_hash_sort_utf32(const CHARSET_INFO *cs, const uchar *s, size_t slen,
       
 18639  
       
 18640  static size_t
       
 18641  my_casedn_utf32(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18642 -                char *dst __attribute__((unused)),
       
 18643 -                size_t dstlen __attribute__((unused)))
       
 18644 +                char *dst MY_ATTRIBUTE((unused)),
       
 18645 +                size_t dstlen MY_ATTRIBUTE((unused)))
       
 18646  {
       
 18647    my_wc_t wc;
       
 18648    int res;
       
 18649 @@ -2198,7 +2198,7 @@ my_strnncollsp_utf32(const CHARSET_INFO *cs,
       
 18650  
       
 18651  
       
 18652  static size_t
       
 18653 -my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18654 +my_strnxfrmlen_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18655                       size_t len)
       
 18656  {
       
 18657    return len / 2;
       
 18658 @@ -2206,17 +2206,17 @@ my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18659  
       
 18660  
       
 18661  static uint
       
 18662 -my_ismbchar_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18663 -                  const char *b __attribute__((unused)),
       
 18664 -                  const char *e __attribute__((unused)))
       
 18665 +my_ismbchar_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18666 +                  const char *b MY_ATTRIBUTE((unused)),
       
 18667 +                  const char *e MY_ATTRIBUTE((unused)))
       
 18668  {
       
 18669    return 4;
       
 18670  }
       
 18671  
       
 18672  
       
 18673  static uint
       
 18674 -my_mbcharlen_utf32(const CHARSET_INFO *cs  __attribute__((unused)) , 
       
 18675 -                   uint c __attribute__((unused)))
       
 18676 +my_mbcharlen_utf32(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)) , 
       
 18677 +                   uint c MY_ATTRIBUTE((unused)))
       
 18678  {
       
 18679    return 4;
       
 18680  }
       
 18681 @@ -2312,7 +2312,7 @@ my_vsnprintf_utf32(char *dst, size_t n, const char* fmt, va_list ap)
       
 18682  
       
 18683  
       
 18684  static size_t
       
 18685 -my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18686 +my_snprintf_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18687                    char* to, size_t n, const char* fmt, ...)
       
 18688  {
       
 18689    size_t retval;
       
 18690 @@ -2325,7 +2325,7 @@ my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18691  
       
 18692  
       
 18693  static longlong
       
 18694 -my_strtoll10_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18695 +my_strtoll10_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18696                     const char *nptr, char **endptr, int *error)
       
 18697  {
       
 18698    const char *s, *end, *start, *n_end, *true_end;
       
 18699 @@ -2495,7 +2495,7 @@ no_conv:
       
 18700  
       
 18701  
       
 18702  static size_t
       
 18703 -my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18704 +my_numchars_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18705                    const char *b, const char *e)
       
 18706  {
       
 18707    return (size_t) (e - b) / 4;
       
 18708 @@ -2503,7 +2503,7 @@ my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18709  
       
 18710  
       
 18711  static size_t
       
 18712 -my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18713 +my_charpos_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18714                   const char *b, const char *e, size_t pos)
       
 18715  {
       
 18716    size_t string_length= (size_t) (e - b);
       
 18717 @@ -2512,7 +2512,7 @@ my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18718  
       
 18719  
       
 18720  static size_t
       
 18721 -my_well_formed_len_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18722 +my_well_formed_len_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18723                           const char *b, const char *e,
       
 18724                           size_t nchars, int *error)
       
 18725  {
       
 18726 @@ -2565,7 +2565,7 @@ void my_fill_utf32(const CHARSET_INFO *cs,
       
 18727  
       
 18728  
       
 18729  static size_t
       
 18730 -my_lengthsp_utf32(const CHARSET_INFO *cs __attribute__((unused)),
       
 18731 +my_lengthsp_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18732                    const char *ptr, size_t length)
       
 18733  {
       
 18734    const char *end= ptr + length;
       
 18735 @@ -2643,11 +2643,11 @@ my_utf32_get(const uchar *s)
       
 18736  
       
 18737  
       
 18738  static int
       
 18739 -my_strnncollsp_utf32_bin(const CHARSET_INFO *cs __attribute__((unused)), 
       
 18740 +my_strnncollsp_utf32_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
       
 18741                           const uchar *s, size_t slen, 
       
 18742                           const uchar *t, size_t tlen,
       
 18743                           my_bool diff_if_only_endspace_difference
       
 18744 -                         __attribute__((unused)))
       
 18745 +                         MY_ATTRIBUTE((unused)))
       
 18746  {
       
 18747    const uchar *se, *te;
       
 18748    size_t minlen;
       
 18749 @@ -2910,7 +2910,7 @@ static uchar to_upper_ucs2[] = {
       
 18750  };
       
 18751  
       
 18752  
       
 18753 -static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18754 +static int my_ucs2_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18755  		       my_wc_t * pwc, const uchar *s, const uchar *e)
       
 18756  {
       
 18757    if (s+2 > e) /* Need 2 characters */
       
 18758 @@ -2920,7 +2920,7 @@ static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18759    return 2;
       
 18760  }
       
 18761  
       
 18762 -static int my_uni_ucs2(const CHARSET_INFO *cs __attribute__((unused)) ,
       
 18763 +static int my_uni_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) ,
       
 18764  		       my_wc_t wc, uchar *r, uchar *e)
       
 18765  {
       
 18766    if ( r+2 > e ) 
       
 18767 @@ -2963,8 +2963,8 @@ my_tosort_ucs2(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
       
 18768  
       
 18769  
       
 18770  static size_t my_caseup_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18771 -                           char *dst __attribute__((unused)),
       
 18772 -                           size_t dstlen __attribute__((unused)))
       
 18773 +                           char *dst MY_ATTRIBUTE((unused)),
       
 18774 +                           size_t dstlen MY_ATTRIBUTE((unused)))
       
 18775  {
       
 18776    my_wc_t wc;
       
 18777    int res;
       
 18778 @@ -3008,8 +3008,8 @@ static void my_hash_sort_ucs2(const CHARSET_INFO *cs, const uchar *s,
       
 18779  
       
 18780  
       
 18781  static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18782 -                           char *dst __attribute__((unused)),
       
 18783 -                           size_t dstlen __attribute__((unused)))
       
 18784 +                           char *dst MY_ATTRIBUTE((unused)),
       
 18785 +                           size_t dstlen MY_ATTRIBUTE((unused)))
       
 18786  {
       
 18787    my_wc_t wc;
       
 18788    int res;
       
 18789 @@ -3030,7 +3030,7 @@ static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
       
 18790  
       
 18791  
       
 18792  static void
       
 18793 -my_fill_ucs2(const CHARSET_INFO *cs __attribute__((unused)), 
       
 18794 +my_fill_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
       
 18795               char *s, size_t l, int fill)
       
 18796  {
       
 18797    DBUG_ASSERT(fill <= 0xFFFF);
       
 18798 @@ -3101,11 +3101,11 @@ static int my_strnncoll_ucs2(const CHARSET_INFO *cs,
       
 18799      > 0  a > b
       
 18800  */
       
 18801  
       
 18802 -static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18803 +static int my_strnncollsp_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18804                                 const uchar *s, size_t slen,
       
 18805                                 const uchar *t, size_t tlen,
       
 18806                                 my_bool diff_if_only_endspace_difference
       
 18807 -			       __attribute__((unused)))
       
 18808 +			       MY_ATTRIBUTE((unused)))
       
 18809  {
       
 18810    const uchar *se, *te;
       
 18811    size_t minlen;
       
 18812 @@ -3152,23 +3152,23 @@ static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18813  }
       
 18814  
       
 18815  
       
 18816 -static uint my_ismbchar_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18817 -                             const char *b __attribute__((unused)),
       
 18818 -                             const char *e __attribute__((unused)))
       
 18819 +static uint my_ismbchar_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18820 +                             const char *b MY_ATTRIBUTE((unused)),
       
 18821 +                             const char *e MY_ATTRIBUTE((unused)))
       
 18822  {
       
 18823    return 2;
       
 18824  }
       
 18825  
       
 18826  
       
 18827 -static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs __attribute__((unused)) ,
       
 18828 -                              uint c __attribute__((unused)))
       
 18829 +static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) ,
       
 18830 +                              uint c MY_ATTRIBUTE((unused)))
       
 18831  {
       
 18832    return 2;
       
 18833  }
       
 18834  
       
 18835  
       
 18836  static
       
 18837 -size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18838 +size_t my_numchars_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18839                          const char *b, const char *e)
       
 18840  {
       
 18841    return (size_t) (e-b)/2;
       
 18842 @@ -3176,9 +3176,9 @@ size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18843  
       
 18844  
       
 18845  static
       
 18846 -size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18847 -                       const char *b  __attribute__((unused)),
       
 18848 -                       const char *e  __attribute__((unused)),
       
 18849 +size_t my_charpos_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18850 +                       const char *b  MY_ATTRIBUTE((unused)),
       
 18851 +                       const char *e  MY_ATTRIBUTE((unused)),
       
 18852                         size_t pos)
       
 18853  {
       
 18854    size_t string_length= (size_t) (e - b);
       
 18855 @@ -3187,7 +3187,7 @@ size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18856  
       
 18857  
       
 18858  static
       
 18859 -size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
       
 18860 +size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18861                                 const char *b, const char *e,
       
 18862                                 size_t nchars, int *error)
       
 18863  {
       
 18864 @@ -3255,11 +3255,11 @@ int my_strnncoll_ucs2_bin(const CHARSET_INFO *cs,
       
 18865  }
       
 18866  
       
 18867  static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs
       
 18868 -                                   __attribute__((unused)),
       
 18869 +                                   MY_ATTRIBUTE((unused)),
       
 18870                                     const uchar *s, size_t slen, 
       
 18871                                     const uchar *t, size_t tlen,
       
 18872                                     my_bool diff_if_only_endspace_difference
       
 18873 -                                   __attribute__((unused)))
       
 18874 +                                   MY_ATTRIBUTE((unused)))
       
 18875  {
       
 18876    const uchar *se, *te;
       
 18877    size_t minlen;
       
 18878 @@ -3303,7 +3303,7 @@ static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs
       
 18879  
       
 18880  
       
 18881  static
       
 18882 -void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs __attribute__((unused)),
       
 18883 +void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18884  			   const uchar *key, size_t len,ulong *nr1, ulong *nr2)
       
 18885  {
       
 18886    const uchar *pos = key;
       
 18887 --- a/strings/ctype-ujis.c
       
 18888 +++ b/strings/ctype-ujis.c
       
 18889 @@ -1,5 +1,5 @@
       
 18890  /* Copyright (c) 2002 MySQL AB & [email protected]
       
 18891 -   Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
       
 18892 +   Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18893     
       
 18894     This library is free software; you can redistribute it and/or
       
 18895     modify it under the terms of the GNU Library General Public
       
 18896 @@ -184,7 +184,7 @@ static uchar sort_order_ujis[]=
       
 18897  #define isujis_ss3(c) (((c)&0xff) == 0x8f)
       
 18898  
       
 18899  
       
 18900 -static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18901 +static uint ismbchar_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18902  		  const char* p, const char *e)
       
 18903  {
       
 18904    return ((*(uchar*)(p)<0x80)? 0:\
       
 18905 @@ -194,7 +194,7 @@ static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18906      0);
       
 18907  }
       
 18908  
       
 18909 -static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18910 +static uint mbcharlen_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18911                             uint c)
       
 18912  {
       
 18913    return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 1);
       
 18914 @@ -210,7 +210,7 @@ static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18915  */
       
 18916  
       
 18917  static
       
 18918 -size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18919 +size_t my_well_formed_len_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18920                                 const char *beg, const char *end,
       
 18921                                 size_t pos, int *error)
       
 18922  {
       
 18923 @@ -260,7 +260,7 @@ size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)),
       
 18924  
       
 18925  
       
 18926  static
       
 18927 -size_t my_numcells_eucjp(const CHARSET_INFO *cs __attribute__((unused)),
       
 18928 +size_t my_numcells_eucjp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18929                         const char *str, const char *str_end)
       
 18930  {
       
 18931    size_t clen;
       
 18932 @@ -65880,7 +65880,7 @@ static uint16 unicode_to_jisx0212_eucjp[65536]=
       
 18933    @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
       
 18934  */
       
 18935  static int
       
 18936 -my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
       
 18937 +my_mb_wc_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18938                  my_wc_t *pwc, const uchar *s, const uchar *e)
       
 18939  {
       
 18940    int hi;
       
 18941 @@ -65940,7 +65940,7 @@ my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
       
 18942    @retval   MY_CS_ILUNI    If the Unicode character does not exist in UJIS
       
 18943  */
       
 18944  static int
       
 18945 -my_wc_mb_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
       
 18946 +my_wc_mb_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18947                  my_wc_t wc, uchar *s, uchar *e)
       
 18948  {
       
 18949    int jp;
       
 18950 @@ -67181,7 +67181,7 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint plane, uint page, uint offs)
       
 18951  static size_t
       
 18952  my_casefold_ujis(const CHARSET_INFO *cs,
       
 18953                   char *src, size_t srclen,
       
 18954 -                 char *dst, size_t dstlen __attribute__((unused)),
       
 18955 +                 char *dst, size_t dstlen MY_ATTRIBUTE((unused)),
       
 18956                   uchar *map,
       
 18957                   size_t is_upper)
       
 18958  {
       
 18959 --- a/strings/ctype-utf8.c
       
 18960 +++ b/strings/ctype-utf8.c
       
 18961 @@ -1,4 +1,4 @@
       
 18962 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
 18963 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 18964  
       
 18965     This library is free software; you can redistribute it and/or
       
 18966     modify it under the terms of the GNU Library General Public
       
 18967 @@ -5327,7 +5327,7 @@ static inline int bincmp(const uchar *s, const uchar *se,
       
 18968  }
       
 18969  
       
 18970  
       
 18971 -static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18972 +static int my_utf8_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18973                         my_wc_t * pwc, const uchar *s, const uchar *e)
       
 18974  {
       
 18975    uchar c;
       
 18976 @@ -5438,7 +5438,7 @@ static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)),
       
 18977    for example, for a null-terminated string
       
 18978  */
       
 18979  static int my_utf8_uni_no_range(const CHARSET_INFO *cs
       
 18980 -                                __attribute__((unused)),
       
 18981 +                                MY_ATTRIBUTE((unused)),
       
 18982                                  my_wc_t * pwc, const uchar *s)
       
 18983  {
       
 18984    uchar c;
       
 18985 @@ -5479,7 +5479,7 @@ static int my_utf8_uni_no_range(const CHARSET_INFO *cs
       
 18986  }
       
 18987  
       
 18988  
       
 18989 -static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)),
       
 18990 +static int my_uni_utf8 (const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 18991                          my_wc_t wc, uchar *r, uchar *e)
       
 18992  {
       
 18993    int count;
       
 18994 @@ -5529,7 +5529,7 @@ static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)),
       
 18995    The same as above, but without range check.
       
 18996  */
       
 18997  static int my_uni_utf8_no_range(const CHARSET_INFO *cs
       
 18998 -                                __attribute__((unused)),
       
 18999 +                                MY_ATTRIBUTE((unused)),
       
 19000                                  my_wc_t wc, uchar *r)
       
 19001  {
       
 19002    int count;
       
 19003 @@ -5955,7 +5955,7 @@ int my_wildcmp_utf8(const CHARSET_INFO *cs,
       
 19004  
       
 19005  
       
 19006  static
       
 19007 -size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
       
 19008 +size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19009                             size_t len)
       
 19010  {
       
 19011    return (len * 2 + 2) / 3;
       
 19012 @@ -5963,7 +5963,7 @@ size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
       
 19013  
       
 19014  
       
 19015  static
       
 19016 -int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
       
 19017 +int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19018                              const uchar *s, const uchar *e)
       
 19019  {
       
 19020    uchar c;
       
 19021 @@ -6050,7 +6050,7 @@ static uint my_ismbchar_utf8(const CHARSET_INFO *cs,const char *b,
       
 19022    return (res>1) ? res : 0;
       
 19023  }
       
 19024  
       
 19025 -static uint my_mbcharlen_utf8(const CHARSET_INFO *cs  __attribute__((unused)),
       
 19026 +static uint my_mbcharlen_utf8(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 19027                                uint c)
       
 19028  {
       
 19029    if (c < 0x80)
       
 19030 @@ -7575,7 +7575,7 @@ static char filename_safe_char[128]=
       
 19031  #define MY_FILENAME_ESCAPE '@'
       
 19032  
       
 19033  static int
       
 19034 -my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)),
       
 19035 +my_mb_wc_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19036                    my_wc_t *pwc, const uchar *s, const uchar *e)
       
 19037  {
       
 19038    int byte1, byte2;
       
 19039 @@ -7635,7 +7635,7 @@ my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)),
       
 19040  
       
 19041  
       
 19042  static int
       
 19043 -my_wc_mb_filename(const CHARSET_INFO *cs __attribute__((unused)),
       
 19044 +my_wc_mb_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19045                    my_wc_t wc, uchar *s, uchar *e)
       
 19046  {
       
 19047    int code;
       
 19048 @@ -7898,7 +7898,7 @@ bincmp_utf8mb4(const uchar *s, const uchar *se,
       
 19049  
       
 19050  
       
 19051  static int
       
 19052 -my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19053 +my_mb_wc_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19054                   my_wc_t * pwc, const uchar *s, const uchar *e)
       
 19055  {
       
 19056    uchar c;
       
 19057 @@ -7984,7 +7984,7 @@ my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19058    for example, for a null-terminated string
       
 19059  */
       
 19060  static int
       
 19061 -my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
       
 19062 +my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19063                            my_wc_t *pwc, const uchar *s)
       
 19064  {
       
 19065    uchar c;
       
 19066 @@ -8039,7 +8039,7 @@ my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
       
 19067  
       
 19068  
       
 19069  static int
       
 19070 -my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19071 +my_wc_mb_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19072                   my_wc_t wc, uchar *r, uchar *e)
       
 19073  {
       
 19074    int count;
       
 19075 @@ -8075,7 +8075,7 @@ my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19076    The same as above, but without range check.
       
 19077  */
       
 19078  static int
       
 19079 -my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
       
 19080 +my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19081                            my_wc_t wc, uchar *r)
       
 19082  {
       
 19083    int count;
       
 19084 @@ -8514,7 +8514,7 @@ my_wildcmp_utf8mb4(const CHARSET_INFO *cs,
       
 19085  
       
 19086  
       
 19087  static size_t
       
 19088 -my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19089 +my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19090                         size_t len)
       
 19091  {
       
 19092    /* TODO: fix when working on WL "Unicode new version" */
       
 19093 @@ -8523,7 +8523,7 @@ my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19094  
       
 19095  
       
 19096  static int
       
 19097 -my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
       
 19098 +my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19099                             const uchar *s, const uchar *e)
       
 19100  {
       
 19101    uchar c;
       
 19102 @@ -8605,7 +8605,7 @@ my_ismbchar_utf8mb4(const CHARSET_INFO *cs, const char *b, const char *e)
       
 19103  
       
 19104  
       
 19105  static uint
       
 19106 -my_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), uint c)
       
 19107 +my_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c)
       
 19108  {
       
 19109    if (c < 0x80)
       
 19110      return 1;
       
 19111 --- a/strings/ctype-win1250ch.c
       
 19112 +++ b/strings/ctype-win1250ch.c
       
 19113 @@ -1,4 +1,4 @@
       
 19114 -/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
       
 19115 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19116  
       
 19117     This program is free software; you can redistribute it and/or modify
       
 19118     it under the terms of the GNU General Public License as published by
       
 19119 @@ -436,7 +436,7 @@ static struct wordvalue doubles[] = {
       
 19120  #define IS_END(p, src, len)	(((char *)p - (char *)src) >= (len))
       
 19121  
       
 19122  static int my_strnncoll_win1250ch(const CHARSET_INFO *cs
       
 19123 -                                  __attribute__((unused)),
       
 19124 +                                  MY_ATTRIBUTE((unused)),
       
 19125  				  const uchar *s1, size_t len1,
       
 19126                                    const uchar *s2, size_t len2,
       
 19127                                    my_bool s2_is_prefix)
       
 19128 @@ -471,7 +471,7 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs,
       
 19129  			     const uchar *s, size_t slen, 
       
 19130  			     const uchar *t, size_t tlen,
       
 19131                               my_bool diff_if_only_endspace_difference
       
 19132 -                             __attribute__((unused)))
       
 19133 +                             MY_ATTRIBUTE((unused)))
       
 19134  {
       
 19135    for ( ; slen && s[slen-1] == ' ' ; slen--);
       
 19136    for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
       
 19137 @@ -480,9 +480,9 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs,
       
 19138  
       
 19139  
       
 19140  static size_t
       
 19141 -my_strnxfrm_win1250ch(const CHARSET_INFO *cs  __attribute__((unused)),
       
 19142 +my_strnxfrm_win1250ch(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
       
 19143                        uchar *dest, size_t len,
       
 19144 -                      uint nweights_arg __attribute__((unused)),
       
 19145 +                      uint nweights_arg MY_ATTRIBUTE((unused)),
       
 19146                        const uchar *src, size_t srclen, uint flags)
       
 19147  {
       
 19148    int value;
       
 19149 @@ -614,7 +614,7 @@ static uchar like_range_prefix_max_win1250ch[]=
       
 19150  */
       
 19151  
       
 19152  static my_bool
       
 19153 -my_like_range_win1250ch(const CHARSET_INFO *cs __attribute__((unused)),
       
 19154 +my_like_range_win1250ch(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
       
 19155  			const char *ptr, size_t ptr_length,
       
 19156  			pbool escape, pbool w_one, pbool w_many,
       
 19157  			size_t res_length,
       
 19158 --- a/tests/mysql_client_fw.c
       
 19159 +++ b/tests/mysql_client_fw.c
       
 19160 @@ -1,4 +1,4 @@
       
 19161 -/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights
       
 19162 +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights
       
 19163   * reserved.
       
 19164  
       
 19165     This program is free software; you can redistribute it and/or modify
       
 19166 @@ -1265,7 +1265,7 @@ static struct my_tests_st *get_my_tests();  /* To be defined in main .c file */
       
 19167  static struct my_tests_st *my_testlist= 0;
       
 19168  
       
 19169  static my_bool
       
 19170 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 19171 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 19172  char *argument)
       
 19173  {
       
 19174   switch (optid) {
       
 19175 --- a/tests/thread_test.c
       
 19176 +++ b/tests/thread_test.c
       
 19177 @@ -1,4 +1,4 @@
       
 19178 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 19179 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19180  
       
 19181     This program is free software; you can redistribute it and/or modify
       
 19182     it under the terms of the GNU General Public License as published by
       
 19183 @@ -29,9 +29,9 @@ static char *database,*host,*user,*password,*unix_socket,*query;
       
 19184  uint tcp_port;
       
 19185  
       
 19186  #ifndef __WIN__
       
 19187 -void *test_thread(void *arg __attribute__((unused)))
       
 19188 +void *test_thread(void *arg MY_ATTRIBUTE((unused)))
       
 19189  #else
       
 19190 -unsigned __stdcall test_thread(void *arg __attribute__((unused)))
       
 19191 +unsigned __stdcall test_thread(void *arg MY_ATTRIBUTE((unused)))
       
 19192  #endif
       
 19193  {
       
 19194    MYSQL *mysql;
       
 19195 @@ -134,7 +134,7 @@ static void usage()
       
 19196  
       
 19197  
       
 19198  static my_bool
       
 19199 -get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       
 19200 +get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
       
 19201  	       char *argument)
       
 19202  {
       
 19203    switch (optid) {
       
 19204 --- a/unittest/gunit/rpl_group_set-t.cc
       
 19205 +++ b/unittest/gunit/rpl_group_set-t.cc
       
 19206 @@ -1,4 +1,4 @@
       
 19207 -/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
       
 19208 +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19209  
       
 19210     This program is free software; you can redistribute it and/or modify
       
 19211     it under the terms of the GNU General Public License as published by
       
 19212 @@ -472,9 +472,9 @@ TEST_F(GroupTest, Group_containers)
       
 19213    push_errtext();                                                       \
       
 19214    for (int method_i= 0, combination_i= 0; method_i < MAX_METHOD; method_i++) { \
       
 19215      for (int sid_map_i= 0; sid_map_i < MAX_SID_MAP; sid_map_i++, combination_i++) { \
       
 19216 -      Gtid_set &gtid_set __attribute__((unused))=                       \
       
 19217 +      Gtid_set &gtid_set MY_ATTRIBUTE((unused))=                       \
       
 19218          containers[combination_i]->gtid_set;                            \
       
 19219 -      Sid_map *&sid_map __attribute__((unused))=                        \
       
 19220 +      Sid_map *&sid_map MY_ATTRIBUTE((unused))=                        \
       
 19221          sid_maps[sid_map_i];                                            \
       
 19222        append_errtext(__LINE__,                                          \
       
 19223                       "sid_map_i=%d method_i=%d combination_i=%d",       \
       
 19224 @@ -489,13 +489,13 @@ TEST_F(GroupTest, Group_containers)
       
 19225      for (int end_i= 0; end_i < MAX_END; end_i++) {                      \
       
 19226        for (int empty_i= 0; empty_i < MAX_EMPTY; empty_i++) {            \
       
 19227          for (int anon_i= 0; anon_i < MAX_ANON; anon_i++, combination_i++) { \
       
 19228 -          Gtid_set &gtid_set __attribute__((unused))=                   \
       
 19229 +          Gtid_set &gtid_set MY_ATTRIBUTE((unused))=                   \
       
 19230              containers[combination_i]->gtid_set;                        \
       
 19231 -          Group_cache &stmt_cache __attribute__((unused))=              \
       
 19232 +          Group_cache &stmt_cache MY_ATTRIBUTE((unused))=              \
       
 19233              containers[combination_i]->stmt_cache;                      \
       
 19234 -          Group_cache &trx_cache __attribute__((unused))=               \
       
 19235 +          Group_cache &trx_cache MY_ATTRIBUTE((unused))=               \
       
 19236              containers[combination_i]->trx_cache;                       \
       
 19237 -          Group_log_state &group_log_state __attribute__((unused))=     \
       
 19238 +          Group_log_state &group_log_state MY_ATTRIBUTE((unused))=     \
       
 19239              containers[combination_i]->group_log_state;                 \
       
 19240            append_errtext(__LINE__,                                      \
       
 19241                           "type_i=%d end_i=%d empty_i=%d "               \
       
 19242 --- a/unittest/mytap/tap.h
       
 19243 +++ b/unittest/mytap/tap.h
       
 19244 @@ -1,4 +1,4 @@
       
 19245 -/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 
       
 19246 +/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. 
       
 19247  
       
 19248     This program is free software; you can redistribute it and/or modify
       
 19249     it under the terms of the GNU General Public License as published by
       
 19250 @@ -126,7 +126,7 @@ void plan(int const count);
       
 19251  */
       
 19252  
       
 19253  void ok(int const pass, char const *fmt, ...)
       
 19254 -  __attribute__((format(printf,2,3)));
       
 19255 +  MY_ATTRIBUTE((format(printf,2,3)));
       
 19256  
       
 19257  
       
 19258  /**
       
 19259 @@ -169,7 +169,7 @@ void ok1(int const pass);
       
 19260   */
       
 19261  
       
 19262  void skip(int how_many, char const *reason, ...)
       
 19263 -    __attribute__((format(printf,2,3)));
       
 19264 +    MY_ATTRIBUTE((format(printf,2,3)));
       
 19265  
       
 19266  
       
 19267  /**
       
 19268 @@ -218,7 +218,7 @@ void skip(int how_many, char const *reason, ...)
       
 19269   */
       
 19270  
       
 19271  void diag(char const *fmt, ...)
       
 19272 -  __attribute__((format(printf,1,2)));
       
 19273 +  MY_ATTRIBUTE((format(printf,1,2)));
       
 19274  
       
 19275  
       
 19276  /**
       
 19277 @@ -240,7 +240,7 @@ void diag(char const *fmt, ...)
       
 19278  */
       
 19279  
       
 19280  void BAIL_OUT(char const *fmt, ...)
       
 19281 -  __attribute__((noreturn, format(printf,1,2)));
       
 19282 +  MY_ATTRIBUTE((noreturn, format(printf,1,2)));
       
 19283  
       
 19284  
       
 19285  /**
       
 19286 @@ -271,7 +271,7 @@ int exit_status(void);
       
 19287   */
       
 19288  
       
 19289  void skip_all(char const *reason, ...)
       
 19290 -  __attribute__((noreturn, format(printf, 1, 2)));
       
 19291 +  MY_ATTRIBUTE((noreturn, format(printf, 1, 2)));
       
 19292  
       
 19293  
       
 19294  /**
       
 19295 @@ -296,7 +296,7 @@ void skip_all(char const *reason, ...)
       
 19296  */
       
 19297  
       
 19298  void todo_start(char const *message, ...)
       
 19299 -  __attribute__((format(printf, 1, 2)));
       
 19300 +  MY_ATTRIBUTE((format(printf, 1, 2)));
       
 19301  
       
 19302  
       
 19303  /**
       
 19304 --- a/vio/test-sslclient.c
       
 19305 +++ b/vio/test-sslclient.c
       
 19306 @@ -1,4 +1,4 @@
       
 19307 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 19308 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19309  
       
 19310     This program is free software; you can redistribute it and/or modify
       
 19311     it under the terms of the GNU General Public License as published by
       
 19312 @@ -40,7 +40,7 @@ fatal_error(	const char*	r)
       
 19313  }
       
 19314  
       
 19315  int
       
 19316 -main(	int	argc __attribute__((unused)),
       
 19317 +main(	int	argc MY_ATTRIBUTE((unused)),
       
 19318  	char**	argv)
       
 19319  {
       
 19320  	char	client_key[] = "../SSL/client-key.pem",	client_cert[] = "../SSL/client-cert.pem";
       
 19321 --- a/vio/test-sslserver.c
       
 19322 +++ b/vio/test-sslserver.c
       
 19323 @@ -1,4 +1,4 @@
       
 19324 -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
       
 19325 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19326  
       
 19327     This program is free software; you can redistribute it and/or modify
       
 19328     it under the terms of the GNU General Public License as published by
       
 19329 @@ -75,7 +75,7 @@ client_thread(	void*	arg)
       
 19330  }
       
 19331  
       
 19332  int
       
 19333 -main(int argc __attribute__((unused)), char** argv)
       
 19334 +main(int argc MY_ATTRIBUTE((unused)), char** argv)
       
 19335  {
       
 19336  	char	server_key[] = "../SSL/server-key.pem",
       
 19337  		server_cert[] = "../SSL/server-cert.pem";
       
 19338 --- a/vio/vio.c
       
 19339 +++ b/vio/vio.c
       
 19340 @@ -1,4 +1,4 @@
       
 19341 -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
       
 19342 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19343  
       
 19344     This program is free software; you can redistribute it and/or modify
       
 19345     it under the terms of the GNU General Public License as published by
       
 19346 @@ -37,16 +37,16 @@
       
 19347    @retval 1       The requested I/O event has occurred.
       
 19348  */
       
 19349  
       
 19350 -static int no_io_wait(Vio *vio __attribute__((unused)),
       
 19351 -                      enum enum_vio_io_event event __attribute__((unused)),
       
 19352 -                      int timeout __attribute__((unused)))
       
 19353 +static int no_io_wait(Vio *vio MY_ATTRIBUTE((unused)),
       
 19354 +                      enum enum_vio_io_event event MY_ATTRIBUTE((unused)),
       
 19355 +                      int timeout MY_ATTRIBUTE((unused)))
       
 19356  {
       
 19357    return 1;
       
 19358  }
       
 19359  
       
 19360  #endif
       
 19361  
       
 19362 -static my_bool has_no_data(Vio *vio __attribute__((unused)))
       
 19363 +static my_bool has_no_data(Vio *vio MY_ATTRIBUTE((unused)))
       
 19364  {
       
 19365    return FALSE;
       
 19366  }
       
 19367 @@ -177,7 +177,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
       
 19368  */
       
 19369  
       
 19370  my_bool vio_reset(Vio* vio, enum enum_vio_type type,
       
 19371 -                  my_socket sd, void *ssl __attribute__((unused)), uint flags)
       
 19372 +                  my_socket sd, void *ssl MY_ATTRIBUTE((unused)), uint flags)
       
 19373  {
       
 19374    int ret= FALSE;
       
 19375    Vio new_vio;
       
 19376 --- a/vio/viosocket.c
       
 19377 +++ b/vio/viosocket.c
       
 19378 @@ -1,5 +1,5 @@
       
 19379  /*
       
 19380 -   Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
       
 19381 +   Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
       
 19382  
       
 19383     This program is free software; you can redistribute it and/or
       
 19384     modify it under the terms of the GNU General Public License
       
 19385 @@ -29,7 +29,7 @@
       
 19386  # include <sys/filio.h>
       
 19387  #endif
       
 19388  
       
 19389 -int vio_errno(Vio *vio __attribute__((unused)))
       
 19390 +int vio_errno(Vio *vio MY_ATTRIBUTE((unused)))
       
 19391  {
       
 19392    /* These transport types are not Winsock based. */
       
 19393  #ifdef _WIN32
       
 19394 @@ -247,8 +247,8 @@ static int vio_set_blocking(Vio *vio, my_bool status)
       
 19395  
       
 19396  
       
 19397  int vio_socket_timeout(Vio *vio,
       
 19398 -                       uint which __attribute__((unused)),
       
 19399 -                       my_bool old_mode __attribute__((unused)))
       
 19400 +                       uint which MY_ATTRIBUTE((unused)),
       
 19401 +                       my_bool old_mode MY_ATTRIBUTE((unused)))
       
 19402  {
       
 19403    int ret= 0;
       
 19404    DBUG_ENTER("vio_socket_timeout");
       
 19405 @@ -314,7 +314,7 @@ int vio_socket_timeout(Vio *vio,
       
 19406  }
       
 19407  
       
 19408  
       
 19409 -int vio_fastsend(Vio * vio __attribute__((unused)))
       
 19410 +int vio_fastsend(Vio * vio MY_ATTRIBUTE((unused)))
       
 19411  {
       
 19412    int r=0;
       
 19413    DBUG_ENTER("vio_fastsend");
       
 19414 @@ -735,7 +735,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes)
       
 19415  int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
       
 19416  {
       
 19417    int ret;
       
 19418 -  short revents __attribute__((unused)) = 0;
       
 19419 +  short revents MY_ATTRIBUTE((unused)) = 0;
       
 19420    struct pollfd pfd;
       
 19421    my_socket sd= mysql_socket_getfd(vio->mysql_socket);
       
 19422    MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */
       
 19423 
       
 19424