openjdk version "21.0.11" 2026-04-21 LTS
OpenJDK Runtime Environment Corretto-21.0.11.10.1 (build 21.0.11+10-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.11.10.1 (build 21.0.11+10-LTS, mixed mode, sharing)
javac 21.0.11
PASS frozen source integrity ed5a420a0189945118b8b0211f6da39e989a453d 19
H2 version=2.1.214 SHA256=d623cdc0f61d218cf549a8d09f1c391ff91096116b22e2475475fce4fbe72bd0
OPEN connection=1 isolation=2
SQL connection=1 thread=main text=CREATE TABLE equipment (  tenant_id VARCHAR(40) NOT NULL,  equipment_id VARCHAR(80) NOT NULL,  category VARCHAR(80) NOT NULL,  state VARCHAR(30) NOT NULL CHECK (state IN ('ACTIVE','RETIRED','INSPECTION_REQUIRED')),  version BIGINT NOT NULL DEFAULT 0,  PRIMARY KEY(tenant_id,equipment_id) ) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=CREATE TABLE rental_contract (  tenant_id VARCHAR(40) NOT NULL,  contract_id VARCHAR(80) NOT NULL,  equipment_id VARCHAR(80) NOT NULL,  starts_at TIMESTAMP(9) WITH TIME ZONE NOT NULL,  ends_at TIMESTAMP(9) WITH TIME ZONE NOT NULL,  amount DECIMAL(19,2) NOT NULL CHECK (amount >= 0),  currency VARCHAR(3) NOT NULL CHECK (currency IN ('CNY','USD')),  status VARCHAR(16) NOT NULL CHECK (status IN ('RESERVED','CANCELLED')),  version BIGINT NOT NULL DEFAULT 0,  PRIMARY KEY(tenant_id,contract_id),  FOREIGN KEY(tenant_id,equipment_id) REFERENCES equipment(tenant_id,equipment_id),  CHECK (starts_at < ends_at) ) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=CREATE TABLE contract_line (  tenant_id VARCHAR(40) NOT NULL,  contract_id VARCHAR(80) NOT NULL,  line_no INT NOT NULL,  description VARCHAR(120) NOT NULL,  amount DECIMAL(19,2) NOT NULL CHECK (amount >= 0),  PRIMARY KEY(tenant_id,contract_id,line_no),  FOREIGN KEY(tenant_id,contract_id) REFERENCES rental_contract(tenant_id,contract_id) ) binds=[]
ROWS connection=1 affected=0
COMMIT connection=1 count=1
SQL connection=1 thread=main text=SELECT H2VERSION() binds=[]
DATABASE H2=2.1.214 schema=v1
CLOSE connection=1 openStatements=0
OPEN connection=2 isolation=2
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T1, E1, camera, ACTIVE]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T1, E2, camera, ACTIVE]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T1, E3, camera, ACTIVE]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T1, E4, camera, RETIRED]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T2, OTHER, camera, ACTIVE]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO equipment(tenant_id,equipment_id,category,state) VALUES(?,?,?,?) binds=[T1, QUOTE, camera' OR '1'='1, ACTIVE]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO rental_contract(tenant_id,contract_id,equipment_id,starts_at,ends_at,amount,currency,status,version) VALUES(?,?,?,?,?,?,?,?,?) binds=[T1, busy, E1, 2026-10-03T10:00:00.123456789Z, 2026-10-03T11:30:00.123456789Z, 25.00, CNY, RESERVED, 0]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO rental_contract(tenant_id,contract_id,equipment_id,starts_at,ends_at,amount,currency,status,version) VALUES(?,?,?,?,?,?,?,?,?) binds=[T1, old-1, E2, 2026-10-03T10:00:00.123456789Z, 2026-10-03T11:30:00.123456789Z, 25.00, CNY, CANCELLED, 0]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO rental_contract(tenant_id,contract_id,equipment_id,starts_at,ends_at,amount,currency,status,version) VALUES(?,?,?,?,?,?,?,?,?) binds=[T1, old-2, E2, 2026-10-03T10:00:00.123456789Z, 2026-10-03T11:30:00.123456789Z, 25.00, CNY, CANCELLED, 0]
ROWS connection=2 affected=1
SQL connection=2 thread=main text=INSERT INTO rental_contract(tenant_id,contract_id,equipment_id,starts_at,ends_at,amount,currency,status,version) VALUES(?,?,?,?,?,?,?,?,?) binds=[T1, adjacent, E3, 2026-10-03T11:30:00.123456789Z, 2026-10-03T12:30:00.123456789Z, 25.00, CNY, RESERVED, 0]
ROWS connection=2 affected=1
COMMIT connection=2 count=1
CLOSE connection=2 openStatements=0
OPEN connection=3 isolation=2
SQL connection=3 thread=main text=SELECT e.equipment_id FROM equipment e WHERE e.tenant_id=? AND e.category=? AND e.state='ACTIVE' AND NOT EXISTS (SELECT 1 FROM rental_contract c WHERE c.tenant_id=e.tenant_id AND c.equipment_id=e.equipment_id AND c.status='RESERVED' AND c.starts_at<? AND ?<c.ends_at) ORDER BY e.equipment_id ASC binds=[T1, camera, 2026-10-03T11:30:00.123456789Z, 2026-10-03T10:00:00.123456789Z]
PASS tenant, category, ACTIVE, half-open occupancy exact set
PASS cancelled history does not duplicate rows
SQL connection=3 thread=main text=SELECT e.equipment_id FROM equipment e WHERE e.tenant_id=? AND e.category=? AND e.state='ACTIVE' AND NOT EXISTS (SELECT 1 FROM rental_contract c WHERE c.tenant_id=e.tenant_id AND c.equipment_id=e.equipment_id AND c.status='RESERVED' AND c.starts_at<? AND ?<c.ends_at) ORDER BY e.equipment_id DESC binds=[T1, camera, 2026-10-03T11:30:00.123456789Z, 2026-10-03T10:00:00.123456789Z]
PASS allowlisted descending order
SQL connection=3 thread=main text=SELECT e.equipment_id FROM equipment e WHERE e.tenant_id=? AND e.category=? AND e.state='ACTIVE' AND NOT EXISTS (SELECT 1 FROM rental_contract c WHERE c.tenant_id=e.tenant_id AND c.equipment_id=e.equipment_id AND c.status='RESERVED' AND c.starts_at<? AND ?<c.ends_at) ORDER BY e.equipment_id ASC binds=[T1, camera' OR '1'='1, 2026-10-03T11:30:00.123456789Z, 2026-10-03T10:00:00.123456789Z]
PASS quote input stays bound data
PASS statements and results closed after queries
CLOSE connection=3 openStatements=0
PASS empty tenant/category, missing period, illegal sort rejected
OPEN connection=4 isolation=2
SQL connection=4 thread=main text=CREATE TABLE external_stock(warehouse VARCHAR(30), category VARCHAR(80), units INT CHECK(units>=0), PRIMARY KEY(warehouse,category)) binds=[]
ROWS connection=4 affected=0
SQL connection=4 thread=main text=INSERT INTO external_stock VALUES(?,?,?) binds=[W1, camera, 3]
ROWS connection=4 affected=1
COMMIT connection=4 count=1
CLOSE connection=4 openStatements=0
OPEN connection=5 isolation=2
SQL connection=5 thread=main text=SELECT units FROM external_stock WHERE warehouse=? AND category=? binds=[W1, camera]
CLOSE connection=5 openStatements=0
PASS gateway reads actual separate inventory database
OPEN connection=6 isolation=2
SQL connection=6 thread=main text=SELECT COUNT(*) FROM equipment binds=[]
PASS rental database remains six equipment rows
CLOSE connection=6 openStatements=0
RESULT enterprise06 checks=8
