| Bug #8355 | When Dropping a db, and then recreating it, data magically reappears. | ||
|---|---|---|---|
| Submitted: | 7 Feb 2005 15:03 | Modified: | 22 Feb 2005 21:38 |
| Reporter: | Winston | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
| Version: | 4.1.9-standard | OS: | MacOS (Mac OS 10.3) |
| Assigned to: | Jim Winstead | CPU Architecture: | Any |
[7 Feb 2005 15:03]
Winston
[8 Feb 2005 2:31]
Jorge del Conde
mysql> mysql> insert into _MKClassIds (id, name) values (1, 'Thing'); ERROR 1062 (23000): Duplicate entry '1' for key 1 mysql> insert into _MKClassIds (id, name) values (2, 'Person'); ERROR 1062 (23000): Duplicate entry '2' for key 1 mysql>
[8 Feb 2005 23:44]
Jim Winstead
The tables that were dropped along with the database were not being flushed from the table cache when lower_case_table_names was set to 2 (as it is on Mac OS X). As a workaround, you can add 'FLUSH TABLES' after your 'DROP DATABASE'.
[15 Feb 2005 14:17]
Alexander Barkov
Jim, a more efficient way is possible. Please take a look into sql_cache.cc:
#ifndef FN_NO_CASE_SENCE
...
#else
VOID(hash_init(&tables,
lower_case_table_names ? &my_charset_bin :
files_charset_info,
def_table_hash_size, 0, 0,query_cache_table_get_key, 0, 0));
#endif
Can you please fix it the same way?
[18 Feb 2005 0:01]
Jim Winstead
Pushed, will be in 4.1.11.
[22 Feb 2005 21:38]
Paul DuBois
Noted in 4.1.11 changelog.
