List:Commits« Previous MessageNext Message »
From:kgeorge Date:November 13 2006 10:45am
Subject:bk commit into 5.0 tree (gkodinov:1.2302)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge 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, 2006-11-13 12:44:56+02:00, gkodinov@stripped +4 -0
  Merge macbook.gmz:/Users/kgeorge/mysql/work/B19216-4.1-opt
  into  macbook.gmz:/Users/kgeorge/mysql/work/B19216-5.0-opt
  MERGE: 1.1616.2792.1

  BitKeeper/deleted/.del-mysql_client.test@stripped, 2006-11-13 12:44:49+02:00, gkodinov@stripped +0 -0
    merge 4.1->5.0
    MERGE: 1.2.2.2

  BitKeeper/deleted/.del-mysql_client.test@stripped, 2006-11-13 12:40:12+02:00, gkodinov@stripped +0 -0
    Merge rename: mysql-test/t/mysql_client.test -> BitKeeper/deleted/.del-mysql_client.test

  sql-common/client.c@stripped, 2006-11-13 12:40:13+02:00, gkodinov@stripped +0 -0
    Auto merged
    MERGE: 1.46.1.48

  sql/protocol.cc@stripped, 2006-11-13 12:44:50+02:00, gkodinov@stripped +0 -1
    merge 4.1->5.0
    MERGE: 1.56.1.50

  sql/protocol.h@stripped, 2006-11-13 12:40:12+02:00, gkodinov@stripped +0 -0
    Auto merged
    MERGE: 1.15.1.8

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gkodinov
# Host:	macbook.gmz
# Root:	/Users/kgeorge/mysql/work/B19216-5.0-opt/RESYNC

--- 1.116/sql/protocol.cc	2006-08-23 04:57:45 +03:00
+++ 1.117/sql/protocol.cc	2006-11-13 12:44:50 +02:00
@@ -46,7 +46,7 @@ bool Protocol_prep::net_store_data(const
       packet->realloc(packet_length+9+length))
     return 1;
   char *to=(char*) net_store_length((char*) packet->ptr()+packet_length,
-				    (ulonglong) length);
+				    length);
   memcpy(to,from,length);
   packet->length((uint) (to+length-packet->ptr()));
   return 0;
@@ -280,8 +280,8 @@ send_ok(THD *thd, ha_rows affected_rows,
   }
 
   buff[0]=0;					// No fields
-  pos=net_store_length(buff+1,(ulonglong) affected_rows);
-  pos=net_store_length(pos, (ulonglong) id);
+  pos=net_store_length(buff+1,affected_rows);
+  pos=net_store_length(pos, id);
   if (thd->client_capabilities & CLIENT_PROTOCOL_41)
   {
     DBUG_PRINT("info",
@@ -456,7 +456,7 @@ void net_send_error_packet(THD *thd, uin
   ulonglong for bigger numbers.
 */
 
-char *net_store_length(char *pkg, uint length)
+static char *net_store_length_fast(char *pkg, uint length)
 {
   uchar *packet=(uchar*) pkg;
   if (length < 251)
@@ -479,7 +479,7 @@ char *net_store_length(char *pkg, uint l
 
 char *net_store_data(char *to,const char *from, uint length)
 {
-  to=net_store_length(to,length);
+  to=net_store_length_fast(to,length);
   memcpy(to,from,length);
   return to+length;
 }
@@ -488,7 +488,7 @@ char *net_store_data(char *to,int32 from
 {
   char buff[20];
   uint length=(uint) (int10_to_str(from,buff,10)-buff);
-  to=net_store_length(to,length);
+  to=net_store_length_fast(to,length);
   memcpy(to,buff,length);
   return to+length;
 }
@@ -497,7 +497,7 @@ char *net_store_data(char *to,longlong f
 {
   char buff[22];
   uint length=(uint) (longlong10_to_str(from,buff,10)-buff);
-  to=net_store_length(to,length);
+  to=net_store_length_fast(to,length);
   memcpy(to,buff,length);
   return to+length;
 }
@@ -561,7 +561,7 @@ bool Protocol::send_fields(List<Item> *l
 
   if (flags & SEND_NUM_ROWS)
   {				// Packet with number of elements
-    char *pos=net_store_length(buff, (uint) list->elements);
+    char *pos=net_store_length(buff, list->elements);
     (void) my_net_write(&thd->net, buff,(uint) (pos-buff));
   }
 

--- 1.101/sql-common/client.c	2006-09-27 15:58:34 +03:00
+++ 1.102/sql-common/client.c	2006-11-13 12:40:13 +02:00
@@ -1191,6 +1191,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT 
     for (row=data->data; row ; row = row->next,field++)
     {
       uchar *pos;
+      /* fields count may be wrong */
+      DBUG_ASSERT ((field - result) < fields);
       cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
       field->catalog  = strdup_root(alloc,(char*) row->data[0]);
       field->db       = strdup_root(alloc,(char*) row->data[1]);

--- 1.32/sql/protocol.h	2006-02-24 18:34:09 +02:00
+++ 1.33/sql/protocol.h	2006-11-13 12:40:12 +02:00
@@ -166,7 +166,6 @@ void send_ok(THD *thd, ha_rows affected_
 	     const char *info=0);
 void send_eof(THD *thd);
 bool send_old_password_request(THD *thd);
-char *net_store_length(char *packet,uint length);
 char *net_store_data(char *to,const char *from, uint length);
 char *net_store_data(char *to,int32 from);
 char *net_store_data(char *to,longlong from);

--- 1.2.2.1/mysql-test/t/mysql_client.test	2006-11-13 12:28:49 +02:00
+++ 1.7/BitKeeper/deleted/.del-mysql_client.test	2006-11-13 12:44:49 +02:00
@@ -30,9 +30,19 @@
 
 #
 # Bug #20328: mysql client: dumb about trailing spaces on 'help' command
-#
 --exec echo 'help' | $MYSQL   >  $MYSQLTEST_VARDIR/tmp/bug20328.tmp
 --exec echo 'help ' | $MYSQL  >  $MYSQLTEST_VARDIR/tmp/bug20328.tmp
+
+#
+# Bug #20103: Escaping with backslash does not work
+#
+--exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';"  > $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
+
+--exec echo "SET SQL_MODE = '';"  > $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
+--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
 
 #
 # Bug #19216: Client crashes on long SELECT
Thread
bk commit into 5.0 tree (gkodinov:1.2302)kgeorge13 Nov