[Groonga-mysql-commit] mroonga/mroonga at c72a890 [master] Extract common condition

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 13 14:50:54 JST 2013


Kouhei Sutou	2013-12-13 14:50:54 +0900 (Fri, 13 Dec 2013)

  New Revision: c72a8901d85396a464d1a5d7a7726c441b4939c3
  https://github.com/mroonga/mroonga/commit/c72a8901d85396a464d1a5d7a7726c441b4939c3

  Message:
    Extract common condition

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+7 -6)
===================================================================
--- ha_mroonga.cpp    2013-12-13 11:13:44 +0900 (ca4b245)
+++ ha_mroonga.cpp    2013-12-13 14:50:54 +0900 (34bf26d)
@@ -4602,12 +4602,13 @@ THR_LOCK_DATA **ha_mroonga::storage_store_lock(THD *thd, THR_LOCK_DATA **to,
 {
   MRN_DBUG_ENTER_METHOD();
   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) &&
-               !thd_in_lock_tables(thd)) {
-      lock_type = TL_WRITE_ALLOW_WRITE;
+    if (!thd_in_lock_tables(thd)) {
+      if (lock_type == TL_READ_NO_INSERT) {
+        lock_type = TL_READ;
+      } else if (lock_type >= TL_WRITE_CONCURRENT_INSERT &&
+                 lock_type <= TL_WRITE && !thd_tablespace_op(thd)) {
+        lock_type = TL_WRITE_ALLOW_WRITE;
+      }
     }
 
     thr_lock_data.type = lock_type;
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-mysql-commit mailing list
Back to archive index