|
|
|
@ -158,7 +158,6 @@ static uint32_t blob_field_index(TABLE *table, KEY_AND_COL_INFO *kc_info, uint i |
|
|
|
int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds) { |
|
|
|
TOKUDB_DBUG_ENTER("ha_tokudb::fast_update"); |
|
|
|
int error = 0; |
|
|
|
unsigned line = 0; // debug
|
|
|
|
|
|
|
|
if (tokudb_debug & TOKUDB_DEBUG_UPSERT) { |
|
|
|
dump_item_list("fields", update_fields); |
|
|
|
@ -170,24 +169,20 @@ int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &upda |
|
|
|
|
|
|
|
if (update_fields.elements < 1 || update_fields.elements != update_values.elements) { |
|
|
|
error = ENOTSUP; // something is fishy with the parameters
|
|
|
|
line = __LINE__; |
|
|
|
goto return_error; |
|
|
|
} |
|
|
|
|
|
|
|
if (!check_fast_update(thd, update_fields, update_values, conds)) { |
|
|
|
error = ENOTSUP; |
|
|
|
line = __LINE__; |
|
|
|
goto check_error; |
|
|
|
} |
|
|
|
|
|
|
|
error = send_update_message(update_fields, update_values, conds, transaction); |
|
|
|
if (error != 0) { |
|
|
|
line = __LINE__; |
|
|
|
goto check_error; |
|
|
|
} |
|
|
|
|
|
|
|
check_error: |
|
|
|
line = line; // debug
|
|
|
|
if (error != 0) { |
|
|
|
if (get_disable_slow_update(thd)) |
|
|
|
error = HA_ERR_UNSUPPORTED; |
|
|
|
@ -746,7 +741,6 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va |
|
|
|
TOKUDB_DBUG_ENTER("ha_tokudb::upsert"); |
|
|
|
|
|
|
|
int error = 0; |
|
|
|
unsigned line = 0; // debug
|
|
|
|
|
|
|
|
if (tokudb_debug & TOKUDB_DEBUG_UPSERT) { |
|
|
|
fprintf(stderr, "upsert\n"); |
|
|
|
@ -756,24 +750,20 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va |
|
|
|
|
|
|
|
if (update_fields.elements < 1 || update_fields.elements != update_values.elements) { |
|
|
|
error = ENOTSUP; // not an upsert or something is fishy with the parameters
|
|
|
|
line = __LINE__; |
|
|
|
goto return_error; |
|
|
|
} |
|
|
|
|
|
|
|
if (!check_upsert(thd, update_fields, update_values)) { |
|
|
|
error = ENOTSUP; |
|
|
|
line = __LINE__; |
|
|
|
goto check_error; |
|
|
|
} |
|
|
|
|
|
|
|
error = send_upsert_message(thd, update_fields, update_values, transaction); |
|
|
|
if (error != 0) { |
|
|
|
line = __LINE__; |
|
|
|
goto check_error; |
|
|
|
} |
|
|
|
|
|
|
|
check_error: |
|
|
|
line = line; // debug
|
|
|
|
if (error != 0) { |
|
|
|
if (get_disable_slow_upsert(thd)) |
|
|
|
error = HA_ERR_UNSUPPORTED; |
|
|
|
|