Bug #31770 Can't drop a data file with long name
Submitted: 23 Oct 2007 1:51 Modified: 19 Feb 2009 15:15
Reporter: li zhou Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[23 Oct 2007 1:51] li zhou
Description:
Can't drop a data file with long path+name.

In fact, the data file exist in the disk.

How to repeat:
mysql>CREATE LOGFILE GROUP lg1 ADD UNDOFILE './tmplogfile/path1/path2/path3/path4/path5/path6/path7/path8/path9/ThisisalongfilenameoflogfileThisisalongfilenameoflogfile.dat'
      INITIAL_SIZE 16M
      UNDO_BUFFER_SIZE = 1M
      ENGINE NDB;
Query OK, 0 rows affected (1.71 sec)
 
mysql>CREATE TABLESPACE ts1 ADD DATAFILE
'./tmpdatafile/path1/path2/path3/path4/path5/path6/path7/path8/path9/ThisisalongfilenameofdatafileThisisalongfilenameofdatafile.dat'
     USE LOGFILE GROUP lg1
     INITIAL_SIZE 12M
     ENGINE NDB;
Query OK, 0 rows affected (1.44 sec)
 
mysql>ALTER TABLESPACE ts1 DROP DATAFILE
'./tmpdatafile/path1/path2/path3/path4/path5/path6/path7/path8/path9/ThisisalongfilenameofdatafileThisisalongfilenameofdatafile.dat'
      ENGINE NDB;
ERROR 1530 (HY000): Failed to alter:  NO SUCH FILE
 
mysql> show warnings;
+-------+------+--------------------------------+
| Level | Code | Message                        |
+-------+------+--------------------------------+
| Error | 1530 | Failed to alter:  NO SUCH FILE |
+-------+------+--------------------------------+
1 row in set (0.00 sec)

Suggested fix:
Limited the lenth of data file or correct the drop statement.
[19 Feb 2009 12:23] 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/66895

2847 Jonas Oreland	2009-02-19
      ndb - bug#31769 bug#31772 bug#31770 - fix path name longer than MAX_TAB_NAME, i.e use PATH_MAX is several places
[19 Feb 2009 13:04] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:jonas@mysql.com-20090219122238-h87lxgiiur7xwdl8) (version source revid:jonas@mysql.com-20090219122238-h87lxgiiur7xwdl8) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)
[19 Feb 2009 13:05] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:jonas@mysql.com-20090219123956-j8x3hj0ae2xwyduz) (version source revid:jonas@mysql.com-20090219123956-j8x3hj0ae2xwyduz) (merge vers: 5.1.32-ndb-6.3.23) (pib:6)
[19 Feb 2009 13:06] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:jonas@mysql.com-20090219125659-ld2mlhzpqj9tfg9u) (version source revid:jonas@mysql.com-20090219125659-ld2mlhzpqj9tfg9u) (merge vers: 5.1.32-ndb-6.4.3) (pib:6)
[19 Feb 2009 15:15] Jon Stephens
Documented bugfix in the NDB-6.2.17, 6.3.23, and 6.4.2 changelogs. See Bug #31769 for changelog entry.