maria:bb-10.6-spetrunia-tmp1

Last commit made on 2023-08-23
Get this branch:
git clone -b bb-10.6-spetrunia-tmp1 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-spetrunia-tmp1
Repository:
lp:maria

Recent commits

e8257c0... by Sergey Petrunia

MDEV-31975: UCASE(varchar_col)=... not handled for partition tables

Enable sargable casefolding rewrite when the column is a part of
partitioning expression.

b1b7cfe... by Sergey Petrunia

MDEV-31946: UCASE(varchar_col)=... not handled for UPDATE/DELETE

Add the rewrite for UPDATE/DELETE.

d730ea2... by Sergey Petrunia

MDEV-31496: Make optimizer handle UCASE(varchar_col)=...

(Review input addressed)
If the properties of the used collation allow, do the following
equivalent rewrites:

1. UPPER(key_col)=expr -> key_col=expr
   expr=UPPER(key_col) -> expr=key_col
   (also rewrite both sides of the equality at the same time)

2. UPPER(key_col) IN (constant-list) -> key_col IN (constant-list)

- Mark utf8mb{3,4}_general_ci as collations that allow this.
- Add optimizer_switch='sargable_casefold=ON' to control this.
  (OFF by default in this patch)
- Cover the rewrite in Optimizer Trace, rewrite name is
  "sargable_casefold_removal".

2855bc5... by Marko Mäkelä

Merge 10.5 into 10.6

bd7908e... by Marko Mäkelä

MDEV-31568 InnoDB protection against dual processes accessing data insufficient

fil_node_open_file_low(): Always acquire an advisory lock on
the system tablespace. Originally, we already did this in
SysTablespace::open_file(), but SysTablespace::open_or_create()
would release those locks when it is closing the file handles.

This is a 10.5+ specific follow up to
commit 0ee1082bd2e7e7049c4f0e686bad53cf7ba053ab (MDEV-28495).

Thanks to Daniel Black for verifying this bug.

5b62644... by Marko Mäkelä

MDEV-31621 Remove ibuf_read_merge_pages() call from ibuf_insert_low()

When InnoDB attempts to buffer a change operation of a secondary index
leaf page (to insert, delete-mark or remove a record) and the
change buffer is too large, InnoDB used to trigger a change buffer merge
that could affect any tables. This could lead to huge variance in
system throughput and potentially unpredictable crashes, in case the
change buffer was corrupted and a crash occurred while attempting to
merge changes to a table that is not being accessed by the current
SQL statement.

ibuf_insert_low(): Simply return DB_STRONG_FAIL when the maximum size
of the change buffer is exceeded.

ibuf_contract_after_insert(): Remove.

ibuf_get_merge_page_nos_func(): Remove a constant parameter.
The function ibuf_contract() will be our only caller, during
shutdown with innodb_fast_shutdown=0.

46b79b8... by Sergei Golubchik

MDEV-30084 Shutdown hangs in some tests

debug-only issue. the test was doing

  set debug_sync='now SIGNAL go3';
  ...
  set debug_sync='reset';

which translated into

  add "go3" to the hash of active signals
  pthread_broadcast to wake up waiting threads
  ...
  clear the hash of active signals

as a result a waiting thread was awoken, but the hash was emptied
before the thread checked if its signal was in the hash. so the
thread didn't find its signal and went back to sleep.

let's wait until the awoken thread has completely finished
disconnecting and was added to the thread cache.

f6ecadf... by Sergei Golubchik

fix ASAN+safemalloc builds

debug_sync refactoring introduced a statically instantiated object
debug_sync_global of the structure st_debug_sync_globals.
st_debug_sync_globals includes Hash_set<> which allocates memory
in the constructor. sf_malloc() calls _my_thread_var()->dbug_id
which is pthread_getspecific(THR_KEY_mysys), and THR_KEY_mysys is 0
before pthread_key_create(). pthread_getspecific(0) returns a valid
pointer, not EINVAL. And safemalloc dereferences it.

let's statically initialize THR_KEY_mysys to -1, this makes
pthread_getspecific(THR_KEY_mysys) to fail before pthread_key_create()
is called.

followup for 8885225de66

af38a8b... by Sergei Golubchik

cleanup: move Type_collection_fbt<> template out of Type_handler_fbt<>

c09b158... by Sergei Golubchik

cleanup: remove FixedBinTypeBundle

now the main class is the Type_handler_fbt.

It contains everything and generates objects of all other classes as
needed.