mariadb/storage/myisam
Aleksey Midenkov 1037f95941 MDEV-33675 Assertion(reclength < vreclength) in setup_vcols_for_repair()
When table2myisam() prepares recinfo structures BIT field was skipped
because pack_length_in_rec() returns 0. Instead of BIT field
DB_ROW_HASH_1 field was taken into recinfo structure and its length
was added to reclength. This is wrong because not stored fields must
not be prepared as record columns (MI_COLUMNDEF) in storage
layer. 0-length fields are prepared in "reserve space for null bits"
branch.

The problem only occurs with tables where there is no data for the
main record outside of the null bits.

The fix updates minpos condition so we avoid fields after
stored_rec_length and these are not stored by
definition. share->reclength already includes not stored lengths from
CREATE TABLE so we cannot use it as minpos starting point.

In Aria there is no "reserve space for null bits" and it does not
create column definition for BIT. Also there is no
setup_vcols_for_repair() to reproduce the issue. But nonetheless it
creates column definition for not stored fields redundantly, so we
patch table2maria() as well. The test case for Aria tries to
demonstrate BIT field works, it does not reproduce any issues (as
redundant column definition for not stored field seem to not cause any
problems).
2025-05-23 14:46:35 +03:00
..
ftbench mtr: use env for perl 2020-06-23 03:24:46 +02:00
mysql-test Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
ChangeLog
CMakeLists.txt Add build on AIX 2020-12-16 08:07:04 +11:00
ft_boolean_search.c MDEV-34348: Consolidate cmp function declarations 2024-11-23 08:14:22 -07:00
ft_myisam.c Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
ft_nlq_search.c MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
ft_parser.c MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
ft_static.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ft_stopwords.c MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
ft_update.c MDEV-30048 Prefix keys for CHAR work differently for MyISAM vs InnoDB 2023-10-24 03:35:48 +04:00
ftdefs.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
fulltext.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
ha_myisam.cc MDEV-33675 Assertion(reclength < vreclength) in setup_vcols_for_repair() 2025-05-23 14:46:35 +03:00
ha_myisam.h MDEV-25060 Freeing overrun buffer, various crashes, ASAN 2024-10-08 13:08:10 +03:00
mi_cache.c Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mi_changed.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_check.c MDEV-35429 my_snprintf fixes for 10.5+ 2025-01-14 17:57:51 +11:00
mi_checksum.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mi_close.c Merge 10.2 into 10.3 2020-04-22 14:45:55 +03:00
mi_create.c Merge branch '10.5' into 10.6 2023-08-04 07:52:54 +02:00
mi_dbug.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_delete.c MDEV-27030 vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022 2021-11-12 00:32:39 +01:00
mi_delete_all.c Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mi_delete_table.c MDEV-11412 Ensure that table is truly dropped when using DROP TABLE 2020-06-14 19:39:42 +03:00
mi_dynrec.c perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
mi_extra.c Merge 10.5 into 10.6 2025-01-08 08:48:21 +02:00
mi_extrafunc.h Update FSF Address 2019-05-11 21:29:06 +03:00
mi_info.c Merge 10.5 into 10.6 2022-03-14 10:59:46 +02:00
mi_key.c Merge 10.4 into 10.5 2020-11-03 16:24:47 +02:00
mi_keycache.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_locking.c Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
mi_log.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
mi_open.c Merge 10.5 into 10.6 2023-05-23 12:25:39 +03:00
mi_packrec.c Fixed access of undefined memory for compressed MyISAM and Aria tables 2020-06-14 19:39:42 +03:00
mi_page.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_panic.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_preload.c perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
mi_range.c Added page_range to records_in_range() to improve range statistics 2020-03-27 03:54:45 +02:00
mi_rename.c Make rename atomic/repeatable in MyISAM and Aria 2021-05-19 22:54:12 +02:00
mi_rfirst.c Fix spelling mistakes in MyISAM code comments 2019-09-20 07:21:21 +03:00
mi_rkey.c MDEV-21794: Optimizer flag rowid_filter leads to long query 2020-05-07 12:27:17 +02:00
mi_rlast.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_rnext.c MDEV-21794: Optimizer flag rowid_filter leads to long query 2020-05-07 12:27:17 +02:00
mi_rnext_same.c MDEV-21794: Optimizer flag rowid_filter leads to long query 2020-05-07 12:27:17 +02:00
mi_rprev.c MDEV-21794: Optimizer flag rowid_filter leads to long query 2020-05-07 12:27:17 +02:00
mi_rrnd.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_rsame.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_rsamepos.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_scan.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_search.c Merge remote-tracking branch 'origin/10.1' into 10.2 2019-09-24 19:19:25 +04:00
mi_static.c perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
mi_statrec.c Update FSF Address 2019-05-11 21:29:06 +03:00
mi_test1.c Added 'const' to arguments in get_one_option and find_typeset() 2021-02-08 12:16:29 +02:00
mi_test2.c Added page_range to records_in_range() to improve range statistics 2020-03-27 03:54:45 +02:00
mi_test3.c Fix clang -Wunused-but-set-variable 2022-09-19 13:30:52 +03:00
mi_test_all.res
mi_test_all.sh Merge remote-tracking branch 'origin/5.5' into 10.1 2019-09-24 11:18:39 +04:00
mi_unique.c MDEV-35620 UBSAN: runtime error: applying zero offset to null pointer 2025-02-03 16:45:02 +04:00
mi_update.c Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mi_write.c MDEV-34348: Consolidate cmp function declarations 2024-11-23 08:14:22 -07:00
myisam_ftdump.c Merge 10.4 into 10.5 2022-10-06 08:29:56 +03:00
myisamchk.c Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
myisamdef.h MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
myisamlog.c MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
myisampack.c MDEV-34348: Fix casts relating to tree_walk_action 2024-11-23 08:14:23 -07:00
NEWS Merge remote-tracking branch 'origin/10.1' into 10.2 2019-09-24 19:19:25 +04:00
rt_index.c perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
rt_index.h Update FSF Address 2019-05-11 21:29:06 +03:00
rt_key.c Update FSF Address 2019-05-11 21:29:06 +03:00
rt_key.h Update FSF Address 2019-05-11 21:29:06 +03:00
rt_mbr.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
rt_mbr.h Update FSF Address 2019-05-11 21:29:06 +03:00
rt_split.c Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
rt_test.c Merge 10.4 into 10.5 2021-08-25 07:53:23 +03:00
sort.c Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
sp_defs.h Update FSF Address 2019-05-11 21:29:06 +03:00
sp_key.c MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOS 2019-11-19 16:28:15 +03:00
sp_test.c Added page_range to records_in_range() to improve range statistics 2020-03-27 03:54:45 +02:00
test_pack