Bug #4135 | INSERT...SELECT into same table fails if table has been write-locked | ||
---|---|---|---|
Submitted: | 14 Jun 2004 23:54 | Modified: | 16 Jun 2004 10:08 |
Reporter: | Alex Villacis | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.20 | OS: | Linux (Linux) |
Assigned to: | Sergei Golubchik | CPU Architecture: | Any |
[14 Jun 2004 23:54]
Alex Villacis
[16 Jun 2004 10:08]
Sergei Golubchik
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: You cannot use a table locked with LOCK TABLES in the query more than once. The solution is to use aliases. LOCK TABLES t1 WRITE, t1 t2 WRITE; INSERT t1 SELECT * FROM t1 t2; http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html