Bug #35698 Trying to backup a Falcon database leads to assertion
Submitted: 31 Mar 2008 9:27 Modified: 21 May 2008 16:48
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0-falcon bk OS:Linux
Assigned to: Jørgen Løland CPU Architecture:Any

[31 Mar 2008 9:27] Hakan Küçükyılmaz
Description:
Trying to backup a Falcon database leads to assertion.

How to repeat:
1) get the Sakila database
   wget http://downloads.mysql.com/docs/sakila-db.tar.gz

2) expand it
   tar -xzf sakila-db.tar.gz

3) change innodb to Falcon
   perl -i -pe 's/innodb/falcon/i' sakila-db/sakila-schema.sql

4) from a mysql client, do the following:
   source sakila-db/sakila-schema.sql
   source sakila-db/sakila-data.sql
   show create table actor \G
   # should show 'falcon'
   select count(*) from actor;
   # should show 200
   backup database sakila to 'sakila.bkp';

mysqld: handler.cc:1971: THD* handler::ha_thd() const: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x4588c950 (LWP 12848)]
0x00002abc23a20025 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00002abc23a20025 in raise () from /lib/libc.so.6
#1  0x00002abc23a21a80 in abort () from /lib/libc.so.6
#2  0x00002abc23a1942f in __assert_fail () from /lib/libc.so.6
#3  0x000000000075a2e8 in handler::ha_thd (this=0x1356178) at handler.cc:1971
#4  0x000000000075e392 in handler::ha_write_row (this=0x1356178, buf=0x13563a8 "�") at handler.cc:2976
#5  0x0000000000a4af62 in report_ob_progress (backup_id=0, object=0xc88c10 "backup kernel", start=0,
    stop=0, size=0, progress=0, error_num=<value optimized out>, notes=0x131d2a8 "error")
    at backup_progress.cc:905
#6  0x0000000000a4b5c1 in report_ob_state (backup_id=0, state=BUP_ERRORS) at backup_progress.cc:796
#7  0x0000000000a40d2a in execute_backup_command (thd=0x12860c8, lex=0x1287a38) at kernel.cc:370
#8  0x000000000066ccdb in mysql_execute_command (thd=0x12860c8) at sql_parse.cc:2134
#9  0x0000000000672ab6 in mysql_parse (thd=0x12860c8,
    inBuf=0x12e9048 "backup database sakila to 'sakila.bkp'", length=38, found_semicolon=0x4588c028)
    at sql_parse.cc:5623
#10 0x000000000067340c in dispatch_command (command=COM_QUERY, thd=0x12860c8, packet=<value optimized out>,
    packet_length=38) at sql_parse.cc:1031
#11 0x0000000000674309 in do_command (thd=0x12860c8) at sql_parse.cc:723
#12 0x00000000006653f6 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1125
#13 0x00002abc225be3f7 in start_thread () from /lib/libpthread.so.0
#14 0x00002abc23ac597d in clone () from /lib/libc.so.6
#15 0x0000000000000000 in ?? ()
[31 Mar 2008 11:12] MySQL Verification Team
Thank you for the bug report.

mysql> select count(*) from actor;
+----------+
| count(*) |
+----------+
|      200 | 
+----------+
1 row in set (0.00 sec)

mysql> backup database sakila to 'sakila.bkp';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[1 Apr 2008 10:38] Hakan Küçükyılmaz
Looks like duplicate of Bug#34858
[21 May 2008 16:48] Rafal Somla
This is a duplicate of Bug#34858. The problems in backup reporting code have been dealt with so that the server doesn't crash anymore. A better reporting mechanism is being designed. See BUG#34858 for details.

After the fixes for BUG#34858 I can't repeat the problem.