# Copyright (c) reifydb.com 2025
# This file is licensed under the AGPL-3.0-or-later

# This file includes and modifies code from the toydb project (https://github.com/erikgrinaker/toydb),
# originally licensed under the Apache License, Version 2.0.
# Original copyright:
#   Copyright (c) 2024 Erik Grinaker
#
# The original Apache License can be found at:
#   http://www.apache.org/licenses/LICENSE-2.0

# Scan should be isolated from concurrent transactions.

# Past committed.
t1: begin
t1: set a=1 b=1 d=1 e=1
t1: commit
---
ok

# Past uncommitted.
t2: begin
t2: set a=2 c=2
t2: remove b
---
ok

# Begin the read transaction.
t3: begin readonly
---
ok

# Future committed.
t4: begin
t4: set d=3 f=3
t4: remove e
t4: commit
---
ok

# Future uncommitted.
t5: begin
t5: set d=4 g=4
t5: remove f
---
ok

# Scan keys.
t3: scan
---
t3: "a" → "1"
t3: "b" → "1"
t3: "d" → "1"
t3: "e" → "1"
