1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25496 Assertion 'trx->bulk_insert' failed on INSERT

row_get_prebuilt_insert_row(): Remove some fallback code that had been
added in commit 8ea923f55b (MDEV-24818).
It seems that after all, statement boundaries are being reliably
indicated by ha_innobase::start_stmt() or
(for partitioned tables) ha_innobase::external_lock().
This commit is contained in:
Marko Mäkelä
2021-06-28 17:10:09 +03:00
parent 4b0070f642
commit e04bbf73dc
3 changed files with 18 additions and 7 deletions

View File

@@ -174,3 +174,11 @@ COMMIT;
SET autocommit=1; SET autocommit=1;
DROP TABLE t1; DROP TABLE t1;
DROP TEMPORARY TABLE t0; DROP TEMPORARY TABLE t0;
#
# MDEV-25496 Assertion 'trx->bulk_insert' failed
# in trx_undo_report_row_operation on INSERT
#
CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
INSERT INTO t VALUES (0);
INSERT INTO t VALUES (1),(0),(1);
DROP TABLE t;

View File

@@ -1,6 +1,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_sequence.inc --source include/have_sequence.inc
--source include/maybe_debug.inc --source include/maybe_debug.inc
--source include/have_partition.inc
# Enable MDEV-515 table-level undo logging for insert into empty table # Enable MDEV-515 table-level undo logging for insert into empty table
SET foreign_key_checks=0, unique_checks=0; SET foreign_key_checks=0, unique_checks=0;
@@ -183,3 +184,12 @@ COMMIT;
SET autocommit=1; SET autocommit=1;
DROP TABLE t1; DROP TABLE t1;
DROP TEMPORARY TABLE t0; DROP TEMPORARY TABLE t0;
--echo #
--echo # MDEV-25496 Assertion 'trx->bulk_insert' failed
--echo # in trx_undo_report_row_operation on INSERT
--echo #
CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
INSERT INTO t VALUES (0);
INSERT INTO t VALUES (1),(0),(1);
DROP TABLE t;

View File

@@ -1051,13 +1051,6 @@ row_get_prebuilt_insert_row(
if (prebuilt->trx_id == table->def_trx_id if (prebuilt->trx_id == table->def_trx_id
&& prebuilt->ins_node->entry_list.size() && prebuilt->ins_node->entry_list.size()
== UT_LIST_GET_LEN(table->indexes)) { == UT_LIST_GET_LEN(table->indexes)) {
if (prebuilt->trx->bulk_insert
&& prebuilt->ins_node->trx_id
!= prebuilt->trx->id) {
prebuilt->trx->bulk_insert = false;
}
return(prebuilt->ins_node->row); return(prebuilt->ins_node->row);
} }