1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-25457 Server crashes in row_undo_mod_clust_low upon rollback of read-only transaction

node->index was NULL.
But it's possible to get dict_table_t* from another source.
This commit is contained in:
Eugene Kosov
2021-04-20 22:33:22 +03:00
parent 2a7dd64425
commit 64eeb250eb
3 changed files with 13 additions and 1 deletions

View File

@ -754,3 +754,8 @@ COUNT(*)
INSERT INTO t VALUES (0);
SET SESSION tx_read_only=OFF;
DROP TABLE t;
CREATE TEMPORARY TABLE t (a INT) ENGINE=InnoDB;
INSERT INTO t VALUES (1);
START TRANSACTION READ ONLY;
UPDATE t SET a = NULL;
ROLLBACK;

View File

@ -595,3 +595,9 @@ SELECT COUNT(*)FROM t;
INSERT INTO t VALUES (0);
SET SESSION tx_read_only=OFF;
DROP TABLE t;
CREATE TEMPORARY TABLE t (a INT) ENGINE=InnoDB;
INSERT INTO t VALUES (1);
START TRANSACTION READ ONLY;
UPDATE t SET a = NULL;
ROLLBACK;

View File

@ -109,7 +109,8 @@ row_undo_mod_clust_low(
ut_ad(success);
ut_ad(rec_get_trx_id(btr_cur_get_rec(btr_cur),
btr_cur_get_index(btr_cur))
== thr_get_trx(thr)->id || node->index->table->is_temporary());
== thr_get_trx(thr)->id
|| btr_cur_get_index(btr_cur)->table->is_temporary());
if (mode != BTR_MODIFY_LEAF
&& dict_index_is_online_ddl(btr_cur_get_index(btr_cur))) {