Details

    Description

      It seems that MDEV-13708 is still unfixed.
      I'm using 10.3.9-MariaDB from the official .deb repository and it appears that I've got exactly the same problem.
      I'm using Galera cluster, if that matters.
      Please let me know if the problem has been fixed after 10.3.9 release.

      Attachments

        Issue Links

          Activity

            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.

            stepan.patryshev Stepan Patryshev (Inactive) added a comment - - edited 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.

            I have just re-verified that the problem exists:

            1. 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;
            --------

            primid

            --------

            2

            --------
            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
            piotrniz Piotr Nizynski added a comment - 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; -------- primid -------- 2 -------- 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 reproduced it even on MariaDB 10.3.9 and 10.3.17 with galera-3 25.3.25.
            But I observered the crash not just after the deletion, but after any other next command. See linked MDEV-21153 Galera: Replica nodes crash with signal 6 after indexed virtual columns and FK cascading deletes: WSREP has not yet prepared node for application use.
            And I presume that root cause for these two similar bugs is the same.

            stepan.patryshev Stepan Patryshev (Inactive) added a comment - - edited I have not reproduced it even on MariaDB 10.3.9 and 10.3.17 with galera-3 25.3.25. But I observered the crash not just after the deletion, but after any other next command. See linked MDEV-21153 Galera: Replica nodes crash with signal 6 after indexed virtual columns and FK cascading deletes: WSREP has not yet prepared node for application use. And I presume that root cause for these two similar bugs is the same.
            • branch 10.3
            • commit bf58ec77a1adaa653a0b044b950cf420f8c19de9

              CREATE TABLE testMain (primid INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (primid)) ENGINE = InnoDB;
              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);
              CREATE INDEX bitmap5 ON testRef(bitmap5) USING BTREE;
              INSERT INTO testMain VALUES(0);
              INSERT INTO testRef(pid) VALUES(3);
              SELECT * FROM testMain;
              primid
              1
              SELECT * FROM testRef;
              id	pid	bitmap	bitmap5
              1	3	0	0
              

            Insert should fail as there is no parent for pid = 3. This is repeatable with no Galera enabled.

            jplindst Jan Lindström (Inactive) added a comment - branch 10.3 commit bf58ec77a1adaa653a0b044b950cf420f8c19de9 CREATE TABLE testMain (primid INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (primid)) ENGINE = InnoDB; 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); CREATE INDEX bitmap5 ON testRef(bitmap5) USING BTREE; INSERT INTO testMain VALUES(0); INSERT INTO testRef(pid) VALUES(3); SELECT * FROM testMain; primid 1 SELECT * FROM testRef; id pid bitmap bitmap5 1 3 0 0 Insert should fail as there is no parent for pid = 3. This is repeatable with no Galera enabled.

            nikitamalyavin, you agreed to work on virtual column bugs. I would expect this to be repeatable on 10.2 as well.

            marko Marko Mäkelä added a comment - nikitamalyavin , you agreed to work on virtual column bugs. I would expect this to be repeatable on 10.2 as well.

            People

              nikitamalyavin Nikita Malyavin
              piotrniz Piotr Nizynski
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.