Kenji Maruyama
null+****@clear*****
Thu Dec 12 15:30:57 JST 2013
Kenji Maruyama 2013-12-12 15:30:57 +0900 (Thu, 12 Dec 2013) New Revision: 60b2db47e50d36019683d48c7a9cf65a6a9f12ca https://github.com/mroonga/mroonga/commit/60b2db47e50d36019683d48c7a9cf65a6a9f12ca Message: Fix mysqldump lock table read. refs #2098 Added files: mysql-test/mroonga/storage/mysqldump/r/lock_table_read.result Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+4 -4) =================================================================== --- ha_mroonga.cpp 2013-12-12 15:26:25 +0900 (2560b00) +++ ha_mroonga.cpp 2013-12-12 15:30:57 +0900 (1965da2) @@ -4601,12 +4601,12 @@ THR_LOCK_DATA **ha_mroonga::storage_store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { MRN_DBUG_ENTER_METHOD(); - if (lock_type != TL_IGNORE && thr_lock_data.type == TL_UNLOCK && - !thd_in_lock_tables(thd)) { - if (lock_type == TL_READ_NO_INSERT) { + if (lock_type != TL_IGNORE && thr_lock_data.type == TL_UNLOCK) { + if (lock_type == TL_READ_NO_INSERT && !thd_in_lock_tables(thd)) { lock_type = TL_READ; } else if (lock_type >= TL_WRITE_CONCURRENT_INSERT && - lock_type <= TL_WRITE && !thd_tablespace_op(thd)) { + lock_type <= TL_WRITE && !thd_tablespace_op(thd) && + !thd_in_lock_tables(thd)) { lock_type = TL_WRITE_ALLOW_WRITE; } Added: mysql-test/mroonga/storage/mysqldump/r/lock_table_read.result (+7 -0) 100644 =================================================================== --- /dev/null +++ mysql-test/mroonga/storage/mysqldump/r/lock_table_read.result 2013-12-12 15:30:57 +0900 (4e1db46) @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS counts; +CREATE TABLE counts ( +id INT PRIMARY KEY AUTO_INCREMENT +); +LOCK TABLES counts READ; +UNLOCK TABLES; +DROP TABLE counts; -------------- next part -------------- HTML����������������������������...Download