maria:bb-10.4-ycp-mdev-29963

Last commit made on 2023-10-13
Get this branch:
git clone -b bb-10.4-ycp-mdev-29963 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-ycp-mdev-29963
Repository:
lp:maria

Recent commits

8b5548f... by Yuchen Pei <email address hidden>

MDEV-29963 MDEV-31357 Spider should clear its lock lists when locking fails

Spider populates its lock lists (a hash) in store_lock(), and normally
clears them in the actual lock_tables(). However, if lock_tables()
fails, there's no reset_lock() method for storage engine handlers,
which can cause bad things to happen. For example, if one of the table
involved is dropped and recreated, or simply TRUNCATEd, when executing
LOCK TABLES again, the lock lists would be queried again in
store_lock(), which could cause access to freed space associated with
the dropped table.

0a9fd54... by Yuchen Pei <email address hidden>

MDEV-26247 Re-implement spider gbh query rewrite of tables

Spider GBH's query rewrite of table joins is overly complex and
error-prone. We replace it with something closer to what
dbug_print() (more specifically, print_join()) does, but catered to
spider.

More specifically, we replace the body of
spider_db_mbase_util::append_from_and_tables() with a call to
spider_db_mbase_util::append_join(), and remove downstream append_X
functions.

We make it handle const tables by rewriting them as (select 1). This
fixes the main issue in MDEV-26247.

We also ban semijoin from spider gbh, which fixes MDEV-31645 and
MDEV-30392, as semi-join is an "internal" join, and "semi join" does
not parse, and it is different from "join" in that it deduplicates the
right hand side

Not all queries passed to a group by handler are valid (MDEV-32273),
for example, a join on expr may refer outer fields not in the current
context. We detect this during the handler creation when walking the
join. See also gbh_outer_fields_in_join.test.

It also skips eliminated tables, which fixes MDEV-26193.

70cd34f... by Yuchen Pei <email address hidden>

MDEV-26247 clean up spider_group_by_handler::init_scan()

8b9524a... by Yuchen Pei <email address hidden>

MDEV-26247 Clean up spider_fields

Spider gbh query rewrite should get table for fields in a simple way.
Add a method spider_fields::find_table that searches its table holders
to find table for a given field. This way we will be able to get rid
of the first pass during the gbh creation where field_chains and
field_holders are created.

We also check that the field belongs to a spider table while walking
through the query, so we could remove
all_query_fields_are_query_table_members(). However, this requires an
earlier creation of the table_holder so that tables are added before
checking. We do that, and in doing so, also decouple table_holder and
spider_fields

Remove unused methods and fields. Add comments.

1180d58... by Yuchen Pei <email address hidden>

MDEV-26247 Remove some unused spider methods

Two methods from spider_fields. There are probably more of these
conn_holder related methods that can be removed

reappend_tables_part()
reappend_tables()

5c6fcee... by Yuchen Pei <email address hidden>

MDEV-28998 remove a known reference to a SPIDER_CONN when it is freed

8660e2d... by Julius Goryavsky <email address hidden>

MDEV-29893: SST fails when having datadir set to a symlink

SST for mariabackup may not destroy old files if datadir or
other working directory is declared as a symlink due to the lack
of the "-L" option among the find utility options, similarly SST
for rsync in some cases may not transfer data directories if they
are created as symlinks. This fix adds the missing option and
generally unifies the work with find utility options to avoid
failures in the interpretation of directories and regular
expressions.

358209d... by Ian Gilfillan <email address hidden>

Update innochecksum man page

4045ead... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-32337 Assertion `pos < table->n_def' failed in dict_table_get_nth_col

While checking for altered column in foreign key constraints,
InnoDB fails to ignore virtual columns. This issue caused
by commit 5f09b53bdb4e973e7c7ec2c53a24c98321223f98(MDEV-31086).

a2312b6... by THIRUNARAYANAN BALATHANDAYUTHAPANI

MDEV-32017 Auto-increment no longer works for explicit FTS_DOC_ID

- InnoDB should avoid the sync commit operation when
there is nothing in fulltext cache. This is caused by
commit 1248fe727784bb6be73f70163353cf8457cfde69 (MDEV-27582)