Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8166

Adding index on new table from select crashes Galera cluster

    Details

      Description

      This is reproducible everytime. Doing a CREATE from SELECT, and then adding INDEX on column results in crashing of all other servers in Galera cluster.

      I have attached my.cnf MariaDB configuration, and the test setup is simple consiting of three servers. Execute this on one of the servers:

      CREATE DATABASE foobar;
      USE foobar;
      
      CREATE TABLE foo (
        timestamp int(11) NOT NULL DEFAULT '0'
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
      
      INSERT INTO foo (timestamp) VALUES (1), (2), (3);
      
      CREATE TABLE bar (timestamp INT) SELECT timestamp FROM foo; ALTER TABLE bar ADD INDEX tind (timestamp);
      

      And all the rest of the servers will crash. I have attached relevant log files. Take a look at server.2.log or server.3.log.

      Some widely used software (ie Drupal's Views Data Export module) uses this statements, which is how we encountered this bug.

        Gliffy Diagrams

          Attachments

          1. my.cnf
            2 kB
          2. server.1.log
            2 kB
          3. server.2.log
            5 kB
          4. server.3.log
            4 kB

            Activity

            Show
            nirbhay_c Nirbhay Choubey added a comment - https://github.com/MariaDB/server/commit/0bfae356d4f774c939a5642cd19ee6bfc682b8e7.patch
            Hide
            kotnik Nikola Kotur added a comment -

            Thank you, Nirbhay!

            Show
            kotnik Nikola Kotur added a comment - Thank you, Nirbhay!
            Hide
            kotnik Nikola Kotur added a comment -

            I don't see this in ChangeLog for MariaDB 10.0.19-galera. Will you release it in the next version?

            Show
            kotnik Nikola Kotur added a comment - I don't see this in ChangeLog for MariaDB 10.0.19-galera. Will you release it in the next version?
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Hi Nikola Kotur, The bug report came in a bit late. Yes, the patch has already been pushed
            to the trees and will be released with version 5.5.44-galera and 10.0.20-galera.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Hi Nikola Kotur , The bug report came in a bit late. Yes, the patch has already been pushed to the trees and will be released with version 5.5.44-galera and 10.0.20-galera.
            Hide
            kotnik Nikola Kotur added a comment - - edited

            Hi Nirbhay.

            I see MariaDB 5.4.44 has been released, but not MaraDB Galera. Any news on when that might happen?

            Please, do let me know, this is very critical for us.

            Thank you.

            Show
            kotnik Nikola Kotur added a comment - - edited Hi Nirbhay. I see MariaDB 5.4.44 has been released, but not MaraDB Galera. Any news on when that might happen? Please, do let me know, this is very critical for us. Thank you.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Hi Nikola Kotur!
            Galera server normally releases a couple of weeks after the corresponding vanilla server release. Fix
            for this issue has already been pushed and should be available with the next galera server release.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Hi Nikola Kotur ! Galera server normally releases a couple of weeks after the corresponding vanilla server release. Fix for this issue has already been pushed and should be available with the next galera server release.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Hopefully, it should release sometime next week.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Hopefully, it should release sometime next week.

              People

              • Assignee:
                nirbhay_c Nirbhay Choubey
                Reporter:
                kotnik Nikola Kotur
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: