MERGE ... WHEN NOT MATCHED ... RETURNING returns wrong (non-null) values when
no insert is performed
----------------------------------------------------------------------------------------------------
Key: CORE-4848
URL: http://tracker.firebirdsql.org/browse/CORE-4848
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0 Beta 1, 3.0 Alpha 2, 3.0 Alpha 1
Reporter: Adriano dos Santos Fernandes
Both cases returns "0, 0" instead of "null, null".
create table t1 (n1 integer, n2 integer);
-- Case 1:
merge into t1
using (
select 1 x
from rdb$database
where 1 = 0
) on 1 = 1
when not matched then
insert values (1, 11)
returning n1, n2;
-- Case 2:
merge into t1
using (
select 1 x
from rdb$database
where 1 = 1
) on 1 = 0
when not matched and 1 = 0 then
insert values (1, 11)
returning n1, n2;
--
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
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel