diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2020-05-06 22:35:43 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2020-05-06 22:35:43 +0300 |
commit | b688c6381ea7128f6fafe0ed53a075c0d322dde4 (patch) | |
tree | 4e242d68d20977503e5f3ea7ea96c991352b9915 | |
parent | 5af50987363422d8d41d4d03b4eb9747d433917e (diff) | |
download | mariadb-git-bb-10.4-mdev21794.tar.gz |
MDEV-21794: Optimizer flag rowid_filter leads to long query, Part#2bb-10.4-mdev21794
Update TokuDB to use the new names of Index Condition Pushdown's
datatypes and constants
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 14 | ||||
-rw-r--r-- | storage/tokudb/ha_tokudb.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 67888216849..b8b4d86ce1c 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -5223,10 +5223,10 @@ static int smart_dbt_bf_callback( info->key_to_compare); } -enum icp_result ha_tokudb::toku_handler_index_cond_check( +check_result_t ha_tokudb::toku_handler_index_cond_check( Item* pushed_idx_cond) { - enum icp_result res; + check_result_t res; if (end_range) { int cmp; #ifdef MARIADB_BASE_VERSION @@ -5235,10 +5235,10 @@ enum icp_result ha_tokudb::toku_handler_index_cond_check( cmp = compare_key_icp(end_range); #endif if (cmp > 0) { - return ICP_OUT_OF_RANGE; + return CHECK_OUT_OF_RANGE; } } - res = pushed_idx_cond->val_int() ? ICP_MATCH : ICP_NO_MATCH; + res = pushed_idx_cond->val_int() ? CHECK_POS : CHECK_NEG; return res; } @@ -5278,19 +5278,19 @@ int ha_tokudb::fill_range_query_buf( if (toku_pushed_idx_cond && (tokudb_active_index == toku_pushed_idx_cond_keyno)) { unpack_key(buf, key, tokudb_active_index); - enum icp_result result = + check_result_t result = toku_handler_index_cond_check(toku_pushed_idx_cond); // If we have reason to stop, we set icp_went_out_of_range and get out // otherwise, if we simply see that the current key is no match, // we tell the cursor to continue and don't store // the key locally - if (result == ICP_OUT_OF_RANGE || thd_kill_level(thd)) { + if (result == CHECK_OUT_OF_RANGE || thd_kill_level(thd)) { icp_went_out_of_range = true; error = 0; DEBUG_SYNC(ha_thd(), "tokudb_icp_asc_scan_out_of_range"); goto cleanup; - } else if (result == ICP_NO_MATCH) { + } else if (result == CHECK_NEG) { // Optimizer change for MyRocks also benefits us here in TokuDB as // opt_range.cc QUICK_SELECT::get_next now sets end_range during // descending scan. We should not ever hit this condition, but diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index fb1d2cd7a67..d74c99a5f8b 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -1027,7 +1027,7 @@ private: int get_next(uchar* buf, int direction, DBT* key_to_compare, bool do_key_read); int read_data_from_range_query_buff(uchar* buf, bool need_val, bool do_key_read); // for ICP, only in MariaDB and MySQL 5.6 - enum icp_result toku_handler_index_cond_check(Item* pushed_idx_cond); + check_result_t toku_handler_index_cond_check(Item* pushed_idx_cond); void invalidate_bulk_fetch(); void invalidate_icp(); int delete_all_rows_internal(); |