Commit 02faba53 authored by unknown's avatar unknown

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

into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql-common/client.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
parents 73cf7a6c e0e739b6
......@@ -278,6 +278,7 @@ sub mtr_report_stats ($) {
{
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
{
my $testname= "";
unless ( open(ERR, $errlog) )
{
mtr_warning("can't read $errlog");
......@@ -367,13 +368,17 @@ sub mtr_report_stats ($) {
{
next; # Skip these lines
}
if ( /CURRENT_TEST: (.*)/ )
{
$testname= $1;
}
if ( /$pattern/ )
{
if ($leak_reports_expected) {
next;
}
$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)
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;
DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE;
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:
shared_memory_base_name+unique_part
......@@ -546,6 +552,8 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
CloseHandle(handle_file_map);
}
err:
if (tmp)
my_free(tmp, MYF(0));
if (error_allow)
error_code = GetLastError();
if (event_connect_request)
......
......@@ -4692,7 +4692,7 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
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;
......@@ -4701,6 +4701,12 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
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, MYF(MY_FAE))))
goto error;
if (my_security_attr_create(&sa_event, &errmsg,
GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE))
goto error;
......@@ -4888,6 +4894,9 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
/* End shared memory handling */
error:
if (tmp)
my_free(tmp, MYF(0));
if (errmsg)
{
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