Make validation of CHECK expression that is added to domain definition like it
is done for SET NOT NULL (against records from dependent tables)
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4804
URL: http://tracker.firebirdsql.org/browse/CORE-4804
Project: Firebird Core
Issue Type: Improvement
Components: Engine
Reporter: Pavel Zotov
Priority: Minor
SQL> create domain dm_ids int; commit;
SQL> create table test(id dm_ids); commit;
SQL> insert into test values(null);
SQL> commit;
SQL> alter domain dm_ids set not null;
Statement failed, SQLSTATE = 22006
unsuccessful metadata update
-Cannot make field ID of table TEST NOT NULL because there are NULLs present
------------------ yes, it's VERY good.
SQL> alter domain dm_ids add check(value is not null);
------------------------------------------------------ this should not pass
(IMO)
SQL> commit;
SQL> insert into test values(null);
Statement failed, SQLSTATE = 23000
validation error for column "TEST"."ID", value "*** null ***" ---- OK
-- But old record remains with null and this now contraries to domain CHECK:
SQL> select * from test;
ID
============
<null>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel