Commit f41ee56d authored by Jan Lindström's avatar Jan Lindström

MDEV-5386: Server crashes in thd_get_ha_data on maria-5.5-galera tree while...

MDEV-5386: Server crashes in thd_get_ha_data on maria-5.5-galera tree while running 'check testcase before test

Analysis: In Galera binlog is not enabled by default in case
when wsrep provider is not specified. In this case we should
not call thd->binlog_flush_pending_rows_event(TRUE). 

Fix: Added a additional guard on galera not to call binlog
function if wsrep provider is not specified and binlog is
not enabled.
parent 329fb586
......@@ -62,7 +62,7 @@
#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
extern handlerton *binlog_hton;
#endif // WITH_WSREP
bool
......@@ -1575,6 +1575,11 @@ void close_thread_tables(THD *thd)
handled either before writing a query log event (inside
binlog_query()) or when preparing a pending event.
*/
#ifdef WITH_WSREP
/* In Galera binlog is not enabled by default in case when
wsrep provider is not specified. */
if ((WSREP_ON && WSREP_PROVIDER_EXISTS) || binlog_hton->state == SHOW_OPTION_YES)
#endif
(void)thd->binlog_flush_pending_rows_event(TRUE);
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment