3 #text |
request = <SubRequest 'db' for <Function test_1>>
db_path = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11581')
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`002e4000 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!`anonymous namespace'::setParamsMakeDbkey(class DataTypeUtilBase * __formal = 0x00000000`00000003, class SysFunction * __formal = 0x00000000`082fc108, int argsCount = 0n137343864, struct dsc ** args = 0x00000000`082fb480) [h:\snapshots\hqbird\src\jrd\sysfunction.cpp @ 843]
0c engine13!Jrd::SysFuncCallNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80)+0x53b [h:\snapshots\hqbird\src\dsql\exprnodes.cpp @ 12272]
0d engine13!Jrd::Node::doDsqlPass(void)+0x19 [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
0e engine13!Jrd::ComparativeBoolNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80)+0x2ad [h:\snapshots\hqbird\src\dsql\boolnodes.cpp @ 403]
0f engine13!Jrd::Node::doDsqlPass(void)+0x15 [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
10 engine13!Jrd::Node::doDsqlPass<Jrd::BoolExprNode>(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class NestConst<Jrd::BoolExprNode> * node = <Value unavailable error>, bool psql = <Value unavailable error>)+0x44 [h:\snapshots\hqbird\src\dsql\nodes.h @ 148]
11 engine13!pass1_rse_impl(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class Jrd::RecordSourceNode * input = 0x0000006c`0000006c, class Jrd::ValueListNode * order = 0x00000000`00000000, class Jrd::RowsClause * rows = 0x00000000`00000000, bool updateLock = false, unsigned short flags = 0)+0x3a6 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 1877]
12 engine13!pass1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class Jrd::RecordSourceNode * input = 0x00000000`0567c070, 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]
13 engine13!pass1_rse_impl(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class Jrd::RecordSourceNode * input = 0x00007ff8`9d7630c3, 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]
14 engine13!pass1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class Jrd::RecordSourceNode * input = 0x00000000`0567c170, 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]
15 engine13!PASS1_rse(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80, class Jrd::SelectExprNode * input = <Value unavailable error>, bool updateLock = <Value unavailable error>)+0x27 [h:\snapshots\hqbird\src\dsql\pass1.cpp @ 588]
16 engine13!Jrd::SelectNode::dsqlPass(class Jrd::DsqlCompilerScratch * dsqlScratch = 0x00000000`02e8ec80)+0xa9 [h:\snapshots\hqbird\src\dsql\stmtnodes.cpp @ 7835]
17 engine13!Jrd::Node::doDsqlPass(void)+0x1d [h:\snapshots\hqbird\src\dsql\nodes.h @ 130]
18 engine13!Jrd::DsqlDmlRequest::dsqlPass(class Jrd::thread_db * tdbb = 0x00000000`082fed20, class Jrd::DsqlCompilerScratch * scratch = 0x00000000`02e8ec80, bool * destroyScratchPool = 0x00000000`082fe5c0, unsigned int * traceResult = 0x00000000`082fe5d0)+0xb5 [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 729]
19 engine13!prepareStatement(class Jrd::thread_db * tdbb = 0x00000000`082fed20, class Jrd::dsql_dbb * database = 0x00000000`02db67f0, class Jrd::jrd_tra * transaction = 0x00000000`06b54f80, unsigned long textLength = 0x6c150, char * text = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short clientDialect = 3, bool isInternalRequest = false)+0xc7f [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 1783]
1a engine13!DSQL_prepare(class Jrd::thread_db * tdbb = 0x00000000`082fed20, class Jrd::Attachment * attachment = 0x00000000`06b54f80, class Jrd::jrd_tra * transaction = 0x00000000`02ed93c0, unsigned long length = 0x3a, char * string = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short dialect = 3, unsigned int prepareFlags = 0x47, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * items = 0x00000000`082fec00, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * buffer = 0x00000000`082febe8, bool isInternalRequest = false)+0x93 [h:\snapshots\hqbird\src\dsql\dsql.cpp @ 530]
1b engine13!Jrd::JAttachment::prepare(class Firebird::CheckStatusWrapper * user_status = 0x00000000`082feef8, class Firebird::ITransaction * apiTra = 0x00000000`0000003a, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x248 [h:\snapshots\hqbird\src\jrd\jrd.cpp @ 5627]
1c 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`058896f8, class Firebird::IStatus * status = 0x00000000`058896f8, class Firebird::ITransaction * tra = 0x00000000`058c22f8, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x70 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 11204]
1d fbclient!Firebird::IAttachment::prepare(void)+0x4d [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 2532]
1e fbclient!Why::YAttachment::prepare(class Firebird::CheckStatusWrapper * status = 0x00000000`082ff018, class Firebird::ITransaction * transaction = 0x00000000`0000003a, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0xc1 [h:\snapshots\hqbird\src\yvalve\why.cpp @ 5518]
1f 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`9ee19cd8, class Firebird::IStatus * status = 0x00000000`57c8a140, class Firebird::ITransaction * tra = 0x00000000`193437f8, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x70 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 11204]
20 firebird!Firebird::IAttachment::prepare(unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`9e73ae60 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3)+0x43 [h:\snapshots\hqbird\src\include\firebird\idlfbinterfaces.h @ 2532]
21 firebird!rem_port::prepare_statement(struct p_sqlst * prepareL = 0x00000000`05b12400, struct packet * sendL = 0x00000000`05b11b58)+0x36f [h:\snapshots\hqbird\src\remote\server\server.cpp @ 4739]
22 firebird!process_packet(struct rem_port * port = 0x00000000`57c8a140, struct packet * sendL = 0x00000000`05b11b58, struct packet * receive = 0x00000000`05b120f8, struct rem_port ** result = 0x00000000`082ffec8)+0x4fc [h:\snapshots\hqbird\src\remote\server\server.cpp @ 5045]
23 firebird!loopThread(void * __formal = 0x00000000`0000007a)+0x1bb [h:\snapshots\hqbird\src\remote\server\server.cpp @ 6596]
24 firebird!`anonymous-namespace'::ThreadArgs::run(void)+0x5 [h:\snapshots\hqbird\src\common\threadstart.cpp @ 78]
25 firebird!threadStart(void * arg = 0x00000000`1d4c1a80)+0x65 [h:\snapshots\hqbird\src\common\threadstart.cpp @ 97]
26 ucrtbase!configthreadlocale+0x92
27 kernel32!BaseThreadInitThunk+0x14
28 ntdll!RtlUserThreadStart+0x21
|