maria:bb-10.4-MDEV-32320

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

Branch merges

Branch information

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

Recent commits

1a5718a... by Sergey Petrunia

MDEV-32320: Server crashes at TABLE::add_tmp_key

The code inside Item_subselect::fix_fields() could fail to check
that left expression had an Item_row, like this:

  (('x', 1.0) ,1) IN (SELECT 'x', 1.23 FROM ... UNION ...)

In order to hit the failure, the first SELECT of the subquery had
to be a degenerate no-tables select. In this case, execution will
not enter into Item_in_subselect::create_row_in_to_exists_cond()
and will not check if left_expr is composed of scalars.

But the subquery is a UNION so as a whole it is not degenerate.
We try to create an expression cache for the subquery.
We create a temp.table from left_expr columns. No field is created
for the Item_row. Then, we crash when trying to add an index over a
non-existent field.

Fixed by moving the left_expr cardinality check to a point in
check_and_do_in_subquery_rewrites() which gets executed for all
cases.
It's better to make the check early so we don't have to care about
subquery rewrite code hitting Item_row in left_expr.

f8e560e... by Sergey Petrunia

MDEV-32324: Server crashes inside filesort at my_decimal::to_binary

A subquery in form "(SELECT not_null_value LIMIT 1 OFFSET 1)" will
produce no rows which will translate into scalar SQL NULL value.

The code Item_singlerow_subselect::fix_length_and_dec() failed to
take LIMIT clause into account and set item_subselect->maybe_null=0.

This caused a crash in filesort() code when it got a NULL value for a
not nullable item.

bae3877... by Sergey Petrunia

MDEV-32301: Server crashes at Arg_comparator::compare_row

In Item_bool_rowready_func2::build_clone(): if we're setting
  clone->cmp.comparators=0
also set
  const_item_cache=0
as the Item is currently in a state where one cannot compute it.

3f1a256... by Marko Mäkelä

MDEV-31890: Remove COMPILE_FLAGS

The cmake configuration step is single-threaded and already consuming
too much time. We should not make it worse by adding invocations like
MY_CHECK_CXX_COMPILER_FLAG().

Let us prefer something that works on any supported version
of GCC (4.8.5 or later) or clang, as well as recent versions
of the Intel C compiler.

This replaces commit 1fde785315ec6d575d0cd5c3e33d53a5d83e3e00

702dc2e... by Sergei Golubchik

MDEV-32024 disable failing test

3e2b129... by Sergei Golubchik

MDEV-30658 fix failing test

followup for 96ae37abc51

69089c7... by Sergei Golubchik

fix groonga to compile with -Werror=enum-int-mismatch

gcc 13.2.1

2556fe1... by Yuchen Pei <email address hidden>

MDEV-31996 Create connection on demand in spider_db_delete_all_rows

When spider_db_delete_all_rows() is called, the supplied spider->conns
may have already been freed. The existing mechanism has spider_trx own
the connections in trx_conn_hash and it may free a conn during the
cleanup after a query. When running a delete query and if the table is
in the table cache, ha_spider::open() would not be called which would
recreate the conn. So we recreate the conn when necessary during
delete by calling spider_check_trx_and_get_conn().

We also reduce code duplication as delete_all_rows() and truncate()
has almost identical code, and there's no need to assign
wide_handler->sql_command in these functions because it has already
been correctly assigned.

194e4f2... by VladislavVaintroub

Merge branch 'bb-10.4-wlad' of https://github.com/mariadb/server into bb-10.4-wlad

f197f9a... by VladislavVaintroub

MDEV-32387 Windows - mtr output on is messed up with large MTR_PARALLEL.

Windows C runtime does not implement line buffering mode for stdio.

This sometimes makes output from different tests interleaved in MTR
MTR relies on this buffering (lines won't output until "\n") to correctly
work in parallel scenarios.

Implement do-it-yourself line buffering on Windows, to workaround.