maria:10.5-MDEV-23766

Last commit made on 2021-10-19
Get this branch:
git clone -b 10.5-MDEV-23766 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
10.5-MDEV-23766
Repository:
lp:maria

Recent commits

52f0019... by Sergei Krivonos <email address hidden>

MDEV-23766: moving JSON writer consistency check into Json_writer

e83a76a... by Sergei Krivonos <email address hidden>

potential double log.close() call issue

e7208bd... by Nayuta Yanagisawa

MDEV-26158 SIGSEGV in spider_free_mem from ha_spider::open on INSERT

The server crashes due to passing NULL to spider_free().

In some cases, this == pt_handler_share_handlers[0] at the label
error_get_share in ha_spider::open().

In such cases, to nullify pt_handler_share_handlers[0]->wide_handler
is nothing but to nullify this->wide_handler. We should not do this
before freeing this->wide_handler.

edde908... by Nayuta Yanagisawa

MDEV-26582 SIGSEGV in spider_db_bulk_insert and spider_db_connect and spider_db_before_query, and hang in "End of update loop" / "Reset for next command" query states

Spider accesses a freed connection in ha_spider::end_bulk_insert()
and results in SIGSEGV.

The cause of the bug is that ha_spider::is_bulk_insert_exec_period()
wrongly returns TRUE when the bulk insertion has not yet started.

Spider decides whether it is during the bulk insertion or not by
the value of insert_pos, but the variable is not reset in a case,
and this result in the bug.

18eab4a... by Marko Mäkelä

MDEV-26682 Replication timeouts with XA PREPARE

The purpose of non-exclusive locks in a transaction is to guarantee
that the records covered by those locks must remain in that way until
the transaction is committed. (The purpose of gap locks is to ensure
that a record that was nonexistent will remain that way.)

Once a transaction has reached the XA PREPARE state, the only allowed
further actions are XA ROLLBACK or XA COMMIT. Therefore, it can be
argued that only the exclusive locks that the XA PREPARE transaction
is holding are essential.

Furthermore, InnoDB never preserved explicit locks across server restart.
For XA PREPARE transations, we will only recover implicit exclusive locks
for records that had been modified.

Because of the fact that XA PREPARE followed by a server restart will
cause some locks to be lost, we might as well always release all
non-exclusive locks during the execution of an XA PREPARE statement.

lock_release_on_prepare(): Release non-exclusive locks on XA PREPARE.

trx_prepare(): Invoke lock_release_on_prepare() unless the
isolation level is SERIALIZABLE or this is an internal distributed
transaction with the binlog (not actual XA PREPARE statement).

This has been discussed with Sergei Golubchik and Andrei Elkin.

Reviewed by: Sergei Golubchik

9068020... by Nayuta Yanagisawa

MDEV-26539 SIGSEGV in spider_check_and_set_trx_isolation and I_P_List_iterator from THD::drop_temporary_table (10.5.3 opt only) on ALTER

The server crashes if ALTER TABLE, which accesses physical data
placed at data nodes, is performed on a Spider table.

The cause of the bug is that spider_check_trx_and_get_conn() does
not allocate connections if sql_command == SQLCOM_ALTER_TABLE.
Some ALTER TABLE statements, like ALTER TABLE ... CHECK PARTITION,
access data nodes. So, we need to allocate a new connection before
performing ALTER TABLEs.

052dda6... by Sergei Krivonos <email address hidden>

Made optional Json_writer_object / Json_writer_array consistency check

cf8e78a... by Sergei Krivonos <email address hidden>

Implemented Json_writer_array & Json_writer_object subitems name presence control

df38304... by Alexander Barkov

MDEV-26742 Assertion `field->type_handler() == this' failed in FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item

bd1573b... by Sergei Krivonos

Xcode compatibility update: pcre, mysql-test-run.pl