mariadb/storage
Marko Mäkelä 76c62bc69c MDEV-15914: Restore MLOG_UNDO_INSERT
trx_undof_page_add_undo_rec_log(): Write the MLOG_UNDO_INSERT
record instead of the equivalent MLOG_2BYTES and MLOG_WRITE_STRING.
This essentially reverts commit 9ee8917dfd.

In MariaDB 10.3, I attempted to simplify the crash recovery code
by making use of lower-level redo log records. It turns out that
we must keep the redo log parsing code in order to allow crash-upgrade
from older MariaDB versions (MDEV-14848).

Now, it further turns out that the InnoDB redo log record format is
suboptimal for logging multiple changes to a single page. This simple
change to the redo logging of undo log significantly affects the
INSERT and UPDATE performance.

Essentially, we wrote
	(space_id,page_number,MLOG_2BYTES,2 bytes)
	(space_id,page_number,MLOG_WRITE_STRING,N+4 bytes)
instead of the previously written
	(space_id,page_number,MLOG_UNDO_INSERT,N+2 bytes)

The added redo log volume caused a single-threaded INSERT
(without innodb_adaptive_hash_index) of
1,000,000 rows to consume 11 seconds instead of 9 seconds,
and a subsequent UPDATE of 30,000,000 rows to consume 64 seconds
instead of 58 seconds. If we omitted all redo logging for the
undo log, the INSERT would consume only 4 seconds.
2018-04-26 22:53:33 +03:00
..
archive Merge branch '10.2' into 10.3 2018-03-28 17:31:57 +02:00
blackhole Added "const" to new data for handler::update_row() 2017-04-18 12:23:53 +03:00
cassandra Added name to MEM_ROOT for esier debugging 2018-02-02 11:08:36 +02:00
connect Merge 10.2 to 10.3 2018-04-19 15:23:21 +03:00
csv Added name to MEM_ROOT for esier debugging 2018-02-02 11:08:36 +02:00
example Changed static const in Alter_info and Alter_online_info to defines 2018-03-29 13:59:40 +03:00
federated Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
federatedx Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
heap Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
innobase MDEV-15914: Restore MLOG_UNDO_INSERT 2018-04-26 22:53:33 +03:00
maria Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
mroonga Fix a lot of compiler warnings found by -Wunused 2018-04-26 17:35:12 +03:00
myisam Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
myisammrg Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
oqgraph Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
perfschema Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
rocksdb Fix a lot of compiler warnings found by -Wunused 2018-04-26 17:35:12 +03:00
sequence Changing field::field_name and Item::name to LEX_CSTRING 2017-04-23 22:35:46 +03:00
sphinx Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
spider Remove compiler warnings 2018-04-16 20:16:43 +03:00
test_sql_discovery Merge bb-10.2-ext into 10.3 2017-09-21 08:12:19 +03:00
tokudb Fix a lot of compiler warnings found by -Wunused 2018-04-26 17:35:12 +03:00