2022-08-31 9:06:58 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2022-08-31 9:06:58 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=514]; set innodb_force_recovery to ignore
2022-08-31 9:06:58 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1490] with error Data structure corruption
I extracted a copy of the page both from the backup and from the server at the logical point of time when the OPT_PAGE_CHECKSUM record was written. Apart from FIL_PAGE_LSN which is excluded from the checksum, the pages differ as follows:
The difference is for a clustered index leaf page record that starts at 0x50c. The DB_TRX_ID=0x70a would be incorrectly recovered as 0x60a. This difference was caught thanks to MDEV-18976.
The columns of the index seem to be something like the following:
(id INT UNSIGNED NOT NULL, DB_TRX_ID, DB_ROLL_PTR, pad CHAR(60), c CHAR(120), k INT, geocol2 GEOMETRY, tcol CHAR(3)).
On recovery, the incorrect byte was recovered by the following:
10.6 92032499874259bae7455130958ea7f38c4d53a3
(rr) frame 2
#2 0x000055f5b96c8359 in page_apply_insert_dynamic (block=..., reuse=false,
Offset 0x63 is where the page infimum pseudo-record is stored. Because an instant ADD/DROP COLUMN has been executed on this table, the record will not contain the string infimum but something else (NUL bytes followed by the header of the supremum record).
I think that we must ‘pessimize’ the implementation of MDEV-21724 and never write log that would copy something from the infimum record to the first actual user record in the table.
Attachments
Issue Links
causes
MDEV-29471Buffer overflow in page_cur_insert_rec_low()
order=0x0, ignore=false, if_exists=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_table.cc:10278
#12 0x00005572f9b74c76 in Sql_cmd_alter_table::execute (this=0x62b000118ce8, thd=0x62b000149218) at /data/Server/bb-10.6-MDEV-29374/sql/sql_alter.cc:542
#13 0x00005572f9774c79 in mysql_execute_command (thd=0x62b000149218, is_called_from_prepared_stmt=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:5997
#14 0x00005572f9781046 in mysql_parse (thd=0x62b000149218, rawbuf=0x62b000118238 "ALTER TABLE t18 ADD COLUMN IF NOT EXISTS tcol7 TIME DEFAULT NULL FIRST, LOCK=SHARED /* E_R Thread2 QNO 2036 CON_ID 19 */",
length=120, parser_state=0x58551c4fba20) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:8030
The ADD COLUMN…FIRST will cause columns to be reordered in the table.
For reproducing this bug, I think that it is important that the table contains INT UNSIGNED PRIMARY KEY. Execute something like this in a loop, and concurrently run backup and restore:
CREATETABLE t(a INT UNSIGNED PRIMARYKEY) ENGINE=InnoDB;
INSERTINTO t VALUES …;
ALTERTABLE t ADDCOLUMN b INTNULLFIRST;
DROPTABLE t;
Marko Mäkelä
added a comment - The infimum and supremum strings were repurposed in MDEV-15562 .
The insert of the record that is logged incorrectly is actually for the hidden metadata record of a MDEV-15562 operation:
10.6 92032499874259bae7455130958ea7f38c4d53a3
#2 0x00005572faaadca1 in page_cur_insert_rec_low (cur=0x58551c4f5048, index=0x616006e1a608, rec=0x6140000254cf "", offsets=0x58551c4f5170, mtr=0x58551c4f5450)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/page/page0cur.cc:1525
#3 0x00005572fad90d7d in page_cur_tuple_insert (cursor=0x58551c4f5048, tuple=0x61d0009f1e88, index=0x616006e1a608, offsets=0x58551c4f5000, heap=0x58551c4f4fe0, n_ext=1, mtr=0x58551c4f5450)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/include/page0cur.inl:199
#4 0x00005572fada7631 in btr_cur_optimistic_insert (flags=2, cursor=0x58551c4f5040, offsets=0x58551c4f5000, heap=0x58551c4f4fe0, entry=0x61d0009f1e88, rec=0x58551c4f5020, big_rec=0x58551c4f4fc0, n_ext=1,
thr=0x61d0009f2070, mtr=0x58551c4f5450) at /data/Server/bb-10.6-MDEV-29374/storage/innobase/btr/btr0cur.cc:3500
#5 0x00005572fab90ae2 in row_ins_clust_index_entry_low (flags=2, mode=10, index=0x616006e1a608, n_uniq=1, entry=0x61d0009f1e88, n_ext=0, thr=0x61d0009f2070)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/row/row0ins.cc:2764
#6 0x00005572fa8dcfcd in innobase_instant_try (ha_alter_info=0x58551c4f7a90, ctx=0x62b00011aad0, altered_table=0x58551c4f8190, table=0x619001cea398, trx=0x75cd11101440)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:6177
#7 0x00005572fa92d529 in commit_try_norebuild (ha_alter_info=0x58551c4f7a90, ctx=0x62b00011aad0, altered_table=0x58551c4f8190, old_table=0x619001cea398, trx=0x75cd11101440, table_name=0x61b000092155 "t18")
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:10559
#8 0x00005572fa905753 in ha_innobase::commit_inplace_alter_table (this=0x61d000885eb8, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90, commit=true)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:11308
#9 0x00005572f9f5c304 in handler::ha_commit_inplace_alter_table (this=0x61d000885eb8, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90, commit=true)
at /data/Server/bb-10.6-MDEV-29374/sql/handler.cc:5234
#10 0x00005572f99d192a in mysql_inplace_alter_table (thd=0x62b000149218, table_list=0x62b000118400, table=0x619001cea398, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90,
target_mdl_request=0x58551c4f7b90, ddl_log_state=0x58551c4f78b0, trigger_param=0x58551c4f8600, alter_ctx=0x58551c4f90a0) at /data/Server/bb-10.6-MDEV-29374/sql/sql_table.cc:7471
#11 0x00005572f99e55b6 in mysql_alter_table (thd=0x62b000149218, new_db=0x62b00014dc18, new_name=0x62b00014e030, create_info=0x58551c4fa550, table_list=0x62b000118400, alter_info=0x58551c4fa420, order_num=0,
order=0x0, ignore=false, if_exists=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_table.cc:10278
#12 0x00005572f9b74c76 in Sql_cmd_alter_table::execute (this=0x62b000118ce8, thd=0x62b000149218) at /data/Server/bb-10.6-MDEV-29374/sql/sql_alter.cc:542
#13 0x00005572f9774c79 in mysql_execute_command (thd=0x62b000149218, is_called_from_prepared_stmt=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:5997
#14 0x00005572f9781046 in mysql_parse (thd=0x62b000149218, rawbuf=0x62b000118238 "ALTER TABLE t18 ADD COLUMN IF NOT EXISTS tcol7 TIME DEFAULT NULL FIRST, LOCK=SHARED /* E_R Thread2 QNO 2036 CON_ID 19 */",
length=120, parser_state=0x58551c4fba20) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:8030
The ADD COLUMN…FIRST will cause columns to be reordered in the table.
For reproducing this bug, I think that it is important that the table contains INT UNSIGNED PRIMARY KEY . Execute something like this in a loop, and concurrently run backup and restore:
CREATE TABLE t(a INT UNSIGNED PRIMARY KEY ) ENGINE=InnoDB;
INSERT INTO t VALUES …;
ALTER TABLE t ADD COLUMN b INT NULL FIRST ;
DROP TABLE t;
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=243]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 243 from file './ibdata1': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=1, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 3 from file './mysql/innodb_table_stats.ibd': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=2, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 3 from file './mysql/innodb_index_stats.ibd': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-09-01 15:50:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
I may have accidentally reproduced another bug in multi-batch recovery, because I only expected that single page to be corrupted.
Marko Mäkelä
added a comment - Finally, I reproduced this without hitting MDEV-29440 . The UPDATE loop is for incrementing the DB_TRX_ID to a suitable range.
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
CREATE TABLE t1(a INT PRIMARY KEY ) ENGINE=InnoDB;
INSERT INTO t1 SET a=1;
--disable_query_log
let $N=768;
while ($N) {
UPDATE t1 SET a=a+1;
dec $N;
}
--enable_query_log
CREATE TABLE t2(a INT UNSIGNED PRIMARY KEY , b INT NOT NULL DEFAULT 42)
ENGINE=InnoDB;
INSERT INTO t2 (a) VALUES (1),(2),(3),(4);
connect ddl, localhost, root;
SET DEBUG_SYNC= 'innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever' ;
--send
ALTER TABLE t2 MODIFY COLUMN b INT NOT NULL DEFAULT 42 FIRST ;
connection default ;
SET DEBUG_SYNC= 'now WAIT_FOR ddl' ;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t1;
--source include/kill_mysqld.inc
disconnect ddl;
--source include/start_mysqld.inc
CHECK TABLE t2;
DROP TABLE t1,t2;
10.6 40aa94df356cfa000fc43c92ff0061212d1b161d
2022-09-01 15:50:35 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=54849,54849
2022-09-01 15:50:35 0 [ERROR] InnoDB: OPT_PAGE_CHECKSUM mismatch on [page id: space=6, page number=3]
2022-09-01 15:50:35 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=6, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 6 row operations to undo
2022-09-01 15:50:35 0 [Note] InnoDB: Trx id counter is 1574
2022-09-01 15:50:35 0 [Note] InnoDB: Starting final batch to recover 12 pages from redo log.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=324]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=410]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=0]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 0 from file './ibdata1': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=5, page number=1]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=5, page number=2]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=5, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=6, page number=1]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=6, page number=2]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=6, page number=4]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1490] with error Data structure corruption
2022-09-01 15:50:35 0 [Note] InnoDB: Starting shutdown...
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=0, page number=243]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 243 from file './ibdata1': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=1, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 3 from file './mysql/innodb_table_stats.ibd': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=2, page number=3]; set innodb_force_recovery to ignore
2022-09-01 15:50:35 0 [ERROR] InnoDB: Failed to read page 3 from file './mysql/innodb_index_stats.ibd': Page read from tablespace is corrupted.
2022-09-01 15:50:35 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-09-01 15:50:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
I may have accidentally reproduced another bug in multi-batch recovery, because I only expected that single page to be corrupted.
That is, we would hit MDEV-29440 a little later (this time during innodb_check_version(), invoked by ddl_log_execute_recovery()). I double-checked that without the fix, we will get many ‘extra’ messages for the unrelated pages.
Marko Mäkelä
added a comment - With the following fix, there will be no log apply failure messages:
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc
index 5f7192675dc..3f863d36a3a 100644
--- a/storage/innobase/page/page0cur.cc
+++ b/storage/innobase/page/page0cur.cc
@@ -1648,7 +1648,7 @@ page_cur_insert_rec_low(
{
const byte *r= rec;
const byte *c= cur->rec;
- const byte *c_end= cur->rec + data_size;
+ const byte *c_end= c + (page_rec_is_infimum(c) ? 8 : data_size);
static_assert(REC_N_OLD_EXTRA_BYTES == REC_N_NEW_EXTRA_BYTES + 1, "");
if (c <= insert_buf && c_end > insert_buf)
c_end= insert_buf;
10.6 40aa94df356cfa000fc43c92ff0061212d1b161d with the patch
2022-09-01 16:25:13 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=54849,54849
2022-09-01 16:25:13 0 [ERROR] InnoDB: Table `test`.`t2` contains unrecognizable instant ALTER metadata
2022-09-01 16:25:13 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 6 row operations to undo
2022-09-01 16:25:13 0 [Note] InnoDB: Trx id counter is 1574
2022-09-01 16:25:13 0 [Note] InnoDB: Starting final batch to recover 13 pages from redo log.
2022-09-01 16:25:13 0 [Note] InnoDB: 128 rollback segments are active.
2022-09-01 16:25:13 0 [Note] InnoDB: Rolled back recovered transaction 1571
…
2022-09-01 16:25:13 0 [ERROR] InnoDB: Table `test`.`t2` contains unrecognizable instant ALTER metadata
mariadbd: /mariadb/10.6/storage/innobase/dict/dict0load.cc:2464: dict_table_t* dict_load_table_one(const st_::span<const char>&, dict_err_ignore_t, dict_names_t&): Assertion `!table || (ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY) || !table->is_readable() || !table->corrupted' failed.
That is, we would hit MDEV-29440 a little later (this time during innodb_check_version() , invoked by ddl_log_execute_recovery() ). I double-checked that without the fix, we will get many ‘extra’ messages for the unrelated pages.
The reason for the flood of messages for unrelated pages is the following in log_phys_t::apply():
case OPTION:
ut_ad(rlen == 5);
ut_ad(*l == OPT_PAGE_CHECKSUM);
if (page_checksum(block, l + 1))
{
applied= APPLIED_YES;
page_corrupted:
sql_print_error("InnoDB: Set innodb_force_recovery=1"
" to ignore corruption.");
recv_sys.set_corrupt_log();
return applied;
}
We are flagging the log corrupted only because a single page is corrupted. This will cause all subsequent invocations of recv_recover_page() to evict pages as corrupted:
set_start_lsn:
if (recv_sys.is_corrupt_log() && !srv_force_recovery) {
…
buf_pool.corrupted_evict(&block->page,
block->page.state() &
buf_page_t::LRU_MASK);
It would be better to introduce another return value, say, log_phys_t::APPLIED_CORRUPTED, to indicate that the page was corrupted. Then there would be no ‘collateral damage’ of claiming unrelated pages as corrupted. The recv_sys.set_corrupt_log() must be reserved to cases where the entire log is corrupted.
Marko Mäkelä
added a comment - The reason for the flood of messages for unrelated pages is the following in log_phys_t::apply() :
case OPTION:
ut_ad(rlen == 5);
ut_ad(*l == OPT_PAGE_CHECKSUM);
if (page_checksum(block, l + 1))
{
applied= APPLIED_YES;
page_corrupted:
sql_print_error( "InnoDB: Set innodb_force_recovery=1"
" to ignore corruption." );
recv_sys.set_corrupt_log();
return applied;
}
We are flagging the log corrupted only because a single page is corrupted. This will cause all subsequent invocations of recv_recover_page() to evict pages as corrupted:
set_start_lsn:
if (recv_sys.is_corrupt_log() && !srv_force_recovery) {
…
buf_pool.corrupted_evict(&block->page,
block->page.state() &
buf_page_t::LRU_MASK);
It would be better to introduce another return value, say, log_phys_t::APPLIED_CORRUPTED , to indicate that the page was corrupted. Then there would be no ‘collateral damage’ of claiming unrelated pages as corrupted. The recv_sys.set_corrupt_log() must be reserved to cases where the entire log is corrupted.
I think that this bug should also affect normal tables where the string infimum is being inserted in the first PRIMARY KEY column as the first record of the table, but I was unable to repeat an OPT_PAGE_CHECKSUM mismatch in such a case.
In 10.5, recovery would not invoke buf_pool.corrupted_evict() if it fails to apply some log to a page. That code was added to 10.6.9 in MDEV-13542.
Marko Mäkelä
added a comment - I think that this bug should also affect normal tables where the string infimum is being inserted in the first PRIMARY KEY column as the first record of the table, but I was unable to repeat an OPT_PAGE_CHECKSUM mismatch in such a case.
In 10.5, recovery would not invoke buf_pool.corrupted_evict() if it fails to apply some log to a page. That code was added to 10.6.9 in MDEV-13542 .
People
Marko Mäkelä
Marko Mäkelä
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1046,"ttfb":356.2999999821186,"pageVisibility":"visible","entityId":114380,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ea0064ea-ab78-4500-adce-e44abae54a4e","navigationType":0,"readyForUser":1172.5999999940395,"redirectCount":0,"resourceLoadedEnd":810.5999999940395,"resourceLoadedStart":365.09999999403954,"resourceTiming":[{"duration":57,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":365.09999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":365.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":422.09999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":57.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":365.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":365.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":422.5,"responseStart":0,"secureConnectionStart":0},{"duration":264,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":365.59999999403954,"connectEnd":365.59999999403954,"connectStart":365.59999999403954,"domainLookupEnd":365.59999999403954,"domainLookupStart":365.59999999403954,"fetchStart":365.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":423.09999999403954,"responseEnd":629.5999999940395,"responseStart":470.69999998807907,"secureConnectionStart":365.59999999403954},{"duration":394.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":365.69999998807907,"connectEnd":365.69999998807907,"connectStart":365.69999998807907,"domainLookupEnd":365.69999998807907,"domainLookupStart":365.69999998807907,"fetchStart":365.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":425.69999998807907,"responseEnd":759.8999999761581,"responseStart":489.59999999403954,"secureConnectionStart":365.69999998807907},{"duration":96.7000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":365.89999997615814,"connectEnd":365.89999997615814,"connectStart":365.89999997615814,"domainLookupEnd":365.89999997615814,"domainLookupStart":365.89999997615814,"fetchStart":365.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":425.7999999821186,"responseEnd":462.59999999403954,"responseStart":460.59999999403954,"secureConnectionStart":365.89999997615814},{"duration":96.2999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":366.09999999403954,"connectEnd":366.09999999403954,"connectStart":366.09999999403954,"domainLookupEnd":366.09999999403954,"domainLookupStart":366.09999999403954,"fetchStart":366.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":426.59999999403954,"responseEnd":462.39999997615814,"responseStart":459.89999997615814,"secureConnectionStart":366.09999999403954},{"duration":99.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":366.2999999821186,"connectEnd":366.2999999821186,"connectStart":366.2999999821186,"domainLookupEnd":366.2999999821186,"domainLookupStart":366.2999999821186,"fetchStart":366.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":428.19999998807907,"responseEnd":465.39999997615814,"responseStart":462.89999997615814,"secureConnectionStart":366.2999999821186},{"duration":60.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":366.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":366.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":426.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":99,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":366.69999998807907,"connectEnd":366.69999998807907,"connectStart":366.69999998807907,"domainLookupEnd":366.69999998807907,"domainLookupStart":366.69999998807907,"fetchStart":366.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":432.2999999821186,"responseEnd":465.69999998807907,"responseStart":463.59999999403954,"secureConnectionStart":366.69999998807907},{"duration":61.900000005960464,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":366.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":366.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":428.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":99.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":367,"connectEnd":367,"connectStart":367,"domainLookupEnd":367,"domainLookupStart":367,"fetchStart":367,"redirectEnd":0,"redirectStart":0,"requestStart":432.69999998807907,"responseEnd":466.39999997615814,"responseStart":464.19999998807907,"secureConnectionStart":367},{"duration":324.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":373.2999999821186,"connectEnd":373.2999999821186,"connectStart":373.2999999821186,"domainLookupEnd":373.2999999821186,"domainLookupStart":373.2999999821186,"fetchStart":373.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":482.2999999821186,"responseEnd":698.1999999880791,"responseStart":694.6999999880791,"secureConnectionStart":373.2999999821186},{"duration":424.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":386.5,"connectEnd":386.5,"connectStart":386.5,"domainLookupEnd":386.5,"domainLookupStart":386.5,"fetchStart":386.5,"redirectEnd":0,"redirectStart":0,"requestStart":522.2999999821186,"responseEnd":810.5999999940395,"responseStart":807.6999999880791,"secureConnectionStart":386.5},{"duration":110.09999999403954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":756.6999999880791,"connectEnd":756.6999999880791,"connectStart":756.6999999880791,"domainLookupEnd":756.6999999880791,"domainLookupStart":756.6999999880791,"fetchStart":756.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":835.1999999880791,"responseEnd":866.7999999821186,"responseStart":866.0999999940395,"secureConnectionStart":756.6999999880791}],"fetchStart":0,"domainLookupStart":71,"domainLookupEnd":117,"connectStart":117,"connectEnd":137,"secureConnectionStart":126,"requestStart":138,"responseStart":356,"responseEnd":386,"domLoading":363,"domInteractive":1279,"domContentLoadedEventStart":1279,"domContentLoadedEventEnd":1339,"domComplete":1923,"loadEventStart":1923,"loadEventEnd":1924,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1219.2999999821186},{"name":"bigPipe.sidebar-id.end","time":1220},{"name":"bigPipe.activity-panel-pipe-id.start","time":1220.199999988079},{"name":"bigPipe.activity-panel-pipe-id.end","time":1227.3999999761581},{"name":"activityTabFullyLoaded","time":1360.2999999821186}],"measures":[],"correlationId":"79dac4e02891a0","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":139,"dbReadsTimeInMs":22,"dbConnsTimeInMs":32,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The infimum and supremum strings were repurposed in
MDEV-15562.The insert of the record that is logged incorrectly is actually for the hidden metadata record of a
MDEV-15562operation:10.6 92032499874259bae7455130958ea7f38c4d53a3
#2 0x00005572faaadca1 in page_cur_insert_rec_low (cur=0x58551c4f5048, index=0x616006e1a608, rec=0x6140000254cf "", offsets=0x58551c4f5170, mtr=0x58551c4f5450)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/page/page0cur.cc:1525
#3 0x00005572fad90d7d in page_cur_tuple_insert (cursor=0x58551c4f5048, tuple=0x61d0009f1e88, index=0x616006e1a608, offsets=0x58551c4f5000, heap=0x58551c4f4fe0, n_ext=1, mtr=0x58551c4f5450)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/include/page0cur.inl:199
#4 0x00005572fada7631 in btr_cur_optimistic_insert (flags=2, cursor=0x58551c4f5040, offsets=0x58551c4f5000, heap=0x58551c4f4fe0, entry=0x61d0009f1e88, rec=0x58551c4f5020, big_rec=0x58551c4f4fc0, n_ext=1,
thr=0x61d0009f2070, mtr=0x58551c4f5450) at /data/Server/bb-10.6-MDEV-29374/storage/innobase/btr/btr0cur.cc:3500
#5 0x00005572fab90ae2 in row_ins_clust_index_entry_low (flags=2, mode=10, index=0x616006e1a608, n_uniq=1, entry=0x61d0009f1e88, n_ext=0, thr=0x61d0009f2070)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/row/row0ins.cc:2764
#6 0x00005572fa8dcfcd in innobase_instant_try (ha_alter_info=0x58551c4f7a90, ctx=0x62b00011aad0, altered_table=0x58551c4f8190, table=0x619001cea398, trx=0x75cd11101440)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:6177
#7 0x00005572fa92d529 in commit_try_norebuild (ha_alter_info=0x58551c4f7a90, ctx=0x62b00011aad0, altered_table=0x58551c4f8190, old_table=0x619001cea398, trx=0x75cd11101440, table_name=0x61b000092155 "t18")
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:10559
#8 0x00005572fa905753 in ha_innobase::commit_inplace_alter_table (this=0x61d000885eb8, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90, commit=true)
at /data/Server/bb-10.6-MDEV-29374/storage/innobase/handler/handler0alter.cc:11308
#9 0x00005572f9f5c304 in handler::ha_commit_inplace_alter_table (this=0x61d000885eb8, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90, commit=true)
at /data/Server/bb-10.6-MDEV-29374/sql/handler.cc:5234
#10 0x00005572f99d192a in mysql_inplace_alter_table (thd=0x62b000149218, table_list=0x62b000118400, table=0x619001cea398, altered_table=0x58551c4f8190, ha_alter_info=0x58551c4f7a90,
target_mdl_request=0x58551c4f7b90, ddl_log_state=0x58551c4f78b0, trigger_param=0x58551c4f8600, alter_ctx=0x58551c4f90a0) at /data/Server/bb-10.6-MDEV-29374/sql/sql_table.cc:7471
#11 0x00005572f99e55b6 in mysql_alter_table (thd=0x62b000149218, new_db=0x62b00014dc18, new_name=0x62b00014e030, create_info=0x58551c4fa550, table_list=0x62b000118400, alter_info=0x58551c4fa420, order_num=0,
order=0x0, ignore=false, if_exists=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_table.cc:10278
#12 0x00005572f9b74c76 in Sql_cmd_alter_table::execute (this=0x62b000118ce8, thd=0x62b000149218) at /data/Server/bb-10.6-MDEV-29374/sql/sql_alter.cc:542
#13 0x00005572f9774c79 in mysql_execute_command (thd=0x62b000149218, is_called_from_prepared_stmt=false) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:5997
#14 0x00005572f9781046 in mysql_parse (thd=0x62b000149218, rawbuf=0x62b000118238 "ALTER TABLE t18 ADD COLUMN IF NOT EXISTS tcol7 TIME DEFAULT NULL FIRST, LOCK=SHARED /* E_R Thread2 QNO 2036 CON_ID 19 */",
length=120, parser_state=0x58551c4fba20) at /data/Server/bb-10.6-MDEV-29374/sql/sql_parse.cc:8030
The ADD COLUMN…FIRST will cause columns to be reordered in the table.
For reproducing this bug, I think that it is important that the table contains INT UNSIGNED PRIMARY KEY. Execute something like this in a loop, and concurrently run backup and restore: