Bug #12177 | Database directory cannot be deleted after embedded server started. | ||
---|---|---|---|
Submitted: | 26 Jul 2005 14:44 | Modified: | 14 Aug 2005 0:33 |
Reporter: | Miguel Solorzano | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Embedded Library ( libmysqld ) | Severity: | S2 (Serious) |
Version: | 4.0.XX/4.1.XX | OS: | Windows (Windows) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[26 Jul 2005 14:44]
Miguel Solorzano
[27 Jul 2005 11:54]
Francisco Reinaldo
Dear Alexey, I'd like to contribute with the resolution of this bug. After debugging the code, I noticed that the error files are created in a different way than other log files. freopen function is what creates this file but the clean_up function called from mysql_server_end... void STDCALL mysql_server_end() { my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR)); copy_arguments_ptr=0; clean_up(0); /* If library called my_init(), free memory allocated by it */ if (!org_my_init_done) my_end(0); } ...never calls fclose on this file. I believe because it was assumed that it will be enough to close this file as the library is unloaded. May be because this file is needed even after mysql_server_end. Since this has been logged as a bug, I assume that it is desirable to close this file after mysql_server_end has been called. As you probably know already the quick fix would be to add two new variables to hold the file descriptors of this file and close them inside mysqld_server_end but I don't know the code that well to foresee side effects. I hope it helps. Francisco.
[27 Jul 2005 12:27]
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/internals/27636
[27 Jul 2005 12:30]
Alexey Botchkov
Francisco Thanks for your attention. You're right about the nature of this bug. Above is the patch supposed to fix this. You can just apply it manually if you don't want to wait until it's pushed.
[27 Jul 2005 13:29]
Francisco Reinaldo
Alexey and Miguel, Thanks a lot for your quick response. Sincerely,
[27 Jul 2005 14:33]
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/internals/27642
[27 Jul 2005 15:13]
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/internals/27645
[4 Aug 2005 10:14]
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/internals/27883
[8 Aug 2005 12:48]
Alexey Botchkov
Pushed into 4.0.26
[14 Aug 2005 0:33]
Paul DuBois
Noted in 4.0.26 changelog.