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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
956e9559
Commit
956e9559
authored
Feb 08, 2008
by
kostja@dipika.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give a more informative message if we failed to write to mysql.general_log
table.
parent
092cadbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
sql/log.cc
sql/log.cc
+9
-3
No files found.
sql/log.cc
View file @
956e9559
...
@@ -73,23 +73,28 @@ static int binlog_prepare(handlerton *hton, THD *thd, bool all);
...
@@ -73,23 +73,28 @@ static int binlog_prepare(handlerton *hton, THD *thd, bool all);
*/
*/
class
Silence_log_table_errors
:
public
Internal_error_handler
class
Silence_log_table_errors
:
public
Internal_error_handler
{
{
char
m_message
[
MYSQL_ERRMSG_SIZE
];
public:
public:
Silence_log_table_errors
()
Silence_log_table_errors
()
{}
{
m_message
[
0
]
=
'\0'
;
}
virtual
~
Silence_log_table_errors
()
{}
virtual
~
Silence_log_table_errors
()
{}
virtual
bool
handle_error
(
uint
sql_errno
,
const
char
*
message
,
virtual
bool
handle_error
(
uint
sql_errno
,
const
char
*
message
,
MYSQL_ERROR
::
enum_warning_level
level
,
MYSQL_ERROR
::
enum_warning_level
level
,
THD
*
thd
);
THD
*
thd
);
const
char
*
message
()
const
{
return
m_message
;
}
};
};
bool
bool
Silence_log_table_errors
::
handle_error
(
uint
/* sql_errno */
,
Silence_log_table_errors
::
handle_error
(
uint
/* sql_errno */
,
const
char
*
/* message */
,
const
char
*
message_arg
,
MYSQL_ERROR
::
enum_warning_level
/* level */
,
MYSQL_ERROR
::
enum_warning_level
/* level */
,
THD
*
/* thd */
)
THD
*
/* thd */
)
{
{
strmake
(
m_message
,
message_arg
,
sizeof
(
m_message
));
return
TRUE
;
return
TRUE
;
}
}
...
@@ -437,7 +442,8 @@ bool Log_to_csv_event_handler::
...
@@ -437,7 +442,8 @@ bool Log_to_csv_event_handler::
err:
err:
if
(
result
)
if
(
result
)
sql_print_error
(
"Failed to write to mysql.general_log"
);
sql_print_error
(
"Failed to write to mysql.general_log: %s"
,
error_handler
.
message
());
if
(
need_rnd_end
)
if
(
need_rnd_end
)
{
{
...
...
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