Commit 64eeb250 authored by Eugene Kosov's avatar Eugene Kosov

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.
parent 2a7dd644
......@@ -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;
......@@ -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;
......@@ -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))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment