Regression: null validation for output SP's argument does NOT work in case when trying to select non-existent value from it ----------------------------------------------------------------------------------------------------------------------------
Key: CORE-4454 URL: http://tracker.firebirdsql.org/browse/CORE-4454 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0 Alpha 2 Reporter: Pavel Zotov DDL: ==== create domain dm_nn as bigint not null; commit; recreate table tt(id bigint primary key, x bigint); commit; insert into tt(id, x) values(1, 100); commit; set term ^; create or alter procedure tt_x(a_id type of column tt.id) returns(tt_x dm_nn) as begin for select x from tt where id = :a_id into tt_x do suspend; end ^set term ;^ commit; Please note that the output argument `tt_x` is declared as NOT null because of domain dm_nn definition. Test on WI-V6.3.3.26726 Firebird 2.5: ============================ select * from tt_x(1); -- Ok, one row (value = 100) select * from tt_x(2); -- Exception: validation error for variable TT_X, value "*** null ***" Test on LI-T6.3.0.31155 Firebird 3.0 Alpha 2 =================================== select * from tt_x(1); -- Ok, one row (value = 100) select * from tt_x(2); -- empty rowset and NO exception. <<< ? WHY NO EXCEPTION here ? <<< PS. The same result will be in case of explicit specification of output arg as not null, without using domain: create or alter procedure tt_x(a_id type of column tt.id) returns(tt_x bigint not null) as ... -- 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 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel