- 22 Jul, 2024 1 commit
-
-
Galina Shalygina authored
The crash is caused by the attempt to refix the constant subquery during pushdown from HAVING into WHERE optimization. Every condition that is going to be pushed into WHERE clause is first cleaned up, then refixed. Constant subqueries are not cleaned or refixed because they will remain the same after refixing, so this complicated procedure can be omitted for them (introduced in MDEV-21184). Constant subqueries are marked with flag IMMUTABLE_FL, that helps to miss the cleanup stage for them. Also they are marked as fixed, so refixing is also not done for them. Because of the multiple equality propagation several references to the same constant subquery can exist in the condition that is going to be pushed into WHERE. Before this patch, the problem appeared in the following way. After the first reference to the constant subquery is processed, the flag IMMUTABLE_FL for the constant subquery is disabled. So, when the second reference to this constant subquery is processed, the flag is already disabled and the subquery goes through the procedure of cleaning and refixing. That causes a crash. To solve this problem, IMMUTABLE_FL should be disabled only after all references to the constant subquery are processed, so after the whole condition that is going to be pushed is cleaned up and refixed. Approved by Igor Babaev <igor@maridb.com>
-
- 18 Jul, 2024 1 commit
-
-
Yuchen Pei authored
Rollback is not supposed to fail. This prevents false failures in spider rollback.
-
- 17 Jul, 2024 1 commit
-
-
Yuchen Pei authored
Item_exists_subselect::fix_length_and_dec() sets explicit_limit to 1. In the exists2in transformation it resets select_limit to NULL. For consistency we should reset explicity_limit too. This fixes a bug where spider table returns wrong results for queries that gets through exists2in transformation when semijoin is off.
-
- 11 Jul, 2024 8 commits
-
-
Yuchen Pei authored
SPIDER_CONN::loop_check_meraged_first is useless, because all SPIDER_CONN_LOOP_CHECKs are in SPIDER_CONN::loop_check_queue, which in spider_db_conn::fin_loop_check() is iterated over. This fixes the use-after-free issue when there are three spider tables sharing the same remote, and their corresponding SPIDER_CONN_LOOP_CHECKs getting merged in spider_conn_queue_and_merge_loop_check() This also fixes MDEV-34555
-
Yuchen Pei authored
-
Yuchen Pei authored
Same cause as MDEV-31996. This prevents reuse of conns freed previously, e.g. during the commit of previous statement. It does not occur in 10.4 because of the commit for MDEV-19002 removed the call to spider_check_trx_and_get_conn().
-
Yuchen Pei authored
This allows creation of SPIDER_CONN on demand, if the previous one was freed. Also, the first_link_idx's are reset during spider_check_trx_and_get_conn(), which in the case of remote HANDLER commands, might not match the link to use correct first_link_idx for remote HANDLER statement that was later set in ha_spider::rnd_handler_init() (causing testing regressions in the spider/handler suite). Therefore we fix the first_link_idx there.
-
Yuchen Pei authored
-
Yuchen Pei authored
A SPIDER_TRX_HA associated with a SPIDER_TRX could have longer lifetime than its associated SPIDER_SHARE. And it is identified with the associated table name. When the SPIDER_SHARE no longer valid, e.g. when the associated spider table has been dropped and recreated, the SPIDER_TRX_HA should be reset too. Since spider could create a new SPIDER_SHARE with the exact same address of a freed SPIDER_SHARE, we try to mark all SPIDER_TRX_HAs associated with a SPIDER_SHARE invalid when the SPIDER_SHARE is about to be freed.
-
Yuchen Pei authored
Some documentations come from commit for MDEV-29676, and the rest are mainly related to SPIDER_TRX_HA. Removed SPIDER_TRX_HA::trx as it is unused.
-
Yuchen Pei authored
This fixes a valgrind failure where the bulk_size is used before initialised in ha_spider::end_bulk_insert().
-
- 08 Jul, 2024 1 commit
-
-
Yuchen Pei authored
To avoid off-by-one in spider_get_share. And document conn key and conn key length.
-
- 27 Jun, 2024 28 commits
-
-
Yuchen Pei authored
MDEV-31788 Factor functions to reduce duplication around spider_check_and_init_casual_read in ha_spider.cc factored out static functions: - spider_prep_loop - spider_start_bg - spider_send_queries
-
Yuchen Pei authored
-
Yuchen Pei authored
-
Yuchen Pei authored
-
Yuchen Pei authored
-
Yuchen Pei authored
They are for unnecessary debugging purposes only.
-
Yuchen Pei authored
The functions called in blocks protected by this macro remain undefined as of 11.5 c96b23f9
-
Yuchen Pei authored
It's virtually empty now
-
Yuchen Pei authored
-
Yuchen Pei authored
-
Yuchen Pei authored
Show::Column() was added in MDEV-19772 4156b1a2
-
Yuchen Pei authored
handler::pre_calculate_checksum was added in MDEV-16249 be5c432a
-
Yuchen Pei authored
get_negated() was introduced in MDEV-16707
-
Yuchen Pei authored
sql_cache was moved to lex in MDEV-11953 in de745ecf
-
Yuchen Pei authored
{STRING|INT|REAL|DECIMAL|DATE}_ITEM were replaced with CONST_ITEM in MDEV-14630 c20cd68e
-
Yuchen Pei authored
MDEV-16246 was fixed long ago. And this macro was removed in other versions too
-
Yuchen Pei authored
handler::need_info_for_auto_inc() was added in MDEV-7720 / MDEV-7726 in commit dc17ac16
-
Yuchen Pei authored
This macro is unused, and not in 11.5 c96b23f9
-
Yuchen Pei authored
This macro is unused
-
Yuchen Pei authored
The flag argument was added to handler::start_bulk_insert() in the MDEV-539 commit ca2cdaad
-
Yuchen Pei authored
new_data is const since at least 2017: a05a610d
-
Yuchen Pei authored
handler has can_use_for_auto_inc_init() since at latest 2017: dc17ac16
-
Yuchen Pei authored
-
Yuchen Pei authored
HA_EXTRA_USE_CMP_REF is undefined, and remains so as of 11.5 c96b23f9
-
Yuchen Pei authored
HA_EXTRA_STARTING_ORDERED_INDEX_SCAN was added latest 2018: 921c5e93
-
Yuchen Pei authored
net has thd since 2015 in 56aa1998 for MDEV-6152
-
Yuchen Pei authored
arg_count was protected since 2015 in commit afa17734
-
Yuchen Pei authored
unifdef -DSPIDER_HAS_HASH_VALUE_TYPE -m storage/spider/spd_* storage/spider/ha_spider.* storage/spider/hs_client/*
-