INSERT into updatable view without explicit field list failed
-------------------------------------------------------------
Key: CORE-5454
URL: http://tracker.firebirdsql.org/browse/CORE-5454
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0.1, 2.5.6, 3.0.0
Reporter: Roman Simakov
CREATE DATABASE 'upd_view.fdb' PAGE_SIZE 16384;
CREATE TABLE DOC1 (ID INTEGER NOT NULL,
NAME VARCHAR(1024),
DATA VARCHAR(1024),
PRIMARY KEY (ID));
CREATE TABLE DOC2 (ID INTEGER NOT NULL,
NAME VARCHAR(1024),
DATA VARCHAR(1024),
PRIMARY KEY (ID));
CREATE VIEW V (ID, NAME, DATA)
AS
SELECT * FROM DOC1
UNION ALL
SELECT * FROM DOC2;
SET TERM ^;
CREATE TRIGGER V_INS FOR V BEFORE INSERT
AS
DECLARE VARIABLE I INTEGER;
BEGIN
I = MOD(NEW.ID, 2);
if (I = 0) THEN
INSERT INTO DOC1 VALUES (NEW.ID, NEW.NAME, NEW.DATA);
else if (I = 1) THEN
INSERT INTO DOC2 VALUES (NEW.ID, NEW.NAME, NEW.DATA);
END^
SET TERM ;^
COMMIT WORK;
INSERT INTO V (ID, NAME, DATA) VALUES (0, '0', '0');
INSERT INTO DOC1 VALUES (1, '1', '1');
INSERT INTO V VALUES (2, '2', '2'); -- << failed
--
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
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel