mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed a bug checksum table locks the InnoDB table and does not use a
consistent read (Bug #12669). mysql-test/r/innodb.result: Added test results for a checksum test. mysql-test/t/innodb.test: Added test case for a checksum bug #12669. sql/ha_innodb.cc: Use consistent read for checksum table and convert MySQL lock type to the TL_READ because at the moment MySQL uses TL_READ_NO_INSERT.
This commit is contained in:
@ -5421,6 +5421,13 @@ ha_innobase::store_lock(
|
||||
|
||||
prebuilt->select_lock_type = LOCK_NONE;
|
||||
prebuilt->stored_select_lock_type = LOCK_NONE;
|
||||
} else if (thd->lex->sql_command == SQLCOM_CHECKSUM) {
|
||||
/* Use consistent read for checksum table and
|
||||
convert lock type to the TL_READ */
|
||||
|
||||
prebuilt->select_lock_type = LOCK_NONE;
|
||||
prebuilt->stored_select_lock_type = LOCK_NONE;
|
||||
lock.type = TL_READ;
|
||||
} else {
|
||||
prebuilt->select_lock_type = LOCK_S;
|
||||
prebuilt->stored_select_lock_type = LOCK_S;
|
||||
|
Reference in New Issue
Block a user