maria:bb-10.10-mdev-32157

Last commit made on 2023-09-15
Get this branch:
git clone -b bb-10.10-mdev-32157 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.10-mdev-32157
Repository:
lp:maria

Recent commits

9f4840f... by Yuchen Pei <email address hidden>

MDEV-32157 MDEV-28856 Spider: Tests, documentation, small fixes and cleanups

Removed some redundant hint related string literals from
spd_db_conn.cc

Clean up SPIDER_PARAM_*_[CHAR]LEN[S]

Adding tests covering monitoring_kind=2. What it does is that it reads
from mysql.spider_link_mon_servers with matching db_name, table_name,
link_id, and does not do anything about that...

How monitoring_* can be useful: in the deprecated spider high
availability feature, when one remote fails, spider will try another
remote, which apparently makes use of these table parameters.

A test covering the query_cache_sync table param. Some further tests
on some spider table params.

Wrapper should be case insensitive.

Code documentation on spider priority binary tree.

Add an assertion that static_key_cardinality is always -1. All tests
pass still

55ed99b... by Yuchen Pei <email address hidden>

MDEV-32157 MDEV-28856 Spider: drop server in tests

This helps eliminate "server exists" failures

Also, spider/bugfix.mdev_29676, when enabled after MDEV-29525 is
pushed will fail because we have not --recorded the result. But the
failure will only emerge when working on MDEV-31138 where we manually
re-enable this test, so let's worry about that then.

08f50df... by Yuchen Pei <email address hidden>

MDEV-31117 Fix spider connection info parsing

Spider connection string is a comma-separated parameter definitions,
where each definition is of the form "<param_title> <param_value>",
where <param_value> is quote delimited on both ends, with backslashes
acting as an escaping prefix.

Despite the simple syntax, the existing spider connection string
parser was poorly-written, complex, hard to reason and error-prone,
causing issues like the one described in MDEV-31117. For example it
treated param title the same way as param value when assigning, and
have nonsensical fields like delim_title_len and delim_title.

Thus as part of the bugfix, we clean up the spider comment connection
string parsing, including:

- Factoring out some code from the parsing function
- Simplify the struct `st_spider_param_string_parse`
- And any necessary changes caused by the above changes

0b6de3d... by Sergei Golubchik

avoid "'sh' is not recognized..." error in mtr on windows

cb384d0... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-32008 auto_increment value on table increments by one after restart

- This issue caused by commit 4700f2ac70f8c79f2ac1968b6b59d18716f492bf(MDEV-30796)
During bulk insert operation, InnoDB wrongly stores the next autoincrement
value as current autoincrement value. So update the current autoincrement
value rather than next auto increment value.

cd5808e... by Ruoyu Zhong

MDEV-31963 Fix libfmt usage in SFORMAT

`fmt::detail::make_arg` does not accept temporaries. Make it happy by
storing the format arg values in a temporary array first.

Signed-off-by: Ruoyu Zhong <email address hidden>

f4cec36... by Ruoyu Zhong

MDEV-31963 cmake: fix libfmt usage

`fmt::detail::make_arg` does not accept temporaries, so the code snippet
checking system libfmt needs to be adjusted.

Signed-off-by: Ruoyu Zhong <email address hidden>

bf3b787... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-31835 Remove unnecessary extra HA_EXTRA_IGNORE_INSERT call

- This commit is different from 10.6 commit c438284863db2ccba8a04437c941a5c8a2d9225b.
Due to Commit 045757af4c301757ba449269351cc27b1691a7d6 (MDEV-24621),
InnoDB does buffer and pre-sort the records for each index, and build
the indexes one page at a time.

Multiple large insert ignore statment aborts the server during bulk
insert operation. Problem is that InnoDB merge record exceeds
the page size. To avoid this scenario, InnoDB should catch
too big record while buffering the insert operation itself.

row_merge_buf_encode(): returns length of the encoded index record

row_merge_buf_write(): Catches the DB_TOO_BIG_RECORD earlier and
returns error

afc64ea... by Alexander Barkov

MDEV-31719 Wrong result of: WHERE inet6_column IN ('','::1')

The problem was earlier fixed by a patch for MDEV-27207
  68403eeda320ad0831563ce09a9c4af1549fe65e
and an additional cleanup patch for MDEV-27207
  88dd50b80ad9624d05b72751fd6e4a2cfdb6a3fe
The above patches added MTR tests for INET6.

Now adding UUID specific MTR tests only.

8aaacb5... by Sergey Petrunia

MDEV-31432 tmp_table field accessed after free

Before this patch, the code in Item_field::print() used
this convention (described in sql_explain.h:ExplainDataStructureLifetime):

- By default, the table that Item_field refers to is accessible.
- ANALYZE and SHOW {EXPLAIN|ANALYZE} may print Items after some
  temporary tables have been dropped. They use
  QT_DONT_ACCESS_TMP_TABLES flag. When it is ON, Item_field::print
  will not access the table it refers to, if it is a temp.table

The bug was that EXPLAIN statement also may compute subqueries (depending
on subquery context and @@expensive_subquery_limit setting). After the
computation, the subquery calls JOIN::cleanup(true) which drops some of
its temporary tables. Calling Item_field::print() that refer to such table
will cause an access to free'd memory.

In this patch, we take into account that query optimization can compute
a subquery and discard its temporary tables. Item_field::print() now
assumes that any temporary table might have already been dropped.
This means QT_DONT_ACCESS_TMP_TABLES flag is not needed - we imply it is
always present.

But we also make one exception: derived tables are not freed in
JOIN::cleanup() call. They are freed later in close_thread_tables(),
at the same time when regular tables are closed.
Because of that, Item_field::print may assume that temp.tables
representing derived tables are available.

Initial patch by: Rex Jonston
Reviewed by: Monty <email address hidden>