maria:bb-10.6-todo-4509

Last commit made on 2024-02-19
Get this branch:
git clone -b bb-10.6-todo-4509 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-todo-4509
Repository:
lp:maria

Recent commits

9402be6... by Sergey Petrunia

Trivial fix in my_bitmap.c

1a6364e... by Sergey Petrunia

TODO-4509: Attempt to improve performance for many partitions

In most cases, ha_partition forwards calls to all locked_partitions. It
doesn't make sense to forward some calls for partitions that were pruned
away.
This patch introduces ha_partition::loop_read_partitions and makes these
calls use it:

- ha_partition::extra_opt(HA_EXTRA_KEYREAD)
- ha_partition::extra(HA_EXTRA_KEYREAD)
- ha_partition::extra(HA_EXTRA_NO_KEYREAD)

8860eae... by Monty <email address hidden>

Optimize performance of my_bitmap

This change was triggered to help some MariaDB users with close to
10000 bits in their bitmaps.

- Change underlaying storage to be 64bit instead of 32bit.
  - This reduses number of loops to scan bitmaps.
  - This can cause some bitmaps to be 4 byte large.
- Ensure that all not used top-bits are always 0 (simplifes code as
  the last 64bit storage not anymore a special case).
- Use my_find_first_bit() to find the first set bit which is much faster
  than scanning trough things byte by byte and then bit by bit.

Other things:
- Added a bool to remember if my_bitmap_init() did allocate the bitmap
  array. my_bitmap_free() will only free arrays it did allocate.
  This allowed me to remove setting 'bitmap=0' before calling
  my_bitmap_free() for cases where the bitmap's where allocated externally.
- Added 'universal' asserts to most bitmap functions.
- Change all remaining calls to bitmap_init() to my_bitmap_init().
  - To finish the change from 2014.
- Changed all usage of uint32 when assking bitmap->bitmap to my_bitmap_map.
- Added bitmap_copy_data() for safe copy of external bitmap to my_bitmap.
- Removed const from bitmap_exists_intersection() as this caused casts
  on all usage.
- Extended bitmap-t with test for more bitmap functions.

595f038... by Monty <email address hidden>

Optimize handler_stats_disable() when handler_stats are already disabled

06bf7cd... by Monty <email address hidden>

Have ha_partition iIgnore HA_EXTRA..CHILDREN extra() calls if no myisamrg

Optimization for tables with a lot of partitions

53c6c82... by Marko Mäkelä

MDEV-33464 Crash when innodb_max_undo_log_size is set to innodb_page_size*4294967296

purge_sys_t::truncating_tablespace(): Clamp the
innodb_max_undo_log_size to the maximum number of pages
before converting the result into a 32-bit unsigned integer.

This fixes up commit f8c88d905b44bffe161158309e9acc25ad3691aa (MDEV-33213).

In later major versions, we would use 32-bit unsigned integer here
due to commit ca501ffb04246dcaa1f1d433d916d8436e30602e
and the code would crash also on 64-bit processors.

Reviewed by: Debarun Banerjee

691f923... by Marko Mäkelä

Merge 10.5 into 10.6

b770633... by Marko Mäkelä

Merge 10.4 into 10.5

68d9deb... by Marko Mäkelä

MDEV-33332 SIGSEGV in buf_read_ahead_linear() when bpage is in buf_pool.watch

buf_read_ahead_linear(): If buf_pool.watch_is_sentinel(*bpage),
do not attempt to read the page frame because the pointer would be null
for the elements of buf_pool.watch[].

Hitting this bug requires the use of a non-default value of
innodb_change_buffering.

d86deee... by Marko Mäkelä

Fix GCC 14 -Wcalloc-transposed-args