mariadb/storage/innobase
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
..
btr MDEV-34823 Invalid arguments in ib_push_warning() 2024-09-06 14:29:09 +03:00
buf Fix clang++-19 -Wunused-but-set-variable 2024-08-15 10:13:49 +03:00
data Merge 10.4 into 10.5 2022-10-25 11:26:37 +03:00
dict MDEV-26516: WSREP: Record locking is disabled in this thread, but the table being modified 2024-11-28 01:02:35 +01:00
eval
fil MDEV-29015/MDEV-29260/MDEV-34938: os_file_get_size() WSL work-around 2024-10-24 16:08:56 +03:00
fsp MDEV-33635 innodb.innodb-64k-crash - Found warnings/errors in server log file 2024-03-14 08:34:56 +05:30
fts MDEV-34057 Inconsistent FTS state in concurrent scenarios 2024-06-06 19:09:13 +05:30
fut MDEV-22110 preparation: Remove mtr_memo_contains macros 2020-06-10 07:50:09 +03:00
gis MDEV-33559 matched_rec::block should be allocated from the buffer pool 2024-04-15 09:04:11 +03:00
ha MDEV-22871: Remove pointer indirection for InnoDB hash_table_t 2020-06-18 14:16:01 +03:00
handler Change my_umask{,_dir} to mode_t and remove os_innodb_umask 2024-12-11 17:21:01 +11:00
ibuf MDEV-32489 Change buffer index fails to delete the records 2024-04-18 08:30:21 +05:30
include MDEV-35443: opt_search_plan_for_table() may degrade to full table scan 2024-12-19 14:05:16 +02:00
lock MDEV-24923 fixup: Correct a function comment 2024-08-27 18:06:24 +03:00
log MDEV-34802 Recovery fails to note some log corruption 2024-08-28 15:44:42 +03:00
mem Merge 10.4 into 10.5 2020-07-02 09:41:44 +03:00
mtr MDEV-34175 mtr_t::log_close() warning should change the shutdown condition 2024-05-20 18:18:41 +05:30
mysql-test/storage_engine
os Change my_umask{,_dir} to mode_t and remove os_innodb_umask 2024-12-11 17:21:01 +11:00
page Merge remote-tracking branch '10.4' into 10.5 2023-03-31 21:32:41 +02:00
pars MDEV-35443: opt_search_plan_for_table() may degrade to full table scan 2024-12-19 14:05:16 +02:00
que Fix g++-14 -Wmaybe-uninitialized 2024-03-19 08:08:18 +02:00
read Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
rem Merge 10.4 into 10.5 2024-03-11 10:08:20 +02:00
row MDEV-26516: WSREP: Record locking is disabled in this thread, but the table being modified 2024-11-28 01:02:35 +01:00
srv MDEV-34221 Errors about checksum mismatch on crash recovery are confusing 2024-05-24 12:57:42 +05:30
sync MDEV-33431 Latching order violation reported fil_system.sys_space.latch and ibuf_pessimistic_insert_mutex 2024-04-17 15:16:50 +05:30
trx Extract some of #3360 fixes to 10.5.x 2024-11-21 22:43:56 +11:00
unittest MDEV-33383: Corrupted red-black tree due to incorrect comparison 2024-02-12 17:01:45 +02:00
ut Cleanup: Say "mariadbd" instead of "mysqld" in InnoDB messages 2022-11-22 15:32:47 +02:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
bzip2.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
CMakeLists.txt MDEV-33876 CMake, zlib - use names compatible with official FindZLIB.cmake 2024-05-03 21:48:47 +02:00
compile-innodb
COPYING.Google
COPYING.Percona
lz4.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzma.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzo.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
snappy.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00