Comment 9 for bug 1277986

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote : Re: Empty GRA_*_*.log file generated after closing a MySQL session that was used to insert rows on a MEMORY/MyISAM with binlogging OFF.

To trigger this crash/issue: you need to do an insert to a non-innodb table followed by anything that touches binlog logic - ie. another insert to any table (an innodb), it will crash. This seems to be due to lack of cleanup in binlog_cache_data::reset() (called from thd_binlog_trx_reset):

#0 thd_binlog_trx_reset (thd=thd@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/binlog.cc:8976
#1 0x00000000007b5566 in wsrep_cleanup_transaction (thd=thd@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/wsrep_hton.cc:39
#2 0x00000000007b5da9 in wsrep_post_commit (thd=thd@entry=0x2444170, all=all@entry=false) at /media/Tintin/Work/code/codership/codership-5.6/sql/wsrep_hton.cc:110
#3 0x000000000079be15 in trans_commit_stmt (thd=thd@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/transaction.cc:481
#4 0x00000000007007dd in mysql_execute_command (thd=thd@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_parse.cc:5405
#5 0x0000000000701ddd in mysql_parse (thd=thd@entry=0x2444170, rawbuf=rawbuf@entry=0x7fff74005020 "insert into i1(a) values (NULL)", length=length@entry=31, parser_state=parser_state@entry=0x7fffcc1b9610)
    at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_parse.cc:6775
#6 0x0000000000702761 in wsrep_mysql_parse (thd=thd@entry=0x2444170, rawbuf=0x7fff74005020 "insert into i1(a) values (NULL)", length=31, parser_state=parser_state@entry=0x7fffcc1b9610)
    at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_parse.cc:6555
#7 0x0000000000704005 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x2444170, packet=packet@entry=0x2552f91 "insert into i1(a) values (NULL)", packet_length=packet_length@entry=31)
    at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_parse.cc:1526
#8 0x00000000007067a1 in do_command (thd=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_parse.cc:1118
#9 0x00000000006c9738 in do_handle_one_connection (thd_arg=thd_arg@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_connect.cc:1007
#10 0x00000000006c98c3 in handle_one_connection (arg=arg@entry=0x2444170) at /media/Tintin/Work/code/codership/codership-5.6/sql/sql_connect.cc:916
#11 0x0000000000c22de8 in pfs_spawn_thread (arg=0x24cae90) at /media/Tintin/Work/code/codership/codership-5.6/storage/perfschema/pfs.cc:1858
#12 0x00007ffff7bc70a2 in start_thread () from /usr/lib/libpthread.so.0
#13 0x00007ffff6216d1d in clone () from /usr/lib/libc.so.6

(i1 is an innodb table).

This cleanup is not called for non-innodb - memory/myisam tables.