added delete operations to blobs in memory and write tests

This commit is contained in:
pedrocarlo 2025-05-31 14:40:28 -03:00
parent dae58be071
commit e97227ccb9
2 changed files with 10 additions and 2 deletions

View file

@ -20,7 +20,7 @@ def stub_memory_test(
# zero_blob_size = 1024 **2
zero_blob = "0" * blob_size * 2
# vals = 100
big_stmt = ["CREATE TABLE temp (t1 BLOB, t2 INTEGER);"]
big_stmt = ["CREATE TABLE temp (t1 BLOB, t2 INTEGER);", "CREATE INDEX temp_index ON temp(t1);"]
big_stmt = big_stmt + [
f"INSERT INTO temp (t1) VALUES (zeroblob({blob_size}));"
if i % 2 == 0 and blobs
@ -39,6 +39,10 @@ def stub_memory_test(
big_stmt.append("SELECT count(*) FROM temp;")
expected.append(str(vals * 2))
big_stmt.append("DELETE FROM temp;")
big_stmt.append("SELECT count(*) FROM temp;")
expected.append(str(0))
big_stmt = "".join(big_stmt)
expected = "\n".join(expected)