Bug #3281 | Queries with more than one subquery on locked tables failes | ||
---|---|---|---|
Submitted: | 24 Mar 2004 6:24 | Modified: | 30 Mar 2004 9:01 |
Reporter: | Jochen Kokemüller | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S3 (Non-critical) |
Version: | 4.1.2-alpha-nightly-20040311-log | OS: | Linux (linux) |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[24 Mar 2004 6:24]
Jochen Kokemüller
[24 Mar 2004 17:49]
Dean Ellis
If you alias the second instance of the same table, and lock the alias which you will use for it, the query does work as one would expect, so I am going to verify that this occurs. If the technical behavior is not modified, the manual needs to be updated as it currently does not mention the need for aliasing when locking a table which is referenced multiple times via subqueries.
[26 Mar 2004 1:43]
Oleksandr Byelkin
Thank you for bug reposrt, but it is expected behaviour. Locked table can't be used more then one time (it is current limitation and will be removed in future versions). It is described in LOCK TABLES chapter in our documentation, but this chapter was written when we had not subqueries and I agree that using locked table several times with same name in subquery is not obvious according our manual. We will change documentation soon. You can use locking table with alias and use tables with different aliases in subqueries that subqueries.
[30 Mar 2004 9:01]
Michael Widenius
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: Checked the documentation for LOCK TABLES and think it's ok