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

Crash while using foreign key on field of unsigned type (CONNECT engine)

    Details

      Description

      Documentation says that foreign key is supported only by innodb, but no warnings if I use other engines. Server crash without anything in error log, when the field is defined as unsigned and as foreign key.

      CREATE TABLE t1 (id INT unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, m int) 
      ENGINE = InnoDB;
       
      CREATE TABLE t2 (
        id2 int NOT NULL PRIMARY KEY,
        t_id int  unsigned NOT NULL,
        FOREIGN KEY (t_id) REFERENCES t1 (id) ON DELETE CASCADE ON UPDATE RESTRICT
      ) ENGINE = connect;
       
      INSERT INTO t1 (m) VALUES ('1');
      INSERT INTO t2  VALUES (1, 5);
      

      Core dump:

      Program terminated with signal SIGSEGV, Segmentation fault.
       
      Thread 1 (Thread 0x7f0db4069700 (LWP 32610)):
      #0  __longjmp () at ../sysdeps/x86_64/__longjmp.S:67
      #1  0xedfb3167a7017b8d in ?? ()
      Backtrace stopped: Cannot access memory at address 0xedfb3167a7017b8d
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alice Alice Sherepa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: