3 #text |
request = <SubRequest 'db' for <Function test_1>>
db_path = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11596')
db_cache = <firebird.qa.plugin.DbCache pytest object at [hex]>
@pytest.fixture
def database_fixture(request: pytest.FixtureRequest, db_path, db_cache) -> Database:
db = Database(db_path, filename, user, password, charset, debug=str(request.module),
config_name=config_name, utf8filename=utf8filename)
if not do_not_create:
if from_backup is None and copy_of is None:
db.create(page_size, sql_dialect, db_cache)
elif from_backup is not None:
db.restore(from_backup)
elif copy_of is not None:
db.copy(copy_of)
if async_write:
db.set_async_write()
if init: # Do not check for None, we want to skip empty scripts as well
try:
db.init(init)
except Error as exc:
if hasattr(exc, 'stderr'):
request.node.user_properties.append(("dbinit-stderr", exc.stderr))
raise
yield db
if not do_not_drop:
> db.drop()
src\firebird\qa\plugin.py:987:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
server = 'qa_rundaily_hq40'
def connect_server(server: str, *, user: str=None, password: str=None,
crypt_callback: iCryptKeyCallbackImpl=None,
expected_db: str=None, role: str=None, encoding: str=None,
encoding_errors: str=None) -> Server:
"""Establishes a connection to server's service manager.
Arguments:
server: Server host machine or Server configuration name.
user: User name.
password: User password.
crypt_callback: Callback that provides encryption key.
expected_db: Database that would be accessed (for using services with non-default
security database)
role: SQL role used for connection.
encoding: Encoding for string values passed in parameter buffer. Default is
`.ServerConfig.encoding`.
encoding_errors: Error handler used for encoding errors. Default is
`.ServerConfig.encoding_errors`.
Hooks:
Event `.ServerHook.ATTACHED`: Executed before `Service` instance is
returned. Hook must have signature::
hook_func(server: Server) -> None
Any value returned by hook is ignored.
"""
srv_config = driver_config.get_server(server)
if srv_config is None:
srv_config = driver_config.server_defaults
host = server or None
port = None
else:
host = srv_config.host.value
port = srv_config.port.value
if host is None:
host = 'service_mgr'
if not host.endswith('service_mgr'):
if host and not host.endswith(':'):
if port:
host += f"/{port}"
host += ':'
host += 'service_mgr'
if user is None:
user = srv_config.user.value
if password is None:
password = srv_config.password.value
spb = SPB_ATTACH(user=user, password=password, config=srv_config.config.value,
trusted_auth=srv_config.trusted_auth.value,
auth_plugin_list=srv_config.auth_plugin_list.value,
expected_db=expected_db, role=role)
spb_buf = spb.get_buffer()
with a.get_api().master.get_dispatcher() as provider:
if crypt_callback is not None:
provider.set_dbcrypt_callback(crypt_callback)
> svc = provider.attach_service_manager(host, spb_buf)
C:\Python3x\Lib\site-packages\firebird\driver\core.py:5596:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <firebird.driver.interfaces.iProvider pytest object at [hex]>
service = 'localhost/33337:service_mgr'
spb = b'\x02\x02\x1c\x06SYSDBA\x1d\tmasterkey'
def attach_service_manager(self, service: str, spb: bytes) -> iService:
"Replaces `isc_service_attach()`"
result = self.vtable.attachServiceManager(self, self.status, service.encode(), len(spb), spb)
> self._check()
C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:1305:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <firebird.driver.interfaces.iProvider pytest object at [hex]>
def _check(self) -> None:
state = self.status.get_state()
if StateFlag.ERRORS in state:
> raise self.__report(DatabaseError, self.status.get_errors())
E firebird.driver.types.DatabaseError: Unable to complete network request to host "localhost".
E -Failed to establish a connection.
C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:113: DatabaseError
|
4 #stack |
# 00000`00379000 Unfrozen
# Call Site
00 ntdll!NtWaitForMultipleObjects+0x14
01 KERNELBASE!WaitForMultipleObjectsEx+0xf0
02 KERNELBASE!WaitForMultipleObjects+0xe
03 kernel32!WerpLaunchAeDebug+0x2cba
04 kernel32!WerpLaunchAeDebug+0x26f6
05 KERNELBASE!UnhandledExceptionFilter+0x3d9
06 ntdll!memset+0x1218
07 ntdll!_C_specific_handler+0x96
08 ntdll!_chkstk+0x11f
09 ntdll!RtlRaiseException+0x484
0a ntdll!KiUserExceptionDispatcher+0x2e
0b engine13!Jrd::DsqlCompilerScratch::setPsql(void)+0x8 [h:\snapshots\hqbird\src\dsql\dsqlcompilerscratch.h @ 250]
0c engine13!Jrd::PsqlChanger::{ctor}(void)+0x1f [h:\snapshots\hqbird\src\dsql\dsqlcompilerscratch.h @ 324]
0d engine13!Jrd::Node::doDsqlPass(void)+0x1f [h:\snapshots\hqbird\src\dsql\nodes.h @ 147]
0e engine13!pass1_rse_impl(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00000000`081fdc88, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0x198 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1842]
0f engine13!pass1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00000000`00000000, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0x170 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1780]
10 engine13!PASS1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::SelectExprNode * input = <Value unavailable error>, bool updateLock = <Value unavailable error>)+0x27 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 588]
11 engine13!Jrd::SubQueryNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80)+0x11c [h:\snapshots\hqbird\src\dsql\exprnodes.cpp @ 10997]
12 engine13!Jrd::Node::doDsqlPass(void)+0x15 [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
13 engine13!Jrd::ValueListNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80)+0x85 [h:\snapshots\hqbird\src\dsql\nodes.h @ 1275]
14 engine13!Jrd::Node::doDsqlPass(void)+0x9 [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
15 engine13!pass1_rse_impl(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00000000`0000000b, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`1a2d3910, bool updateLock = false, unsigned short flags = 0)+0x1bb6 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 2261]
16 engine13!pass1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00000000`0794cf60, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0x170 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1780]
17 engine13!pass1_rse_impl(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00007ffc`0d854f33, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0xc6 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1807]
18 engine13!pass1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::RecordSourceNode * input = 0x00000000`0794d060, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0x170 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1780]
19 engine13!PASS1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80, class Jrd::SelectExprNode * input = <Value unavailable error>, bool updateLock = <Value unavailable error>)+0x27 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 588]
1a engine13!Jrd::SelectNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`0784ec80)+0xa9 [h:\snapshots\hqbird\src\dsql\stmtnodes.cpp @ 7835]
1b engine13!Jrd::Node::doDsqlPass(void)+0x1d [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
1c engine13!Jrd::DsqlDmlRequest::dsqlPass(class Jrd::thread_db * tdbb = 0x00000000`081fed20, class Jrd::DsqlCompilerScratch * scratch = 0x00000000`0784ec80, bool * destroyScratchPool = 0x00000000`081fe540, unsigned int * traceResult = 0x00000000`081fe550)+0xb5 [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 730]
1d engine13!prepareStatement(class Jrd::thread_db * tdbb = 0x00000000`081fed20, class Jrd::dsql_dbb * database = 0x00000000`077367f0, class Jrd::jrd_tra * transaction = 0x00000000`077c00d0, unsigned long textLength = 0x30, char * text = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned short clientDialect = 3, bool isInternalRequest = false)+0xc7f [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 1796]
1e engine13!prepareRequest(class Jrd::thread_db * tdbb = 0x00000000`081fed20, class Jrd::dsql_dbb * database = 0x00000000`081feef8, class Jrd::jrd_tra * transaction = 0x00000000`0e54bc00, unsigned long textLength = 0x6c150, char * text = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned short clientDialect = 3, bool isInternalRequest = false)+0x86 [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 1620]
1f engine13!DSQL_prepare(class Jrd::thread_db * tdbb = 0x00000000`081fed20, class Jrd::Attachment * attachment = 0x00000000`0e54bc00, class Jrd::jrd_tra * transaction = 0x00000000`078893c0, unsigned long length = 0x54, char * string = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned short dialect = 3, unsigned int prepareFlags = 0x47, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * items = 0x00000000`081fec00, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * buffer = 0x00000000`081febe8, bool isInternalRequest = false)+0x93 [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 531]
20 engine13!Jrd::JAttachment::prepare(class Firebird::CheckStatusWrapper * user_status = 0x00000000`081feef8, class Firebird::ITransaction * apiTra = 0x00000000`00000054, unsigned int stmtLength = 0x54, char * sqlStmt = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned int dialect = 3, unsigned int flags = 0x47)+0x248 [h:\snapshots\hqbird\src\jrd\jrd.cpp @ 5645]
21 engine13!Firebird::IAttachmentBaseImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment> > > > >::cloopprepareDispatcher(class Firebird::IAttachment * self = 0x00000000`05ccfcb8, class Firebird::IStatus * status = 0x00000000`05ccfcb8, class Firebird::ITransaction * tra = 0x00000000`05ccf478, unsigned int stmtLength = 0x54, char * sqlStmt = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned int dialect = 3, unsigned int flags = 0x47)+0x70 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 11234]
22 fbclient!Firebird::IAttachment::prepare(void)+0x4d [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 2532]
23 fbclient!Why::YAttachment::prepare(class Firebird::CheckStatusWrapper * status = 0x00000000`081ff018, class Firebird::ITransaction * transaction = 0x00000000`00000054, unsigned int stmtLength = 0x54, char * sqlStmt = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned int dialect = 3, unsigned int flags = 0x47)+0xc1 [h:\snapshots\hqbird\src\yvalve\why.cpp @ 5518]
24 fbclient!Firebird::IAttachmentBaseImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment> > > > >::cloopprepareDispatcher(class Firebird::IAttachment * self = 0x00000000`9e145fd8, class Firebird::IStatus * status = 0x00000000`01a561c0, class Firebird::ITransaction * tra = 0x00000000`18db08f8, unsigned int stmtLength = 0x54, char * sqlStmt = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned int dialect = 3, unsigned int flags = 0x47)+0x70 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 11234]
25 firebird!Firebird::IAttachment::prepare(unsigned int stmtLength = 0x54, char * sqlStmt = 0x00000000`06d59e80 "select row_number()over(partition by (select 1 from rdb$database)) from rdb$database", unsigned int dialect = 3)+0x43 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 2532]
26 firebird!rem_port::prepare_statement(struct p_sqlst * prepareL = 0x00000000`0e74fd00, struct packet * sendL = 0x00000000`0e74f458)+0x36f [h:\snapshots\hqbird\src\remote\server\server.cpp @ 4809]
27 firebird!process_packet(struct rem_port * port = 0x00000000`01a561c0, struct packet * sendL = 0x00000000`0e74f458, struct packet * receive = 0x00000000`0e74f9f8, struct rem_port ** result = 0x00000000`081ffec8)+0x4fc [h:\snapshots\hqbird\src\remote\server\server.cpp @ 5115]
28 firebird!loopThread(void * __formal = 0x00000000`0000007a)+0x1bb [h:\snapshots\hqbird\src\remote\server\server.cpp @ 6666]
29 firebird!`anonymous-namespace'::ThreadArgs::run(void)+0x5 [h:\snapshots\hqbird\src\common\threadstart.cpp @ 78]
2a firebird!threadStart(void * arg = 0x00000000`06db93a0)+0x65 [h:\snapshots\hqbird\src\common\threadstart.cpp @ 97]
2b ucrtbase!configthreadlocale+0x92
2c kernel32!BaseThreadInitThunk+0x14
2d ntdll!RtlUserThreadStart+0x21
|