maria:bb-10.4-midenok-MDEV-25644

Last commit made on 2023-07-07
Get this branch:
git clone -b bb-10.4-midenok-MDEV-25644 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-midenok-MDEV-25644
Repository:
lp:maria

Recent commits

53a177a... by midenok

MDEV-25644 UPDATE not working properly on transaction precise system versioned table

First UPDATE under START TRANSACTION does nothing (nstate= nstate),
but anyway generates history. Since update vector is empty we get into
(!uvect->n_fields) branch which only adds history row, but does not do
update. After that we get current row with wrong (old) row_start value
and because of that second UPDATE tries to insert history row again
because it sees trx->id != row_start which is the guard to avoid
inserting multiple trx_id-based history rows under same transaction
(because we have same trx_id and we get duplicate error and this bug
demostrates that). But this try anyway fails because PK is based on
row_end which is constant under same transaction, so PK didn't change.

The fix moves vers_make_update() to an earlier stage of
calc_row_difference(). Therefore it prepares update vector before
(!uvect->n_fields) check and never gets into that branch, hence no
need to handle versioning inside that condition anymore.

Now trx->id and row_start are equal after first UPDATE and we don't
try to insert second history row.

== Cleanups and improvements ==

ha_innobase::update_row():

vers_set_fields and vers_ins_row are cleaned up into direct condition
check. SQLCOM_ALTER_TABLE check now is not used as this is dead code,
assertion is done instead.

upd_node->is_delete is set in calc_row_difference() just to keep
versioning code as much in one place as possible. vers_make_delete()
is still located in row_update_for_mysql() as this is required for
ha_innodbase::delete_row() as well.

row_ins_duplicate_error_in_clust():

Restrict DB_FOREIGN_DUPLICATE_KEY to the better conditions.
VERSIONED_DELETE is used specifically to help lower stack to
understand what caused current insert. Related to MDEV-29813.

9856bb4... by Kristian Nielsen

MDEV-31602: Race on rpl_global_gtid_slave_state when starting IO thread

Fix that rpl_slave_state::load() was calling rpl_slave_state::update() without
holding LOCK_slave_state.

Reviewed-by: Monty <email address hidden>
Signed-off-by: Kristian Nielsen <email address hidden>

922db06... by Yuchen Pei <email address hidden>

MDEV-31421 Fix spider test cleanup

This fixes mdev_26541.test, and the new clean_up_spider.inc will be
useful for other tests where part of deinit_spider does not apply,
e.g. those testing spider initialisation only.

ea386c9... by Vicențiu Ciorbaru

Fix use of uninitialized variable

The original code generated a warning in gcc 13.1

5c81c50... by Sergei Golubchik

MDEV-31214 Recursive CTE execution is interrupted without errors or warnings

22e5a5f... by Sergei Golubchik

generalize ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT

make it "query reached <some limit> result may be incomplete"

d458136... by Sergei Golubchik

cleanup: ER_QUERY_TIMEOUT -> ER_UNUSED_1

also make sure all unused error messages are "You should never see it"
and have no translations

b808848... by Marko Mäkelä

MDEV-19216 Assertion ...SYS_FOREIGN failed in btr_node_ptr_max_size

btr_node_ptr_max_size(): Handle BINARY(0) and VARBINARY(0)
as special cases, similar to CHAR(0) and VARCHAR(0).

0105220... by Marko Mäkelä

Remove tests that duplicate innodb.max_record_size

77a229c... by Anel Husakovic <email address hidden>

MDEV-31358: Update description for MariaDB debian/rpm packages

Reviewer: <email address hidden>