Bug #16471 DD: Maximum path for undofile in CREATE LOGFILE GROUP is 167 bytes
Submitted: 13 Jan 2006 1:28 Modified: 27 Feb 2006 7:55
Reporter: Nikolay Grishakin Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.6-alpha OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[13 Jan 2006 1:28] Nikolay Grishakin
Description:
I found that maximum file path we can specify for undofile in CREATE LOGFILE GROUP statement is 167 chars.
To reproduce run the test case:

 let $path1 = `SELECT CONCAT('./var/', repeat('a', 148), '/undofile.dat')`;
 eval CREATE LOGFILE GROUP lg1
 ADD UNDOFILE '$path1'
 INITIAL_SIZE 16M
 UNDO_BUFFER_SIZE = 1M
 ENGINE=NDB;

 DROP LOGFILE GROUP lg1
 ENGINE=NDB;

To get status 1502 just specify value > 148 in repeat('a', 148) statment.

How to repeat:
see above.
[19 Jan 2006 13:47] Jonas Oreland
1) The 167 might depend on your FileSystemPath as your not using absolute paths.
2) The limit might be OS dependant...
3) I think a limit of 167 is ok. I think mysqld has a 107 limit.

But it should give a fairly good error message be documented...
What does show warning give afterwards?
[26 Jan 2006 2:14] Nikolay Grishakin
Error is:
"failed: 1506: Failed to create UNDOFILE"
[26 Jan 2006 2:39] Nikolay Grishakin
From bug 16545: (putting my test case here for 16545 as it's duplicate for 16471)

NDB engine does not support long file names (up to 256 bytes) for UNDOFILE and
DATAFILE. The following test case fails with status 1502:

 let $fp1 = `SELECT CONCAT('./var/', repeat('u', 250), '.dat')`;
 eval CREATE LOGFILE GROUP lg1
 ADD UNDOFILE '$fp1'
 INITIAL_SIZE 16M
 UNDO_BUFFER_SIZE = 1M
 ENGINE=NDB;

 let $fp2 = `SELECT CONCAT('./var/', repeat('d', 250), '.dat')`;

 eval CREATE TABLESPACE ts1
 ADD DATAFILE '$fp2'
 USE LOGFILE GROUP lg1
 INITIAL_SIZE 12M
 ENGINE NDB;

 eval ALTER TABLESPACE ts1
 DROP DATAFILE '$fp2'
 ENGINE NDB;

 eval DROP TABLESPACE ts1 ENGINE NDB;

 eval DROP LOGFILE GROUP lg1
 ENGINE=NDB;
[27 Jan 2006 6:52] Jonas Oreland
Again, what does "show warnings" show?
No "ndb" error code is visible to mysql as such, they are only pushed as warnings.

Did you try to find the real limit.
By using absolute path...in your example you create files under "NdbFilesystem",
  I dont know what this is...
But if you want to find real limit, you must also take that into concideration.
Either by adding lenght of NdbFilesystem, or by using absloute path's.
[27 Jan 2006 7:04] Nikolay Grishakin
Show warnings:
"failed: 1506: Failed to create UNDOFILE"
[28 Feb 2006 0: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".