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
- relates to
-
MDEV-10574 sql_mode=ORACLE: IS NULL and empty strings
- Open