Bug #22462 Update fails when IN used inconjunction with Left Outer Join
Submitted: 19 Sep 2006 3:31 Modified: 19 Sep 2006 3:47
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:24a OS:Windows (WinXP)
Assigned to: CPU Architecture:Any
Tags: flexible, IN, insert, UPDATE, where

[19 Sep 2006 3:31] Jared S
Description:
Hi,

It maybe the case that you do not support IN statements in 'FLEXIBLE' update statements.  I am just trying to reset a sale price from meals table when qty changes, I can get this to work for 1 record but can not get it to work with the IN keyword.

"You have error in your sql syntax....."

How to repeat:
Here is the offending statement..

UPDATE `sale-meals`
 LEFT OUTER JOIN `flat-meals` ON `flat-meals`.id = `sale-meals`.idmeal
 SET  `sale-meals`.price =  5 * `flat-meals`.price, qty = '5'
 WHERE	`sale-meals`.id in(135, 55)

Suggested fix:
Advise me on how to perform flexible update on multiple rows in 1 single statement.
[19 Sep 2006 3:36] Jared S
Full backup of my databse

Attachment: goolabri.zip (application/x-zip-compressed, text), 152.11 KiB.

[19 Sep 2006 3:47] Jared S
Bug withdrawn.  Stupid me was linking by a NULL value. 

Sorry again for bother.