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
9c9d10b4
Commit
9c9d10b4
authored
Jan 15, 2016
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9106 Audit plugin not working with MySQL 5.7.
fixing Windows crash.
parent
fe4823d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
3 deletions
+44
-3
plugin/server_audit/server_audit.c
plugin/server_audit/server_audit.c
+44
-3
No files found.
plugin/server_audit/server_audit.c
View file @
9c9d10b4
...
...
@@ -116,18 +116,41 @@ static char *default_home= (char *)".";
#define FLOGGER_SKIP_INCLUDES
#define my_open(A, B, C) loc_open(A, B)
#define my_close(A, B) close(A)
#define my_close(A, B)
loc_
close(A)
#define my_rename(A, B, C) loc_rename(A, B)
#define my_tell(A, B) loc_tell(A)
#define my_write(A, B, C, D) write(A, B, C)
#define my_write(A, B, C, D)
loc_
write(A, B, C)
#define my_malloc(A, B) malloc(A)
#define my_free(A) free(A)
#ifdef my_errno
#undef my_errno
#endif
static
int
loc_file_errno
;
#define my_errno loc_file_errno
#ifdef my_vsnprintf
#undef my_vsnprintf
#endif
#define my_vsnprintf vsnprintf
#define logger_open loc_logger_open
#define logger_close loc_logger_close
#define logger_write loc_logger_write
#define logger_rotate loc_logger_rotate
#define logger_init_mutexts loc_logger_init_mutexts
static
size_t
loc_write
(
File
Filedes
,
const
uchar
*
Buffer
,
size_t
Count
)
{
size_t
writtenbytes
;
#ifdef _WIN32
writtenbytes
=
my_win_write
(
Filedes
,
Buffer
,
Count
);
#else
writtenbytes
=
write
(
Filedes
,
Buffer
,
Count
);
#endif
return
writtenbytes
;
}
File
loc_open
(
const
char
*
FileName
,
int
Flags
)
static
File
loc_open
(
const
char
*
FileName
,
int
Flags
)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
...
...
@@ -140,9 +163,27 @@ File loc_open(const char *FileName, int Flags)
#else
fd
=
open
((
char
*
)
FileName
,
Flags
);
#endif
my_errno
=
errno
;
return
fd
;
}
static
int
loc_close
(
File
fd
)
{
int
err
;
#ifndef _WIN32
do
{
err
=
close
(
fd
);
}
while
(
err
==
-
1
&&
errno
==
EINTR
);
#else
err
=
my_win_close
(
fd
);
#endif
my_errno
=
errno
;
return
err
;
}
static
int
loc_rename
(
const
char
*
from
,
const
char
*
to
)
{
int
error
=
0
;
...
...
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