I have just re-verified that the problem exists:
- mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 185136
Server version: 10.3.17-MariaDB-0+deb10u1-log Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use xp.pl
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [xp.pl]> CREATE TABLE testMain (primid INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (primid)) ENGINE = InnoDB;
Query OK, 0 rows affected (1.006 sec)
MariaDB [xp.pl]> CREATE TABLE testRef (id INT UNSIGNED NOT NULL AUTO_INCREMENT, pid INT UNSIGNED, bitmap TINYINT UNSIGNED NOT NULL DEFAULT 0, bitmap5 TINYINT UNSIGNED GENERATED ALWAYS AS (bitmap&(1<<5)) VIRTUAL, PRIMARY KEY (id), FOREIGN KEY (pid) REFERENCES testMain (primid) ON DELETE CASCADE ON UPDATE CASCADE);
Query OK, 0 rows affected (1.131 sec)
MariaDB [xp.pl]> CREATE INDEX bitmap5 ON testRef(bitmap5) USING BTREE;
Query OK, 0 rows affected (2.045 sec)
Rekordów: 0 Duplikatów: 0 Ostrzeżeń: 0
MariaDB [xp.pl]> INSERT INTO testMain VALUES(0);
Query OK, 1 row affected (0.048 sec)
MariaDB [xp.pl]> SELECT * FROM testMain;
--------
--------
--------
1 row in set (0.000 sec)
MariaDB [xp.pl]> INSERT INTO testRef(pid) VALUES(3);
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`xp.pl`.`testRef`, CONSTRAINT `testRef_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `testMain` (`primid`) ON DELETE CASCADE ON UPDATE CASCADE)
MariaDB [xp.pl]> INSERT INTO testRef(pid) VALUES(2);
Query OK, 1 row affected (0.047 sec)
MariaDB [xp.pl]> DELETE FROM testMain WHERE primid=2;
ERROR 2013 (HY000): Lost connection to MySQL server during query
MariaDB [xp.pl]> quit
^C^C^C^C^CBye
Packages in use:
ii mariadb-server-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database server binaries
ii mariadb-server-core-10.3 1:10.3.17-0+deb10u1 amd64 MariaDB database core server files
ii galera-3 25.3.25-2 amd64 Replication framework for transactional applications
wsrep_cluster_size |
3 |
wsrep_cluster_status |
Primary |
wsrep_thread_count |
2 |
wsrep_local_state_comment |
Synced |
I have not managed to reproduce it with Galera replication. Tried the both cases from this MDEV and from
MDEV-13708(the last one by Sergei) on 10.3.9 (ca26f91bcaa21933147974c823852a2e1c2e2bd7) and 10.3.21 (a14544260c33dcdb057d2f62c4aab33cb09ebcb1).piotrniz can you please provide exact version of Galera lib you were using during the crash? Don't have other ideas how to repeat it.