maria:bb-10.5-MDEV-32583

Last commit made on 2024-05-09
Get this branch:
git clone -b bb-10.5-MDEV-32583 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.5-MDEV-32583
Repository:
lp:maria

Recent commits

c37f1f9... by Rex Johnston

MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing query materialization

RAND() and UUID() are treated differently with respect to subquery
materialization both should be marked as uncacheable, forcing materialization.
Altered Create_func_uuid(_short)::create_builder()

8677472... by He Guohua <email address hidden>

MDEV-31566 Fix buffer overrun of column_json function

The accounting of the limit variable that represents the
amount of space left it the buffer was incorrect.

Also there was 1 or 2 bytes left to write that occured without
the buffer length being checked.

Review: Sanja Byelkin

034abab... by Daniel Black

MDEV-34053 mariadbbackup privilege REPLICA MONITOR issue

MariaDB-backup needs to check for SLAVE MONITOR as that is
what is returned by SHOW GRANTS.

Update test to ensure that warnings about missing privileges
do not occur when the backup is successful.

Reviewer: Andrew Hutchings
Thanks Eugene for reporting the issue.

29c185b... by Sergei Golubchik

test needs to cleanup after itself

938b929... by Sergei Golubchik

don't wait indefinitely for signal handler in --bootstrap

FreeBSD doesn't like it and hangs.

As we don't wait for signal handler, let's disable SIGHUP in bootstrap
too

360a7ff... by Sergei Golubchik

fix tests after 349ca2be7437

.opt files, unlike combinations, accumulate, let's not overuse them

1c425a8... by Sergei Golubchik

MDEV-33727 update test results

followup for 13663cb5c455

6f003b5... by VladislavVaintroub

MDEV-29955 post-fix - add CMake policy CMP0074, so ZLIB_ROOT is not ignored

22d4fbe... by VladislavVaintroub

Define CMake policy list, like it is done in 10.6+

Makes easier to add new policy to the list, and merge to newer versions-

40b3525... by Sergey Petrunia

MDEV-28621: group by optimization incorrectly removing subquery where subject buried in a function

Workaround patch: Do not remove GROUP BY clause when it has
subquer(ies) in it.

remove_redundant_subquery_clauses() removes redundant GROUP BY clause
from queries in form:
  expr IN (SELECT no_aggregates GROUP BY ...)
  expr {CMP} {ALL|ANY|SOME} (SELECT no_aggregates GROUP BY ...)
This hits problems when the GROUP BY clause itself has subquer(y/ies).

This patch is just a workaround: it disables removal of GROUP BY clause
if the clause has one or more subqueries in it.

Tests:
- subselect_elimination.test has all known crashing cases.
- subselect4.result, insert_select.result are updated.
Note that in some cases results of SELECT are changed too (not just
EXPLAINs). These are caused by non-deterministic SQL: when running a
query like:

  x > ANY( SELECT col1 FROM t1 GROUP BY constant_expression)

without removing the GROUP BY, the executor is free to pick the value
of t1.col1 from any row in the GROUP BY group (denote it $COL1_VAL).
Then, it computes x > ANY(SELECT $COL1_VAL).

When running the same query and removing the GROUP BY:

   x > ANY( SELECT col1 FROM t1)

the executor will actually check all rows of t1.