Bug #31302 USE information_schema disables DROP tablespace
Submitted: 30 Sep 2007 13:28 Modified: 4 Aug 2008 16:43
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:6.0.2 OS:Windows
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: qc

[30 Sep 2007 13:28] Peter Laursen
Description:
CREATE TABLESPACE statement is not schema specific.

never the less after "USE information_schema" "DROP tablespace" returns an error!

How to repeat:
create tablespace tsp add datafile 'istest' engine = falcon;

use information_schema;
drop tablespace tsp engine = falcon;
/*
Error Code : 1044
Access denied for user 'root'@'localhost' to database 'information_schema'
(0 ms taken)
*/

use test;
drop tablespace tsp engine = falcon;
/*
(0 row(s)affected)
(0 ms taken)
*/
[30 Sep 2007 13:32] Peter Laursen
same with CREATE tablespace!

use information_schema;
create tablespace tsp2 add datafile 'istest2' engine = falcon;

/*
Error Code : 1044
Access denied for user 'root'@'localhost' to database 'information_schema'
(0 ms taken)
*/
[30 Sep 2007 13:45] Peter Laursen
Unless of course if the situation is that a tablespace is specific for a schema! Then it would make sense if 'create tablespace" alos were!

But if so "create schema.tablespace" should be allowed! But

create tablespace test.tsp2 add datafile 'istest2' engine = falcon;
/* returns
Error Code : 1064
You have an error in your SQL syntax; blablabla */

BTW: I do not think it is docmented if tables from diffrent databases/schemas can share the same tablespace?!
[30 Sep 2007 19:16] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[1 Nov 2007 17:26] Kevin Lewis
Konstantin, This bug seems to be related a little to Bug#31304 since it is getting an access denied error (ER_DBACCESS_DENIED_ERROR) from the server.
[30 Jul 2008 10:22] 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/50702

2689 Alexander Nozdrin	2008-07-30
      Add a test case for Bug#31302: USE information_schema disables DROP tablespace.
[4 Aug 2008 6:58] 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/50850

2690 Alexander Nozdrin	2008-08-04
      Add a test case for Bug#31302: USE information_schema disables DROP tablespace.
[4 Aug 2008 6:59] 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/50851

2690 Alexander Nozdrin	2008-08-04
      Add a test case for Bug#31302: USE information_schema disables DROP tablespace.
[4 Aug 2008 7:00] Bugs System
Pushed into 6.0.7-alpha  (revid:alik@mysql.com-20080804065812-17f9s687kc1nb30x) (version source revid:alik@mysql.com-20080804065812-17f9s687kc1nb30x) (pib:3)
[4 Aug 2008 16:43] Paul DuBois
Noted in 6.0.7 changelog.

Making INFORMATION_SCHEMA the default database caused the DROP 
TABLESPACE statement to be disabled.
[5 Aug 2008 14:15] 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/50934

2690 Alexander Nozdrin	2008-08-05 [merge]
      Merge from 6.0.

 2689 Alexander Nozdrin	2008-07-30
      Add a test case for Bug#31302: USE information_schema disables DROP tablespace.
[5 Aug 2008 14:16] 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/50935

2690 Alexander Nozdrin	2008-08-05 [merge]
      Merge from 6.0.

 2689 Alexander Nozdrin	2008-07-30
      Add a test case for Bug#31302: USE information_schema disables DROP tablespace.
[6 Aug 2008 7:28] Bugs System
Pushed into 6.0.7-alpha  (revid:bar@mysql.com-20080806064130-pg8a8xoio79fga4e) (version source revid:bar@mysql.com-20080806064130-pg8a8xoio79fga4e) (pib:3)
[7 Aug 2008 3:01] 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/51061

2749 Davi Arnaut	2008-08-06 [merge]
      Merge mysql-6.0 into mysql-6.0-bugteam
[7 Aug 2008 3:06] 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/51062

2749 Davi Arnaut	2008-08-07 [merge]
      Merge mysql-6.0 into mysql-6.0-bugteam
[7 Aug 2008 3:16] 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/51063

2749 Davi Arnaut	2008-08-07 [merge]
      Merge mysql-6.0 into mysql-6.0-bugteam
[7 Aug 2008 18:38] 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/51138

2744 Marc Alff	2008-08-07 [merge]
      Merge mysql-6.0-bugteam -> local bugfix branch
[14 Sep 2008 5:08] Bugs System
Pushed into 6.0.7-alpha  (revid:alik@mysql.com-20080804065812-17f9s687kc1nb30x) (version source revid:john.embretsen@sun.com-20080724122511-9c0oudz1xrdrs6y6) (pib:3)
[16 Sep 2008 9:09] Bugs System
Pushed into 6.0.7-alpha  (revid:alik@mysql.com-20080730101631-wi09pxcshflke03t) (version source revid:alik@mysql.com-20080730101631-wi09pxcshflke03t) (pib:3)