[MDEV-15042] INSERT ON DUPLICATE KEY UPDATE produces error 1032 (Can't find record) Created: 2018-01-23 Updated: 2020-07-13 Resolved: 2018-02-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert, Storage Engine - InnoDB |
| Affects Version/s: | 10.2.11, 10.2.12, 10.2.13, 10.2.18 |
| Fix Version/s: | 10.2.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vilnis Termanis | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Environment: |
CentOS 7.3 x86_64, mariadb.com yum repository |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
There seems to be a regression in the way FK constraints are handled: Trying to insert a record into a child table without the parent row existing now causes a 1032 error (Can't find record in 'child') instead of 1452. Additionally this error (1032) also appears in the server log:
The following tables reproduce this issue. I've linked
|
| Comments |
| Comment by Elena Stepanova [ 2018-01-23 ] | |||||
|
Thanks for the report and test case, and yes, you've identified the related issue correctly, the change was introduced by this commit:
| |||||
| Comment by Jan Lindström (Inactive) [ 2018-02-06 ] | |||||
|
commit 60f51af755ea9d07c20a596ba21de184816fa265 Problem was that wrong error message was returned when insert row_ins | |||||
| Comment by Vilnis Termanis [ 2018-10-15 ] | |||||
|
Unfortunately it would appear this is not actually fixed (or maybe it's a different issue?): I've re-tested the exact test case from above in 10.2.13 and 10.2.18 from: .. and I still get: I don't seem to be able to re-open this issue - should I create a new one? | |||||
| Comment by Marko Mäkelä [ 2020-07-13 ] | |||||
|
I just updated |