SOURCES: mysql-bug-34655.patch (NEW) - fix for bug #34655 taken fr...

hawk hawk at pld-linux.org
Sun Mar 30 22:11:45 CEST 2008


Author: hawk                         Date: Sun Mar 30 20:11:45 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix for bug #34655 taken from mysql repository

---- Files affected:
SOURCES:
   mysql-bug-34655.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/mysql-bug-34655.patch
diff -u /dev/null SOURCES/mysql-bug-34655.patch:1.1
--- /dev/null	Sun Mar 30 22:11:45 2008
+++ SOURCES/mysql-bug-34655.patch	Sun Mar 30 22:11:40 2008
@@ -0,0 +1,774 @@
+
+#### ChangeSet ####
+2008-02-28 14:55:46-03:00, davi at mysql.com 
+  Bug#34655 Compile error
+  
+  Rename client_last_error to last_error and client_last_errno to last_errno
+  to not break connectors which use the internal net structure for error handling.
+
+==== include/mysql_com.h ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +2 -2
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.128/include/mysql_com.h	2007-12-14 05:01:09 -08:00
++++ 1.129/include/mysql_com.h	2008-02-28 09:55:42 -08:00
+@@ -217,12 +217,12 @@ typedef struct st_net {
+     functions and methods to maintain proper locking.
+   */
+   unsigned char *query_cache_query;
+-  unsigned int client_last_errno;
++  unsigned int last_errno;
+   unsigned char error; 
+   my_bool unused2; /* Please remove with the next incompatible ABI change. */
+   my_bool return_errno;
+   /** Client library error message buffer. Actually belongs to struct MYSQL. */
+-  char client_last_error[MYSQL_ERRMSG_SIZE];
++  char last_error[MYSQL_ERRMSG_SIZE];
+   /** Client library sqlstate buffer. Set along with the error message. */
+   char sqlstate[SQLSTATE_LENGTH+1];
+   void *extension;
+
+==== include/mysql_h.ic ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +42 -42
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.15/include/mysql_h.ic	2007-12-12 07:20:53 -08:00
++++ 1.16/include/mysql_h.ic	2008-02-28 09:55:42 -08:00
+@@ -106,9 +106,9 @@ typedef struct st_mysql_ftparser_param M
+ typedef struct st_mysql_methods MYSQL_METHODS;
+ # 47 "mysql_time.h"
+ typedef struct st_mysql_time MYSQL_TIME;
+-# 384 "mysql_com.h"
++# 383 "mysql_com.h"
+ typedef struct st_udf_args UDF_ARGS;
+-# 398 "mysql_com.h"
++# 397 "mysql_com.h"
+ typedef struct st_udf_init UDF_INIT;
+ # 26 "my_alloc.h"
+ typedef struct st_used_mem USED_MEM;
+@@ -130,7 +130,7 @@ struct __attribute__((aligned(__alignof_
+     unsigned int mbminlen;
+     unsigned int mbmaxlen;
+   };
+-# 370 "mysql_com.h"
++# 369 "mysql_com.h"
+ struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
+   {
+     unsigned long int seed1;
+@@ -542,11 +542,11 @@ struct __attribute__((aligned(__alignof_
+     my_bool compress;
+     my_bool unused1;
+     unsigned char * query_cache_query;
+-    unsigned int client_last_errno;
++    unsigned int last_errno;
+     unsigned char error;
+     my_bool unused2;
+     my_bool return_errno;
+-    char client_last_error[512];
++    char last_error[512];
+     char sqlstate[(5 + 1)];
+     void * extension;
+   };
+@@ -558,7 +558,7 @@ struct __attribute__((aligned(__alignof_
+     char const * * type_names;
+     unsigned int * type_lengths;
+   };
+-# 384 "mysql_com.h"
++# 383 "mysql_com.h"
+ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
+   {
+     unsigned int arg_count;
+@@ -570,7 +570,7 @@ struct __attribute__((aligned(__alignof_
+     unsigned long int * attribute_lengths;
+     void * extension;
+   };
+-# 398 "mysql_com.h"
++# 397 "mysql_com.h"
+ struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
+   {
+     my_bool maybe_null;
+@@ -587,7 +587,7 @@ struct __attribute__((aligned(__alignof_
+     unsigned int left;
+     unsigned int size;
+   };
+-# 381 "mysql_com.h"
++# 380 "mysql_com.h"
+ enum Item_result
+   {
+     STRING_RESULT = 0,
+@@ -596,7 +596,7 @@ enum Item_result
+     ROW_RESULT = 3,
+     DECIMAL_RESULT = 4,
+   };
+-# 322 "mysql_com.h"
++# 321 "mysql_com.h"
+ enum enum_cursor_type
+   {
+     CURSOR_TYPE_NO_CURSOR = 0,
+@@ -604,7 +604,7 @@ enum enum_cursor_type
+     CURSOR_TYPE_FOR_UPDATE = 2,
+     CURSOR_TYPE_SCROLLABLE = 4,
+   };
+-# 235 "mysql_com.h"
++# 234 "mysql_com.h"
+ enum enum_field_types
+   {
+     MYSQL_TYPE_DECIMAL = 0,
+@@ -651,7 +651,7 @@ enum enum_ftparser_mode
+     MYSQL_FTPARSER_WITH_STOPWORDS = 1,
+     MYSQL_FTPARSER_FULL_BOOLEAN_INFO = 2,
+   };
+-# 332 "mysql_com.h"
++# 331 "mysql_com.h"
+ enum enum_mysql_set_option
+   {
+     MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
+@@ -730,7 +730,7 @@ enum enum_stmt_attr_type
+     STMT_ATTR_CURSOR_TYPE = 1,
+     STMT_ATTR_PREFETCH_ROWS = 2,
+   };
+-# 297 "mysql_com.h"
++# 296 "mysql_com.h"
+ enum mysql_enum_shutdown_level
+   {
+     SHUTDOWN_DEFAULT = 0,
+@@ -790,13 +790,13 @@ enum mysql_status
+     MYSQL_STATUS_GET_RESULT = 1,
+     MYSQL_STATUS_USE_RESULT = 2,
+   };
+-# 439 "mysql_com.h"
++# 441 "mysql_com.h"
+ extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
+-# 432 "mysql_com.h"
++# 434 "mysql_com.h"
+ extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
+ # 35 "typelib.h"
+ extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
+-# 427 "mysql_com.h"
++# 429 "mysql_com.h"
+ extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
+ # 32 "typelib.h"
+ extern int find_type(char * x, TYPELIB const * typelib, unsigned int);
+@@ -804,15 +804,15 @@ extern int find_type(char * x, TYPELIB c
+ extern int find_type_or_exit(char const * x, TYPELIB * typelib, char const * option);
+ # 29 "typelib.h"
+ extern my_ulonglong find_typeset(char * x, TYPELIB * typelib, int * error_position);
+-# 441 "mysql_com.h"
++# 443 "mysql_com.h"
+ extern void get_salt_from_password(unsigned char * res, char const * password);
+-# 434 "mysql_com.h"
++# 436 "mysql_com.h"
+ extern void get_salt_from_password_323(unsigned long int * res, char const * password);
+-# 447 "mysql_com.h"
++# 449 "mysql_com.h"
+ extern char * get_tty_password(char const * opt_message);
+ # 34 "typelib.h"
+ extern char const * get_type(TYPELIB * typelib, unsigned int);
+-# 429 "mysql_com.h"
++# 431 "mysql_com.h"
+ extern void hash_password(unsigned long int * to, char const * password, unsigned int);
+ # 30 "my_list.h"
+ extern LIST * list_add(LIST * root, LIST * element);
+@@ -828,31 +828,31 @@ extern unsigned int list_length(LIST *);
+ extern LIST * list_reverse(LIST * root);
+ # 36 "my_list.h"
+ extern int list_walk(LIST *, list_walk_action, unsigned char * argument);
+-# 442 "mysql_com.h"
++# 444 "mysql_com.h"
+ extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
+-# 435 "mysql_com.h"
+-extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
+ # 437 "mysql_com.h"
++extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
++# 439 "mysql_com.h"
+ extern void make_scrambled_password(char * to, char const * password);
+-# 430 "mysql_com.h"
++# 432 "mysql_com.h"
+ extern void make_scrambled_password_323(char * to, char const * password);
+ # 33 "typelib.h"
+ extern void make_type(char * to, unsigned int, TYPELIB * typelib);
+-# 367 "mysql_com.h"
++# 366 "mysql_com.h"
+ extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
+-# 344 "mysql_com.h"
++# 343 "mysql_com.h"
+ extern my_bool my_net_init(NET * net, Vio * vio);
+-# 345 "mysql_com.h"
++# 344 "mysql_com.h"
+ extern void my_net_local_init(NET * net);
+-# 355 "mysql_com.h"
++# 354 "mysql_com.h"
+ extern unsigned long int my_net_read(NET * net);
+-# 350 "mysql_com.h"
++# 349 "mysql_com.h"
+ extern my_bool my_net_write(NET * net, unsigned char const * packet, size_t);
+-# 426 "mysql_com.h"
++# 428 "mysql_com.h"
+ extern double my_rnd(struct rand_struct *);
+-# 453 "mysql_com.h"
++# 455 "mysql_com.h"
+ extern void my_thread_end(void);
+-# 452 "mysql_com.h"
++# 454 "mysql_com.h"
+ extern my_bool my_thread_init(void);
+ # 560 "mysql.h"
+ extern void myodbc_remove_escape(MYSQL * mysql, char * name);
+@@ -890,7 +890,7 @@ extern void mysql_enable_rpl_parse(MYSQL
+ extern my_bool mysql_eof(MYSQL_RES * res);
+ # 423 "mysql.h"
+ extern unsigned int mysql_errno(MYSQL * mysql);
+-# 448 "mysql_com.h"
++# 450 "mysql_com.h"
+ extern char const * mysql_errno_to_sqlstate(unsigned int);
+ # 424 "mysql.h"
+ extern char const * mysql_error(MYSQL * mysql);
+@@ -1108,25 +1108,25 @@ extern char * mysql_unix_port;
+ extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
+ # 426 "mysql.h"
+ extern unsigned int mysql_warning_count(MYSQL * mysql);
+-# 347 "mysql_com.h"
+-extern void net_clear(NET * net, my_bool);
+ # 346 "mysql_com.h"
++extern void net_clear(NET * net, my_bool);
++# 345 "mysql_com.h"
+ extern void net_end(NET * net);
+-# 349 "mysql_com.h"
++# 348 "mysql_com.h"
+ extern my_bool net_flush(NET * net);
+-# 354 "mysql_com.h"
++# 353 "mysql_com.h"
+ extern int net_real_write(NET * net, unsigned char const * packet, size_t);
+-# 348 "mysql_com.h"
++# 347 "mysql_com.h"
+ extern my_bool net_realloc(NET * net, size_t);
+-# 351 "mysql_com.h"
++# 350 "mysql_com.h"
+ extern my_bool net_write_command(NET * net, unsigned char, unsigned char const * header, size_t, unsigned char const * packet, size_t);
+-# 443 "mysql_com.h"
++# 445 "mysql_com.h"
+ extern char * octet2hex(char * to, char const * str, unsigned int);
+-# 424 "mysql_com.h"
++# 426 "mysql_com.h"
+ extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
+-# 438 "mysql_com.h"
++# 440 "mysql_com.h"
+ extern void scramble(char * to, char const * message, char const * password);
+-# 431 "mysql_com.h"
++# 433 "mysql_com.h"
+ extern void scramble_323(char * to, char const * message, char const * password);
+ # 37 "typelib.h"
+ extern TYPELIB sql_protocol_typelib;
+
+==== libmysql/libmysql.c ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +18 -18
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.305.1.1/libmysql/libmysql.c	2008-02-18 14:29:35 -08:00
++++ 1.305.1.2/libmysql/libmysql.c	2008-02-28 09:55:42 -08:00
+@@ -440,11 +440,11 @@ static void expand_error(MYSQL* mysql, i
+   char tmp[MYSQL_ERRMSG_SIZE];
+   char *p;
+   uint err_length;
+-  strmake(tmp, mysql->net.client_last_error, MYSQL_ERRMSG_SIZE-1);
+-  p = strmake(mysql->net.client_last_error, ER(error), MYSQL_ERRMSG_SIZE-1);
+-  err_length= (uint) (p - mysql->net.client_last_error);
++  strmake(tmp, mysql->net.last_error, MYSQL_ERRMSG_SIZE-1);
++  p = strmake(mysql->net.last_error, ER(error), MYSQL_ERRMSG_SIZE-1);
++  err_length= (uint) (p - mysql->net.last_error);
+   strmake(p, tmp, MYSQL_ERRMSG_SIZE-1 - err_length);
+-  mysql->net.client_last_errno = error;
++  mysql->net.last_errno = error;
+ }
+ 
+ /*
+@@ -870,10 +870,10 @@ my_bool handle_local_infile(MYSQL *mysql
+     VOID(my_net_write(net,(const uchar*) "",0)); /* Server needs one packet */
+     net_flush(net);
+     strmov(net->sqlstate, unknown_sqlstate);
+-    net->client_last_errno=
++    net->last_errno=
+       (*options->local_infile_error)(li_ptr,
+-                                     net->client_last_error,
+-                                     sizeof(net->client_last_error)-1);
++                                     net->last_error,
++                                     sizeof(net->last_error)-1);
+     goto err;
+   }
+ 
+@@ -900,10 +900,10 @@ my_bool handle_local_infile(MYSQL *mysql
+ 
+   if (readcount < 0)
+   {
+-    net->client_last_errno=
++    net->last_errno=
+       (*options->local_infile_error)(li_ptr,
+-                                     net->client_last_error,
+-                                     sizeof(net->client_last_error)-1);
++                                     net->last_error,
++                                     sizeof(net->last_error)-1);
+     goto err;
+   }
+ 
+@@ -1397,7 +1397,7 @@ const char *cli_read_statistics(MYSQL *m
+   if (!mysql->net.read_pos[0])
+   {
+     set_mysql_error(mysql, CR_WRONG_HOST_INFO, unknown_sqlstate);
+-    return mysql->net.client_last_error;
++    return mysql->net.last_error;
+   }
+   return (char*) mysql->net.read_pos;
+ }
+@@ -1408,7 +1408,7 @@ mysql_stat(MYSQL *mysql)
+ {
+   DBUG_ENTER("mysql_stat");
+   if (simple_command(mysql,COM_STATISTICS,0,0,0))
+-    DBUG_RETURN(mysql->net.client_last_error);
++    DBUG_RETURN(mysql->net.last_error);
+   DBUG_RETURN((*mysql->methods->read_statistics)(mysql));
+ }
+ 
+@@ -1773,7 +1773,7 @@ static my_bool my_realloc_str(NET *net, 
+     if (res)
+     {
+       strmov(net->sqlstate, unknown_sqlstate);
+-      strmov(net->client_last_error, ER(net->client_last_errno));
++      strmov(net->last_error, ER(net->last_errno));
+     }
+     net->write_pos= net->buff+ buf_length;
+   }
+@@ -1825,14 +1825,14 @@ void set_stmt_errmsg(MYSQL_STMT *stmt, N
+ {
+   DBUG_ENTER("set_stmt_errmsg");
+   DBUG_PRINT("enter", ("error: %d/%s '%s'",
+-                       net->client_last_errno,
++                       net->last_errno,
+                        net->sqlstate,
+-                       net->client_last_error));
++                       net->last_error));
+   DBUG_ASSERT(stmt != 0);
+ 
+-  stmt->last_errno= net->client_last_errno;
+-  if (net->client_last_error && net->client_last_error[0])
+-    strmov(stmt->last_error, net->client_last_error);
++  stmt->last_errno= net->last_errno;
++  if (net->last_error && net->last_error[0])
++    strmov(stmt->last_error, net->last_error);
+   strmov(stmt->sqlstate, net->sqlstate);
+ 
+   DBUG_VOID_RETURN;
+
+==== libmysql/manager.c ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +1 -1
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.19/libmysql/manager.c	2007-12-12 07:20:53 -08:00
++++ 1.20/libmysql/manager.c	2008-02-28 09:55:42 -08:00
+@@ -160,7 +160,7 @@ MYSQL_MANAGER*  STDCALL mysql_manager_co
+   msg_len=strlen(msg_buf);
+   if (my_net_write(&con->net,(uchar*) msg_buf,msg_len) || net_flush(&con->net))
+   {
+-    con->last_errno=con->net.client_last_errno;
++    con->last_errno=con->net.last_errno;
+     strmov(con->last_error,"Write error on socket");
+     goto err;
+   }
+
+==== libmysqld/lib_sql.cc ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +3 -3
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.147/libmysqld/lib_sql.cc	2007-12-20 12:24:01 -08:00
++++ 1.147.1.1/libmysqld/lib_sql.cc	2008-02-28 09:55:42 -08:00
+@@ -61,8 +61,8 @@ void embedded_get_error(MYSQL *mysql, MY
+ {
+   NET *net= &mysql->net;
+   struct embedded_query_result *ei= data->embedded_info;
+-  net->client_last_errno= ei->last_errno;
+-  strmake(net->client_last_error, ei->info, sizeof(net->client_last_error)-1);
++  net->last_errno= ei->last_errno;
++  strmake(net->last_error, ei->info, sizeof(net->last_error)-1);
+   memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate));
+   mysql->server_status= ei->server_status;
+   my_free(data, MYF(0));
+@@ -685,7 +685,7 @@ int check_embedded_connection(MYSQL *mys
+ err:
+   {
+     NET *net= &mysql->net;
+-    strmake(net->client_last_error, thd->main_da.message(), sizeof(net->client_last_error)-1);
++    strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1);
+     memcpy(net->sqlstate,
+            mysql_errno_to_sqlstate(thd->main_da.sql_errno()),
+            sizeof(net->sqlstate)-1);
+
+==== libmysqld/libmysqld.c ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +2 -2
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.76/libmysqld/libmysqld.c	2007-12-12 07:20:53 -08:00
++++ 1.77/libmysqld/libmysqld.c	2008-02-28 09:55:42 -08:00
+@@ -210,8 +210,8 @@ mysql_real_connect(MYSQL *mysql,const ch
+ 
+ error:
+   DBUG_PRINT("error",("message: %u (%s)",
+-                      mysql->net.client_last_errno,
+-                      mysql->net.client_last_error));
++                      mysql->net.last_errno,
++                      mysql->net.last_error));
+   {
+     /* Free alloced memory */
+     my_bool free_me=mysql->free_me;
+
+==== server-tools/instance-manager/mysql_connection.cc ====
+2008-02-28 14:55:42-03:00, davi at mysql.com +1 -1
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.31/server-tools/instance-manager/mysql_connection.cc	2007-12-12 07:20:54 -08:00
++++ 1.32/server-tools/instance-manager/mysql_connection.cc	2008-02-28 09:55:42 -08:00
+@@ -257,7 +257,7 @@ int Mysql_connection::do_command()
+       return 1;
+     if (thread_registry->is_shutdown())
+       return 1;
+-    net_send_error(&net, net.client_last_errno);
++    net_send_error(&net, net.last_errno);
+     net.error= 0;
+     return 0;
+   }
+
+==== sql-common/client.c ====
+2008-02-28 14:55:43-03:00, davi at mysql.com +30 -30
+  Rename client_last_error to last_error, client_last_errno to last_errno.
+
+--- 1.152/sql-common/client.c	2008-02-22 09:45:43 -08:00
++++ 1.153/sql-common/client.c	2008-02-28 09:55:43 -08:00
+@@ -289,8 +289,8 @@ void set_mysql_error(MYSQL *mysql, int e
+   DBUG_ASSERT(mysql != 0);
+ 
+   net= &mysql->net;
+-  net->client_last_errno= errcode;
+-  strmov(net->client_last_error, ER(errcode));
++  net->last_errno= errcode;
++  strmov(net->last_error, ER(errcode));
+   strmov(net->sqlstate, sqlstate);
+ 
+   DBUG_VOID_RETURN;
+@@ -304,8 +304,8 @@ void set_mysql_error(MYSQL *mysql, int e
+ 
+ void net_clear_error(NET *net)
+ {
+-  net->client_last_errno= 0;
+-  net->client_last_error[0]= '\0';
++  net->last_errno= 0;
++  net->last_error[0]= '\0';
+   strmov(net->sqlstate, not_error_sqlstate);
+ }
+ 
+@@ -331,9 +331,9 @@ static void set_mysql_extended_error(MYS
+   DBUG_ASSERT(mysql != 0);
+ 
+   net= &mysql->net;
+-  net->client_last_errno= errcode;
++  net->last_errno= errcode;
+   va_start(args, format);
+-  my_vsnprintf(net->client_last_error, sizeof(net->client_last_error)-1,
++  my_vsnprintf(net->last_error, sizeof(net->last_error)-1,
+                format, args);
+   va_end(args);
+   strmov(net->sqlstate, sqlstate);
+@@ -667,7 +667,7 @@ cli_safe_read(MYSQL *mysql)
+       return (packet_error);
+ #endif /*MYSQL_SERVER*/
+     end_server(mysql);
+-    set_mysql_error(mysql, net->client_last_errno == ER_NET_PACKET_TOO_LARGE ?
++    set_mysql_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ?
+                     CR_NET_PACKET_TOO_LARGE: CR_SERVER_LOST, unknown_sqlstate);
+     return (packet_error);
+   }
+@@ -676,7 +676,7 @@ cli_safe_read(MYSQL *mysql)
+     if (len > 3)
+     {
+       char *pos=(char*) net->read_pos+1;
+-      net->client_last_errno=uint2korr(pos);
++      net->last_errno=uint2korr(pos);
+       pos+=2;
+       len-=2;
+       if (protocol_41(mysql) && pos[0] == '#')
+@@ -684,8 +684,8 @@ cli_safe_read(MYSQL *mysql)
+ 	strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH);
+ 	pos+= SQLSTATE_LENGTH+1;
+       }
+-      (void) strmake(net->client_last_error,(char*) pos,
+-		     min((uint) len,(uint) sizeof(net->client_last_error)-1));
++      (void) strmake(net->last_error,(char*) pos,
++		     min((uint) len,(uint) sizeof(net->last_error)-1));
+     }
+     else
+       set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate);
+@@ -701,9 +701,9 @@ cli_safe_read(MYSQL *mysql)
+     mysql->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
+ 
+     DBUG_PRINT("error",("Got error: %d/%s (%s)",
+-                        net->client_last_errno,
++                        net->last_errno,
+                         net->sqlstate,
+-                        net->client_last_error));
++                        net->last_error));
+     return(packet_error);
+   }
+   return len;
+@@ -760,7 +760,7 @@ cli_advanced_command(MYSQL *mysql, enum 
+   {
+     DBUG_PRINT("error",("Can't send command to server. Error: %d",
+ 			socket_errno));
+-    if (net->client_last_errno == ER_NET_PACKET_TOO_LARGE)
++    if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
+     {
+       set_mysql_error(mysql, CR_NET_PACKET_TOO_LARGE, unknown_sqlstate);
+       goto end;
+@@ -845,7 +845,7 @@ static my_bool is_NT(void)
+ 
+   @retval  0   success
+   @retval  !0  network error or the server is not commercial.
+-               Error code is saved in mysql->net.client_last_errno.
++               Error code is saved in mysql->net.last_errno.
+ */
+ 
+ static int check_license(MYSQL *mysql)
+@@ -858,7 +858,7 @@ static int check_license(MYSQL *mysql)
+ 
+   if (mysql_real_query(mysql, query, sizeof(query)-1))
+   {
+-    if (net->client_last_errno == ER_UNKNOWN_SYSTEM_VARIABLE)
++    if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE)
+     {
+       set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate,
+                                ER(CR_WRONG_LICENSE), required_license);
+@@ -873,7 +873,7 @@ static int check_license(MYSQL *mysql)
+     two is ever true for server variables now), or column value
+     mismatch, set wrong license error.
+   */
+-  if (!net->client_last_errno &&
++  if (!net->last_errno &&
+       (!row || !row[0] ||
+        strncmp(row[0], required_license, sizeof(required_license))))
+   {
+@@ -881,7 +881,7 @@ static int check_license(MYSQL *mysql)
+                              ER(CR_WRONG_LICENSE), required_license);
+   }
+   mysql_free_result(res);
+-  return net->client_last_errno;
++  return net->last_errno;
+ }
+ #endif /* CHECK_LICENSE */
+ 
+@@ -2090,7 +2090,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
+ 
+   if ((pkt_length=cli_safe_read(mysql)) == packet_error)
+   {
+-    if (mysql->net.client_last_errno == CR_SERVER_LOST)
++    if (mysql->net.last_errno == CR_SERVER_LOST)
+       set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
+                                ER(CR_SERVER_LOST_EXTENDED),
+                                "reading initial communication packet",
+@@ -2324,7 +2324,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
+ 
+   if ((pkt_length=cli_safe_read(mysql)) == packet_error)
+   {
+-    if (mysql->net.client_last_errno == CR_SERVER_LOST)
++    if (mysql->net.last_errno == CR_SERVER_LOST)
+       set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
+                                ER(CR_SERVER_LOST_EXTENDED),
+                                "reading authorization packet",
+@@ -2352,7 +2352,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
+     /* Read what server thinks about out new auth message report */
+     if (cli_safe_read(mysql) == packet_error)
+     {
+-      if (mysql->net.client_last_errno == CR_SERVER_LOST)
++      if (mysql->net.last_errno == CR_SERVER_LOST)
+         set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate,
+                                  ER(CR_SERVER_LOST_EXTENDED),
+                                  "reading final connect information",
+@@ -2371,7 +2371,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
+ 
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list