[MDEV-17148] DROP DATABASE throw "Directory not empty" after changed lower_case_table_names Created: 2018-09-06 Updated: 2020-08-25 Resolved: 2019-02-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Delete |
| Affects Version/s: | 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.2.22 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Richard Stracke | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
to reproduce OS: Unix
Stop service Change lower_case_table_names in my.cnf to start service
The error message comes from unix rmdir himself. All *.ibd and db.opt already deleted, but files T1.frm still exists in database directory, DROP DATABASE should check, if some .frm names are in the datadir with capital_letters, 2 Solutions are possible. 1. Throw an error before ! deleting *.ibd files 2. Delete also the .frm files with Captial letter. |
| Comments |
| Comment by Elena Stepanova [ 2018-09-20 ] | |||||||||||||||||||||||||||
|
I can't reproduce it on the current 10.0.
After restart:
Was there anything else in the scenario that you haven't mentioned? | |||||||||||||||||||||||||||
| Comment by Richard Stracke [ 2018-09-21 ] | |||||||||||||||||||||||||||
|
Hi, the new table must include uppercase letters.
I corrected in the testcase above. Richard | |||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-09-21 ] | |||||||||||||||||||||||||||
|
Thanks, this way it's reproducible. Unfortunately, I couldn't find a similar section in MariaDB KB, it needs to be added. I'm inclined to move it to documentation-only, unless you want it to be converted to a feature request. In this case, we'll need a detailed specification of what the new behavior might be, identifier case-sensitivity is quite tricky. | |||||||||||||||||||||||||||
| Comment by Richard Stracke [ 2018-09-24 ] | |||||||||||||||||||||||||||
|
Current behaviour is inconsistent. Currently tablename.ibd db.opt and will be deleted, Drop database is a unequivocal expression of will. The routine find_db_tables_and_rm_known_files() (in sql_db.cc) is a isolated routine for this single usecase. The specification iq quite clear. 1. 2. but I'm sure, the effort is here higher. | |||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-10-02 ] | |||||||||||||||||||||||||||
|
Assigning to serg to decide what to do with it. | |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-11-16 ] | |||||||||||||||||||||||||||
|
I tend to think that DROP DATABASE should delete rogue .frm files that don't correspond to any table. | |||||||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2018-12-24 ] | |||||||||||||||||||||||||||
|
http://lists.askmonty.org/pipermail/commits/2018-December/013229.html |