Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.6.24, 12.1.2
-
Can result in unexpected behaviour
Description
Content of suite/rpl/t/RPL-2153.test
source include/have_innodb.inc;
|
source include/master-slave.inc;
|
|
let $create_table=
|
CREATE TABLE t2 ( col1 INT PRIMARY KEY, col_text TEXT, UNIQUE KEY uidx(col_text(9)))
|
ENGINE = InnoDB ROW_FORMAT = Dynamic ;
|
let $drop_table=
|
DROP TABLE t2;
|
|
connection master;
|
SET foreign_key_checks = 0, unique_checks = 0 ;
|
|
# This works well
|
eval $create_table;
|
REPLACE INTO t2 (col1, col_text) VALUES (49, NULL);
|
REPLACE INTO t2 (col1, col_text) VALUES (49, NULL);
|
eval $drop_table;
|
|
# This fails if using replication mode 'row' with
|
# 12.1.2 : Could not execute Delete_rows_v1 event on table test.t2; Can't find record in 't2', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 0
|
# 10.6.24 : mariadbd: /Server/10.6/storage/innobase/handler/ha_innodb.cc:8765: virtual int ha_innobase::delete_row(const uchar*): Assertion `!trx->is_bulk_insert()' failed.
|
eval $create_table;
|
REPLACE INTO t2 (col1, col_text) VALUES (49, NULL), (49, NULL);
|
eval $drop_table;
|
|
sync_slave_with_master;
|
--source include/rpl_end.inc
|
The problem (or a similar one at least) can be reproduced without replication:
source include/have_innodb.inc;
|
|
let $create_table=
|
CREATE TABLE t2 ( col1 INT PRIMARY KEY, col_text TEXT, UNIQUE KEY uidx(col_text(9)))
|
ENGINE = InnoDB ROW_FORMAT = Dynamic ;
|
let $drop_table=
|
DROP TABLE t2;
|
|
SET foreign_key_checks = 0, unique_checks = 0 ;
|
|
eval $create_table;
|
SET @count= 0;
|
CREATE TRIGGER mytrig AFTER DELETE ON t2 FOR EACH ROW SET @count= @count+1;
|
REPLACE INTO t2 (col1, col_text) VALUES (49, NULL), (49, NULL);
|
eval $drop_table;
|
SELECT @count;
|
This results in:
mysqltest: At line 14: query 'REPLACE INTO t2 (col1, col_text) VALUES (49, NULL), (49, NULL)' failed: ER_KEY_NOT_FOUND (1032): Can't find record in 't2'
|
Attachments
Issue Links
- relates to
-
MDEV-24622 Replication does not support bulk insert into empty table
-
- Closed
-