maria:bb-10.4-MDEV-31130

Last commit made on 2023-05-02
Get this branch:
git clone -b bb-10.4-MDEV-31130 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-MDEV-31130
Repository:
lp:maria

Recent commits

3e033b3... by Rex Johnston

MDEV-31130 INSERT-SELECT with many when/case/if conditions running forever

recursive column definitions in stacked materialized tables causes issues.
detect depth of walk in the item tree and terminate if too deep.

ddcc9d2... by Alexander Barkov

MDEV-31153 New methods Schema::make_item_func_* for REPLACE, SUBSTRING, TRIM

Adding virtual methods to class Schema:

  make_item_func_replace()
  make_item_func_substr()
  make_item_func_trim()

This is a non-functional preparatory change for MDEV-27744.

2e74f9d... by Alexander Barkov

Adding "const" qualifiers to a few trivial Lex_input_string methods

1963a87... by Angelique Sklavounos

MDEV-30221: Move environmental macros to before master-slave
The fix was introduced, along with re-ordering to do other macros that check test environment capabilities before master/slave is set up.

85cc831... by Sergey Petrunia

MDEV-31067: selectivity_from_histogram >1.0 for a DOUBLE_PREC_HB histogram

Variant #2.

When Histogram::point_selectivity() sees that the point value of interest
falls into one bucket, it tries to guess whether the bucket has many
different (unpopular) values or a few popular values. (The number of
rows is fixed, as it's a Height-balanced histogram).
The basis for this guess is the "width" of the value range the bucket
covers. Buckets covering wider value ranges are assumed to contain
values with proportionally lower frequencies.

This is just a [brave] guesswork. For a very narrow bucket, it may
produce an estimate that's larger than total #rows in the bucket
or even in the whole table.

Remove the guesswork and replace it with basic logic: return
either the per-table average selectivity of col=const, or selectivity
of one bucket, whichever is lower.

bc97057... by Sergei Golubchik

MDEV-22756 SQL Error (1364): Field 'DB_ROW_HASH_1' doesn't have a default value

exclude generated columns from the "has default value" check

adbad5e... by Oleg Smirnov

MDEV-31113 Server crashes in store_length / Type_handler_string_result::make_sort_key with DISTINCT and group function

Fix-up for commit 476b24d084e7e717310155bb986eb086d3c1e1a6
  Author: Monty
  Date: Thu Feb 16 14:19:33 2023 +0200
    MDEV-20057 Distinct SUM on CROSS JOIN and grouped returns wrong result
which misses initializing of sorder->suffix_length.
In this commit the initialization is implemented by passing
MY_ZEROFILL flag to the allocation of SORT_FIELD elements

f216644... by Sergei Golubchik

MDEV-31129 build failure with RocksDB, incompatible pointer to integer conversion

FreeBSD 13.2

a959c22... by Oleksandr "Sanja" Byelkin

return accidentally removed in 45d4f6b97b4811b1b7783dcd19526be1dbb196dc comment

6171119... by Oleksandr "Sanja" Byelkin

MDEV-30889: 3 - Item_in_optimizer leak

Keep Item_in_optimizer cache always (but only once) in statement memory.