1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12745 InnoDB Assertion `0' failed at row0umod.cc:1181

row_undo_mod_parse_undo_rec(): Relax the too strict assertion and
correct the comment.

innodb.innodb-blob: Force a flush of the redo log right before
killing the server, to ensure that the code path gets exercised.
(The bogus debug assertion failed on the rollback of the statement
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2 which did not modify
any indexes before the server was killed.)
This commit is contained in:
Marko Mäkelä
2017-05-09 10:00:49 +03:00
parent 9a73af0152
commit e8889c8002
3 changed files with 22 additions and 5 deletions

View File

@ -97,6 +97,12 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2
connect con3,localhost,root,,;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t1;
ROLLBACK;
disconnect con3;
connection con2;
disconnect con2;
connection default;
ERROR HY000: Lost connection to MySQL server during query

View File

@ -139,6 +139,14 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch';
SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
connect (con3,localhost,root,,);
SET GLOBAL innodb_flush_log_at_trx_commit=1;
DELETE FROM t1;
ROLLBACK;
disconnect con3;
connection con2;
--let $shutdown_timeout=0
--source include/restart_mysqld.inc

View File

@ -1169,16 +1169,19 @@ close_table:
node->new_trx_id = trx_id;
node->cmpl_info = cmpl_info;
if (UNIV_UNLIKELY(!row_undo_search_clust_to_pcur(node))) {
/* This should never occur. As long as this
rolling-back transaction exists, the PRIMARY KEY value
pointed to by the undo log record must exist.
if (!row_undo_search_clust_to_pcur(node)) {
/* As long as this rolling-back transaction exists,
the PRIMARY KEY value pointed to by the undo log
record must exist. But, it is possible that the record
was not modified yet (the DB_ROLL_PTR does not match
node->roll_ptr) and thus there is nothing to roll back.
btr_cur_upd_lock_and_undo() only writes the undo log
record after successfully acquiring an exclusive lock
on the the clustered index record. That lock will not
be released before the transaction is committed or
fully rolled back. */
ut_ad(0);
ut_ad(node->pcur.btr_cur.low_match == node->ref->n_fields);
goto close_table;
}