Commit a1b98694 authored by Rich Prohaska's avatar Rich Prohaska

#206 compile without partition storage engine

parent 0b1edd43
...@@ -1634,14 +1634,9 @@ int ha_tokudb::initialize_share( ...@@ -1634,14 +1634,9 @@ int ha_tokudb::initialize_share(
goto exit; goto exit;
} }
#if TOKU_PARTITION_WRITE_FRM_DATA #if WITH_PARTITION_STORAGE_ENGINE
// verify frm data for all tables
error = verify_frm_data(table->s->path.str, txn);
if (error)
goto exit;
#else
// verify frm data for non-partitioned tables // verify frm data for non-partitioned tables
if (table->part_info == NULL) { if (TOKU_PARTITION_WRITE_FRM_DATA || table->part_info == NULL) {
error = verify_frm_data(table->s->path.str, txn); error = verify_frm_data(table->s->path.str, txn);
if (error) if (error)
goto exit; goto exit;
...@@ -1651,6 +1646,10 @@ int ha_tokudb::initialize_share( ...@@ -1651,6 +1646,10 @@ int ha_tokudb::initialize_share(
if (error) if (error)
goto exit; goto exit;
} }
#else
error = verify_frm_data(table->s->path.str, txn);
if (error)
goto exit;
#endif #endif
error = initialize_key_and_col_info( error = initialize_key_and_col_info(
...@@ -6891,16 +6890,16 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in ...@@ -6891,16 +6890,16 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
error = write_auto_inc_create(status_block, create_info->auto_increment_value, txn); error = write_auto_inc_create(status_block, create_info->auto_increment_value, txn);
if (error) { goto cleanup; } if (error) { goto cleanup; }
#if TOKU_PARTITION_WRITE_FRM_DATA #if WITH_PARTITION_STORAGE_ENGINE
if (TOKU_PARTITION_WRITE_FRM_DATA || form->part_info == NULL) {
error = write_frm_data(status_block, txn, form->s->path.str); error = write_frm_data(status_block, txn, form->s->path.str);
if (error) { goto cleanup; } if (error) { goto cleanup; }
}
#else #else
// only for tables that are not partitioned
if (form->part_info == NULL) {
error = write_frm_data(status_block, txn, form->s->path.str); error = write_frm_data(status_block, txn, form->s->path.str);
if (error) { goto cleanup; } if (error) { goto cleanup; }
}
#endif #endif
error = allocate_key_and_col_info(form->s, &kc_info); error = allocate_key_and_col_info(form->s, &kc_info);
if (error) { goto cleanup; } if (error) { goto cleanup; }
......
...@@ -520,7 +520,11 @@ bool ha_tokudb::inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha ...@@ -520,7 +520,11 @@ bool ha_tokudb::inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799)
#if WITH_PARTITION_STORAGE_ENGINE
if (error == 0 && (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL)) { if (error == 0 && (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL)) {
#else
if (error == 0) {
#endif
error = write_frm_data(share->status_block, ctx->alter_txn, altered_table->s->path.str); error = write_frm_data(share->status_block, ctx->alter_txn, altered_table->s->path.str);
} }
#endif #endif
...@@ -731,7 +735,11 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i ...@@ -731,7 +735,11 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i
#endif #endif
#if (50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599) || \ #if (50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099) (100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099)
#if WITH_PARTITION_STORAGE_ENGINE
if (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL) { if (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL) {
#else
if (true) {
#endif
int error = write_frm_data(share->status_block, ctx->alter_txn, altered_table->s->path.str); int error = write_frm_data(share->status_block, ctx->alter_txn, altered_table->s->path.str);
if (error) { if (error) {
commit = false; commit = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment