summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* DBUG_ASSERT(flags != Gtid_log_event::FL_START_ALTER_E1...) in ↵preview-10.8-MDEV-11675-rpl-lag-free-alterAndrei2022-01-191-0/+2
| | | | | | | | | THD::set_binlog_flags_for_alter is fixed to reset binlog_cache_mngr::gtid_flags3 in the error return from write_bin_log() of write_bin_log_start_alter(). In other error cases gtid_flags3 has been reset correctly for any flag value.
* MDEV-26887 Assertion (longlong) thd->status_var.local_memory_used >= 0Andrei2022-01-182-2/+8
| | | | | | | | Can not apply to slave worker thread because of temporary table pool that is shared by the worker pool. A table can be opened by one thread and closed by another one, or not at all. Hence the slave worker thread has to get exempted from the assert.
* MDEV-27365 this commit covers ALTER sequenceAndrei2022-01-183-3/+5
| | | | This is 2nd amendment commit that covers ALTER.
* MDEV-19555 assert Diagnostics_area::sql_errno() in ha_rollback_transAndrei2022-01-181-1/+2
| | | | | Fixed the assert to restore pre-refactoring condition for calling set_error() equivalent.
* Corrects the replication alter state in "special" goto-end_inplace branchesAndrei2022-01-171-5/+23
| | | | | | | | | | | Two mysql_alter_table execution branches missed to invoke write_bin_log_start_alter and wait_for_master prior to process_master_state. This is corrected to indentify the need and call them inside process_master_state. As these branches are fast thanks to the goto, so calling the two functions at the receiving end of the goto is fine for performance as well.
* MDEV-11675. Corrects a format specifirier for a warning of the main patch.Andrei2022-01-171-1/+1
|
* Amendment to 9fcb5c5d2f to improve an introduced log_warning.Andrei2022-01-171-5/+6
|
* FixedAndrei2022-01-171-1/+2
| | | | | | | | | | Assertion `rgi->gtid_ev_flags_extra & Gtid_log_event::FL_COMMIT_ALTER_E1' that unexectedly met RA which still was harmless. Instead of the assert arg extending RA execution gets cut short into binlogging, so the original assert indeed must not see RA coming it anymore.
* MDEV-27365 CREATE-or-REPLACE bilogged without DDL flagAndrei2022-01-176-12/+12
| | | | | | | | Former commit did not fix a use case of repeated CoR (added to the test file now). Also the former fixes are refactored to cover two use cases with one code branch change (in implicit commit).
* MDEV-27511 Assertion `rgi->gtid_ev_flags_extra & ↵Andrei2022-01-143-3/+49
| | | | | | | | | | Gtid_log_event::FL_COMMIT_ALTER_E1' failed in write_bin_log_start_alter The assert was caused by lack of proper cleanup of the sequential slave's execution context, enriched by MDEV-11675 2 phase loggable ALTER. Fixed to conduct an explicit cleanup in non-parallel execution.
* MDEV-27365 CREATE-or-REPLACE SEQUENCE is binlogged without DDL flagAndrei2022-01-143-3/+46
| | | | | | | | | | | | | | CREATE-OR-REPLACE SEQUENCE is not logged with Gtid event DDL flag which affects its slave parallel execution. Unlike other DDL:s it can occur in concurrent execution with following transactions which can lead to various errors, including asserts like (mdl_request->type != MDL_INTENTION_EXCLUSIVE && mdl_request->type != MDL_EXCLUSIVE) || !(get_thd()->rgi_slave && get_thd()->rgi_slave->is_parallel_exec && lock->check_if_conflicting_replication_locks(this) in MDL_context::acquire_lock. Fixed to wrap internal statement level commit with save- and-restore of TRANS_THD::m_unsafe_rollback_flags.
* This commit converts an assert to an errorAndrei2022-01-132-2/+30
| | | | | | | | | | | | | | The assert was caused by unexpected by the slave applier appearance of a temporary table that shadowed the regular one for START ALTER phase. This situation however is not really a replication fault and can occur practically 'cos of misconfiguration that would made the master and slave table types diverge in the temporary attribute sense. Also a warning is added to catch cleared errors of bin-logged queries such as CREATE-or-REPLACE.
* MDEV-27471 is fixed the same way as earlier MDEV-27349.Andrei2022-01-121-0/+1
|
* MDEV-27349 ASAN use-after-poison in Query_log_eventAndrei Elkin2022-01-031-0/+1
| | | | | | | | | | The poisoning comaplaint was caused by that Rollback ALTER does not assign anything to its THD::lex::sql_command, so it found the value from a previous event and 'cos it was not ALTER, an inmpropriate branch of ctor was attempted to be executed. Fixed with forcing THD::lex::sql_command to denote ALTER indeed.
* Corrected "OPTIMIZE" commit and refined an MDL assertAndrei2021-12-212-2/+3
| | | | | | | | | | Binlogging temporary switch-off gets now checked instead of a permanent switch-off, 'cos the latter leads to an assert in slave skip binlogging setups. MDL assert was not fully ready to accept possibility of concurrent erroring out MDL and later gtid ordered SA. That got fixed.
* Corrected the previous commit that broke SA shutdown loop prematurely.Andrei2021-12-211-1/+1
|
* This commit fixes concurrent FTWRL with parallel slave hangAndrei2021-12-203-7/+18
| | | | | | | | | which occures when the former ends with an error; related to that - STOP SLAVE could find FTWRL affected SA state which is already COMPLETED, in which case the driver thread should not wait; corrects MDL cleanup (as rollback to savepoint) at the of ALTER's record_gtid. The rollback may be missed by a SA, which it should be run unconditionally.
* Embedded compilation fixed for the Stop-slave commit.Andrei2021-12-181-1/+4
|
* Added show_binlog_event2 after the slave restart and synchonization.Andrei2021-12-172-0/+22
|
* Fixing a QA find of OPTIMIZE asserts.Andrei2021-12-173-0/+46
| | | | | | Fixed with not letting into SA binlog function as OPTIMIZE tries entering inadvertently (having binlogging capabilities temporarily turned off).
* Fixed an embedded test failure, and a flaw in STOP-SLAVE parallelAndrei2021-12-1711-80/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is guarded to not run on embedded. In a case of STOP SLAVE that separates SA (has been done) and CA (will not 'cos of the stop), see rpl_start_alter_restart_slave.test, an assert got fired when a "inadvertently" commented-out statement has been finally identified and restored for action. It turns out the split alter executing parallel workers did not fully comply with the stop slave's worker stop protocol and could be on loose at time the SQL thread thought their have been docked. It's fixed (and somewhat simplified) with leveraging a "direct" execution mode (by CA). SA and the shutdowner threads continue communicating as before but the latter sets the direct mode ON for a possible "unlikely" CA. SA may also find its shutdown status at time of changing the slave gtid state. In terms of use case the slave stop schema works as the following. Let's consider sequences of execution (comma separated below) events 1. SA, STOP-SLAVE, *no-more-events* interrupts SA after its change to the (gtid) slave state. ALTER query will be re-run by a matching CA (if it will show up). 2. SA, STOP-SLAVE, CA The same as above and CA indeed re-runs the whole ALTER in "direct" mode. 3. *no* SA, STOP-SLAVE, CA The same as above in the part of re-running CA (SA might have been tried to reach its wait-for-master decision state in the past).
* MDEV-11675. The test to FTWRL commit.Andrei2021-12-152-0/+137
|
* MDEV-11675. Fixes FTWRL in between SA and CA, and some cleanupAndrei2021-12-159-36/+105
| | | | | | | | | | | | | | | | | | | | | | | | | A FTWRL hang reported in the previous commit's message is resolved. SA is notified by FTWRL that set it to a state start_alter_state::COMPLETED && direct_commit_alter <- true forcing a "graceful" no-error rollback. After FTWRL has done CA gets scheduled and behaves by general rules. That is it's first to wait for UNLOCK TABLES. That's what an included test demonstrates. Note, start_alter_state::COMPLETED is also reachable by another source of benign error, e.g SA deadlock. (Then SA retries and sets to the state after unsuccessfully running out of all attempts). To facilitate the above A. `rpl_parallel_entry` is augmented with `rli` member so FTWRL can find the SA states; (I picked `rli` not `mi` for some future) B. `Master_info` receives mem_root for itself, now merely for allocating links of sa_info list associated with an `mi`. Some insignificant cleanup is done around places involved in above.
* MDEV-11675. Cleanup and test results updateAndrei2021-12-153-7/+4
| | | | | | | | Todo: fix FTWRL. In case the parallel slave executes SA, FTWRL, CA in this order, there's a hang, as CA can't be scheduled (because of FTWRL) to unlock FTWRL to complete its processing. A patch is following up tomorrow to fix that.
* MDEV-11675. Cleanup and review notes addressAndrei2021-12-154-22/+35
| | | | | | | | | | | - Two, incl a trivial line break, unnessary hunks are removed; - RAII Write_log_with_flags made simplified, the only its invocation with other than FL_START_ALTER_E1 is always preceeded to set the SA's seq_no (log_event_server.cc:1736); - types of accessers and setters to flags_extra made consistent with the object itself (uchar); - corrected the transaction type to be false in write_bin_log_with_if_exists() of write_bin_log_start_alter().
* MDEV-11675. A cleanup commit renames and relocates of few class membersAndrei2021-12-1510-77/+76
| | | | Also `--help` doc lines for @@binlog_alter_two_phase have been improved.
* MDEV-11675. Open up support for algorithms instant and nocopyAndrei2021-12-157-54/+434
| | | | | The options, esp 'instant' make some '--error' noise which is mostly that this commit aims to handle.
* MDEV-11675. Cleanup around mysql_client_binlog_statement to simplifyAndrei2021-12-153-41/+75
| | | | logics as well as optimize memory usage.
* MDEV-11675 Lag Free Alter On SlaveSachin2021-12-1577-132/+7230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements two phase binloggable ALTER. When a new @@session.binlog_alter_two_phase = YES ALTER query gets logged in two parts, the START ALTER and the COMMIT or ROLLBACK ALTER. START Alter is written in binlog as soon as at its handling necessary locks are acquired for the table. The timing is such that any concurrent DML:s that update the same table are either committed, thus logged into binary log having done work on the old version of the table, or will be queued for execution on its new version. The "COMPLETE" COMMIT or ROLLBACK ALTER are written after the most of ALTER work is done. When its result is positive COMMIT ALTER is written, otherwise when there were errors since START ALTER, ROLLBACK ALTER is written. Replication of two-phase binloggable ALTER is cross-version safe. Specifically the OLD slave merely does not recognized the start alter part, still memorizing its gtid. Two phase logged ALTER is read from binlog by mysqlbinlog to produce BINLOG 'string', where 'string' contains base64 encoded Query_log_event containing either the start part of ALTER, or a completion part. The Query details can be displayed with `-v` flag, similarly to ROW format events. Notice, mysqlbinlog output containing parts of two-phase binloggable ALTER is processable correctly only by binlog_alter_two_phase server. Thanks to all people involved into early discussion of the feature including Kristian Nielsen, those who helped to design, implement and test: Sergei Golubchik, Andrei Elkin, Sujatha Sivakumar, Brandon Nesterenko, Alice Sherepa.
* disable galera_3nodes.galera_ipv6_mariabackupSergei Golubchik2021-12-151-0/+2
| | | | | | | and galera_3nodes.galera_ipv6_mariabackup_section until their corresponding MDEV's are fixed. They fail almost everywhere.
* Merge 10.7 into 10.8Marko Mäkelä2021-12-148-29/+109
|\
| * Merge 10.6 into 10.7Marko Mäkelä2021-12-144-28/+79
| |\
| | * MDEV-27014 InnoDB fails to restore page 0 from the doublewrite bufferThirunarayanan Balathandayuthapani2021-12-122-7/+7
| | | | | | | | | | | | | | | - Addressing the format issue in deferred_dblwr() and changed the function comment.
| | * MDEV-27111 atomic.rename_table test case failsThirunarayanan Balathandayuthapani2021-12-121-0/+12
| | | | | | | | | | | | | | | | | | | | | InnoDB fails to identify the deferred tablespace after recovery. Problem is that InnoDB fails to rename the tablespace present in recovered tablespace. Fix is that InnoDB should try to rename the recovered tablespace when tablespace is being deferred
| | * MDEV-27014 InnoDB fails to restore page 0 from the doublewrite bufferThirunarayanan Balathandayuthapani2021-12-124-28/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts the commit cab8f4b552d234c8642f87fae28ecb098392c381. InnoDB fails to restore page0 from doublewrite buffer when the tablespace is being deferred. In that case, InnoDB doesn't find INIT_PAGE redo log record for page0 and it leads to failure. InnoDB should recovery page0 from doublewrite buffer for the deferred tablespace before applying the redo log records. Added deferred_dblwr() to restore page0 of deferred tablespace from doublewrite buffer
| * | MDEV-27001 Galera crashes when converting table to partitionbb-10.7-MDEV-27001mkaruza2021-12-144-1/+30
| | | | | | | | | | | | | | | | | | | | | SQL statments could have table entries added in lexer. This entries should not invalidate `next_global` member. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | MDEV-27206: [ERROR] Duplicated key: cause, Assertion `is_uniq_key' failed ↵Sergei Krivonos2021-12-103-1/+28
| | | | | | | | | | | | with optimizer trace
* | | Merge 10.7 into 10.8Marko Mäkelä2021-12-102-3/+4
|\ \ \ | |/ /
| * | Add forgotten changes to the parent commitMarko Mäkelä2021-12-102-3/+4
| | |
* | | Merge 10.7 into 10.8Marko Mäkelä2021-12-1028-266/+634
|\ \ \ | |/ /
| * | Cleanup: Remove some ib::logger in recovery messagesMarko Mäkelä2021-12-104-179/+214
| | |
| * | Merge 10.6 into 10.7Marko Mäkelä2021-12-101-3/+3
| |\ \ | | |/
| | * MDEV-27219 Some error messages might report table names incorrectly on LLP64Marko Mäkelä2021-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 49e2c8f0a6fefdeac50925f758090d6bd099768d (MDEV-25743) some more use of the printf-style format "%.*s" was added. The length parameter is of type int, not size_t. On 64-bit platforms that follow the LLP64 convention (such as 64-bit Microsoft Windows), sizeof(int)==4 and sizeof(size_t)==8. Let us explicitly cast the lengths to the correct type in order to avoid any trouble.
| * | SUMMARY/DESCRIPTION for compression provider RPMsSergei Golubchik2021-12-085-0/+15
| | |
| * | Merge branch '10.6' into 10.7Sergei Golubchik2021-12-0818-81/+391
| |\ \ | | |/
| | * Merge branch '10.5' into 10.6Sergei Golubchik2021-12-0718-81/+391
| | |\
| | | * BUG#31761802 STATISTICS ANY QUERIES USING VIEWS ARE SUMMARIZED TOGETHER WITH ↵Sergei Golubchik2021-12-072-0/+220
| | | | | | | | | | | | | | | | | | | | | | | | THE VIEW DEFINITION SELECT test case only
| | | * require system pcre2 in rpmsSergei Golubchik2021-12-071-3/+1
| | | | | | | | | | | | | | | | now when SLES12.3 is gone, we can enforce it
| | | * ColumnStore and S3 SUMMARY/DESCRIPTION for RPMSergei Golubchik2021-12-072-0/+5
| | | |
| | | * Merge branch '10.4' into 10.5Sergei Golubchik2021-12-079-5/+89
| | | |\