# This test verifies that the results of the subquery are consistent with the transaction. If we
# inadvertently reuse the previous results of the subquery during a retry, we might insert
# duplicate values.

repeat 50
statement ok
INSERT INTO T VALUES ((SELECT max(k+1) FROM T))
