Bug #16158 DD: ALTER TABLESPACE fails if Duplicate CREATE TABLESPACE done before
Submitted: 3 Jan 2006 17:11 Modified: 13 Feb 2006 20:24
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1 OS:Linux (Linux)
Assigned to: Nikolay Grishakin CPU Architecture:Any

[3 Jan 2006 17:11] Jonathan Miller
Description:
Following test case fails:
CREATE TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 12M
ENGINE NDB;

--error 1502
CREATE TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 12M
ENGINE NDB;

ALTER TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile2.dat'
INITIAL_SIZE 12M
ENGINE=NDB;

Error recieved:
mysqltest: At line 49: query 'ALTER TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile2.dat'
INITIAL_SIZE 12M
ENGINE=NDB' failed: 1507: Failed to alter: CREATE DATAFILE

Following test case passes:
CREATE TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 12M
ENGINE NDB;

#--error 1502
#CREATE TABLESPACE ts1
#ADD DATAFILE './var/tmp/datafile.dat'
#USE LOGFILE GROUP lg1
#INITIAL_SIZE 12M
#ENGINE NDB;

ALTER TABLESPACE ts1
ADD DATAFILE './var/tmp/datafile2.dat'
INITIAL_SIZE 12M
ENGINE=NDB;

How to repeat:
See above

Suggested fix:
ALTER should not fail due to a failure from duplicate CREATE's
[10 Jan 2006 8:34] 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/838
[10 Jan 2006 9:37] Jonas Oreland
Please retest
[8 Feb 2006 19:42] Jonathan Miller
Nik,

Can you please retest these an give feedback to Jonas?

JBM
[13 Feb 2006 20:23] Nikolay Grishakin
Fixed in latest mysql-5.1-new build. Alter TS does not fail any more.
[13 Feb 2006 20:24] Nikolay Grishakin
Tested with current mysql-5.1-new build