Below is the list of changes that have just been committed into a local
5.1 repository of thek. When thek 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-04-22 14:01:32+02:00, thek@adventure.(none) +1 -0
Bug#34417 Assertion failure in Diagnostics_area::set_error_status()
The Diagnostic_area caused an assertion failure in debug mode when
the disk was full.
By setting the internal error handler to ignore errors caused by
underlying logging methods, the error is avoided.
sql/log.cc@stripped, 2008-04-22 14:01:29+02:00, thek@adventure.(none) +15 -7
MYSQL_QUERY_LOG::write uses IOCACHE for writing data. If writing fails
an error is pushed by the procedure my_error which in turn invokes
the default error handler my_message_sql. When the error is set the
Diagnostic_area status changes and later trigger an assertion on the
next consecutive status change which happens by for example the
function my_ok(). By intercepting the error handler from the logger
interface this error can be silenced.
diff -Nrup a/sql/log.cc b/sql/log.cc
--- a/sql/log.cc 2008-03-27 12:54:43 +01:00
+++ b/sql/log.cc 2008-04-22 14:01:29 +02:00
@@ -727,10 +727,14 @@ bool Log_to_file_event_handler::
ulonglong query_utime, ulonglong lock_utime, bool is_command,
const char *sql_text, uint sql_text_len)
{
- return mysql_slow_log.write(thd, current_time, query_start_arg,
- user_host, user_host_len,
- query_utime, lock_utime, is_command,
- sql_text, sql_text_len);
+ Silence_log_table_errors error_handler;
+ thd->push_internal_handler(&error_handler);
+ bool retval= mysql_slow_log.write(thd, current_time, query_start_arg,
+ user_host, user_host_len,
+ query_utime, lock_utime, is_command,
+ sql_text, sql_text_len);
+ thd->pop_internal_handler();
+ return retval;
}
@@ -746,9 +750,13 @@ bool Log_to_file_event_handler::
const char *sql_text, uint sql_text_len,
CHARSET_INFO *client_cs)
{
- return mysql_log.write(event_time, user_host, user_host_len,
- thread_id, command_type, command_type_len,
- sql_text, sql_text_len);
+ Silence_log_table_errors error_handler;
+ thd->push_internal_handler(&error_handler);
+ bool retval= mysql_log.write(event_time, user_host, user_host_len,
+ thread_id, command_type, command_type_len,
+ sql_text, sql_text_len);
+ thd->pop_internal_handler();
+ return retval;
}
| Thread |
|---|
| • bk commit into 5.1 tree (thek:1.2590) BUG#34417 | kpettersson | 22 Apr 2008 |