Bug #51111 ALTER LOGFILE GROUP missing error message
Submitted: 11 Feb 2010 16:21 Modified: 5 Mar 2010 12:06
Reporter: Andrew Hutchings Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Maitrayi Sabaratnam CPU Architecture:Any

[11 Feb 2010 16:21] Andrew Hutchings
Description:
Running ALTER LOGFILE GROUP on an non-existent logfile group fails but the error message does not indicate why.

How to repeat:
mysql> ALTER LOGFILE GROUP lg_2 ADD UNDOFILE 'undo_1.log' INITIAL_SIZE 200M ENGINE NDBCLUSTER;
ERROR 1533 (HY000): Failed to alter: CREATE UNDOFILE
mysql> show warnings;
+-------+------+----------------------------------+
| Level | Code | Message                          |
+-------+------+----------------------------------+
| Error | 1533 | Failed to alter: CREATE UNDOFILE |
+-------+------+----------------------------------+
1 row in set (0.01 sec)

Suggested fix:
Option 1:
Return an error code/message in NdbDictionaryImpl::createUndofile when the second if fails as well as the DBUG_PRINT()

Option 2:
Since we only support one logfile group, ignore the logfile group part.
[1 Mar 2010 14:05] 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/101873

3111 Maitrayi Sabaratnam	2010-03-01
      Bug#51111 ALTER LOGFILE GROUP missing error message
[2 Mar 2010 15:58] Bugs System
Pushed into 5.1.41-ndb-7.0.14 (revid:jonas@mysql.com-20100302154927-6awe2owvg9wvp7w1) (version source revid:jonas@mysql.com-20100302154927-6awe2owvg9wvp7w1) (merge vers: 5.1.41-ndb-7.0.14) (pib:16)
[3 Mar 2010 9:27] Maitrayi Sabaratnam
NDB returns error code 789 after the fix:

mysql> ALTER LOGFILE GROUP lg_2 ADD UNDOFILE 'undo_1.log' INITIAL_SIZE 200M ENGINE NDBCLUSTER;
ERROR 1533 (HY000): Failed to alter: CREATE UNDOFILE
mysql> show warnings;
+-------+------+--------------------------------------------------+
| Level | Code | Message                                          |
+-------+------+--------------------------------------------------+
| Error | 1296 | Got error 789 'Logfile group not found' from NDB |
| Error | 1533 | Failed to alter: CREATE UNDOFILE                 |
+-------+------+--------------------------------------------------+
[3 Mar 2010 13:59] Jon Stephens
Documented in the NDB-7.0.14 changelog as follows:

      The error message returned after atttempting to execute ALTER 
      LOGFILE GROUP on an nonexistent logfile group did not indicate 
      the reason for the failure.

Set NM status, waiting for merges to 6.3 and 7.1 trees.
[5 Mar 2010 9:39] Maitrayi Sabaratnam
Merged in 6.3: Tue Mar 2 14:33:04 2010,
Merged in 7.1: Tue Mar 2 15:58:50 2010.
[5 Mar 2010 9:46] Maitrayi Sabaratnam
Merged in mysql-5.1.41-ndb-7.1.2-beta.
Merged in mysql-5.1.41-ndb-6.3.33
[5 Mar 2010 12:06] Jon Stephens
Also documented in the NDB-6.3.33 and 7.1.2 changelogs. Closed.