-- -- -- Session B -- -- --
USE cosc_61;
-- what's our connection number
SELECT CONNECTION_ID();
-- get next order number
SELECT @ordernum:=MAX(orderNumber)+1 FROM orders;
-- try to create another order 
-- and we are suspended, waiting for the READ lock to be released
INSERT INTO orders (orderNumber, orderDate, customerNumber)
  VALUES(@ordernum, '2022-11-04', 400);
-- If we're here the READ lock was released
SELECT COUNT(*) FROM orders;
