1
0
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:
unknown
2005-09-28 14:14:49 +03:00
parent 0559f1e012
commit 2de206b4ee
3 changed files with 76 additions and 0 deletions

View File

@ -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;