diff --git a/pkg/sql/logictest/testdata/logic_test/materialized_view b/pkg/sql/logictest/testdata/logic_test/materialized_view index 8ea9435b7393..dce72acf3ef6 100644 --- a/pkg/sql/logictest/testdata/logic_test/materialized_view +++ b/pkg/sql/logictest/testdata/logic_test/materialized_view @@ -29,6 +29,9 @@ SELECT * FROM v 3 4 5 6 +let $orig_crdb_timestamp +SELECT max(crdb_internal_mvcc_timestamp) FROM v + # Now refresh the view. statement ok REFRESH MATERIALIZED VIEW v @@ -42,6 +45,12 @@ SELECT * FROM v 5 6 7 8 +# Verify that crdb_internal_mvcc_timestamp is updated for all rows. +query I +SELECT count(*) FROM v WHERE crdb_internal_mvcc_timestamp > $orig_crdb_timestamp +---- +4 + # Now add an index to the view, and use it. statement ok CREATE INDEX i ON v (y)