[Groonga-mysql-commit] mroonga/mroonga [master] get lock in function mrn_drop_db(). refs #1281

Back to archive index

null+****@clear***** null+****@clear*****
2012年 2月 16日 (木) 01:48:19 JST


Kentoku	2012-02-16 01:48:19 +0900 (Thu, 16 Feb 2012)

  New Revision: 8482de5e26c966e1774d16e565621e8f635e33f8

  Log:
    get lock in function mrn_drop_db(). refs #1281

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+2 -0)
===================================================================
--- ha_mroonga.cc    2012-02-15 18:33:09 +0900 (bb5c61c)
+++ ha_mroonga.cc    2012-02-16 01:48:19 +0900 (43a49d7)
@@ -916,7 +916,9 @@ static void mrn_drop_db(handlerton *hton, char *path)
       GRN_LOG(ctx, GRN_LOG_ERROR, "cannot drop database (%s)", db_path);
     }
   }
+  pthread_mutex_lock(&mrn_db_mutex);
   mrn_hash_remove(ctx, mrn_hash, db_name);
+  pthread_mutex_unlock(&mrn_db_mutex);
   grn_ctx_fin(ctx);
 }
 




Groonga-mysql-commit メーリングリストの案内
Back to archive index