diff options
author | unknown <jan@hundin.mysql.fi> | 2005-09-28 14:14:49 +0300 |
---|---|---|
committer | unknown <jan@hundin.mysql.fi> | 2005-09-28 14:14:49 +0300 |
commit | 2de206b4eee3033a590cb337ffd86c89df678b4c (patch) | |
tree | 69fc5aae62c0c97efaa06988f79bfdf1563bed82 /sql/ha_innodb.cc | |
parent | 0559f1e0124280bd8cecb98611364057914791ec (diff) | |
download | mariadb-git-2de206b4eee3033a590cb337ffd86c89df678b4c.tar.gz |
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.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index b30ddfe8227..1312b645017 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -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; |