maria:bb-10.4-MDEV-32308

Last commit made on 2023-10-18
Get this branch:
git clone -b bb-10.4-MDEV-32308 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-MDEV-32308
Repository:
lp:maria

Recent commits

4304264... by Oleksandr "Sanja" Byelkin

MDEV-32308 Server crash on cleanup of non-fully-constructed-due-to-an-error CTE

Check and do not try to access With_element::rec_result on cleanup
if it is not assigned.

19eac14... by hotairballoon-3573 <15198894161@139.com>

MDEV-32142 mariadb-install-db shows warning on missing directory /auth_pam_tool_dir

Without pam compiled there will be no auth_pam_tool_dir, so check this
before attempting something that will error.

Reviewer: Sergei Golubchik / Daniel Black

8f2f8f3... by Xiaotong Niu <email address hidden>

MDEV-26494 Fix buffer overflow of string lib on Arm64

In the hexlo function, the element type of the array hex_lo_digit is not
explicitly declared as signed char, causing elements with a value of -1
to be converted to 255 on Arm64. The problem occurs because "char" is
unsigned by default on Arm64 compiler, but signed on x86 compiler. This
problem can be seen in https://godbolt.org/z/rT775xshj

The above issue causes "use-after-poison" exception in my_mb_wc_filename
function. The code snippet where the error occurred is shown below,
copied from below link.
https://github.com/MariaDB/server/blob/5fc19e71375fb39eb85354321bf852d998aecf81/strings/ctype-utf8.c#L2728

2728 if ((byte1= hexlo(byte1)) >= 0 &&
2729 (byte2= hexlo(byte2)) >= 0)
   {
2731 int byte3= hexlo(s[3]);
      …
   }

At line 2729, when byte2 is 0, which indicates the end of the string s.
(1) On x86, hexlo(0) return -1 and line 2731 is skipped, as expected.
(2) On Arm64, hexlo(0) return 255 and line 2731 is executed, not as
expected, accessing s[3] after the null character of string s, thus
raising the "user-after-poison" error.

The problem was discovered when executing the main.mysqlcheck test.

Signed-off-by: Xiaotong Niu <email address hidden>

e467e8d... by Daniel Black

MDEV-30825 innodb_compression_algorithm=0 (none) increments Innodb_num_pages_page_compression_error

fil_page_compress_low returns 0 for both innodb_compression_algorithm=0
and where there is compression errors. On the two callers to this
function, don't increment the compression errors if the algorithm was
none.

Reviewed by: Marko Mäkelä

ac15141... by Dmitry Shulga <email address hidden>

MDEV-32369: Memory leak when executing PS for query with IN subquery

The memory allocated for an instance of the class Item_direct_ref_to_item
was leaked on second execution of a query run as a prepared statement and
involving conversion of strings with different character sets.

The reason of leaking the memory was caused by the fact that a statement
arena could be already set by the moment the method
Type_std_attributes::agg_item_set_converter() is called.

6f83537... by Sergei Golubchik

MDEV-24283 Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed in ha_partition::handle_ordered_index_scan

ha_partition should not try to search the index
if all partitions were pruned away.

The fix originally by Nayuta Yanagisawa

81c88ab... by Sergei Golubchik

MDEV-28820 MyISAM wrong server status flags

MyISAM tables no longer take transactional metadata locks
unless there already is an active transaction.

f293b2b... by Sergei Golubchik

cleanup

e46ae59... by Sergei Golubchik

MDEV-27523 main.delayed fails with wrong error code or timeout when executed after main.deadlock_ftwrl

don't forget to reset mdl_context.m_deadlock_overweight when
taking the THD out of the cache - the history of previous connections
should not affect the weight in deadlock victim selection

(small cleanup of the test to help the correct merge)

e9b38f6... by Sergei Golubchik

MDEV-25734 mbstream breaks page compression on XFS

try harder to punch holes on xfs, don't rely on its heuristics to do
the right thing