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

10.4.13 crashes when creating CHECK constraint

    XMLWordPrintable

    Details

      Description

      The following sample SQL code crashes MariaDB using offical docker image mariadb:10.4.13, it worked fine with mariadb:10.4.12.

      SET SESSION sql_mode = 'STRICT_ALL_TABLES,ANSI_QUOTES';
       
      CREATE TABLE test1 (
          id BIGINT(10) NOT NULL auto_increment,
          col1 TINYINT(1) NOT NULL,
          col2 TINYINT(1) NOT NULL,
          col3 TINYINT(1) NOT NULL,
          CONSTRAINT PRIMARY KEY (id)
      );
       
      ALTER TABLE test1 ADD CONSTRAINT "test1_col3_constraint" CHECK (col3 IN (0,1));
      ALTER TABLE test1 ADD CONSTRAINT `test1_col2_constraint` CHECK (col2 IN (0,1));
      ALTER TABLE test1 ADD CONSTRAINT test1_col1_constraint CHECK (col1 IN (0,1));
      

      The same problem pops up with mariadb:10.5.3 sometimes too, but it does not seem to be fully reproducible. I am using OSX docker, but my colleagues managed to reproduce it in Linux too.

      mariadb:10.3.23 is working fine.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              skodak Petr Skoda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: