maria:bb-11.1-mdev-29502

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

Branch merges

Branch information

Name:
bb-11.1-mdev-29502
Repository:
lp:maria

Recent commits

56501c1... by Yuchen Pei <email address hidden>

MDEV-29502 Fix some issues with spider direct aggregate

The direct aggregate mechanism sems to be only intended to work when
otherwise a full table scan query will be executed from the spider
node and the aggregation done at the spider node too. Typically this
happens in sub_select(). In the test spider.direct_aggregate_part
direct aggregate allows to send COUNT statements directly to the data
nodes and adds up the results at the spider node, instead of iterating
over the rows one by one at the spider node.

By contrast, the group by handler (GBH) typically sends aggregated
queries directly to data nodes, in which case DA does not improve the
situation here.

That is why we should fix it by disabling DA when GBH is used.

There are other reasons supporting this change. First, the creation of
GBH results in a call to change_to_use_tmp_fields() (as opposed to
setup_copy_fields()) which causes the spider DA function
spider_db_fetch_for_item_sum_funcs() to work on wrong items. Second,
the spider DA function only calls direct_add() on the items, and the
follow-up add() needs to be called by the sql layer code. In
do_select(), after executing the query with the GBH, it seems that the
required add() would not necessarily be called.

Disabling DA when GBH is used does fix the bug. There are a few
other things included in this commit to improve the situation with
spider DA:

1. Add a session variable that allows user to disable DA completely,
this will help as a temporary measure if/when further bugs with DA
emerge.

2. Move the increment of direct_aggregate_count to the spider DA
function. Currently this is done in rather bizarre and random
locations.

3. Fix the spider_db_mbase_row creation so that the last of its row
field (sentinel) is NULL. The code is already doing a null check, but
somehow the sentinel field is on an invalid address, causing the
segfaults. With a correct implementation of the row creation, we can
avoid such segfaults.

e4393d0... by Yuchen Pei <email address hidden>

MDEV-31673 MDEV-29502 Remove spider_db_handler::need_lock_before_set_sql_for_exec

This function trivially returns false

e6ec2b3... by Oleksandr "Sanja" Byelkin

Merge branch '11.1' into mariadb-11.1.2

676a913... by Daniel Bartholomew <email address hidden>

bump the VERSION

9bc25d9... by Sergei Golubchik

update results for ps2 mode

don't use ps2 mode for selects with side effects

22d3ab5... by Oleksandr "Sanja" Byelkin

Merge branch '11.0' into 11.1

70905bc... by Oleksandr "Sanja" Byelkin

Merge branch '10.11' into 11.0

7875294... by Oleksandr "Sanja" Byelkin

fix of 32bit results after merge

2f0efad... by Oleksandr "Sanja" Byelkin

Merge branch '11.0' into 11.1

adf84c8... by Oleksandr "Sanja" Byelkin

Merge branch '10.11' into 11.0