mirror of
https://github.com/MariaDB/server.git
synced 2025-04-25 00:19:58 +02:00
![]() A spider_conn may outlive its associated ha_spider (in the field queued_ping_spider) used for connecting to and pinging the data node (a call to spider_db_ping(), guarded by the boolean field queued_ping). In a call to ha_spider::close() (which is often preceded with the deletion of the ha_spider itself), many cleanups happen, including freeing the associated spider_share, which is used by the spider_conn in spider_db_ping. Therefore it is necessary to reset both the queued_ping_spider and queued_ping fields, so that any further spider interaction with the data node will not trigger the call using the ha_spider including its freed spider_share. Also out of caution added an assert and internal error in case a connection has not been established (the db_conn field of type MYSQL * is NULL), and attempt to connect is skipped because both queued_connect and queued_ping are false. Note that this unlikely (if not impossible) scenario would not be a regression caused by this change, as it strictly falls under the scenario of this bug. |
||
---|---|---|
.. | ||
mysql-test/spider | ||
CMakeLists.txt | ||
ha_spider.cc | ||
ha_spider.h | ||
spd_conn.cc | ||
spd_conn.h | ||
spd_copy_tables.cc | ||
spd_copy_tables.h | ||
spd_db_conn.cc | ||
spd_db_conn.h | ||
spd_db_include.cc | ||
spd_db_include.h | ||
spd_db_mysql.cc | ||
spd_db_mysql.h | ||
spd_direct_sql.cc | ||
spd_direct_sql.h | ||
spd_err.h | ||
spd_group_by_handler.cc | ||
spd_group_by_handler.h | ||
spd_i_s.cc | ||
spd_include.h | ||
spd_init_query.h | ||
spd_malloc.cc | ||
spd_malloc.h | ||
spd_param.cc | ||
spd_param.h | ||
spd_ping_table.cc | ||
spd_ping_table.h | ||
spd_sys_table.cc | ||
spd_sys_table.h | ||
spd_table.cc | ||
spd_table.h | ||
spd_trx.cc | ||
spd_trx.h | ||
spd_udf.cc | ||
spd_udf.def | ||
spd_udf.h | ||
spider.cnf |