Attempt to violate constraint for domain-based BLOB field raises message that does not relates to actual problem ----------------------------------------------------------------------------------------------------------------
Key: CORE-6297 URL: http://tracker.firebirdsql.org/browse/CORE-6297 Project: Firebird Core Issue Type: Improvement Components: Engine Reporter: Pavel Zotov Priority: Minor Consider script (i've checked on 2.5.9, 3.0.6 and 4.0.0 -- result the same): ======= -- set names utf8; shell del c:\temp\tmp4t_blob.fdb 2>nul; create database 'localhost:c:\temp\tmp4t_blob.fdb' user 'SYSDBA' password 'masterkey'; show version; set blob all; set list on; create domain dm_char as varchar(1) default 'W' check( value in ('W', 'R') ); create domain dm_blob as blob sub_type text default 'W' check( value in ('W', 'R') ); recreate table t_char( fld_char dm_char ); recreate table t_blob( fld_blob dm_blob ); commit; insert into t_char default values returning fld_char; insert into t_blob default values returning fld_blob; rollback; alter domain dm_char set default 'A'; -- new default value VIOLATES domain constraint alter domain dm_blob set default 'A'; -- new default value VIOLATES domain constraint insert into t_char default values returning fld_char; -- [ 1 ] insert into t_blob default values returning fld_blob; -- [ 2 ] rollback; ======= Statement marked as [ 1 ] raises: "SQLSTATE = 23000 ... for column "T_CHAR"."FLD_CHAR", value "A", i.e. all OK Statement marked as [ 2 ] raises: "SQLSTATE = 22018 / conversion error from string "BLOB"", but character 'A' belongs to the same ASCII-list as those which are in CHECK-list: 'W' , R' IMO, it will be good if message in this case will be equal to [ 1 ]. -- 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 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel