Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
The following, as expected, produces an error in all versions:
create table t (n int not null unique);
|
insert into t values(1);
|
insert into t values(2);
|
update t set n=n+1;
|
ERROR 1062 (23000): Duplicate entry '2' for key 'n'
|
However, the above runs without error in Oracle and the SQL standard suggests that non-deferrable uniqueness constraints should be checked only at the end of the statement. PostgreSQL, MySQL, Firebird all behave as MariaDB does. DB2 behaves as Oracle does. Should this be changed for Oracle mode?