Commit Graph

113 Commits

Author SHA1 Message Date
pedrocarlo
bfeccf6543 integrate DropIndex in query generator 2025-10-13 13:56:36 -03:00
pedrocarlo
703efaa724 adjust Properties to skip Alter Table in certain conditions 2025-10-13 02:34:43 -03:00
pedrocarlo
c072058e4b add Alter Table query generation in Sim 2025-10-13 02:04:15 -03:00
pedrocarlo
f593080c2a add Query::AlterTable variant 2025-10-10 11:08:04 -03:00
pedrocarlo
b6f94b2fa1 remove dead code in sim 2025-10-09 17:25:04 -03:00
pedrocarlo
300d918040 fix differential check for parse error 2025-10-07 15:03:50 -03:00
pedrocarlo
3b2583c540 adjust Interaction generation to take into account possibilty of PropertyDistribution to have 0 Weights 2025-10-07 14:17:37 -03:00
pedrocarlo
21fc8bae2a Property::FaultyQuery and FsyncNoWait stored a list of tables to check the on the database. Again, the FaultyQuery could be a Drop Table which meant that we could be running a SELECT on an inexistent table. To solve this, just insert a Property that check all the tables in the db after a Faulty Property 2025-10-07 13:23:35 -03:00
pedrocarlo
6bad5d04ce generate extensional queries when iterating over the next interaction, not when generating the property. This is necessary as the extensional queries can modify schema and thus could cause the next queries to fail because the DB enviroment context was not updated on generation time. Rule of thumb: queries should never be generated in bulk, always one a a time so the enviroment can be shadowed accordingly 2025-10-07 13:19:53 -03:00
pedrocarlo
7eb504baef certain properties cannot be generated if there are no tables in the current context 2025-10-07 11:38:47 -03:00
pedrocarlo
07cc1c548b adjust query generation to avoid DROP for certain extensional queries 2025-10-07 11:38:47 -03:00
pedrocarlo
4fc7be5042 as we have DROP table now, if we want to generate extensional queries eagerly, without affecting how we document interactions with MVCC, we need to travel forward in time and shadow queries eagerly so we can generate queries correctly. This involves cloning the tables unfortunately which is inneficient but correct 2025-10-07 11:38:47 -03:00
pedrocarlo
3e8867c8f5 DropSelect property should only fail when error is not a parse error on the table name 2025-10-07 11:38:47 -03:00
pedrocarlo
7f93f64fc5 enable Drop statements 2025-10-07 11:38:47 -03:00
pedrocarlo
8b6456f843 do not allow Property::Queries to attempt to be generated 2025-10-07 02:36:14 -03:00
pedrocarlo
91da12390d refactor property generation to use query distribution and avoid more
memory allocations
2025-10-07 02:36:14 -03:00
pedrocarlo
b1c26505b8 adjust Rng generic to include ?Sized + introduce WeightedDistribution trait 2025-10-07 02:36:13 -03:00
pedrocarlo
bb9c8dea4f rework interaction generation to only generate possible queries + do less allocations 2025-10-07 02:36:13 -03:00
pedrocarlo
25ad94079c print_diff in ReadYourUpdatesBack + TableHasExpectedContent 2025-10-03 11:34:40 -03:00
pedrocarlo
dc0d4e2dcb print diffs in assert tables 2025-10-03 02:01:14 -03:00
pedrocarlo
9f95499a55 do not count BEGIN, COMMIT, and ROLLBACK queries as interactions in the InteractionPlan, so we can generate more meaningful intereactions without hitting the max cap quickly 2025-09-27 23:52:57 -03:00
pedrocarlo
461c765b7b fix shrinking extensional queries. Now we only keep queries and/or properties that contain a depending table 2025-09-27 23:52:57 -03:00
pedrocarlo
ff9599abe1 do not generate non-conccurent transactions with mvcc 2025-09-27 23:52:57 -03:00
pedrocarlo
df420ab815 consolidate SimulatorEnv rollback code 2025-09-27 23:52:57 -03:00
pedrocarlo
026fd9ae9e add ignore_error flag to interaction so that we fail on errors when executing interactions 2025-09-27 23:52:57 -03:00
pedrocarlo
d070c1c184 rollback active transaction in properties that error is acceptable 2025-09-27 23:52:57 -03:00
pedrocarlo
6569d27bdc compare rows order insensitively for differential testing 2025-09-22 15:33:37 -03:00
pedrocarlo
2cd7c68c35 adjust property generation to not panic by always having some property to select from 2025-09-22 15:24:30 -03:00
pedrocarlo
6e2b0c901e remove PanicGenerationContext and instead just pass the connection context directly 2025-09-21 14:16:46 -03:00
pedrocarlo
021d5d272a refactor shadowing code to take into account snapshot isolation 2025-09-20 12:01:07 -03:00
pedrocarlo
0293c32616 disable integrity check and indexes when using mvcc 2025-09-20 11:52:15 -03:00
pedrocarlo
13f36880f8 adjust generation code to use the context from the current connection index instead of the whole database 2025-09-20 11:52:15 -03:00
pedrocarlo
30538e7898 modify Begin struct 2025-09-20 11:52:15 -03:00
pedrocarlo
6039a30222 fix double create failure 2025-09-17 10:49:24 -03:00
pedrocarlo
faf38fe196 add connection Index to interaction struct 2025-09-17 10:49:24 -03:00
pedrocarlo
7e02fbe7e7 make assertion to be cloneable 2025-09-17 10:49:24 -03:00
pedrocarlo
4f2bc96dbe add Faultless profile 2025-08-30 13:07:19 -03:00
pedrocarlo
5881ee71d6 clippy 2025-08-30 12:21:37 -03:00
pedrocarlo
61fa7546c1 fold some SimulatorOpts fields to Profile 2025-08-30 11:31:52 -03:00
pedrocarlo
463eb1fefd simplify profile weights for writes 2025-08-30 11:31:52 -03:00
pedrocarlo
2f237fdcfd adjust remaining calculation to use the profile 2025-08-30 11:31:52 -03:00
pedrocarlo
962666831b read Profile file from path or use predefined profiles 2025-08-30 11:31:52 -03:00
pedrocarlo
06b923d0c1 adjust simulator to use correct trait signature 2025-08-30 11:31:52 -03:00
pedrocarlo
8010b7d0c7 make simulator use sql_generation crate as dependency 2025-08-25 22:59:31 -03:00
Jussi Saurio
97657a86b3 Do not assume error message content in FaultyQuery 2025-08-19 12:49:01 +03:00
pedrocarlo
d96a26aef9 Property TableHasExpectedContent should just check the expected
content on runtime, not generation time
2025-08-18 16:00:59 -03:00
pedrocarlo
6388ed2017 FaultyQuery enabled by default 2025-08-18 11:52:10 -03:00
Jussi Saurio
96072509f5 sim: add Property::TableHasExpectedContent 2025-08-15 11:16:31 +03:00
Jussi Saurio
1a11648974 sim: add Property::ReadYourUpdatesBack 2025-08-14 19:04:27 +03:00
Jussi Saurio
d67a9f03fd sim: add order by to some queries 2025-07-18 10:47:36 +03:00