MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / init

Function init

src/dsql/dsql.cpp:424–442  ·  view source on GitHub ↗

init @brief Initialize dynamic SQL. This is called only once. @param db_handle **/

Source from the content-addressed store, hash-verified

422
423 **/
424static dsql_dbb* init(thread_db* tdbb, Jrd::Attachment* attachment)
425{
426 SET_TDBB(tdbb);
427
428 if (attachment->att_dsql_instance)
429 return attachment->att_dsql_instance;
430
431 MemoryPool& pool = *attachment->createPool();
432 dsql_dbb* const database = FB_NEW_POOL(pool) dsql_dbb(pool, attachment);
433 attachment->att_dsql_instance = database;
434
435 INI_init_dsql(tdbb, database);
436
437#ifdef DSQL_DEBUG
438 DSQL_debug = Config::getTraceDSQL();
439#endif
440
441 return attachment->att_dsql_instance;
442}
443
444// Use SEH frame when preparing user requests to catch possible stack overflows
445static DsqlRequest* safePrepareRequest(thread_db* tdbb, dsql_dbb* database, jrd_tra* transaction,

Callers 14

DSQL_prepareFunction · 0.70
DSQL_execute_immediateFunction · 0.70
findMethod · 0.70
SyncGuardMethod · 0.50
queEventsMethod · 0.50
SortMethod · 0.50
putMethod · 0.50
PreparedStatementMethod · 0.50
initGlobalObjectsMethod · 0.50
EngineCallbackGuardMethod · 0.50
HashJoinMethod · 0.50
internalOpenMethod · 0.50

Calls 3

SET_TDBBFunction · 0.85
dsql_dbbClass · 0.70
createPoolMethod · 0.45

Tested by

no test coverage detected