[MDEV-5612] my_rename() deletes files when it shouldn't Created: 2014-02-04 Updated: 2014-02-26 Resolved: 2014-02-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5.35, 10.0.7 |
| Fix Version/s: | 10.0.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | windows | ||
| Environment: |
Windows |
||
| Description |
|
On Windows my_rename() deletes the target file before renaming. But if the source file does not exist, it means that a target file was deleted erroneously. It particular, this is a problem for handler::rename_table() that renames all files from handler::bas_ext(). It assumes that the table was renamed successfully if at least some files existed and were renamed. On Windows it would delete all other target files though. Possible fixes:
|
| Comments |
| Comment by Sergey Vojtovich [ 2014-02-26 ] |
|
What's the point for handler::rename_table() not to remove all target files? We'll get a mix of old and new files in this case, which may or may not be desired. |
| Comment by Sergey Vojtovich [ 2014-02-26 ] |
|
Sergei, please review fix for this bug. |
| Comment by Sergei Golubchik [ 2014-02-26 ] |
|
ok to push |
| Comment by Sergey Vojtovich [ 2014-02-26 ] |
|
Fixed in 10.0.9, revno: 4008, revision-id: svoj@mariadb.org-20140226085528-80vzk8f2c4b4ugxm |