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

sql_mode=ORACLE: multi-columns Unique index behavior to expect with NULL value

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None

    Description

      Multi-columns Unique index behavior with NULL value should be same as Oracle db server when setting sql_mode=ORACLE

      Init :
      CREATE TABLE `test` (
      `Col1` VARCHAR(50) NULL,
      `Col2` VARCHAR(50) NULL,
      UNIQUE INDEX `UX_COL1_COL2` (`Col1`, `Col2`)
      )
      ENGINE=InnoDB;
      insert into TEST (Col1, Col2) values ('A','B'), (NULL,NULL), ('A',NULL), (NULL,'B');

      Use cases :
      insert into TEST (Col1, Col2) values (NULL,NULL);
      => accepted by Oracle (11.2) & MariaDB (10.2, 10.3) => OK

      insert into TEST (Col1, Col2) values ('A',NULL);
      => rejected by Oracle (11.2) but accepted by MariaDB (10.2, 10.3) => Issue
      insert into TEST (Col1, Col2) values (NULL,'B');
      => rejected by Oracle (11.2) but accepted by MariaDB (10.2, 10.3) => Issue

      insert into TEST (Col1, Col2) values ('A','B');
      => rejected by Oracle (11.2) & MariaDB (10.2, 10.3) => OK

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              djegou David JEGOU
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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