MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:July 31 2006 12:22pm
Subject:bk commit into 5.0 tree (msvensson:1.2244) BUG#21042
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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-07-31 14:22:32+02:00, msvensson@neptunus.(none) +3 -0
  Bug#21042 mysql client segfaults on importing a mysqldump export
   - Use strmake, that will both protect the buffer and make sure it's terminated by a zero
   - Add test case

  client/mysql.cc@stripped, 2006-07-31 14:22:30+02:00, msvensson@neptunus.(none) +1 -1
    Use strmake instead of strxnmov as that function will make sure the string is terminated by 0

  mysql-test/r/mysql.result@stripped, 2006-07-31 14:22:30+02:00, msvensson@neptunus.(none) +1 -0
    Update test result

  mysql-test/t/mysql.test@stripped, 2006-07-31 14:22:30+02:00, msvensson@neptunus.(none) +6 -0
    Add test case

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint

--- 1.210/client/mysql.cc	2006-07-31 14:22:37 +02:00
+++ 1.211/client/mysql.cc	2006-07-31 14:22:37 +02:00
@@ -2858,7 +2858,7 @@ com_connect(String *buffer, char *line)
   bzero(buff, sizeof(buff));
   if (buffer)
   {
-    strxnmov(buff, sizeof(buff), line, NullS);
+    strmake(buff, line, sizeof(buff));
     tmp= get_arg(buff, 0);
     if (tmp && *tmp)
     {

--- 1.11/mysql-test/r/mysql.result	2006-07-31 14:22:37 +02:00
+++ 1.12/mysql-test/r/mysql.result	2006-07-31 14:22:37 +02:00
@@ -114,4 +114,5 @@ a	int(11)	YES		NULL	
 b	varchar(255)	YES		NULL	
 c	int(11)	YES		NULL	
 drop table t1;
+ERROR 1049 (42000) at line 1: Unknown database 'verylongdatabasenamethatshouldblowthe256byteslongbufferincom_con'
 End of 5.0 tests

--- 1.11/mysql-test/t/mysql.test	2006-07-31 14:22:37 +02:00
+++ 1.12/mysql-test/t/mysql.test	2006-07-31 14:22:37 +02:00
@@ -86,6 +86,12 @@ create table t1(a int, b varchar(255), c
 --exec $MYSQL test -e "desc t1\g"
 drop table t1;
 
+#
+# Bug#21042  	mysql client segfaults on importing a mysqldump export
+#
+--error 1
+--exec $MYSQL test -e "connect verylongdatabasenamethatshouldblowthe256byteslongbufferincom_connectfunctionxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxendcccccccdxxxxxxxxxxxxxxxxxkskskskskkskskskskskskskskskskkskskskskkskskskskskskskskskend" 2>&1
+
 --echo End of 5.0 tests
 
 
Thread
bk commit into 5.0 tree (msvensson:1.2244) BUG#21042msvensson31 Jul