Inconsistent behavior with materialized views
I want to create a demonstration of this error:
ORA-12034: materialized view log on "MY_USER"."T" younger than last refresh
I can demonstrate the ORA-12034 error if I paste the following into SQL*Plus: Release 10.2.0.5.0 in a 10g or 9iR2 database:
DROP TABLE t CASCADE CONSTRAINTS;
DROP MATERIALIZED VIEW t_mv;
CREATE TABLE t ( id NUMBER PRIMARY KEY );
/* Create a MV log on base table to enable fast refresh */
CREATE MATERIALIZED VIEW LOG ON t WITH PRIMARY KEY;
/* Create fast refreshable MV */
CREATE MATERIALIZED VIEW t_mv
REFRESH FAST ON COMMIT
AS
SELECT * FROM t;
INSERT INTO t VALUES