summaryrefslogtreecommitdiff
path: root/mysql-test/main/commit.result
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/main/commit.result
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/main/commit.result')
-rw-r--r--mysql-test/main/commit.result5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/main/commit.result b/mysql-test/main/commit.result
index f2e012d4782..44d46900d38 100644
--- a/mysql-test/main/commit.result
+++ b/mysql-test/main/commit.result
@@ -247,11 +247,13 @@ COMMIT;
SET @@completion_type=1;
COMMIT AND NO CHAIN;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
-START TRANSACTION;
TRUNCATE TABLE t1;
+INSERT INTO t1 VALUES(100);
+START TRANSACTION;
INSERT INTO t1 VALUES (1000);
SELECT * FROM t1;
s1
+100
1000
Should read '1000'
connection con1;
@@ -260,6 +262,7 @@ COMMIT;
connection default;
SELECT * FROM t1;
s1
+100
1000
Should only read the '1000' as this transaction is now in REP READ
COMMIT AND NO CHAIN;