mariadb/storage/innobase/pars
Marko Mäkelä e5c4c0842d MDEV-35443: opt_search_plan_for_table() may degrade to full table scan
opt_calc_index_goodness(): Correct an inaccurate condition.
We can very well use a clustered index of a table that is subject
to online rebuild. But we must not choose an index that has not been
committed (it is a secondary index that was not fully created)
or that is corrupted or not a normal B-tree index.

opt_search_plan_for_table(): Remove some redundant code, now that
opt_calc_index_goodness() checks against corrupted indexes.

The test case allows this code to be exercised. The main observation
in the following:
	./mtr --rr innodb.stats_persistent
	rr replay var/log/mysqld.1.rr/latest-trace
should be that when opt_search_plan_for_table() is being invoked by
dict_stats_update_persistent() on the being-altered statistics table
in the 2nd call after ha_innobase::inplace_alter_table(),
and the fix in opt_calc_index_goodness() is absent,
it would choose the code path if (n_fields == 0), that is, a full
table scan, instead of searching for the record. The GDB commands to
execute in "rr replay" would be as follows:
	break ha_innobase::inplace_alter_table
	continue
	break opt_search_plan_for_table
	continue
	continue
	next
	next
	…

Reviewed by: Vladislav Lesin
2024-12-19 14:05:16 +02:00
..
lexyy.cc Cleanup: Remove os0proc.* 2020-09-03 16:40:42 +03:00
make_bison.sh Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
make_flex.sh Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
pars0grm.cc MDEV-31890: Remove COMPILE_FLAGS 2023-10-11 15:59:56 +03:00
pars0grm.y MDEV-31890: Remove COMPILE_FLAGS 2023-10-11 15:59:56 +03:00
pars0lex.l Cleanup: Remove os0proc.* 2020-09-03 16:40:42 +03:00
pars0opt.cc MDEV-35443: opt_search_plan_for_table() may degrade to full table scan 2024-12-19 14:05:16 +02:00
pars0pars.cc Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
pars0sym.cc Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00