Bug #44307 assert open_tables == 0 && temporary_tables == 0 ... in sql_class.cc:3041
Submitted: 16 Apr 2009 8:54 Modified: 13 Jan 2010 11:42
Reporter: Andrei Elkin Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[16 Apr 2009 8:54] Andrei Elkin
Description:
At executing a regression test for bug#38715 the following assert gets hit:

mysqld: sql_class.cc:3041: void THD::restore_backup_open_tables_state(Open_tables_state*): Assertion `open_tables == 0 && temporary_tables == 0 && handler_tables == 0 && derived_tables == 0 && lock == 0 && locked_tables_mode == LTM_NONE && m_reprepare_observer == __null' failed.

How to repeat:
To build and execute bug38715 program against the server started and
configured per bug#38715 instructions. To quote:

   setup a debug build master replicating to itself:

   mysqld-debug  --console --skip-grant-tables --server-id=5 --log-bin --port=3306
   --replicate-same-server-id  --slave-skip-errors=1050 --skip-innodb

   change master to master_host='127.0.0.1', master_port=3306, master_user='root',
   master_password='';
   start slave;

   then run the attached bug38715.c testcase against the server.

Getting to the assert can take some minutes.
[13 Dec 2009 11:42] Sveta Smirnova
Thank you for the report.

With version 5.1 I got another error:

091213 12:40:21 [Note] Slave SQL thread exiting, replication stopped in log 'FIRST' at position 0
091213 12:40:21 [ERROR] Slave I/O: error connecting to master 'test@127.0.0.1:3306' - retry-time: 60  retries: 86400, Error_code: 2013
mysqld: slave.cc:728: bool io_slave_killed(THD*, Master_info*): Assertion `mi->io_thd == thd' failed.
091213 12:40:21 - mysqld got signal 6 ;

Which version do you use? Does assert still repeatable for you?
[14 Jan 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".