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
16640ef3
Commit
16640ef3
authored
Mar 28, 2007
by
tsmith@siva.hindu.god
Browse files
Options
Browse Files
Download
Plain Diff
Merge siva.hindu.god:/home/tsmith/m/bk/maint/50
into siva.hindu.god:/home/tsmith/m/bk/maint/51
parents
5aa073b1
979102de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
sql/log.cc
sql/log.cc
+32
-32
No files found.
sql/log.cc
View file @
16640ef3
...
...
@@ -4216,38 +4216,6 @@ static bool test_if_number(register const char *str,
}
/* test_if_number */
static
void
print_buffer_to_file
(
enum
loglevel
level
,
const
char
*
buffer
)
{
time_t
skr
;
struct
tm
tm_tmp
;
struct
tm
*
start
;
DBUG_ENTER
(
"print_buffer_to_file"
);
DBUG_PRINT
(
"enter"
,(
"buffer: %s"
,
buffer
));
VOID
(
pthread_mutex_lock
(
&
LOCK_error_log
));
skr
=
time
(
NULL
);
localtime_r
(
&
skr
,
&
tm_tmp
);
start
=&
tm_tmp
;
fprintf
(
stderr
,
"%02d%02d%02d %2d:%02d:%02d [%s] %s
\n
"
,
start
->
tm_year
%
100
,
start
->
tm_mon
+
1
,
start
->
tm_mday
,
start
->
tm_hour
,
start
->
tm_min
,
start
->
tm_sec
,
(
level
==
ERROR_LEVEL
?
"ERROR"
:
level
==
WARNING_LEVEL
?
"Warning"
:
"Note"
),
buffer
);
fflush
(
stderr
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_error_log
));
DBUG_VOID_RETURN
;
}
void
sql_perror
(
const
char
*
message
)
{
#ifdef HAVE_STRERROR
...
...
@@ -4380,6 +4348,38 @@ int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
DBUG_RETURN
(
0
);
}
#else
/*!EMBEDDED_LIBRARY*/
static
void
print_buffer_to_file
(
enum
loglevel
level
,
const
char
*
buffer
)
{
time_t
skr
;
struct
tm
tm_tmp
;
struct
tm
*
start
;
DBUG_ENTER
(
"print_buffer_to_file"
);
DBUG_PRINT
(
"enter"
,(
"buffer: %s"
,
buffer
));
VOID
(
pthread_mutex_lock
(
&
LOCK_error_log
));
skr
=
time
(
NULL
);
localtime_r
(
&
skr
,
&
tm_tmp
);
start
=&
tm_tmp
;
fprintf
(
stderr
,
"%02d%02d%02d %2d:%02d:%02d [%s] %s
\n
"
,
start
->
tm_year
%
100
,
start
->
tm_mon
+
1
,
start
->
tm_mday
,
start
->
tm_hour
,
start
->
tm_min
,
start
->
tm_sec
,
(
level
==
ERROR_LEVEL
?
"ERROR"
:
level
==
WARNING_LEVEL
?
"Warning"
:
"Note"
),
buffer
);
fflush
(
stderr
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_error_log
));
DBUG_VOID_RETURN
;
}
int
vprint_msg_to_log
(
enum
loglevel
level
,
const
char
*
format
,
va_list
args
)
{
char
buff
[
1024
];
...
...
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