-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add dotnet test for isolation levels
Signed-off-by: Tanzeel Khan <[email protected]>
- Loading branch information
1 parent
4757a79
commit 8fb83d2
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#Q#SELECT set_config('babelfishpg_tsql.enable_repeatable_read_isolation_level','on',false) | ||
#D#text | ||
on | ||
#Q#SELECT set_config('babelfishpg_tsql.enable_serializable_isolation_level','off',false) | ||
#D#text | ||
off | ||
#Q#select @@trancount; | ||
#D#int | ||
1 | ||
#Q#select current_setting('transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#select current_setting('default_transaction_isolation') | ||
#D#text | ||
repeatable read | ||
#Q#select @@trancount; | ||
#D#int | ||
0 | ||
#Q#select current_setting('transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#select current_setting('default_transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#SELECT set_config('babelfishpg_tsql.enable_repeatable_read_isolation_level','off',false) | ||
#D#text | ||
off | ||
#Q#SELECT set_config('babelfishpg_tsql.enable_serializable_isolation_level','on',false) | ||
#D#text | ||
on | ||
#Q#select @@trancount; | ||
#D#int | ||
0 | ||
#Q#select current_setting('transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#select current_setting('default_transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#select @@trancount; | ||
#D#int | ||
1 | ||
#Q#select current_setting('transaction_isolation') | ||
#D#text | ||
read committed | ||
#Q#select current_setting('default_transaction_isolation') | ||
#D#text | ||
serializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
SELECT set_config('babelfishpg_tsql.enable_repeatable_read_isolation_level','on',false) | ||
SELECT set_config('babelfishpg_tsql.enable_serializable_isolation_level','off',false) | ||
|
||
# Begin transaction -> rollback transaction | ||
txn#!#begin#!#isolation#!#rr | ||
select @@trancount; | ||
select current_setting('transaction_isolation') | ||
select current_setting('default_transaction_isolation') | ||
txn#!#rollback | ||
|
||
# Begin transaction -> error | ||
txn#!#begin#!#isolation#!#s -- error | ||
select @@trancount; | ||
select current_setting('transaction_isolation') | ||
select current_setting('default_transaction_isolation') | ||
|
||
SELECT set_config('babelfishpg_tsql.enable_repeatable_read_isolation_level','off',false) | ||
SELECT set_config('babelfishpg_tsql.enable_serializable_isolation_level','on',false) | ||
|
||
# Begin transaction -> error | ||
txn#!#begin#!#isolation#!#rr -- error | ||
select @@trancount; | ||
select current_setting('transaction_isolation') | ||
select current_setting('default_transaction_isolation') | ||
|
||
# Begin transaction -> rollback transaction | ||
txn#!#begin#!#isolation#!#s | ||
select @@trancount; | ||
select current_setting('transaction_isolation') | ||
select current_setting('default_transaction_isolation') | ||
txn#!#rollback |