Bug #16341 DD: Failed CREATE LOGFILE GROUP/TABLESPACE should back out all changes
Submitted: 10 Jan 2006 14:23 Modified: 28 Jun 2006 5:49
Reporter: Jonathan Miller Email Updates:
Status: Closed
Category:Server: ClusterDD Severity:S3 (Non-critical)
Version:5.1.5-alpha OS:Linux (Linux)
Assigned to: Jonas Oreland Target Version:

[10 Jan 2006 14:23] Jonathan Miller
Description:
If you run the following test case if will fail with ERROR 1502 (HY000): Failed to create
UNDOFILE.  But the cluster now has the log group in its meta data. This will keep you from
creating that log group until you do a drop of the failed log group that should not
exist.

mysql> CREATE LOGFILE GROUP lg2 ADD UNDOFILE '/space/run/undofile.dat' INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M ENGINE=NDB;
ERROR 1502 (HY000): Failed to create UNDOFILE

mysql> drop logfile group lg2 engine = ndb; CREATE LOGFILE GROUP lg2 ADD UNDOFILE
'lg2undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=NDB;
ERROR 1502 (HY000): Failed to create LOGFILE GROUP

mysql> CREATE LOGFILE GROUP lg2 ADD UNDOFILE 'lg2undofile.dat' INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M ENGINE=NDB;

How to repeat:
See Above

Suggested fix:
If a command does not complete, back out all changes done before failure.
[1 Jun 2006 18:08] Jonathan Miller
http://bugs.mysql.com/?id=20052
[19 Jun 2006 18:23] Johan Andersson
Happened to me too, because an old undo file was lying around not associated with any
logfile group.
Then i could not creating logfile group failed, because it existed and undo file with the
same name.
II then had to drop the logfile group, and manually delete the dangling undo file.
If a command fails, it should revert to the state prior to the command was issued.
[22 Jun 2006 8:25] 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/8054
[27 Jun 2006 22:04] Tomas Ulin
pushed to 5.1.12
[28 Jun 2006 5:49] Jon Stephens
Documented bugfix in 5.1.12 changelog. Closed.