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

Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.28, 10.0(EOL), 10.1(EOL), 10.2(EOL)
    • 10.0.29
    • None
    • Gentoo Linux hardened no-multilib, kernel 4.7.10-hardened, 16 GiB RAM, Intel Xeon 64-bit CPU
    • 10.0.29

    Description

      Version: '10.0.28-MariaDB' Source distribution crashes after the following SQL command sequence (mysqld.err attached):

      CREATE DATABASE IF NOT EXISTS forgedImei;
      USE forgedImei;
       
      CREATE TABLE IF NOT EXISTS imei (
        id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        imei VARCHAR(16) NOT NULL UNIQUE KEY,
        problem ENUM( 'D', 'I' ) NOT NULL,
        provInEir ENUM( 'no', 'yes' ) NOT NULL
          COMMENT "'yes' means IMEI can be provisioned in EIR."
      );
       
      CREATE TABLE IF NOT EXISTS imsi (
        id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        imsi VARCHAR(16) NOT NULL UNIQUE KEY
      );
       
      CREATE TABLE IF NOT EXISTS pair (
        imei INT UNSIGNED NOT NULL,
        imsi INT UNSIGNED NOT NULL
      );
      

      ALTER TABLE pair
      ADD FOREIGN KEY IF NOT EXISTS (imei)
      REFERENCES imei (id)
      ON DELETE CASCADE
      ON UPDATE CASCADE;
       
      ALTER TABLE pair
      ADD FOREIGN KEY IF NOT EXISTS (imsi)
      REFERENCES imsi (id)
      ON DELETE CASCADE
      ON UPDATE CASCADE;
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              attila.styevko Attila Styevko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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