List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:June 18 2007 12:59pm
Subject:bk commit into 5.1 tree (tnurnberg:1.2505)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tnurnberg. When tnurnberg 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-06-18 12:59:14+02:00, tnurnberg@stripped +2 -0
  Merge tnurnberg@stripped:/home/bk/mysql-5.1-maint
  into  sin.intern.azundris.com:/home/tnurnberg/24924/51-24924
  MERGE: 1.2482.69.1

  sql-common/client.c@stripped, 2007-06-18 12:59:09+02:00, tnurnberg@stripped
+0 -0
    Auto merged
    MERGE: 1.134.1.1

  sql/mysqld.cc@stripped, 2007-06-18 12:59:09+02:00, tnurnberg@stripped +0 -0
    Auto merged
    MERGE: 1.651.2.1

# 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:	tnurnberg
# Host:	sin.intern.azundris.com
# Root:	/home/tnurnberg/24924/51-24924/RESYNC

--- 1.655/sql/mysqld.cc	2007-06-15 20:45:36 +02:00
+++ 1.656/sql/mysqld.cc	2007-06-18 12:59:09 +02:00
@@ -4691,7 +4691,7 @@ pthread_handler_t handle_connections_sha
   HANDLE event_connect_answer= 0;
   ulong smem_buffer_length= shared_memory_buffer_length + 4;
   ulong connect_number= 1;
-  char tmp[63];
+  char *tmp= NULL;
   char *suffix_pos;
   char connect_number_char[22], *p;
   const char *errmsg= 0;
@@ -4700,6 +4700,12 @@ pthread_handler_t handle_connections_sha
   DBUG_ENTER("handle_connections_shared_memorys");
   DBUG_PRINT("general",("Waiting for allocated shared memory."));
 
+  /*
+     get enough space base-name + '_' + longest suffix we might ever send
+   */
+  if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L)))
+    goto error;
+
   if (my_security_attr_create(&sa_event, &errmsg,
                               GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE))
     goto error;
@@ -4887,6 +4893,9 @@ errorconn:
 
   /* End shared memory handling */
 error:
+  if (tmp)
+    my_free(tmp);
+
   if (errmsg)
   {
     char buff[180];

--- 1.136/sql-common/client.c	2007-06-15 20:32:00 +02:00
+++ 1.137/sql-common/client.c	2007-06-18 12:59:09 +02:00
@@ -397,7 +397,7 @@ HANDLE create_shared_memory(MYSQL *mysql
   HANDLE handle_file_map = NULL;
   ulong connect_number;
   char connect_number_char[22], *p;
-  char tmp[64];
+  char *tmp= NULL;
   char *suffix_pos;
   DWORD error_allow = 0;
   DWORD error_code = 0;
@@ -405,6 +405,12 @@ HANDLE create_shared_memory(MYSQL *mysql
   char *shared_memory_base_name = mysql->options.shared_memory_base_name;
 
   /*
+     get enough space base-name + '_' + longest suffix we might ever send
+   */
+  if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L)))
+    goto err;
+
+  /*
     The name of event and file-mapping events create agree next rule:
     shared_memory_base_name+unique_part
     Where:
@@ -546,6 +552,9 @@ err2:
       CloseHandle(handle_file_map);
   }
 err:
+  if (tmp)
+    my_free(tmp);
+
   if (error_allow)
     error_code = GetLastError();
   if (event_connect_request)
Thread
bk commit into 5.1 tree (tnurnberg:1.2505)Tatjana A Nuernberg18 Jun