mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -754,3 +754,8 @@ COUNT(*)
|
|||||||
INSERT INTO t VALUES (0);
|
INSERT INTO t VALUES (0);
|
||||||
SET SESSION tx_read_only=OFF;
|
SET SESSION tx_read_only=OFF;
|
||||||
DROP TABLE t;
|
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);
|
INSERT INTO t VALUES (0);
|
||||||
SET SESSION tx_read_only=OFF;
|
SET SESSION tx_read_only=OFF;
|
||||||
DROP TABLE t;
|
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(success);
|
||||||
ut_ad(rec_get_trx_id(btr_cur_get_rec(btr_cur),
|
ut_ad(rec_get_trx_id(btr_cur_get_rec(btr_cur),
|
||||||
btr_cur_get_index(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
|
if (mode != BTR_MODIFY_LEAF
|
||||||
&& dict_index_is_online_ddl(btr_cur_get_index(btr_cur))) {
|
&& dict_index_is_online_ddl(btr_cur_get_index(btr_cur))) {
|
||||||
|
Reference in New Issue
Block a user