Below is the list of changes that have just been committed into a local
5.2 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-16 17:39:19+04:00, kostja@bodhi.(none) +5 -0
Remove some remains of support of 3.23 protocol. This was in fact dead code,
since the option to talk 3.22 protocol was removed in 4.1 and there
is no other protocol negotiation mechanism besides this option.
include/mysql_com.h@stripped, 2007-10-16 17:39:10+04:00, kostja@bodhi.(none) +1 -1
Remove some remains of support of 3.22 client/server protocol.
The support of the protocol itself was removed in 4.1.
sql/field.cc@stripped, 2007-10-16 17:39:10+04:00, kostja@bodhi.(none) +1 -2
Clean up.
sql/mysqld.cc@stripped, 2007-10-16 17:39:11+04:00, kostja@bodhi.(none) +0 -3
Clean up.
sql/net_serv.cc@stripped, 2007-10-16 17:39:11+04:00, kostja@bodhi.(none) +1 -1
Clean up.
sql/protocol.cc@stripped, 2007-10-16 17:39:11+04:00, kostja@bodhi.(none) +13 -21
Always assume protocol version 10 and older (3.23 protocol).
diff -Nrup a/include/mysql_com.h b/include/mysql_com.h
--- a/include/mysql_com.h 2007-10-15 15:52:25 +04:00
+++ b/include/mysql_com.h 2007-10-16 17:39:10 +04:00
@@ -233,7 +233,7 @@ typedef struct st_net {
unsigned int last_errno;
unsigned char error;
my_bool report_error; /* We should report error (we have unreported error) */
- my_bool return_errno;
+ my_bool unused1; /* Please remove with the next incompatible ABI change */
char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
void *extension;
} NET;
diff -Nrup a/sql/field.cc b/sql/field.cc
--- a/sql/field.cc 2007-09-15 00:09:38 +04:00
+++ b/sql/field.cc 2007-10-16 17:39:10 +04:00
@@ -9468,8 +9468,7 @@ bool Create_field::init(THD *thd, char *
break;
case MYSQL_TYPE_DATE:
/* Old date type. */
- if (protocol_version != PROTOCOL_VERSION-1)
- sql_type= MYSQL_TYPE_NEWDATE;
+ sql_type= MYSQL_TYPE_NEWDATE;
/* fall trough */
case MYSQL_TYPE_NEWDATE:
length= 10;
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2007-09-11 21:44:02 +04:00
+++ b/sql/mysqld.cc 2007-10-16 17:39:11 +04:00
@@ -4356,9 +4356,6 @@ static void create_new_thread(THD *thd)
NET *net=&thd->net;
DBUG_ENTER("create_new_thread");
- if (protocol_version > 9)
- net->return_errno=1;
-
/* don't allow too many connections */
if (thread_count - delayed_insert_threads >= max_connections+1 || abort_loop)
{
diff -Nrup a/sql/net_serv.cc b/sql/net_serv.cc
--- a/sql/net_serv.cc 2007-10-15 15:49:05 +04:00
+++ b/sql/net_serv.cc 2007-10-16 17:39:11 +04:00
@@ -124,7 +124,7 @@ my_bool my_net_init(NET *net, Vio* vio)
DBUG_RETURN(1);
net->buff_end=net->buff+net->max_packet;
net->no_send_ok= net->no_send_error= 0;
- net->error=0; net->return_errno=0; net->return_status=0;
+ net->error=0; net->return_status=0;
net->pkt_nr=net->compress_pkt_nr=0;
net->write_pos=net->read_pos = net->buff;
net->last_error[0]=0;
diff -Nrup a/sql/protocol.cc b/sql/protocol.cc
--- a/sql/protocol.cc 2007-10-15 15:52:25 +04:00
+++ b/sql/protocol.cc 2007-10-16 17:39:11 +04:00
@@ -236,9 +236,8 @@ net_printf_error(THD *thd, uint errcode,
format=va_arg(args,char*);
errcode= ER_UNKNOWN_ERROR;
}
- offset= (net->return_errno ?
- ((thd->client_capabilities & CLIENT_PROTOCOL_41) ?
- 2+SQLSTATE_LENGTH+1 : 2) : 0);
+ offset= (thd->client_capabilities & CLIENT_PROTOCOL_41 ?
+ 2 + SQLSTATE_LENGTH + 1 : 2);
#ifndef EMBEDDED_LIBRARY
text_pos=(char*) net->buff + head_length + offset + 1;
length= (uint) ((char*)net->buff_end - text_pos);
@@ -480,25 +479,18 @@ void net_send_error_packet(THD *thd, uin
DBUG_VOID_RETURN;
}
- if (net->return_errno)
- { // new client code; Add errno before message
- int2store(buff,sql_errno);
- pos= buff+2;
- if (thd->client_capabilities & CLIENT_PROTOCOL_41)
- {
- /* The first # is to make the protocol backward compatible */
- buff[2]= '#';
- pos= (uchar*) strmov((char*) buff+3, mysql_errno_to_sqlstate(sql_errno));
- }
- length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-1) -
- (char*) buff);
- err= (char*) buff;
- }
- else
+ int2store(buff,sql_errno);
+ pos= buff+2;
+ if (thd->client_capabilities & CLIENT_PROTOCOL_41)
{
- length=(uint) strlen(err);
- set_if_smaller(length,MYSQL_ERRMSG_SIZE-1);
- }
+ /* The first # is to make the protocol backward compatible */
+ buff[2]= '#';
+ pos= (uchar*) strmov((char*) buff+3, mysql_errno_to_sqlstate(sql_errno));
+ }
+ length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-1) -
+ (char*) buff);
+ err= (char*) buff;
+
VOID(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err,
length));
DBUG_VOID_RETURN;
| Thread |
|---|
| • bk commit into 5.2 tree (kostja:1.2629) | konstantin | 16 Oct |