mariadb/storage
Thirunarayanan Balathandayuthapani accb4af95b MDEV-31892 Server crash upon moving InnoDB table with
fulltext index between databases

Problem:
========
- When renaming/moving an InnoDB table with fulltext indexes
between databases, the server would crash because
InnoDB attempted to open auxiliary tables using
the old database name instead of the new one.

When creating auxiliary index, InnoDB does create temporary
sort fulltext index using old table reference which creates
the auxiliary table name with the prefix of old database name.

FTS Document ID size optimization in row_merge_create_fts_sort_index()
using dict_table_get_n_rows() to decide between 4-byte
and 8-byte Doc IDs for memory optimization. But
dict_table_get_n_rows() returns estimated statistics that
may be stale or inaccurate, potentially leading to wrong
size decisions and data corruption if 4-byte
Doc IDs are chosen when 8-byte are actually needed.

Solution:
=========
fts_rename_aux_tables(): Iterate through all table indexes
and ensure all fulltext indexes are properly renamed

row_merge_create_fts_sort_index() : Use new_table instead
of old_table when creating temporary FTS sort indexes.

row_merge_build_indexes(): Refactored the logic to do
memory optimization to determine the doc id size for
temporary fts sort index.

 - When adding FTS index for the first time
  (DICT_TF2_FTS_ADD_DOC_ID), always use 8-byte Doc IDs

 - For existing FTS tables or user-supplied Doc ID columns,
   use fts_get_max_doc_id() approach to check actual maximum Doc ID
2026-01-09 21:15:14 +05:30
..
archive Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
blackhole MDEV-34348: my_hash_get_key fixes 2024-11-23 08:14:22 -07:00
columnstore columnstore 6.4.12-1 2025-10-21 16:32:32 +02:00
connect Fixed compiler warning from clang in connect/tabxcl.cpp 2025-06-02 14:02:53 +03:00
csv Fix clang-21 -Wunnecessary-virtual-specifier 2025-08-21 15:17:44 +03:00
example MDEV-36729: ha_example::show_func_example is incorrectly defined 2025-05-29 10:10:52 +10:00
federated Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
federatedx MDEV-36341 UBSAN: FederatedX fill_server runtime error: applying non-zero offset to null pointer 2025-04-07 11:04:53 +02:00
heap Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
innobase MDEV-31892 Server crash upon moving InnoDB table with 2026-01-09 21:15:14 +05:30
maria MDEV-23132 Assertion `trn->locked_tables == 0 && trn->used_instances == 0' failed in trnman_end_trn 2025-12-01 11:40:04 +02:00
mroonga MDEV-34388: Stack overflow on Alpine Linux (postfix) mroonga+asan 2025-05-28 17:07:53 +10:00
myisam MDEV-37505 myisamchk -V crashes 2025-09-04 17:20:02 +02:00
myisammrg Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
oqgraph Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
perfschema Fix clang-21 -Wuninitialized-const-pointer 2025-08-21 14:38:48 +03:00
rocksdb MDEV-34388: Stack overflow on Alpine Linux 2025-05-20 17:27:05 +03:00
sequence MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
sphinx Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
spider MDEV-38368 Spider crash on fake loop detection variables 2025-12-26 17:07:31 +01:00
test_sql_discovery Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00