maria:bb-10.5-MDEV-19520

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

Branch merges

Branch information

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

Recent commits

4aaa61d... by Rex Johnston

MDEV-19520 pushdown_from_having_into_where() not calling fix_fields() correctly

fix_fields() called in pushdown_from_having_into_where() assuming that the
item is immutable.
normalize_cond() extended to include (not f)=>(f == 0) to avoid the
issue where NOT(field) was being transformed to (field == 0) during
this fix_fields call.

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.

ec6aa9a... by Monty <email address hidden>

MDEV-34055 Assertion '...' failure or corruption errors upon REPAIR on Aria tables

The problem was two fold:
- REPAIR TABLE t1 USE_FRM did not work for transactional
  Aria tables (Table was thought to be repaired, which it was not) which
  caused issues in later usage of the table.
- When swapping tmp_data file to data file, sort_info files where not
  updated. This caused problems if there was several unique keys and
  there was a duplicate for the second key.

4bc1860... by Galina Shalygina <email address hidden>

MDEV-23878 Wrong result with semi-join and splittable derived table

Due to this bug a wrong result might be expected from queries with
an IN subquery predicate in the WHERE clause and a derived table in the
FROM clause to which split optimization could be applied.

The function JOIN::fix_all_splittings_in_plan() used the value of the
bitmap JOIN::sjm_lookup_tables() such as it had been left after the
search for the best plan for the select containing the splittable
derived table. That value could not be guaranteed to be correct. So the
recalculation of this bitmap is needed to exclude the plans with key
accesses from SJM lookup tables.

Approved by Igor Babaev <email address hidden>