mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
tests: update 01173_transaction_control_queries
Since now on INSERT failures reconnect does not happens. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
01329d7d08
commit
23347a878d
@ -4,7 +4,7 @@ drop table if exists mt2;
|
||||
create table mt1 (n Int64) engine=MergeTree order by n;
|
||||
create table mt2 (n Int64) engine=MergeTree order by n;
|
||||
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- no transaction
|
||||
rollback; -- { serverError INVALID_TRANSACTION }
|
||||
|
||||
begin transaction;
|
||||
@ -31,7 +31,7 @@ select 'on exception before start', arraySort(groupArray(n)) from (select n from
|
||||
-- rollback on exception before start
|
||||
select functionThatDoesNotExist(); -- { serverError 46 }
|
||||
-- cannot commit after exception
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- after 46
|
||||
begin transaction; -- { serverError INVALID_TRANSACTION }
|
||||
rollback;
|
||||
|
||||
@ -42,7 +42,7 @@ select 'on exception while processing', arraySort(groupArray(n)) from (select n
|
||||
-- rollback on exception while processing
|
||||
select throwIf(100 < number) from numbers(1000); -- { serverError 395 }
|
||||
-- cannot commit after exception
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- after 395
|
||||
insert into mt1 values (5); -- { serverError INVALID_TRANSACTION }
|
||||
insert into mt2 values (50); -- { serverError INVALID_TRANSACTION }
|
||||
select 1; -- { serverError INVALID_TRANSACTION }
|
||||
@ -52,10 +52,9 @@ begin transaction;
|
||||
insert into mt1 values (6);
|
||||
insert into mt2 values (60);
|
||||
select 'on session close', arraySort(groupArray(n)) from (select n from mt1 union all select * from mt2);
|
||||
-- trigger reconnection by error on client, check rollback on session close
|
||||
insert into mt1 values ([1]); -- { clientError 43 }
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
rollback; -- { serverError INVALID_TRANSACTION }
|
||||
-- INSERT failures does not produce client reconnect anymore, so rollback can be done
|
||||
rollback;
|
||||
|
||||
begin transaction;
|
||||
insert into mt1 values (7);
|
||||
@ -82,19 +81,19 @@ rollback;
|
||||
|
||||
begin transaction;
|
||||
create table m (n int) engine=Memory; -- { serverError 48 }
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- after 48
|
||||
rollback;
|
||||
|
||||
create table m (n int) engine=Memory;
|
||||
begin transaction;
|
||||
insert into m values (1); -- { serverError 48 }
|
||||
select * from m; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- after 48
|
||||
rollback;
|
||||
|
||||
begin transaction;
|
||||
select * from m; -- { serverError 48 }
|
||||
commit; -- { serverError INVALID_TRANSACTION }
|
||||
commit; -- { serverError INVALID_TRANSACTION } -- after 48
|
||||
rollback;
|
||||
|
||||
drop table m;
|
||||
|
Loading…
Reference in New Issue
Block a user