| Bug #9462 | can drop table, even if read locked | ||
|---|---|---|---|
| Submitted: | 29 Mar 2005 17:42 | Modified: | 24 May 2005 19:27 |
| Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.1.10 | OS: | Any (*) |
| Assigned to: | CPU Architecture: | Any | |
[29 Mar 2005 17:42]
Martin Friebe
[29 Mar 2005 17:58]
Jorge del Conde
mysql> create table a2 (a int ); Query OK, 0 rows affected (0.01 sec) mysql> lock table a2 read; Query OK, 0 rows affected (0.00 sec) mysql> drop table a2; Query OK, 0 rows affected (0.00 sec)
[23 May 2005 14:05]
Michael Widenius
This is a documentation issue and we will update the documentation with more information regarding this. The table lock only protects against insert/update/delete/truncate but not against DLL statements. It's intentional (but agree that maybe not obvious) that one should be able to DROP, ALTER and RENAME a table even if it's locked by the same thread.
[24 May 2005 19:27]
Paul DuBois
I've noted that you can drop a locked table in the section on LOCK TABLES. Monty, I don't find that ALTER or RENAME are allowed on a read-locked table, so I didn't noted those as being allowed for locked tables.
