Bug #102755 | Error 1062 locks unique index and do not release until commit or rollback | ||
---|---|---|---|
Submitted: | 27 Feb 2021 17:19 | Modified: | 6 Apr 2021 12:34 |
Reporter: | Vinicius Malvestio Grippa | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Feb 2021 17:19]
Vinicius Malvestio Grippa
[27 Feb 2021 20:03]
Vinicius Malvestio Grippa
I forgot to mention that in session 1, I'm setting autocommit=0. # session 1 set autocommit=0 begin; insert into t1 (c2) value ('test'); insert into t1 (c2) value ('test');
[3 Mar 2021 16:03]
MySQL Verification Team
Hi Mr. Grippa, Thank you for your bug report. We have managed to repeat it. We also find that, although this is not a serious nor critical bug, fixing this behaviour would lead to a smaller number of locks held. Verified as reported.
[5 Apr 2021 19:37]
Zongzhi Chen
This issue is duplicate of https://bugs.mysql.com/bug.php?id=68021 I agree that this issue should be performance issue, not a bug. I have add a fix to this problem in issue #68021. The key is change the unique check lock to record_not_gap lock and change the gap|insert_intention lock to next-key|insert_intention.
[6 Apr 2021 12:34]
MySQL Verification Team
Thank you, Mr. Zongzhi.