Bug #71164 | an autocommit SELECT was not treated as autocommit non-lock trx | ||
---|---|---|---|
Submitted: | 17 Dec 2013 16:38 | Modified: | 26 Dec 2013 20:27 |
Reporter: | zhai weixiang (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.6.15 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[17 Dec 2013 16:38]
zhai weixiang
[18 Dec 2013 2:06]
zhai weixiang
correct Category
[26 Dec 2013 20:27]
Sveta Smirnova
Thank you for the report. Verified as described. Workaround: run SELECT two times, second will be in READ ONLY mode.
[4 Sep 2014 2:56]
Jeremy Cole
Wouldn't this be the correct fix? --- storage/innobase/handler/ha_innodb.cc +++ storage/innobase/handler/ha_innodb.cc @@ -12758,7 +12758,7 @@ ha_innobase::external_lock( } } - if (!trx_is_started(trx) + if (lock_type != F_UNLCK && !trx_is_started(trx) && (prebuilt->select_lock_type != LOCK_NONE || prebuilt->stored_select_lock_type != LOCK_NONE)) {
[5 Sep 2014 2:44]
liu hickey
Good catch! Definitely fixed.