1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| begin transaction;
create table t1(c int primary key);
create table t2(c int primary key);
commit transaction;
--12 secs COMMIT Query returned successfully in 12 secs.
begin transaction;
create table t3(c int primary key);
drop table t2;
alter table t1 add column c1 char(2);
commit transaction;
--2 secs COMMIT Query returned successfully in 2 secs.
begin transaction;
alter table t3 add column c2 char(1);
insert into t1(c, c1) values(1,'aa');
commit transaction;
--1 secs COMMIT Query returned successfully in 1 secs.
begin transaction;
alter table t3 add column c3 char(1);
insert into t1(c, c1) values(2,'ba');
rollback transaction;
--1 secs ROLLBACK Query returned successfully in 1 secs. |