Comment 3 for bug 1353644

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

=== modified file 'sql/binlog.cc'
--- sql/binlog.cc 2014-06-12 18:12:00 +0000
+++ sql/binlog.cc 2014-08-10 19:46:59 +0000
@@ -1387,10 +1387,12 @@

   binlog_cache_mngr * const cache_mngr= thd_get_cache_mngr(thd);

+ if (!cache_mngr->is_binlog_empty()) {
   /* Server layer calls us with LOCK_log locked, so this is safe. */
- mysql_bin_log.raw_get_current_log(&cache_mngr->binlog_info);
+ mysql_bin_log.raw_get_current_log(&cache_mngr->binlog_info);

- trans_register_ha(thd, TRUE, hton);
+ trans_register_ha(thd, TRUE, hton);
+ }

   DBUG_RETURN(err);
 }

fixes it. Need more review from Alexey on this.