Bug #43454 | GROUP BY makes columns unrecognized when doing INSERT SELECT ... ON DUPLICATE K | ||
---|---|---|---|
Submitted: | 6 Mar 2009 13:38 | Modified: | 6 Mar 2009 15:09 |
Reporter: | bbkr | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Parser | Severity: | S2 (Serious) |
Version: | 5.1.30 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[6 Mar 2009 13:38]
bbkr
[6 Mar 2009 15:09]
Valeriy Kravchuk
While this is easily repeatable and look unexpected, it is clearly documented in the manual, http://dev.mysql.com/doc/refman/5.1/en/insert-select.html: "In the values part of ON DUPLICATE KEY UPDATE, you can refer to columns in other tables, as long as you do not use GROUP BY in the SELECT part." So, formally this is not a bug. You had also found a nice workaround.