Bug #31110 falcon: missing engine check while dropping tablespace
Submitted: 20 Sep 2007 14:15 Modified: 1 Jun 2012 17:11
Reporter: Peter Horneber Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.02-alpha OS:Linux (xubuntu 7.03)
Assigned to: Assigned Account CPU Architecture:Any

[20 Sep 2007 14:15] Peter Horneber
Description:
and fails to drop the tablespace with right engine name.

It should fail to drop a tablespace with invalid engine name,
but it succeeds.

And it fails to create a tablespace with the same name.

How to repeat:
1. create a falcon tablespace
mysql> create tablespace ftbs
    -> add datafile 'ftbs.dat'
    -> engine falcon;
Query OK, 0 rows affected (0.30 sec)

2. try to drop the falcon tablespace giving engine name as myisam.
   => should fail, but it says ok.
 
mysql> drop tablespace ftbs
    -> engine myisam;
Query OK, 0 rows affected, 1 warning (0.00 sec)

3. Because mysql said that the tablespace has been dropped,
   creating the tablespace again should succeed but fail.
mysql> create tablespace ftbs
    -> add datafile 'ftbs.dat'
    -> engine falcon;
ERROR 65433 (HY000): Unknown error -103

4. Because the tablespace has been dropped,
   dropping it again should say that is's alreay dropped.
   But mysql says the tablespace has been droppped.

mysql> drop tablespace ftbs
    -> engine myisam;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> drop tablespace ftbs
    -> engine myisam;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> drop tablespace ftbs
    -> engine myisam;
Query OK, 0 rows affected, 1 warning (0.00 sec)

5. try to drop the tablespace giving the right engine name.
   -> says ok. 

mysql> drop tablespace ftbs
    -> engine falcon;
Query OK, 0 rows affected (0.01 sec)

6. but creating the tablespace again fails.

mysql> create tablespace ftbss
    -> add datafile 'ftbs.dat'
    -> engine falcon;
ERROR 65433 (HY000): Unknown error -103

7. create the same tablespace after removing the var/ftbs.dat manually.
   => it fails again. 

mysql> create tablespace ftbs
    -> add datafile 'ftbs.dat'
    -> engine falcon;
ERROR 65433 (HY000): Unknown error -103

Suggested fix:
In user's perspective, it is not convinient to give engine name
each time he or she drops a tablespace.

It would be nice if mysql automatically checks the engine name to drop the tablespace with the engine that was given to CREATE TABLESPACE statement.

If giving engine name to DROP TABLESPACE statement is a policy of mysql,
then mysql should check the engine name if it is exactly same to the one
given to CREATE TABLESPACE statement of the tablespace to drop
[20 Sep 2007 15:15] Peter Horneber
DROP TABLESPACE seems to be not 
removing the tablespace from TableSpaceManager.

but it says Query OK.

mysql> create tablespace ftbs3
    -> add datafile 'ftbs3.dat'
    -> engine falcon;
Query OK, 0 rows affected (3.62 sec)

mysql> 
mysql> drop tablespace ftbs3
    -> engine falcon;
Query OK, 0 rows affected (2.02 sec)

mysql> create tablespace ftbs3
    -> add datafile 'ftbs3.dat'
    -> engine falcon;
ERROR 65433 (HY000): Unknown error -103
mysql> 

Trial to create the tablespace after dropping it failes
becuase in Statement::createTableSpace
TableSpaceManager::findTableSpace returns a tablespace object.

