summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-11-21 12:28:01 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-11-21 12:28:01 +0800
commit9b65f5782e110bed71cc3ed782029d73b1faa297 (patch)
tree33edb6115f37aa26c592dd1aa99a17b195511f5e /sql/sql_trigger.cc
parent408dd52a6ad1698619fb933b62966fa8b843f859 (diff)
downloadmariadb-git-9b65f5782e110bed71cc3ed782029d73b1faa297.tar.gz
BUG#37148 Most callers of mysql_bin_log.write ignore the return result
This is the non-ndb part of the patch. The return value of mysql_bin_log.write was ignored by most callers, which may lead to inconsistent on master and slave if the transaction was committed while the binlog was not correctly written. If my_error() is call in mysql_bin_log.write, this could also lead to assertion issue if my_ok() or my_error() is called after. This fixed the problem by let the caller to check and handle the return value of mysql_bin_log.write. This patch only adresses the simple cases.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 61da4617610..aa2ed498de1 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -507,7 +507,7 @@ end:
if (!result)
{
- write_bin_log(thd, TRUE, stmt_query.ptr(), stmt_query.length());
+ result= write_bin_log(thd, TRUE, stmt_query.ptr(), stmt_query.length());
}
VOID(pthread_mutex_unlock(&LOCK_open));