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
39f19505
Commit
39f19505
authored
Mar 28, 2019
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19068 - rename eventlog source to MariaDB.
parent
8d27f1e4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
34 deletions
+26
-34
sql/MSG00001.bin
sql/MSG00001.bin
+0
-0
sql/log.cc
sql/log.cc
+21
-5
sql/message.h
sql/message.h
+3
-26
sql/message.mc
sql/message.mc
+1
-2
sql/message.rc
sql/message.rc
+1
-1
No files found.
sql/MSG00001.bin
View file @
39f19505
No preview for this file type
sql/log.cc
View file @
39f19505
...
...
@@ -2449,7 +2449,7 @@ static void setup_windows_event_source()
// Create the event source registry key
dwError
=
RegCreateKey
(
HKEY_LOCAL_MACHINE
,
"SYSTEM
\\
CurrentControlSet
\\
Services
\\
EventLog
\\
Application
\\
M
ySQL"
,
"SYSTEM
\\
CurrentControlSet
\\
Services
\\
EventLog
\\
Application
\\
M
ariaDB"
,
&
hRegKey
);
/* Name of the PE module that contains the message resource */
...
...
@@ -8697,18 +8697,35 @@ bool flush_error_log()
}
#ifdef _WIN32
struct
eventlog_source
{
HANDLE
handle
;
eventlog_source
()
{
setup_windows_event_source
();
handle
=
RegisterEventSource
(
NULL
,
"MariaDB"
);
}
~
eventlog_source
()
{
if
(
handle
)
DeregisterEventSource
(
handle
);
}
};
static
eventlog_source
eventlog
;
static
void
print_buffer_to_nt_eventlog
(
enum
loglevel
level
,
char
*
buff
,
size_t
length
,
size_t
buffLen
)
{
HANDLE
event
;
HANDLE
event
=
eventlog
.
handle
;
char
*
buffptr
=
buff
;
DBUG_ENTER
(
"print_buffer_to_nt_eventlog"
);
/* Add ending CR/LF's to string, overwrite last chars if necessary */
strmov
(
buffptr
+
MY_MIN
(
length
,
buffLen
-
5
),
"
\r\n\r\n
"
);
setup_windows_event_source
();
if
((
event
=
RegisterEventSource
(
NULL
,
"MySQL"
)))
if
(
event
)
{
switch
(
level
)
{
case
ERROR_LEVEL
:
...
...
@@ -8724,7 +8741,6 @@ static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
0
,
(
LPCSTR
*
)
&
buffptr
,
NULL
);
break
;
}
DeregisterEventSource
(
event
);
}
DBUG_VOID_RETURN
;
...
...
sql/message.h
View file @
39f19505
#ifndef MESSAGE_INCLUDED
#define MESSAGE_INCLUDED
/* Copyright (c) 2008, 2009 Sun Microsystems, Inc.
Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
To change or add messages mysqld writes to the Windows error log, run
mc.exe message.mc
...
...
@@ -24,10 +6,8 @@
mc.exe can be installed with Windows SDK, some Visual Studio distributions
do not include it.
*/
//
// Values are 32 bit values la
ye
d out as follows:
// Values are 32 bit values la
i
d out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
...
...
@@ -67,11 +47,8 @@
//
// MessageText:
//
// %1For more information, see Help and Support Center at http://www.mysql.com.
//
//
// %1
//
//
#define MSG_DEFAULT 0xC0000064L
#endif
/* MESSAGE_INCLUDED */
sql/message.mc
View file @
39f19505
...
...
@@ -11,6 +11,5 @@ Severity = Error
Facility = Application
SymbolicName = MSG_DEFAULT
Language = English
%
1
For
more
information
,
see
Help
and
Support
Center
at
http:
//
www
.
mysql
.
com
.
%
1
sql/message.rc
View file @
39f19505
LANGUAGE 0x9,0x1
1 11
MSG00001.bin
1 11
"MSG00001.bin"
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