diff options
author | unknown <guilhem@gbichot2> | 2003-09-26 22:56:13 +0200 |
---|---|---|
committer | unknown <guilhem@gbichot2> | 2003-09-26 22:56:13 +0200 |
commit | 44f65c246d80de4518e8d74359159b14a1ef3bd4 (patch) | |
tree | 454ec75c8f9ae2cb27a86ee9fc952a0d52e39957 /sql/log_event.cc | |
parent | 2d7beead4447606db00bfa41cf5a283dd76577d9 (diff) | |
download | mariadb-git-44f65c246d80de4518e8d74359159b14a1ef3bd4.tar.gz |
A fix of the fix for BUG#1209 (was: SELECT DATABASE() still shows dropped database).
Don't free the client's selected db (thd->db) when it has been DROPped,
if this is a slave thread; the x_free() was causing a lot
of various bugs in rpl_loaddata_rule_m (garbage characters, segfault, hangs in
other threads).
A small post-merge fix (rli->inside_transaction exists in 4.0 only).
sql/log_event.cc:
Post-merge fix (rli->inside_transaction existed in 4.0 only)
sql/sql_db.cc:
Don't free the client's selected db (thd->db) when it has been DROPped,
if this is a slave thread; the x_free() was causing a lot
of various bugs in rpl_loaddata_rule_m which does a DROP DATABASE
(garbage characters, segfault, hangs in other threads).
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index eee5be4c40f..b6964c40422 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1876,19 +1876,22 @@ int Rotate_log_event::exec_event(struct st_relay_log_info* rli) pthread_mutex_lock(&rli->data_lock); -#ifdef TO_BE_CHECKED_BY_GUILHEM - if (rli->inside_transaction) + if (thd->options & OPTION_BEGIN) { slave_print_error(rli, 0, + opt_using_transactions ? "\ There is an unfinished transaction in the relay log (could find neither \ COMMIT nor ROLLBACK in the relay log); It could be that the master died while \ writing the transaction to its binary log. Now the slave is rolling back the \ -transaction."); +transaction." : + "\ +There is an unfinished transaction in the relay log (could find neither \ +COMMIT nor ROLLBACK in the relay log); It could be that the master died while \ +writing the transaction to its binary log."); pthread_mutex_unlock(&rli->data_lock); DBUG_RETURN(1); } -#endif memcpy(log_name, new_log_ident, ident_len+1); rli->notify_group_master_log_name_update(); |