summaryrefslogtreecommitdiff
path: root/mysql-test/main/backup_lock.test
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'bb-10.5-all-builders' into bb-10.6-all-buildersLena Startseva2022-09-271-0/+2
|\
| * Merge branch 'bb-10.4-all-builders' into bb-10.5-all-buildersLena Startseva2022-09-261-0/+2
| |\
| | * MDEV-27691: make working view-protocolLena Startseva2022-09-231-0/+2
| | | | | | | | | | | | Update tests for version 10.4
* | | MDEV-4750 fixup: main.backup_lock result differenceMarko Mäkelä2021-09-031-9/+12
| | | | | | | | | | | | | | | | | | This test may occasionally display MDL for the InnoDB persistent statistics tables. Filter them out. This fixes up commit 9608773f75e2ca21491ef6825c3616cdc96d1ca5.
* | | MDEV-18465 Logging of DDL statements during backupMonty2021-05-191-1/+26
|/ / | | | | | | | | Many of the changes was needed to be able to collect and print engine name and table version id's in the ddl log.
* | Aria will now register it's transactionsMonty2020-05-231-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
* | Fix that BACKUP STAGE BLOCK_COMMIT blocks commit to the Aria engineMonty2020-05-231-2/+11
|/ | | | | | | | | MDEV-22468 BACKUP STAGE BLOCK_COMMIT should block commit in the Aria engine This is needed to ensure that mariabackup works properly with Aria tables This code ads new calls to ha_maria::implicit_commit(). These will be deleted by MDEV-22531 Remove maria::implicit_commit().
* Moved early check for table existance to mysql_execute_command()Sergey Vojtovich2018-12-091-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17772 - 3 way lock : ALTER, MDL, BACKUP STAGE BLOCK_DDL While waiting for a (potentially long) RO transaction or SELECT, DDL and LOCK TABLES ... WRITE hold protection against FTWRL and BACKUP STAGE. This effectively makes FTWRL/BACKUP STAGE indirectly wait for this RO transaction or SELECT to finish. Which is not great, as otherwise we could do something useful meanwhile. With this patch BACKUP lock is attempted to be acquired after TABLE/SCHEMA locks. If this attempt fails, TABLE/SCHEMA locks gets released and we start waiting for BACKUP lock. When wait finishes, BACKUP lock is released (to avoid deadlocks) and we attempt to acquire all locks once again. Other changes: - Take MDL lock before testing if table exists as part of CREATE TABLE ... IF EXISTS. This change was an effect of changes in lock_table_name and removes an inconsistency where one could get different error messages from CREATE TABLE .. IF EXISTS depending on active mdl locks. One effect of this change is that we don't binary log CREATE TABLE IF EXISTS if the table exists. This was done because old code was sometimes behaving inconsistenly (it was logged some time and not other times) and sending the query to the slave could make the slave even more inconsistent as there is not guarantee that the new table will have the same definition as the old table on the master.
* Added syntax and implementation for BACKUP STAGE'sMonty2018-12-091-0/+290
Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()