Bug #9084 | Select statement which aliases name of a locked table returns not locked error | ||
---|---|---|---|
Submitted: | 9 Mar 2005 23:24 | Modified: | 11 Mar 2005 11:43 |
Reporter: | Craig Sargent | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.9 | OS: | Linux (Fedora 3) |
Assigned to: | CPU Architecture: | Any |
[9 Mar 2005 23:24]
Craig Sargent
[11 Mar 2005 11:43]
MySQL Verification Team
From the MySQL manual: If your queries refer to a table using an alias, then you must lock the table using that same alias. It does not work to lock the table without specifying the alias: mysql> LOCK TABLE t READ; mysql> SELECT * FROM t AS myalias; ERROR 1100: Table 'myalias' was not locked with LOCK TABLES