List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:October 19 2010 10:02am
Subject:bzr push into mysql-next-mr-stage branch (magnus.blaudd:3313 to 3314) WL#3126
View as plain text  
 3314 Magnus Blåudd	2010-10-19
      WL#3126
        - fix problem with "anonymous union in struct" by naming the union "ci"
          which is short for "client info"

    modified:
      include/mysql.h
      include/mysql.h.pp
      sql-common/client.c
 3313 Magnus Blåudd	2010-10-18 [merge]
      Merge next-mr-wl3126 into next-mr-stage

    modified:
      client/mysql.cc
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      include/mysql.h
      include/mysql.h.pp
      mysql-test/r/mysql.result
      mysql-test/r/mysqladmin.result
      mysql-test/r/mysqldump.result
      mysql-test/r/mysqlshow.result
      mysql-test/t/mysql.test
      mysql-test/t/mysqladmin.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqlcheck.test
      mysql-test/t/mysqldump.test
      mysql-test/t/mysqlshow.test
      sql-common/client.c
=== modified file 'include/mysql.h'
--- a/include/mysql.h	2010-10-18 12:18:18 +0000
+++ b/include/mysql.h	2010-10-19 09:54:17 +0000
@@ -204,7 +204,7 @@ struct st_mysql_options {
       remote server - not used in embedded server
     */
     char *bind_address;
-  };
+  } ci;
   /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
   my_bool secure_auth;
   /* 0 - never report, 1 - always report (default) */

=== modified file 'include/mysql.h.pp'
--- a/include/mysql.h.pp	2010-10-18 12:18:18 +0000
+++ b/include/mysql.h.pp	2010-10-19 09:54:17 +0000
@@ -288,7 +288,7 @@ struct st_mysql_options {
   union {
     char *client_ip;
     char *bind_address;
-  };
+  } ci;
   my_bool secure_auth;
   my_bool report_data_truncation;
   int (*local_infile_init)(void **, const char *, void *);

=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2010-10-18 12:18:18 +0000
+++ b/sql-common/client.c	2010-10-19 09:54:17 +0000
@@ -1355,8 +1355,8 @@ void mysql_read_default_options(struct s
           options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1;
           break;
 	case 32: /* bind-address */
-          my_free(options->bind_address);
-          options->bind_address= my_strdup(opt_arg, MYF(MY_WME));
+          my_free(options->ci.bind_address);
+          options->ci.bind_address= my_strdup(opt_arg, MYF(MY_WME));
           break;
 	default:
 	  DBUG_PRINT("warning",("unknown option: %s",option[0]));
@@ -2483,21 +2483,21 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
     }
 
     /* Get address info for client bind name if it is provided */
-    if (mysql->options.bind_address)
+    if (mysql->options.ci.bind_address)
     {
       int bind_gai_errno= 0;
 
       DBUG_PRINT("info",("Resolving addresses for client bind: '%s'",
-                         mysql->options.bind_address));
+                         mysql->options.ci.bind_address));
       /* Lookup address info for name */
-      bind_gai_errno= getaddrinfo(mysql->options.bind_address, 0,
+      bind_gai_errno= getaddrinfo(mysql->options.ci.bind_address, 0,
                                   &hints, &client_bind_ai_lst);
       if (bind_gai_errno)
       {
         DBUG_PRINT("info",("client bind getaddrinfo error %d", bind_gai_errno));
         set_mysql_extended_error(mysql, CR_UNKNOWN_HOST, unknown_sqlstate,
                                  ER(CR_UNKNOWN_HOST),
-                                 mysql->options.bind_address,
+                                 mysql->options.ci.bind_address,
                                  bind_gai_errno);
 
         freeaddrinfo(res_lst);
@@ -3112,8 +3112,8 @@ static void mysql_close_free_options(MYS
   my_free(mysql->options.my_cnf_group);
   my_free(mysql->options.charset_dir);
   my_free(mysql->options.charset_name);
-  my_free(mysql->options.client_ip);
-  /* bind_adress is union with client_ip, already freed above */
+  my_free(mysql->options.ci.client_ip);
+  /* ci.bind_adress is union with client_ip, already freed above */
   if (mysql->options.init_commands)
   {
     DYNAMIC_ARRAY *init_commands= mysql->options.init_commands;
@@ -3588,7 +3588,7 @@ mysql_options(MYSQL *mysql,enum mysql_op
     mysql->options.methods_to_use= option;
     break;
   case MYSQL_SET_CLIENT_IP:
-    mysql->options.client_ip= my_strdup(arg, MYF(MY_WME));
+    mysql->options.ci.client_ip= my_strdup(arg, MYF(MY_WME));
     break;
   case MYSQL_SECURE_AUTH:
     mysql->options.secure_auth= *(my_bool *) arg;
@@ -3600,8 +3600,8 @@ mysql_options(MYSQL *mysql,enum mysql_op
     mysql->reconnect= *(my_bool *) arg;
     break;
   case MYSQL_OPT_BIND:
-    my_free(mysql->options.bind_address);
-    mysql->options.bind_address= my_strdup(arg, MYF(MY_WME));
+    my_free(mysql->options.ci.bind_address);
+    mysql->options.ci.bind_address= my_strdup(arg, MYF(MY_WME));
     break;
   case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
     if (*(my_bool*) arg)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-next-mr-stage branch (magnus.blaudd:3313 to 3314) WL#3126Magnus Blåudd19 Oct