[Groonga-mysql-commit] mroonga/mroonga at d7748ad [master] Remove needless explicit unlocks

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Sep 25 18:18:43 JST 2013


Kouhei Sutou	2013-09-25 18:18:43 +0900 (Wed, 25 Sep 2013)

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

  Message:
    Remove needless explicit unlocks
    
    They should be done by mrn::~Lock().

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+0 -3)
===================================================================
--- ha_mroonga.cpp    2013-09-25 18:16:40 +0900 (49dc8fe)
+++ ha_mroonga.cpp    2013-09-25 18:18:43 +0900 (201d20e)
@@ -3623,7 +3623,6 @@ int ha_mroonga::ensure_database_create(const char *name)
         }
         db = grn_db_create(&mrn_ctx, mapper.db_path(), NULL);
         if (mrn_ctx.rc) {
-          pthread_mutex_unlock(&mrn_db_mutex);
           error = ER_CANT_CREATE_TABLE;
           my_message(error, mrn_ctx.errbuf, MYF(0));
           DBUG_RETURN(error);
@@ -3632,7 +3631,6 @@ int ha_mroonga::ensure_database_create(const char *name)
         // opening existing database
         db = grn_db_open(&mrn_ctx, mapper.db_path());
         if (mrn_ctx.rc) {
-          pthread_mutex_unlock(&mrn_db_mutex);
           error = ER_CANT_OPEN_FILE;
           my_message(error, mrn_ctx.errbuf, MYF(0));
           DBUG_RETURN(error);
@@ -3664,7 +3662,6 @@ int ha_mroonga::ensure_database_open(const char *name)
     if (!mrn_hash_get(&mrn_ctx, mrn_hash, mapper.db_name(), &db)) {
       db = grn_db_open(&mrn_ctx, mapper.db_path());
       if (mrn_ctx.rc) {
-        pthread_mutex_unlock(&mrn_db_mutex);
         error = ER_CANT_OPEN_FILE;
         my_message(error, mrn_ctx.errbuf, MYF(0));
         DBUG_RETURN(error);
-------------- next part --------------
HTML����������������������������...
Download 



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