mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-02-02 02:40:42 +01:00
Added/Updated tests\bugs\gh_7350_test.py: Removed branched for 5.x vs 6.x, code now the same for 5.x and 6.x
This commit is contained in:
parent
3870823a95
commit
4ca464540b
@ -32,6 +32,10 @@ NOTES:
|
||||
set term @; select 1 from rdb$database @ set term @; - will not compile ("Unexpected end of command" raises).
|
||||
|
||||
Checked on 6.0.0.137 (SS/CS), 5.0.0.1274 (SS/CS).
|
||||
|
||||
[27.11.2023] pzotov
|
||||
Removed branched for 5.x vs 6.x, code now the same for 5.x and 6.x
|
||||
Checked on 5.0.0.1280 (intermediate build 27.11.2023, after backporting, commit dc2d85c17b41fb6c378bffc0896338c4f8856998).
|
||||
"""
|
||||
|
||||
import pytest
|
||||
@ -49,374 +53,7 @@ act = python_act('db', substitutions = substitutions)
|
||||
|
||||
CHECK_SQL = 'select id from test order by id with lock skip locked'
|
||||
|
||||
expected_stdout_5x = f"""
|
||||
QUERY_TYPE = DSQL, TIL = SERIALIZABLE, ACCESS = READ, WAIT = NO_WAIT:
|
||||
lock conflict on no wait transaction
|
||||
-Acquire lock for relation (TEST) failed
|
||||
-901
|
||||
335544345
|
||||
335544382
|
||||
QUERY_TYPE = DSQL, TIL = SNAPSHOT, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = SNAPSHOT, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-817
|
||||
335544361
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
deadlock
|
||||
-read conflicts with concurrent update
|
||||
-concurrent transaction number is
|
||||
-913
|
||||
335544336
|
||||
335545096
|
||||
335544878
|
||||
QUERY_TYPE = DSQL, TIL = SERIALIZABLE, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
lock conflict on no wait transaction
|
||||
-Acquire lock for relation (TEST) failed
|
||||
-901
|
||||
335544345
|
||||
335544382
|
||||
QUERY_TYPE = DSQL, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = DSQL, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
deadlock
|
||||
-read conflicts with concurrent update
|
||||
-concurrent transaction number is
|
||||
-913
|
||||
335544336
|
||||
335545096
|
||||
335544878
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SERIALIZABLE, ACCESS = READ, WAIT = NO_WAIT:
|
||||
lock conflict on no wait transaction
|
||||
-Acquire lock for relation (TEST) failed
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-901
|
||||
335544345
|
||||
335544382
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SNAPSHOT, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SNAPSHOT, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = WAIT:
|
||||
attempted update during read-only transaction
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-817
|
||||
335544361
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
deadlock
|
||||
-read conflicts with concurrent update
|
||||
-concurrent transaction number is
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-913
|
||||
335544336
|
||||
335545096
|
||||
335544878
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SERIALIZABLE, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
lock conflict on no wait transaction
|
||||
-Acquire lock for relation (TEST) failed
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-901
|
||||
335544345
|
||||
335544382
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_LOCAL, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
deadlock
|
||||
-read conflicts with concurrent update
|
||||
-concurrent transaction number is
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_LOCAL'
|
||||
-913
|
||||
335544336
|
||||
335545096
|
||||
335544878
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SERIALIZABLE, ACCESS = READ, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544345 : lock conflict on no wait transaction
|
||||
335544382 : Acquire lock for relation (TEST) failed
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SNAPSHOT, ACCESS = READ, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SNAPSHOT, ACCESS = READ, WAIT = WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = READ, WAIT = WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = READ, WAIT = WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544361 : attempted update during read-only transaction
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = READ, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544336 : deadlock
|
||||
335545096 : read conflicts with concurrent update
|
||||
335544878 : concurrent transaction number is
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SERIALIZABLE, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544345 : lock conflict on no wait transaction
|
||||
335544382 : Acquire lock for relation (TEST) failed
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = SNAPSHOT, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_READ_CONSISTENCY, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_RECORD_VERSION, ACCESS = WRITE, WAIT = WAIT:
|
||||
ID=2
|
||||
ID=3
|
||||
ID=4
|
||||
ID=6
|
||||
ID=7
|
||||
ID=8
|
||||
ID=10
|
||||
QUERY_TYPE = PSQL_REMOTE, TIL = READ_COMMITTED_NO_RECORD_VERSION, ACCESS = WRITE, WAIT = NO_WAIT:
|
||||
Execute statement error at isc_dsql_fetch :
|
||||
335544336 : deadlock
|
||||
335545096 : read conflicts with concurrent update
|
||||
335544878 : concurrent transaction number is
|
||||
Statement : select id from test order by id with lock skip locked
|
||||
Data source : Firebird::localhost:
|
||||
-At procedure 'SP_GET_UNLOCKED_ROWS_REMOTE'
|
||||
-901
|
||||
335544926
|
||||
335544842
|
||||
"""
|
||||
|
||||
expected_stdout_6x = f"""
|
||||
expected_stdout = f"""
|
||||
QUERY_TYPE = DSQL, TIL = SERIALIZABLE, ACCESS = READ, WAIT = NO_WAIT:
|
||||
lock conflict on no wait transaction
|
||||
-Acquire lock for relation (TEST) failed
|
||||
@ -860,11 +497,7 @@ def test_1(act: Action, capsys):
|
||||
for x_mode in tpb_mode_set:
|
||||
for x_isol in tpb_isol_set:
|
||||
for x_wait in tpb_wait_set:
|
||||
if act.is_version('<6'):
|
||||
skip_flag = x_isol in (Isolation.SERIALIZABLE, Isolation.READ_COMMITTED_NO_RECORD_VERSION) and x_wait == TraLockResolution.WAIT
|
||||
else:
|
||||
skip_flag = x_isol in (Isolation.SERIALIZABLE,) and x_wait == TraLockResolution.WAIT
|
||||
|
||||
skip_flag = x_isol in (Isolation.SERIALIZABLE,) and x_wait == TraLockResolution.WAIT
|
||||
if skip_flag:
|
||||
|
||||
#######################################
|
||||
@ -905,6 +538,6 @@ def test_1(act: Action, capsys):
|
||||
finally:
|
||||
tx_free_seeker.rollback()
|
||||
|
||||
act.expected_stdout = expected_stdout_5x if act.is_version('<6') else expected_stdout_6x
|
||||
act.expected_stdout = expected_stdout
|
||||
act.stdout = capsys.readouterr().out
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
||||
|
Loading…
Reference in New Issue
Block a user