sql-deadlock-examples/serializable/session 2.sql

17 lines
261 B
MySQL
Raw Normal View History

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN TRANSACTION
SELECT
SUM(Cena)
FROM
Bilety
-- STEP 2 RUN ABOVE
INSERT INTO
Wycieczki
VALUES
('Honolulu', 2000)
-- STEP 4 RUN BETWEEN 2 AND 4
COMMIT TRANSACTION