summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2010-08-10 12:32:54 +0100
committerAlfranio Correia <alfranio.correia@sun.com>2010-08-10 12:32:54 +0100
commitbd3aa7eb783ea405e8e8b57798273c57e5916da7 (patch)
tree51b09d968c30a378dde0df81920b31d8ca21068d /sql/log.cc
parent89ad5fa81018160cd7de73abba45c676d7321ea7 (diff)
downloadmariadb-git-bd3aa7eb783ea405e8e8b57798273c57e5916da7.tar.gz
BUG#50312 Warnings for unsafe sub-statement not returned to client
After BUG#36649, warnings for sub-statements are cleared when a new sub-statement is started. This is problematic since it suppresses warnings for unsafe statements in some cases. It is important that we always give a warning to the client, because the user needs to know when there is a risk that the slave goes out of sync. We fixed the problem by generating warning messages for unsafe statements while returning from a stored procedure, function, trigger or while executing a top level statement. We also started checking unsafeness when both performance and log tables are used. This is necessary after the performance schema which does a distinction between performance and log tables.
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 1e4682e4bc3..86f8100be07 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -4704,7 +4704,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
file= cache_mngr->get_binlog_cache_log(is_trans_cache);
cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache);
- if (thd->stmt_accessed_non_trans_temp_table())
+ if (thd->lex->stmt_accessed_non_trans_temp_table())
cache_data->set_changes_to_non_trans_temp_table();
thd->binlog_start_trans_and_stmt();