Commit 8e65f663 authored by msvensson@pilot.(none)'s avatar msvensson@pilot.(none)

Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint

into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
parents 9ece930c 84034458
...@@ -278,6 +278,7 @@ sub mtr_report_stats ($) { ...@@ -278,6 +278,7 @@ sub mtr_report_stats ($) {
{ {
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") ) foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
{ {
my $testname= "";
unless ( open(ERR, $errlog) ) unless ( open(ERR, $errlog) )
{ {
mtr_warning("can't read $errlog"); mtr_warning("can't read $errlog");
...@@ -367,13 +368,17 @@ sub mtr_report_stats ($) { ...@@ -367,13 +368,17 @@ sub mtr_report_stats ($) {
{ {
next; # Skip these lines next; # Skip these lines
} }
if ( /CURRENT_TEST: (.*)/ )
{
$testname= $1;
}
if ( /$pattern/ ) if ( /$pattern/ )
{ {
if ($leak_reports_expected) { if ($leak_reports_expected) {
next; next;
} }
$found_problems= 1; $found_problems= 1;
print WARN basename($errlog) . ": $_"; print WARN basename($errlog) . ": $testname: $_";
} }
} }
} }
......
...@@ -397,13 +397,19 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) ...@@ -397,13 +397,19 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
HANDLE handle_file_map = NULL; HANDLE handle_file_map = NULL;
ulong connect_number; ulong connect_number;
char connect_number_char[22], *p; char connect_number_char[22], *p;
char tmp[64]; char *tmp= NULL;
char *suffix_pos; char *suffix_pos;
DWORD error_allow = 0; DWORD error_allow = 0;
DWORD error_code = 0; DWORD error_code = 0;
DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE; DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE;
char *shared_memory_base_name = mysql->options.shared_memory_base_name; 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, MYF(MY_FAE))))
goto err;
/* /*
The name of event and file-mapping events create agree next rule: The name of event and file-mapping events create agree next rule:
shared_memory_base_name+unique_part shared_memory_base_name+unique_part
...@@ -546,6 +552,8 @@ err2: ...@@ -546,6 +552,8 @@ err2:
CloseHandle(handle_file_map); CloseHandle(handle_file_map);
} }
err: err:
if (tmp)
my_free(tmp, MYF(0));
if (error_allow) if (error_allow)
error_code = GetLastError(); error_code = GetLastError();
if (event_connect_request) if (event_connect_request)
......
...@@ -4692,7 +4692,7 @@ pthread_handler_t handle_connections_shared_memory(void *arg) ...@@ -4692,7 +4692,7 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
HANDLE event_connect_answer= 0; HANDLE event_connect_answer= 0;
ulong smem_buffer_length= shared_memory_buffer_length + 4; ulong smem_buffer_length= shared_memory_buffer_length + 4;
ulong connect_number= 1; ulong connect_number= 1;
char tmp[63]; char *tmp= NULL;
char *suffix_pos; char *suffix_pos;
char connect_number_char[22], *p; char connect_number_char[22], *p;
const char *errmsg= 0; const char *errmsg= 0;
...@@ -4701,6 +4701,12 @@ pthread_handler_t handle_connections_shared_memory(void *arg) ...@@ -4701,6 +4701,12 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
DBUG_ENTER("handle_connections_shared_memorys"); DBUG_ENTER("handle_connections_shared_memorys");
DBUG_PRINT("general",("Waiting for allocated shared memory.")); 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, MYF(MY_FAE))))
goto error;
if (my_security_attr_create(&sa_event, &errmsg, if (my_security_attr_create(&sa_event, &errmsg,
GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE)) GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE))
goto error; goto error;
...@@ -4888,6 +4894,9 @@ errorconn: ...@@ -4888,6 +4894,9 @@ errorconn:
/* End shared memory handling */ /* End shared memory handling */
error: error:
if (tmp)
my_free(tmp, MYF(0));
if (errmsg) if (errmsg)
{ {
char buff[180]; char buff[180];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment