Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
eac6619f
Commit
eac6619f
authored
Jun 10, 2009
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.0-bugteam.
parents
d98dee2c
afacea4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
sql-common/client.c
sql-common/client.c
+16
-4
No files found.
sql-common/client.c
View file @
eac6619f
...
...
@@ -477,6 +477,9 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
DWORD
error_code
=
0
;
DWORD
event_access_rights
=
SYNCHRONIZE
|
EVENT_MODIFY_STATE
;
char
*
shared_memory_base_name
=
mysql
->
options
.
shared_memory_base_name
;
static
const
char
*
name_prefixes
[]
=
{
""
,
"Global
\\
"
};
const
char
*
prefix
;
int
i
;
/*
get enough space base-name + '_' + longest suffix we might ever send
...
...
@@ -491,9 +494,18 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
shared_memory_base_name is unique value for each server
unique_part is uniquel value for each object (events and file-mapping)
*/
suffix_pos
=
strxmov
(
tmp
,
"Global
\\
"
,
shared_memory_base_name
,
"_"
,
NullS
);
for
(
i
=
0
;
i
<
array_elements
(
name_prefixes
);
i
++
)
{
prefix
=
name_prefixes
[
i
];
suffix_pos
=
strxmov
(
tmp
,
prefix
,
shared_memory_base_name
,
"_"
,
NullS
);
strmov
(
suffix_pos
,
"CONNECT_REQUEST"
);
if
(
!
(
event_connect_request
=
OpenEvent
(
event_access_rights
,
FALSE
,
tmp
)))
event_connect_request
=
OpenEvent
(
event_access_rights
,
FALSE
,
tmp
);
if
(
event_connect_request
)
{
break
;
}
}
if
(
!
event_connect_request
)
{
error_allow
=
CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR
;
goto
err
;
...
...
@@ -545,7 +557,7 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
unique_part is uniquel value for each object (events and file-mapping)
number_of_connection is number of connection between server and client
*/
suffix_pos
=
strxmov
(
tmp
,
"Global
\\
"
,
shared_memory_base_name
,
"_"
,
connect_number_char
,
suffix_pos
=
strxmov
(
tmp
,
prefix
,
shared_memory_base_name
,
"_"
,
connect_number_char
,
"_"
,
NullS
);
strmov
(
suffix_pos
,
"DATA"
);
if
((
handle_file_map
=
OpenFileMapping
(
FILE_MAP_WRITE
,
FALSE
,
tmp
))
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment