Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions lab_9.sql
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ rollback to sp_before_update;
--6)
update schema1.employees
set department_id = 10
where employee_id = 14;
where employee_id = 5;

-- Корректное обновление одного сотрудника.

Expand Down Expand Up @@ -417,7 +417,7 @@ begin;
--3)изменить email первого сотрудника

update schema1.employees
set email = email || session1@yandex.ru
set email = email || 's1'
where employee_id = 1;

-- Изменение выполнено, но не видно в других сессиях.
Expand Down Expand Up @@ -453,7 +453,7 @@ where employee_id = 1;
--9) изменить email того же сотрудника

update schema1.employees
set email = email || ',session2@yandex.ru'
set email = email || 's2'
where employee_id = 1;

-- Изменение успешно.
Expand Down Expand Up @@ -577,7 +577,7 @@ begin;
--3) изменить email первого сотрудника

update schema1.employees
set email = email || ',session1@yandex.ru'
set email = email || 's1'
where employee_id = 1;

-- первое обращение к таблице зафиксировало snapshot.
Expand Down Expand Up @@ -619,7 +619,7 @@ where employee_id = 1;
--9) изменить email того же сотрудника

update schema1.employees
set email = email || ',session2@yandex.ru'
set email = email || 's2'
where employee_id = 1;

-- UPDATE будет ждать освобождения блокировки строки Session 1.
Expand Down Expand Up @@ -725,8 +725,3 @@ commit;
-- После commit snapshot “сбрасывается”.
-- В следующей новой транзакции select уже увидит новый телефон,
-- зафиксированный второй сессией.