diff options
author | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-05-18 14:54:49 +0530 |
---|---|---|
committer | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-05-18 14:54:49 +0530 |
commit | cdf81d143e85431a0710a08c81e04f74c21b6bdc (patch) | |
tree | eae2e6c645b7e95b91e14452af201a323f72a0d3 /sql/log.cc | |
parent | fff61e31eca83a0a9af7c30e2bcda8309e9c695a (diff) | |
download | mariadb-git-bb-mdev-11092.tar.gz |
MDEV-11092 Assertion `!writer.checksum_len || writer.remains == 0' failedbb-mdev-11092
Problem:-
This crash happens because logged stmt is quite big and while writing
Annotate_rows_log_event it throws EFBIG error but we ignore this error
and do not call cache_data->set_incident().
Solution:-
When we normally write Binlog_log_event we check for error EFBIG, but we did
do this for Annotate_rows_log_event. We check for this error and call
cache_data->set_incident() accordingly.
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index f865c52ac6d..66374ca5743 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -5635,6 +5635,9 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional, IO_CACHE *file= cache_mngr->get_binlog_cache_log(use_trans_cache(this, is_transactional)); + binlog_cache_data *cache_data= + cache_mngr->get_binlog_cache_data(use_trans_cache(this, is_transactional)); + Log_event_writer writer(file); if (with_annotate && *with_annotate) { @@ -5642,7 +5645,11 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional, /* Annotate event should be written not more than once */ *with_annotate= 0; if ((error= writer.write(&anno))) + { + if (my_errno == EFBIG) + cache_data->set_incident(); DBUG_RETURN(error); + } } if ((error= writer.write(&the_event))) DBUG_RETURN(error); |