==> The reason of unkown error is described at 
BUG#31114 falcon : creating tablespace with same name twice returns Unknown error -103
[26 Sep 2007 12:21] MySQL Verification Team
Thank you for the bug report. Could you please print the warning when
the wrong drop command is done. Thanks in advance.
[26 Oct 2007 23: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".
[27 Oct 2007 13:04] Kevin Lewis
Sergey, Please take a look at this tablespace issue as well.
[31 Oct 2007 12:24] 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/36749

ChangeSet@1.2651, 2007-10-31 15:26:56+04:00, svoj@mysql.com +5 -0
  BUG#31110 - falcon: missing engine check while dropping tablespace
  
  Creating a tablespace with engine that doesn't support tablespaces
  reports a warning and succeedes doing nothing.
  
  With this fix such statement returns and error instead.
  
  Note that this problem is not actually related to falcon, but is
  generic server issue.
[1 Nov 2007 7:17] 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/36822

ChangeSet@1.2651, 2007-11-01 10:20:17+04:00, svoj@mysql.com +5 -0
  BUG#31110 - falcon: missing engine check while dropping tablespace
  
  Creating a tablespace with engine that doesn't support tablespaces
  reports a warning and succeedes doing nothing.
  
  With this fix such statement returns and error instead.
  
  Note that this problem is not actually related to falcon, but is
  generic server issue.
[13 Nov 2007 9:35] 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/37645

ChangeSet@1.2670, 2007-11-13 13:38:29+04:00, svoj@mysql.com +5 -0
  BUG#31110 - falcon: missing engine check while dropping tablespace
  
  Creating a tablespace with engine that doesn't support tablespaces
  reports a warning and succeedes doing nothing.
  
  With this fix such statement returns and error instead.
  
  Note that this problem is not actually related to falcon, but is
  generic server issue.
[14 Nov 2007 9:40] Bugs System
Pushed into 6.0.4-alpha
[15 Nov 2007 7:22] MC Brown
A note has been added to the 6.0.4 changelog: 

Dropping a tablespace and specifying an engine type that does not support tablespaces would report a warning. The response has now been updated to report an error.
[30 Nov 2007 20:42] Bugs System
Pushed into 6.0.4-alpha
[15 Mar 2010 14:37] 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/103269

3127 Jon Olav Hauglid	2010-03-15
      Partial (falcon test cases excluded) backport of:
      ------------------------------------------------------------
      revno: 2476.856.1
      committer: svoj@mysql.com/june.mysql.com
      timestamp: Thu 2007-11-01 10:20:17 +0400
      message:
        BUG#31110 - falcon: missing engine check while dropping tablespace
      
        Creating a tablespace with engine that doesn't support tablespaces
        reports a warning and succeedes doing nothing.
      
        With this fix such statement returns and error instead.
      
        Note that this problem is not actually related to falcon, but is
        generic server issue.
     @ mysql-test/suite/ndb/r/ndb_dd_basic.result
        Modified a test case according to fix for BUG#31110.
     @ mysql-test/suite/ndb/t/ndb_dd_basic.test
        Modified a test case according to fix for BUG#31110.
     @ sql/sql_tablespace.cc
        Return an error (instead of warning) when engine doesn't support
        tablespaces.
[15 Mar 2010 15:11] Jon Olav Hauglid
Backported from 6.0 to mysql-next-mr-bugfixing (Ver 5.6.99-m4).
[24 Mar 2010 8:15] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100324081249-yfwol7qtcek6dh7w) (version source revid:alik@sun.com-20100324081113-kc7x1iytnplww91u) (merge vers: 6.0.14-alpha) (pib:16)
[24 Mar 2010 8:18] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100324081159-5b8juv8ldiqwce8v) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (pib:16)
[25 Mar 2010 15:37] MC Brown
Added entry to 6.0.14 changelog
[4 Aug 2010 8:02] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (merge vers: 5.6.99-m4) (pib:18)
[4 Aug 2010 8:18] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (merge vers: 5.6.99-m4) (pib:18)
[4 Aug 2010 14:42] Paul DuBois
Not in any released 5.6.x version.
[5 Aug 2010 7:47] Jon Stephens
Hi, re-opening this because this really REALLY should go into Cluster. See BUG#31293 and my comments therein for the reasoning.

Changed lead to BOcklin, requesting that this fix + fix for BUG#31293 be merged to Cluster trees ASAP.

Thanks!
[2 Jun 2012 1: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".