Bug #87716 | SELECT FOR UPDATE with BETWEEN AND gets row lock excessively. | ||
---|---|---|---|
Submitted: | 9 Sep 2017 9:01 | Modified: | 13 Sep 2017 8:19 |
Reporter: | Yoshiaki Yamasaki | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7.18, 8.0.2, 5.7.19, 5.6.37 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Sep 2017 9:01]
Yoshiaki Yamasaki
[9 Sep 2017 9:04]
Yoshiaki Yamasaki
[Note] - tx_isolation='READ-COMMITTED' is no problem. - "WHERE XXX IN" is no problem also(*). * Example: [Transaction1] mysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> SELECT * FROM seats WHERE seat_no IN (4,5,6) FOR UPDATE; +---------+--------+ | seat_no | booked | +---------+--------+ | 4 | NO | | 5 | NO | | 6 | NO | +---------+--------+ 3 rows in set (0.00 sec) [Transaction2] mysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> UPDATE seats SET booked='NO' WHERE seat_no=7; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0
[13 Sep 2017 8:19]
MySQL Verification Team
Hello Yoshiaki, Thank you for the report and test case. Observed with 5.7.19. Thanks, Umesh