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

Method execWithCheck

src/remote/client/interface.cpp:2377–2406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2375
2376
2377void Attachment::execWithCheck(CheckStatusWrapper* status, const string& stmt)
2378{
2379/**************************************
2380 *
2381 * Used to execute "SET xxx TIMEOUT" statements. Checks for protocol version
2382 * and convert expected SQL error into isc_wish_list error. The only possible
2383 * case is when modern network server works with legacy engine.
2384 *
2385 **************************************/
2386 if (rdb->rdb_port->port_protocol >= PROTOCOL_STMT_TOUT)
2387 {
2388 execute(status, NULL, stmt.length(), stmt.c_str(), SQL_DIALECT_CURRENT, NULL, NULL, NULL, NULL);
2389
2390 if (!(status->getState() & IStatus::STATE_ERRORS))
2391 return;
2392
2393 // handle isc_dsql_token_unk_err
2394 const ISC_STATUS* errs = status->getErrors();
2395
2396 if (!fb_utils::containsErrorCode(errs, isc_sqlerr) ||
2397 !fb_utils::containsErrorCode(errs, isc_dsql_token_unk_err))
2398 {
2399 return;
2400 }
2401
2402 status->init();
2403 }
2404
2405 status->setErrors(Arg::Gds(isc_wish_list).value());
2406}
2407
2408
2409unsigned int Attachment::getIdleTimeout(CheckStatusWrapper* status)

Callers

nothing calls this directly

Calls 10

executeFunction · 0.85
containsErrorCodeFunction · 0.85
GdsClass · 0.85
lengthMethod · 0.45
c_strMethod · 0.45
getStateMethod · 0.45
getErrorsMethod · 0.45
initMethod · 0.45
setErrorsMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected