maria:bb-11.2-midenok-MDEV-4991

Last commit made on 2023-06-13
Get this branch:
git clone -b bb-11.2-midenok-MDEV-4991 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.2-midenok-MDEV-4991
Repository:
lp:maria

Recent commits

4cb3383... by midenok

Fix

8ac94f8... by midenok

MDEV-4991 GTID binlog indexing

In-memory cache for binlog position -> GTID state used by SQL function
binlog_gtid_pos(). The cache is growing when events are written to
binlog file. Configured by (1 is default value):

  set @@global.binlog_gtid_pos_cache= N;

N = 0 means no caching is done, the existing cache will be deleted on
FLUSH BINARY LOGS.

N > 0 means keep cache for N last binary log files. On FLUSH BINARY
LOGS the cache is rotated according to current binlog_gtid_pos_cache
value.

The cache is done via GTID array in chronological order and hash
mapping event offsets to the index of last GTID. gtid_state->load() in
gtid_state_from_pos() loads then this array up the mapped index and
keeps only the last GTIDs per each domain (that's how it works
originally).

To indicate "no GTIDs" state hash stores
SIZE_T_MAX. gtid_state_from_pos() returns empty string for that and
NULL for error state.

Testing is done in binlog_hash.test which can compare results of cache
and non-cached algorithms via combinations cache_off/cache_on.

Debug tracing can be used to check cache hits/misses as well as hash
rotation:

  mtr --mysqld=--debug=d,binlog:o,/tmp/b.log binlog_hash,cache_on

39fba46... by midenok

Vanilla cleanup

main, rpl suites pass

907bc68... by Sergei Golubchik

Merge branch '11.1' into 11.2

3883eb6... by Marko Mäkelä

Merge 11.0 into 11.1

d85a135... by Marko Mäkelä

Merge mariadb-11.1.1 into 11.1

5fb2c03... by Marko Mäkelä

Merge 10.11 into 11.0

cb9d97e... by Marko Mäkelä

Merge mariadb-11.0.2 into 11.0

56bcb2b... by Marko Mäkelä

Merge mariadb-10.11.4 into 10.11

5d7b957... by Marko Mäkelä

Merge 10.10 into 10.11