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

ER_UNSUPPORTED_EXTENSION when using ON DELETE CASCADE

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.3.4
    • Fix Version/s: N/A
    • Component/s: Versioned Tables
    • Labels:
      None
    • Environment:
      Windows 10 64Bit; Ubuntu 17.10 64Bit

      Description

      I was testing out the new system-versioned tables and stumbled upon the ER_UNSUPPORTED_EXTENSION
      when using ON DELETE CASCADE in my table definition.

      DROP DATABASE IF EXISTS test;
      CREATE DATABASE test;
      USE test;
       
      CREATE TABLE User
      (
          Id               INT AUTO_INCREMENT PRIMARY KEY,
          Username         VARCHAR(50) NOT NULL
      ) WITH SYSTEM VERSIONING;
       
       
      CREATE TABLE Products
      (
          Id                INT AUTO_INCREMENT PRIMARY KEY,
          Name              VARCHAR(100) NOT NULL,
          ModifiedBy        INT NOT NULL,
          FOREIGN KEY(ModifiedBy) REFERENCES User(Id) ON DELETE CASCADE
      ) WITH SYSTEM VERSIONING;
       
       
      INSERT INTO User(Username) VALUES ("admin");
       
      INSERT INTO Products(Name, ModifiedBy) VALUES ("Apple", 1);
      #Error is thrown on the delete
      DELETE FROM User WHERE Username = "admin";
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bbartels Benjamin Bartels
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: