Bug #2131 multi table updates do not allow limit
Submitted: 16 Dec 2003 12:13 Modified: 16 Dec 2003 14:17
Reporter: Mark Fleeson Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.15 OS:Linux (Linux)
Assigned to: Dean Ellis CPU Architecture:Any

[16 Dec 2003 12:13] Mark Fleeson
Description:
Multiple table updates work great but you cannot use a limit with it. For instance you cant say
update shipment,stock_master set instock=1 where shipment.product_code = stock_master.product_code limit stock_master.qty 
What I'd like to do is highlight just enough rows that we have stock for, but the only way I can do it at the moment is to do individual update shipment set instock =1 limit x, where x has been retrieved from previous query.

Any more examples just hollar, so please can I request this gets fixed. 

How to repeat:
see above. Any multi table update with a limit keyword gets thrown out.

Suggested fix:
Add ability to limit by matching rows to multi-table updates.
[16 Dec 2003 14:17] Dean Ellis
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:

Per the manual, "From MySQL 4.0, you can specify multiple tables in the DELETE statement to delete rows from one or more tables depending on a particular condition in multiple tables. However, you cannot use ORDER BY or LIMIT in a multiple-table DELETE."

Thank you.