Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-02-08 13:35:11+03:00, kostja@dipika.(none) +1 -0
Give a more informative message if we failed to write to mysql.general_log
table.
sql/log.cc@stripped, 2008-02-08 13:35:07+03:00, kostja@dipika.(none) +9 -3
Give a more informative message if we failed to write to mysql.general_log
table.
diff -Nrup a/sql/log.cc b/sql/log.cc
--- a/sql/log.cc 2008-01-23 01:45:42 +03:00
+++ b/sql/log.cc 2008-02-08 13:35:07 +03:00
@@ -73,23 +73,28 @@ static int binlog_prepare(handlerton *ht
*/
class Silence_log_table_errors : public Internal_error_handler
{
+ char m_message[MYSQL_ERRMSG_SIZE];
public:
Silence_log_table_errors()
- {}
+ {
+ m_message[0]= '\0';
+ }
virtual ~Silence_log_table_errors() {}
virtual bool handle_error(uint sql_errno, const char *message,
MYSQL_ERROR::enum_warning_level level,
THD *thd);
+ const char *message() const { return m_message; }
};
bool
Silence_log_table_errors::handle_error(uint /* sql_errno */,
- const char * /* message */,
+ const char *message_arg,
MYSQL_ERROR::enum_warning_level /* level */,
THD * /* thd */)
{
+ strmake(m_message, message_arg, sizeof(m_message));
return TRUE;
}
@@ -437,7 +442,8 @@ bool Log_to_csv_event_handler::
err:
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)
{