Commit Graph

20 Commits

Author SHA1 Message Date
pedrocarlo
aa5055e563 fuzz tests for pending_byte 2025-09-30 13:52:40 -03:00
Jussi Saurio
b12387b2e3 mvcc/fuzz: make some ALTER TABLE ops in mvcc fuzz test 2025-09-25 11:49:18 +03:00
Jussi Saurio
f7806cbc33 mvcc: add basic checkpoint test 2025-09-25 08:12:13 +03:00
Jussi Saurio
22a8992b6b mvcc: un-ignore mvcc fuzz test 2025-09-19 09:18:20 +03:00
Jussi Saurio
7410200a9f mvcc: add higher weight for BEGIN CONCURRENT in fuzz test 2025-09-19 09:18:20 +03:00
Jussi Saurio
4cda0d5d99 mvcc fuzz: fix tx startpoint as BEGIN CONCURRENT can fail 2025-09-17 11:43:20 +03:00
Jussi Saurio
ea6373b8ae Switch to BTreeMap for deterministic iteration 2025-09-16 12:56:17 +03:00
Jussi Saurio
59f18e2dc8 fix mvcc update
simple reason why mvcc update didn't work: it didn't try to update.
2025-09-15 11:27:56 +03:00
Jussi Saurio
f2079d8f07 test/fuzz: improve error handling in tx isolation fuzz test
- extract out common behavior for checking acceptable errors
- add functionality to check which errors require rolling back
  a transaction
2025-09-15 08:03:08 +03:00
Jussi Saurio
1c5febf047 test/fuzz: introduce fuzzoptions to tx isolation test
this makes it significantly easier to tweak the tx isolation test parameters,
and also makes it much easier to run the MVCC version of the test without
manually tweaking code inline to make it work.

introduces default options for the non-mvcc and mvcc test variants.
2025-09-15 07:44:16 +03:00
Jussi Saurio
6a7bead482 Fix tx isolation test semantics after #3023
The test now incorrectly takes a shadow snapshot of the DB state
before it is determined that the connection successfully started
a read transaction.

Fix: take the snapshot after we've verified that the read TX started.
2025-09-11 16:44:28 +03:00
Jussi Saurio
c30d320cab Fix: read transaction cannot be allowed to start with a stale max frame
If both of the following are true:

1. All read locks are already held
2. The highest readmark of any read lock is less than the committed max frame

Then we must return Busy to the reader, because otherwise they would begin a
transaction with a stale local max frame, and thus not see some committed
changes.
2025-09-11 15:58:13 +03:00
Jussi Saurio
a874530db8 Fix semantics of transaction isolation test
- Busy errors do not rollback the transaction
- Transaction takes snapshot of DB state after its first successful
  access of the DB, not before its first attempt to access the DB
2025-09-10 11:13:50 +03:00
Pekka Enberg
8161badbf4 core/vdbe: Don't rollback transaction when write upgrade fails
If upgrade from read to write transaction fails, don't roll back the
transaction. Instead restore the transaction into its original state,
which allows deferred transactions that have not read anything to
restart automatically.

Fixes #2984
2025-09-10 10:51:52 +03:00
PThorpe92
496105ac15 Add Full checkpoint mode to test_multiple_connections_fuzz 2025-08-09 17:34:23 -04:00
Jussi Saurio
d13a1a0eec Merge 'test/fuzz: add ALTER TABLE column ops to tx isolation fuzz test' from Jussi Saurio
## Beef
Adds `AddColumn`, `DropColumn`, `RenameColumn`
## Details
- Previously the test was hardcoded to assume there's always 2 named
columns, so changed a bunch of things for this reason
- Still assumes the primary key column is always `id` and is never
renamed or dropped etc.

Closes #2434
2025-08-05 15:42:31 +03:00
Pere Diaz Bou
2a3e2349ca tests/fuzz_transactions: add tests for fuzzing transactions with MVCC 2025-08-05 11:43:26 +02:00
Jussi Saurio
cd79d2dce5 test/fuzz: add ALTER TABLE column ops to tx isolation fuzz test 2025-08-05 10:05:56 +03:00
Jussi Saurio
685615dc98 test/fuzz/txn: remove assumption about hardcoded column count 2025-08-05 10:04:25 +03:00
Jussi Saurio
addb067416 chore: move tx isolation fuzz test to 'tests' 2025-08-01 13:02:05 +03:00