Navigation Menu

Skip to content

Commit

Permalink
disable inplace index change with MySQL 5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 27, 2011
1 parent 49384ea commit b3e882b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ha_mroonga.cc
Expand Up @@ -922,7 +922,9 @@ static void mrn_store_field(grn_ctx *ctx, Field *field, grn_obj *col, grn_id id)
}

static uint mrn_alter_table_flags(uint flags) {
uint ret_flags =
uint ret_flags = 0;
#ifdef MRN_HANDLER_HAVE_HA_INPLACE_INDEX_CHANGE
ret_flags |=
HA_INPLACE_ADD_INDEX_NO_READ_WRITE |
HA_INPLACE_DROP_INDEX_NO_READ_WRITE |
HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE |
Expand All @@ -935,6 +937,7 @@ static uint mrn_alter_table_flags(uint flags) {
HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE |
HA_INPLACE_ADD_PK_INDEX_NO_WRITE |
HA_INPLACE_DROP_PK_INDEX_NO_WRITE;
#endif
return ret_flags;
}

Expand Down
4 changes: 4 additions & 0 deletions ha_mroonga.h
Expand Up @@ -57,6 +57,10 @@ extern "C" {
# define MRN_HANDLER_HAVE_MULTI_RANGE_READ 1
#endif

#if MYSQL_VERSION_ID >= 50512
# define MRN_HANDLER_HAVE_HA_INPLACE_INDEX_CHANGE
#endif

#if MYSQL_VERSION_ID < 50600
typedef Item COND;
#endif
Expand Down

0 comments on commit b3e882b

Please sign in to comment.