maria:bb-10.9-MDEV-30100

Last commit made on 2023-08-04
Get this branch:
git clone -b bb-10.9-MDEV-30100 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.9-MDEV-30100
Repository:
lp:maria

Recent commits

c3ebaba... by Marko Mäkelä

Merge

1a1daf3... by Marko Mäkelä

MDEV-30100: Assertion purge_sys.tail.trx_no <= purge_sys.rseg->last_trx_no()

trx_write_nothing(): A special case of transaction "commit" when
the transaction was actually rolled back or there is no undo log.
In this case, we only need to change the undo log header state to
TRX_UNDO_CACHED and move the undo log from rseg->undo_list to
rseg->undo_cached for fast reuse.

trx_write_serialisation_history(): If there is no undo log,
invoke trx_write_nothing() and trx_sys.assign_new_trx_no(trx).
The latter is needed so that in the test innodb.instant_alter
everything will be purged as expected.

c9e3ac3... by Marko Mäkelä

squash! 4058381b893d2945d95f1139eefb4febbb479aaa

trx_write_serialisation_history(): Move some code from
trx_purge_add_undo_to_history().

0e3b98a... by Marko Mäkelä

MDEV-30100 preparation: Simplify InnoDB transaction commit further

trx_commit_complete_for_mysql(): Remove some conditions.
We will rely on trx_flush_log_if_needed().

trx_t::must_flush_log_later: Remove. trx_commit_complete_for_mysql()
no longer checks for this.

trx_flush_log_if_needed_low(): Renamed to trx_flush_log_if_needed().
Assert that innodb_flush_log_at_trx_commit!=0 was checked by
the caller and that the transaction is not in XA PREPARE state.

trx_prepare(): Invoke log_write_up_to() directly if needed.

4058381... by Marko Mäkelä

MDEV-30100 preparation: Simplify InnoDB transaction commit

trx_commit_cleanup(): Clean up any temporary undo log.
Replaces trx_undo_commit_cleanup() and trx_undo_seg_free().

trx_write_serialisation_history(): Commit the mini-transaction.
Do not touch temporary undo logs. Assume that a persistent rollback
segment has been assigned.

trx_serialise(): Merged into trx_write_serialisation_history().

trx_t::commit_low(): Correct some comments and assertions.

trx_t::commit_persist(): Only invoke commit_low() on a mini-transaction
if the persistent state needs to change.

34a8e78... by Oleksandr "Sanja" Byelkin

Merge branch '10.6' into 10.9

5ea5291... by Oleksandr "Sanja" Byelkin

Merge branch '10.5' into 10.6

a89527e... by Marko Mäkelä

MDEV-31827 InnoDB multi-batch recovery stops prematurely

recv_scan_log(): On recv_sys_t::PREMATURE_EOF, keep reading more log
if recv_sys.lsn < recv_sys.scanned_lsn.

recv_recovery_from_checkpoint_start(): Add a safety check to abort
crash recovery if recv_sys.lsn is not recv_sys.scanned_lsn.

This fixes a serious database corruption bug that was introduced by
commit 2f9e264781f702b8da1ed418ac9f4f5e8f8aa843 (MDEV-29911).

61acb43... by Sergei Golubchik

MDEV-31822 ALTER TABLE ENGINE=x started failing instead of producing warning on unsupported TRANSACTIONAL=1

make TRANSACTIONAL table option behave similar to other engine-defined
table options. If the engine doesn't suport it:
* if specified expicitly in CREATE or ALTER - it's ER_UNKNOWN_OPTION
* an error or a warning depending on sql_mode IGNORE_BAD_TABLE_OPTIONS
* in ALTER TABLE from the engine that suppors it to the engine that
  doesn't - silently preserved (no warning)
* it is commented out in SHOW CREATE unless IGNORE_BAD_TABLE_OPTIONS

da09ae0... by Sergei Golubchik

MDEV-18114 Foreign Key Constraint actions don't affect Virtual Column

* invoke check_expression() for all vcol_info's in
  mysql_prepare_create_table() to check for FK CASCADE
* also check for SET NULL and SET DEFAULT
* to check against existing FKs when a vcol is added in ALTER TABLE,
  old FKs must be added to the new_key_list just like other indexes are
* check columns recursively, if vcol1 references vcol2,
  flags of vcol2 must be taken into account
* remove check_table_name_processor(), put that logic under
  check_vcol_func_processor() to avoid walking the tree twice