Bug #36899 Backup: restore crashes if damaged Falcon tablespace
Submitted: 22 May 2008 23:35 Modified: 11 Sep 2008 9:39
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0.6-alpha-debug OS:Linux (SUSE 10 | 32-bit)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[22 May 2008 23:35] Peter Gulutzan
Description:
I create a Falcon tablespace.
I create a table in the tablespace.
I backup the database.
I destroy the tablespace file.
(That's how I simulate 'damaged tablespace'.)
I take the server down with mysqladmin.
I bring the server up again.
I say 'use'.
I say 'restore'.
Crash.

How to repeat:
On the client, say:

create tablespace t1 add datafile 't1' engine=falcon;
create database d2;
create table d2.t (s1 int) tablespace t1 engine=falcon;
backup database d2 to 'd2.bak';

On another connection, as root, do:
[ Assuming datadir is /usr/local/mysql/var]
cd /usr/local/mysql/var
rm t1
/usr/local/mysql/bin/mysqladmin --user=root shutdown

Ignore the crash that happens while the server goes down.
That's bug#33575, it's probably irrelevant.

Start the server (mysqld) again.

Now, back on the client, say:
use d2
restore from 'd2.bak';

Now mysqld should crash.
[23 May 2008 17:29] Sveta Smirnova
Thank you for the report.

Verified as described.
[9 Sep 2008 11:43] Sergey Vojtovich
Not repeatable with current falcon tree:
create tablespace t1 add datafile 't1' engine=falcon;
create database d2;
create table d2.t (s1 int) tablespace t1 engine=falcon;
backup database d2 to 'd2.bak';
backup_id
1

-- restart the server (note that falcon detects damaged tablespace and refuse to initialize)
080909 13:38:07 [ERROR] Falcon: Recovery failed: can't open file "var/master-data/t1": No such file or directory (2)
080909 13:38:07 [ERROR] Plugin 'Falcon' init function returned error.
080909 13:38:07 [ERROR] Plugin 'Falcon' registration as a STORAGE ENGINE failed.

use d2;
restore from 'd2.bak';
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
select 'the server is still online';
the server is still online
the server is still online
[11 Sep 2008 9:39] Sveta Smirnova
Re-tested with current bzr tree and bug is not repeatable anymore. So report closed as "Can't repeat". mysqld has been started with option --falcon_serial_log_dir=/tmp as workaround for bug #39089