diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index a8c83d58884..ebdb8014f88 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,5 +12,4 @@ rpl_redirect : Failure is sporadic and and the test is superfluous (mats) rpl_innodb_bug28430 : Failure on Solaris Bug #36793 -rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild rpl_flushlog_loop : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main diff --git a/sql/log_event.cc b/sql/log_event.cc index da6e7ef2a1c..f91ebf3823f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -3350,6 +3350,17 @@ int Start_log_event_v3::do_apply_event(Relay_log_info const *rli) close_temporary_tables(thd); cleanup_load_tmpdir(); } + else + { + /* + Set all temporary tables thread references to the current thread + as they may point to the "old" SQL slave thread in case of its + restart. + */ + TABLE *table; + for (table= thd->temporary_tables; table; table= table->next) + table->in_use= thd; + } break; /*