summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-04-09 14:22:06 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-04-09 14:22:06 +0800
commitcaaa8531bd1098d7e5d0efec6f87fbf4eac46043 (patch)
treeeb323e6b2526e2138c8361715bb993a4c9de55f1 /sql/log_event.cc
parent4ab0005be68033147e3d7210641dbd8e1de49a6b (diff)
downloadmariadb-git-caaa8531bd1098d7e5d0efec6f87fbf4eac46043.tar.gz
Post fix of BUG#37145
Binlog the CREATE EVENT unless the created event been successfully dropped Modified Query_log_event constructor to make sure that error_code is not set to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED errors when NOT_KILLED sql/events.cc: binlog the create event unless it's been successfully dropped sql/log_event.cc: Modified Query_log_event constructor to make sure that error_code is not set to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED errors when NOT_KILLED
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 89094da3e94..10ff6555e9b 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2292,7 +2292,16 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
(thd_arg->is_error() ? thd_arg->main_da.sql_errno() : 0) :
((thd_arg->system_thread & SYSTEM_THREAD_DELAYED_INSERT) ? 0 :
thd_arg->killed_errno());
-
+
+ /* thd_arg->main_da.sql_errno() might be ER_SERVER_SHUTDOWN or
+ ER_QUERY_INTERRUPTED, So here we need to make sure that
+ error_code is not set to these errors when specified NOT_KILLED
+ by the caller
+ */
+ if ((killed_status_arg == THD::NOT_KILLED) &&
+ (error_code == ER_SERVER_SHUTDOWN || error_code == ER_QUERY_INTERRUPTED))
+ error_code= 0;
+
time(&end_time);
exec_time = (ulong) (end_time - thd_arg->start_time);
/**