Bug #107325 | Subquery gives wrong results in ON DUPLICATE KEY UPDATE ... part of INSERT | ||
---|---|---|---|
Submitted: | 18 May 2022 10:03 | Modified: | 18 May 2022 14:12 |
Reporter: | Janez Resnik | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[18 May 2022 10:03]
Janez Resnik
[18 May 2022 12:12]
Janez Resnik
I tried this example with a few older versions of mysql: - 8.0.12 ... gives "Error: ER_BAD_FIELD_ERROR: Unknown column 't1.a' in 'where clause'" - 5.7.22 ... "WITH ... SELECT" is not supported, after resolving that it has the same issue demo: https://www.db-fiddle.com/f/bwXWot2AGMRypKqaguLj77/0 - 5.6.40 ... same issue, see demo above - 5.5.62 ... same issue, see demo above
[18 May 2022 14:12]
MySQL Verification Team
HI Mr. Resnik, Thank you for your bug report. We have run your test cases and we reproduced your results. We agree that the results are wrong. Verified as reported.