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

Method resetSession

src/jrd/extds/IscDS.cpp:268–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268bool IscConnection::resetSession(thread_db* tdbb)
269{
270 if (!m_handle)
271 return false;
272
273 if (!testFeature(fb_feature_session_reset))
274 return true;
275
276 FbLocalStatus status;
277 {
278 EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION);
279 m_iscProvider.isc_dsql_execute_immediate(&status, &m_handle,
280 NULL, 0, "ALTER SESSION RESET", m_sqlDialect, NULL);
281 }
282
283 if (!(status->getState() & IStatus::STATE_ERRORS))
284 return true;
285
286 if (status->getErrors()[1] == isc_dsql_error)
287 {
288 clearFeature(fb_feature_session_reset);
289 return true;
290 }
291
292 ERR_post_nothrow(&status);
293 return false;
294}
295
296// this ISC connection instance is available for the current execution context if it
297// a) has no active statements or supports many active statements

Callers 1

releaseConnectionMethod · 0.45

Calls 4

ERR_post_nothrowFunction · 0.85
getStateMethod · 0.45
getErrorsMethod · 0.45

Tested by

no test coverage detected