maria:bb-10.10-mdev-31787

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

Branch merges

Branch information

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

Recent commits

05e5941... by Yuchen Pei <email address hidden>

MDEV-31787 MDEV-26151 Add a test exercising non-0 spider_casual_read

Also:
- clean up spider_check_and_get_casual_read_conn() and
  spider_check_and_set_autocommit()
- remove a couple of commented out code blocks

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>

9cd2989... by Marko Mäkelä

Merge 10.6 into 10.10

88dd50b... by Alexander Barkov

After-merge cleanup for MDEV-27207 + MDEV-31719

Something went wrong during a merge (from 10.5 to 10.6)
of 68403eeda320ad0831563ce09a9c4af1549fe65e
(fixing bugs MDEV-27207 and MDEV-31719).

Originally (in 10.5) the fix was done in_inet6::set() in
plugin/type_inet/sql_type_inet.cc.
In 10.6 this code resides in a different place:
in the method in_fbt::set() of a template class
in sql/sql_type_fixedbin.h.

During the merge:
- the fix did not properly migrate to in_fbt::set()
- the related MTR tests disappeared

This patch fixes in_fbt::set() properly and restores MTR tests.