summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/group_commit.test
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-12-21 14:02:46 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-12-21 14:02:46 +0530
commit4ad11a6d7fa4a269cc8c63b8031d1ff74201ebad (patch)
tree613d856a1e140def3a7f34146d2b62bfe4569223 /mysql-test/suite/innodb/t/group_commit.test
parent4e0004ea13a9cf2883afe525b947dbefb18f32f3 (diff)
downloadmariadb-git-10.6-MDEV-515.tar.gz
MDEV-515 InnoDB bulk insert10.6-MDEV-515
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 ins_node_t::bulk_insert: Flag to indicate the bulk insert of the table. trx_mod_table_time_t::bulk_insert_undo: Enable undo logging for the consecutive insert during bulk insert operation. 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 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 bulk_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. - HA_EXTRA_IGNORE_INSERT flag in ha_innobase::extra() is to indicate ignore statement. Sets the bulk insert undo for the transaction. - 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/innodb/t/group_commit.test')
-rw-r--r--mysql-test/suite/innodb/t/group_commit.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/group_commit.test b/mysql-test/suite/innodb/t/group_commit.test
index 692e06f38b8..3a2018bec5d 100644
--- a/mysql-test/suite/innodb/t/group_commit.test
+++ b/mysql-test/suite/innodb/t/group_commit.test
@@ -10,6 +10,9 @@
# to check some edge case for concurrency control.
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=innodb;
+# MDEV-515 takes X-lock on the table for the first insert.
+# So concurrent insert won't happen on the table
+INSERT INTO t1 VALUES(100);
SELECT variable_value INTO @commits FROM information_schema.global_status
WHERE variable_name = 'binlog_commits';