diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-12-11 17:27:53 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-12-11 17:34:50 +0530 |
commit | f369e4b9b01599ad9e308e969fc8401438b5ae64 (patch) | |
tree | 1e980db121f342b5366ab0f1e0cedaca3a3f8de5 /mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test | |
parent | 0c7c449267655ed759f223067c5095d7df3665b3 (diff) | |
download | mariadb-git-bb-10.5-MDEV-515-1.tar.gz |
MDEV-515 InnoDB bulk insertbb-10.5-MDEV-515-1
dict_table_t::bulk_trx_id: Stores the bulk insert
transaction id. Protected by exclusive lock of the table.
It can be used by other connection read operation to
identify whether to read the table
dict_table_t::allow_insert_undo: Allows normal insert row
undo logging for the table during bulk transaction
Introduced new undo log record "TRX_UNDO_EMPTY".
It should be first undo log during bulk insert operation.
While rollback, if innodb encounters the undo record
then it should empty the table
dict_table_t::empty_table(): Basically it empties all the
indexes associated with table . This is undo operation
of bulk insert operation. Metadata record should be retained
during this rollback operation
dict_table_t::remove_bulk_trx(): Resets the bulk_trx_id and
allow_insert_undo
row_log_table_empty(): If the table is being created during
empty_table() then log the EMPTY operation in the online log
row_log_online_op(): If the secondary index is being created
during empty_table() then log ROW_OP_EMPTY operation
in online log
row_log_table_apply_empty(): Applies the ROW_T_EMPTY to the
table that was being rebuild. It does call empty_table() to
empty the table.
btr_root_page_init(): Initialize the root page of the b-tree.
It is used during dict_index_t::empty() and btr_create().
btr_cur_ins_lock_and_undo(): During first insert of bulk
insert operation, write UNDO_EMPTY undo log of it and
reset DB_TRX_ID and DB_ROLL_PTR.
trx_mark_sql_stat_end(): Set the allow_insert_undo for
bulk operation of the table. So that consecutive insert
does allow undo operation.
row_search_mvcc(): check whether the current transaction
can view the table records based on bulk_trx_id.
row_merge_read_clustered_index(): Avoid the table read if the
bulk transaction id of the table is not visible within
current transaction read view.
- Add new insert in many test case to avoid the hang. Because
MDEV-515 takes X-lock of the table for first insert. So concurrent
insert will wait for X-lock to be released.
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test')
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test index 75db619d225..811d2bf24d9 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test @@ -30,6 +30,7 @@ CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) --delimiter ; SET sql_log_bin=1; CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (100, 100); --save_master_pos --connection server_2 |