Bug #36927 Falcon: crash altering table's tablespace
Submitted: 23 May 2008 18:21 Modified: 23 May 2008 18:41
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.6-alpha-debug OS:Linux (SUSE 10 | 32-bit)
Assigned to: CPU Architecture:Any

[23 May 2008 18:21] Peter Gulutzan
Description:
I create two tablespaces and two tables.
I say ALTER TABLE four times, changing tablespace.
Crash.

How to repeat:
use test
create tablespace a add datafile 'a' engine=falcon;
create table a_1 (s1 int) tablespace a engine=falcon;
create table a_2 (s1 int) tablespace a engine=falcon;
create tablespace a2 add datafile 'a2' engine=falcon;
alter table a_2 tablespace a2;
alter table a_1 tablespace a2;
alter table a_2 tablespace a1;
alter table a_2 tablespace a1;

Example run:

mysql> use test
Database changed
mysql> create tablespace a add datafile 'a' engine=falcon;
Query OK, 0 rows affected (0.25 sec)

mysql> create table a_1 (s1 int) tablespace a engine=falcon;
Query OK, 0 rows affected (0.09 sec)

mysql> create table a_2 (s1 int) tablespace a engine=falcon;
Query OK, 0 rows affected (0.05 sec)

mysql> create tablespace a2 add datafile 'a2' engine=falcon;
Query OK, 0 rows affected (0.19 sec)

mysql> alter table a_2 tablespace a2;
Query OK, 0 rows affected (0.10 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table a_1 tablespace a2;
Query OK, 0 rows affected (0.07 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table a_2 tablespace a1;
ERROR 1005 (HY000): Can't create table 'test.#sql-562a_1' (errno: 156)
mysql> alter table a_2 tablespace a1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 May 2008 18:41] Peter Gulutzan
Well, this one didn't last long ...
Bug#34617
Falcon assertion in StorageHandler::addTable, line 622
also shows a crash with two ALTERS.
So this is a duplicate.
[17 Jun 2008 13:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47997

2707 John H. Embretsen	2008-06-17
      Bug#33723 - ALTER TABLE into non-existing Falcon tablespace blocks further ALTERs
      
      Expanded test falcon_bug_34617 to include further *valid* ALTER TABLE statement
      after invalid ALTER TABLE into non-existing tablespace.
      
      Also added script header and some comments.
      Added reference to additional bugs covered by this test, i.e.
      Bug#33397 - ALTER TABLE into non-existing Falcon tablespace causes vague error.
      and the duplicate Bug#36927.