Skip to content

Commit e1884b1

Browse files
committed
Release 0.6.1: fix special-symbol workload transaction boundaries
1 parent 546769e commit e1884b1

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pg-workload"
7-
version = "0.6.0"
7+
version = "0.6.1"
88
description = "PostgreSQL workload emulator for diagnostic and observability testing"
99
readme = "README.md"
1010
requires-python = ">=3.10"

‎src/pg_workload/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""PostgreSQL workload generation and scheduling tools."""
22

3-
__version__ = "0.6.0"
3+
__version__ = "0.6.1"
44

55
from pg_workload.assets import bundled_profiles_root, initialize_project
66
from pg_workload.cli import build_parser

‎src/pg_workload/bundled/profiles/simple_stock_spec_symbols/sql/01_workload.sql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SELECT
3535
WHEN random() < 0.3 THEN '-Infinity'::double precision -- -Infinity
3636
ELSE random() * 1e18 -- Very large floating-point value
3737
END AS "Fließkomma\r\nCRLF$#@&", -- Fließkomma$#@& (double precision)
38-
'descr ' || generate_series(1,50) || ' <script>alert("XSS!");</script> <!-- SQL --> OR 1=1; DROP TABLE "Stock_$#@.&\n\r_items"; --' -- "ThisIsAVeryLongFieldNameThatWillBreakTheLayoutIfNotHandledPrope";
38+
'descr ' || generate_series(1,50) || ' <script>alert("XSS!");</script> <!-- SQL --> OR 1=1; DROP TABLE "Stock_$#@.&\n\r_items"; --'; -- "ThisIsAVeryLongFieldNameThatWillBreakTheLayoutIfNotHandledPrope"
3939
COMMIT;
4040

4141
BEGIN;

‎tests/test_docker_postgres18.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,14 @@ def test_postgres18_container_runs_all_smoke_profiles(self):
647647
)
648648

649649
for profile_name in profile_names:
650+
if profile_name == "simple_stock_spec_symbols":
651+
profile = profiles[profile_name]
652+
for job in profile.jobs:
653+
self.assertNotIn(
654+
"there is already a transaction in progress",
655+
profile.log_path(job).read_text(encoding="utf-8"),
656+
"Each stock operation must commit before the next BEGIN",
657+
)
650658
invariant_sql = PROFILE_INVARIANTS.get(profile_name)
651659
if invariant_sql is None:
652660
self.fail(f"No post-run invariant defined for bundled profile {profile_name}")

0 commit comments

Comments
 (0)