mariadb/storage/myisam
Nikita Malyavin 25e2d0a6bb MDEV-34632 Assertion failed in handler::assert_icp_limitations
Assertion `table->field[0]->ptr >= table->record[0] &&
table->field[0]->ptr <= table->record[0] + table->s->reclength' failed in
handler::assert_icp_limitations.

table->move_fields has some limitations:
1. It cannot be used in cascade
2. It should always have a restoring pair.

Rule 1 is covered by assertions in handler::assert_icp_limitations
and handler::ptr_in_record (commit 30894fe9a9).

Rule 2 should be manually maintained with care. Hopefully, the rule 1 assertions
may sometimes help as well.

In ha_myisam::repair, both rules are broken. table->move_fields is used
asymmetrically there: it is set on every param->fix_record call
(i.e. in compute_vcols) but is restored only once, in the end of repair.

The reason to updating field ptr's for every call is that compute_vcols can
(supposedly) be called in parallel, that is, with the same table, but different
records.

The condition to "unmove" the pointers in ha_myisam::restore_vcos_after_repair
is incorrect, when stored vcols are available, and myisam stores a VIRTUAL field
if it's the only field in the table (the record cannot be of zero length).

This patch solves the problem by "unmoving" the pointers symmetrically, in
compute_vcols. That is, both rules will be preserved maintained.
2024-08-07 14:50:19 +02:00
..
ftbench
mysql-test
ChangeLog
CMakeLists.txt
ft_boolean_search.c
ft_myisam.c
ft_nlq_search.c
ft_parser.c
ft_static.c
ft_stopwords.c
ft_update.c
ftdefs.h
fulltext.h
ha_myisam.cc
ha_myisam.h
mi_cache.c
mi_changed.c
mi_check.c
mi_checksum.c
mi_close.c
mi_create.c
mi_dbug.c
mi_delete.c
mi_delete_all.c
mi_delete_table.c
mi_dynrec.c
mi_extra.c
mi_extrafunc.h
mi_info.c
mi_key.c
mi_keycache.c
mi_locking.c
mi_log.c
mi_open.c
mi_packrec.c
mi_page.c
mi_panic.c
mi_preload.c
mi_range.c
mi_rename.c
mi_rfirst.c
mi_rkey.c
mi_rlast.c
mi_rnext.c
mi_rnext_same.c
mi_rprev.c
mi_rrnd.c
mi_rsame.c
mi_rsamepos.c
mi_scan.c
mi_search.c
mi_static.c
mi_statrec.c
mi_test1.c
mi_test2.c
mi_test3.c
mi_test_all.res
mi_test_all.sh
mi_unique.c
mi_update.c
mi_write.c
myisam_ftdump.c
myisamchk.c
myisamdef.h
myisamlog.c
myisampack.c
NEWS
rt_index.c
rt_index.h
rt_key.c
rt_key.h
rt_mbr.c
rt_mbr.h
rt_split.c
rt_test.c
sort.c
sp_defs.h
sp_key.c
sp_test.c
test_pack