Navigation Menu

Skip to content

Commit

Permalink
make re-support on MySQL 5.1.
Browse files Browse the repository at this point in the history
Should we support both MySQL 5.1 and 5.5? It seems too costful...
  • Loading branch information
kou committed Jun 11, 2011
1 parent c9c26aa commit 9a8a73d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ha_mroonga.cc
Expand Up @@ -1655,13 +1655,19 @@ int ha_mroonga::delete_table(const char *name)
#else
table_list.init_one_table(db_name, tbl_name, TL_WRITE);
#endif
#if MYSQL_VERSION_ID >= 50500
mysql_mutex_lock(&LOCK_open);
#endif
if (!(tmp_table_share = mrn_get_table_share(&table_list, &error)))
{
#if MYSQL_VERSION_ID >= 50500
mysql_mutex_unlock(&LOCK_open);
#endif
DBUG_RETURN(error);
}
#if MYSQL_VERSION_ID >= 50500
mysql_mutex_unlock(&LOCK_open);
#endif
/* This is previous version */
tmp_table_share->version--;
tmp_table.s = tmp_table_share;
Expand All @@ -1682,9 +1688,13 @@ int ha_mroonga::delete_table(const char *name)
}

mrn_free_share(tmp_share);
#if MYSQL_VERSION_ID >= 50500
mysql_mutex_lock(&LOCK_open);
#endif
mrn_free_table_share(tmp_table_share);
#if MYSQL_VERSION_ID >= 50500
mysql_mutex_unlock(&LOCK_open);
#endif
DBUG_RETURN(error);
}

Expand Down

0 comments on commit 9a8a73d

Please sign in to comment.