Open maistrenkoIulia opened 4 years ago
This is a known issue for HSQL and it stems from the fact that HSQL follows SQL standard when treating nulls in indexes but doesn't support partial indexes:
http://www.hsqldb.org/doc/1.8/guide/ch02.html
A row, in which the value for any of the UNIQUE constraint columns is NULL, can always be added to the table. So multiple rows can contain the same values for the UNIQUE columns if one of the values is NULL.
In other DBMS we use partial indexes (Postgres), triggers (MySQL) or the DBMS just doesn't conform to the standard and ignores nulls in unique indexes (MS SQL, Oracle).
We consider HSQL as prototype-only DB, so we can live with this issue.
Environment
Platform version: 7.2.6
Database: HSQLDB
Operating system: Windows
Description of the bug or enhancement