mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\gh_7675_test.py: Removed output of concrete data for checked query. It is enough only to display content of SQLDA (lines with 'sqltype:' and 'name:') and SQLSTATE (if some error occurs).
This commit is contained in:
parent
aabe3479b7
commit
57e95fd7f9
@ -10,7 +10,13 @@ DESCRIPTION:
|
|||||||
NOTES:
|
NOTES:
|
||||||
[02.10.2023] pzotov
|
[02.10.2023] pzotov
|
||||||
Checked on 6.0.0.65.
|
Checked on 6.0.0.65.
|
||||||
|
|
||||||
|
[17.11.2024] pzotov
|
||||||
|
Removed output of concrete data for checked query.
|
||||||
|
It is enough only to display content of SQLDA (lines with 'sqltype:' and 'name:') and SQLSTATE (if some error occurs).
|
||||||
|
Checked on 6.0.0.532.
|
||||||
"""
|
"""
|
||||||
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
@ -35,119 +41,51 @@ init_sql = """
|
|||||||
db = db_factory(init = init_sql)
|
db = db_factory(init = init_sql)
|
||||||
|
|
||||||
test_script = """
|
test_script = """
|
||||||
set list on;
|
set sqlda_display on;
|
||||||
select *
|
select p.*
|
||||||
from rdb$sql.explain(
|
from rdb$sql.explain('select 1 from rdb$database') as p
|
||||||
q'{
|
rows 0
|
||||||
select m2.id, count(*)
|
;
|
||||||
from tmain m2
|
|
||||||
join tdetl d using(id)
|
|
||||||
where m2.x > 0
|
|
||||||
group by 1
|
|
||||||
}'
|
|
||||||
) p
|
|
||||||
order by p.plan_line;
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
act = isql_act('db', test_script)
|
act = isql_act('db', test_script, substitutions=[('^((?!SQLSTATE|sqltype:|name:).)*$',''),('[ \t]+',' ')])
|
||||||
|
|
||||||
expected_stdout = """
|
expected_stdout = """
|
||||||
PLAN_LINE 1
|
01: sqltype: 496 LONG scale: 0 subtype: 0 len: 4
|
||||||
RECORD_SOURCE_ID 7
|
: name: PLAN_LINE alias: PLAN_LINE
|
||||||
PARENT_RECORD_SOURCE_ID <null>
|
|
||||||
LEVEL 0
|
02: sqltype: 580 INT64 scale: 0 subtype: 0 len: 8
|
||||||
OBJECT_TYPE <null>
|
: name: RECORD_SOURCE_ID alias: RECORD_SOURCE_ID
|
||||||
PACKAGE_NAME <null>
|
|
||||||
OBJECT_NAME <null>
|
03: sqltype: 580 INT64 Nullable scale: 0 subtype: 0 len: 8
|
||||||
ALIAS <null>
|
: name: PARENT_RECORD_SOURCE_ID alias: PARENT_RECORD_SOURCE_ID
|
||||||
CARDINALITY <null>
|
|
||||||
RECORD_LENGTH <null>
|
04: sqltype: 496 LONG scale: 0 subtype: 0 len: 4
|
||||||
KEY_LENGTH <null>
|
: name: LEVEL alias: LEVEL
|
||||||
ACCESS_PATH 0:4
|
|
||||||
Select Expression
|
05: sqltype: 500 SHORT Nullable scale: 0 subtype: 0 len: 2
|
||||||
PLAN_LINE 2
|
: name: OBJECT_TYPE alias: OBJECT_TYPE
|
||||||
RECORD_SOURCE_ID 6
|
|
||||||
PARENT_RECORD_SOURCE_ID 7
|
06: sqltype: 452 TEXT Nullable scale: 0 subtype: 0 len: 252 charset: 4 UTF8
|
||||||
LEVEL 1
|
: name: PACKAGE_NAME alias: PACKAGE_NAME
|
||||||
OBJECT_TYPE <null>
|
|
||||||
PACKAGE_NAME <null>
|
07: sqltype: 452 TEXT Nullable scale: 0 subtype: 0 len: 252 charset: 4 UTF8
|
||||||
OBJECT_NAME <null>
|
: name: OBJECT_NAME alias: OBJECT_NAME
|
||||||
ALIAS <null>
|
|
||||||
CARDINALITY 0.1000000000000000
|
08: sqltype: 452 TEXT Nullable scale: 0 subtype: 0 len: 252 charset: 4 UTF8
|
||||||
RECORD_LENGTH <null>
|
: name: ALIAS alias: ALIAS
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:5
|
09: sqltype: 480 DOUBLE Nullable scale: 0 subtype: 0 len: 8
|
||||||
-> Aggregate
|
: name: CARDINALITY alias: CARDINALITY
|
||||||
PLAN_LINE 3
|
|
||||||
RECORD_SOURCE_ID 5
|
10: sqltype: 496 LONG Nullable scale: 0 subtype: 0 len: 4
|
||||||
PARENT_RECORD_SOURCE_ID 6
|
: name: RECORD_LENGTH alias: RECORD_LENGTH
|
||||||
LEVEL 2
|
|
||||||
OBJECT_TYPE <null>
|
11: sqltype: 496 LONG Nullable scale: 0 subtype: 0 len: 4
|
||||||
PACKAGE_NAME <null>
|
: name: KEY_LENGTH alias: KEY_LENGTH
|
||||||
OBJECT_NAME <null>
|
|
||||||
ALIAS <null>
|
12: sqltype: 520 BLOB scale: 0 subtype: 1 len: 8 charset: 4 UTF8
|
||||||
CARDINALITY 100.0000000000000
|
: name: ACCESS_PATH alias: ACCESS_PATH
|
||||||
RECORD_LENGTH <null>
|
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:6
|
|
||||||
-> Nested Loop Join (inner)
|
|
||||||
PLAN_LINE 4
|
|
||||||
RECORD_SOURCE_ID 2
|
|
||||||
PARENT_RECORD_SOURCE_ID 5
|
|
||||||
LEVEL 3
|
|
||||||
OBJECT_TYPE <null>
|
|
||||||
PACKAGE_NAME <null>
|
|
||||||
OBJECT_NAME <null>
|
|
||||||
ALIAS <null>
|
|
||||||
CARDINALITY 100.0000000000000
|
|
||||||
RECORD_LENGTH <null>
|
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:7
|
|
||||||
-> Filter
|
|
||||||
PLAN_LINE 5
|
|
||||||
RECORD_SOURCE_ID 1
|
|
||||||
PARENT_RECORD_SOURCE_ID 2
|
|
||||||
LEVEL 4
|
|
||||||
OBJECT_TYPE 0
|
|
||||||
PACKAGE_NAME <null>
|
|
||||||
OBJECT_NAME TMAIN
|
|
||||||
ALIAS M2
|
|
||||||
CARDINALITY 100.0000000000000
|
|
||||||
RECORD_LENGTH <null>
|
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:8
|
|
||||||
-> Table "TMAIN" as "M2" Access By ID
|
|
||||||
-> Index "TMAIN_PK" Full Scan
|
|
||||||
-> Bitmap
|
|
||||||
-> Index "TMAIN_X" Range Scan (lower bound: 1/1)
|
|
||||||
PLAN_LINE 6
|
|
||||||
RECORD_SOURCE_ID 4
|
|
||||||
PARENT_RECORD_SOURCE_ID 5
|
|
||||||
LEVEL 3
|
|
||||||
OBJECT_TYPE <null>
|
|
||||||
PACKAGE_NAME <null>
|
|
||||||
OBJECT_NAME <null>
|
|
||||||
ALIAS <null>
|
|
||||||
CARDINALITY 1.000000000000000
|
|
||||||
RECORD_LENGTH <null>
|
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:9
|
|
||||||
-> Filter
|
|
||||||
PLAN_LINE 7
|
|
||||||
RECORD_SOURCE_ID 3
|
|
||||||
PARENT_RECORD_SOURCE_ID 4
|
|
||||||
LEVEL 4
|
|
||||||
OBJECT_TYPE 0
|
|
||||||
PACKAGE_NAME <null>
|
|
||||||
OBJECT_NAME TDETL
|
|
||||||
ALIAS D
|
|
||||||
CARDINALITY 0.9999999999999999
|
|
||||||
RECORD_LENGTH <null>
|
|
||||||
KEY_LENGTH <null>
|
|
||||||
ACCESS_PATH 0:a
|
|
||||||
-> Table "TDETL" as "D" Access By ID
|
|
||||||
-> Bitmap
|
|
||||||
-> Index "TDETL_PK" Unique Scan
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.version('>=6.0')
|
@pytest.mark.version('>=6.0')
|
||||||
|
Loading…
Reference in New Issue
Block a user