#At file:///media/sdb2/hezx/work/mysql/bzrwork/b37145/6.0-bugteam/ based on revid:zhenxing.he@stripped
3193 He Zhenxing 2009-04-09 [merge]
Merge postfix of BUG#37145 from 5.1-bugteam
M sql/events.cc
M sql/log_event.cc
2497.865.5 He Zhenxing 2009-04-09
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
M sql/events.cc
M sql/log_event.cc
2497.865.4 He Zhenxing 2009-04-09 [merge]
auto merge from 5.0-bugteam
1810.3895.3 He Zhenxing 2009-04-09 [merge]
auto merge
M myisam/mi_close.c
1810.3894.3 Satya B 2009-04-07 [merge]
merge to latest 5.0-bugteam
M myisam/mi_packrec.c
M mysql-test/r/lock_multi.result
M mysql-test/r/myisampack.result
M mysql-test/t/lock_multi.test
M mysql-test/t/myisampack.test
M scripts/mysqld_multi.sh
M sql/sql_lex.cc
M sql/sql_lex.h
M sql/sql_parse.cc
M sql/sql_yacc.yy
1810.3895.2 He Zhenxing 2009-04-08 [merge]
Auto merge
R mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result => mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result
R mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test => mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
M cmd-line-utils/libedit/makelist.sh
M cmd-line-utils/libedit/readline.c
M cmd-line-utils/libedit/readline/readline.h
M cmd-line-utils/libedit/vi.c
M include/my_global.h
M myisam/CMakeLists.txt
M myisam/mi_packrec.c
M mysql-test/r/binlog.result
M mysql-test/r/func_group.result
M mysql-test/r/innodb_mysql.result
M mysql-test/r/lock_multi.result
M mysql-test/r/myisampack.result
M mysql-test/r/ps_1general.result
M mysql-test/r/sp.result
M mysql-test/r/trigger.result
M mysql-test/r/union.result
M mysql-test/r/variables-big.result
M mysql-test/t/binlog.test
M mysql-test/t/func_group.test
M mysql-test/t/innodb_mysql.test
M mysql-test/t/lock_multi.test
M mysql-test/t/myisampack.test
M mysql-test/t/ps_1general.test
M mysql-test/t/sp.test
M mysql-test/t/trigger.test
M mysql-test/t/union.test
M mysql-test/t/variables-big.test
M scripts/mysqld_multi.sh
M sql/field.cc
M sql/handler.cc
M sql/item.cc
M sql/item.h
M sql/mysql_priv.h
M sql/sp_head.cc
M sql/sql_base.cc
M sql/sql_class.cc
M sql/sql_class.h
M sql/sql_insert.cc
M sql/sql_lex.cc
M sql/sql_lex.h
M sql/sql_parse.cc
M sql/sql_select.cc
M sql/sql_yacc.yy
M support-files/mysql.spec.sh
=== modified file 'sql/events.cc'
--- a/sql/events.cc 2009-03-17 20:07:27 +0000
+++ b/sql/events.cc 2009-04-09 06:24:18 +0000
@@ -402,6 +402,7 @@ Events::create_event(THD *thd, Event_par
if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists)))
{
Event_queue_element *new_element;
+ bool dropped= 0;
if (!(new_element= new Event_queue_element()))
ret= TRUE; // OOM
@@ -409,8 +410,9 @@ Events::create_event(THD *thd, Event_par
parse_data->name,
new_element)))
{
- db_repository->drop_event(thd, parse_data->dbname, parse_data->name,
- TRUE);
+ if (!db_repository->drop_event(thd, parse_data->dbname, parse_data->name,
+ TRUE))
+ dropped= 1;
delete new_element;
}
else
@@ -419,6 +421,12 @@ Events::create_event(THD *thd, Event_par
bool created;
if (event_queue)
event_queue->create_event(thd, new_element, &created);
+ }
+ /*
+ binlog the create event unless it's been successfully dropped
+ */
+ if (!dropped)
+ {
/* Binlog the create event. */
DBUG_ASSERT(thd->query && thd->query_length);
write_bin_log(thd, TRUE, thd->query, thd->query_length);
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2009-04-08 23:46:45 +0000
+++ b/sql/log_event.cc 2009-04-09 06:24:18 +0000
@@ -2297,7 +2297,16 @@ Query_log_event::Query_log_event(THD* th
(thd_arg->is_error() ? thd_arg->stmt_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);
/**
Attachment: [text/bzr-bundle] bzr/zhenxing.he@sun.com-20090409062418-06i4j26z30sqdpg3.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-bugteam branch (zhenxing.he:3193) Bug#37145 | He Zhenxing | 9 Apr |