text: -- tkt3298.test
  -- 
  -- execsql {
  --     CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
  --     INSERT INTO t1 VALUES(0, 1);
  --     INSERT INTO t1 VALUES(1, 1);
  --     INSERT INTO t1 VALUES(2, 1);
  --     CREATE VIEW v1 AS SELECT a AS x, b+1 AS y FROM t1;
  --     CREATE TRIGGER r1 INSTEAD OF UPDATE ON v1
  --       BEGIN
  --         UPDATE t1 SET b=new.y-1 WHERE a=new.x;
  --       END;
  --     CREATE TRIGGER r2 INSTEAD OF DELETE ON v1
  --       BEGIN
  --         DELETE FROM t1 WHERE a=old.x;
  --       END;
  --     SELECT * FROM v1 ORDER BY x;
  -- }
  CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
  INSERT INTO t1 VALUES(0, 1);
  INSERT INTO t1 VALUES(1, 1);
  INSERT INTO t1 VALUES(2, 1);
  CREATE VIEW v1 AS SELECT a AS x, b+1 AS y FROM t1;
  CREATE TRIGGER r1 INSTEAD OF UPDATE ON v1
  BEGIN
  UPDATE t1 SET b=new.y-1 WHERE a=new.x;
  END;
  CREATE TRIGGER r2 INSTEAD OF DELETE ON v1
  BEGIN
  DELETE FROM t1 WHERE a=old.x;
  END;
  SELECT * FROM v1 ORDER BY x;