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

Method internalDropDatabase

src/remote/client/interface.cpp:2278–2333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2276
2277
2278void Attachment::internalDropDatabase(CheckStatusWrapper* status)
2279{
2280/**************************************
2281 *
2282 * i s c _ d r o p _ d a t a b a s e
2283 *
2284 **************************************
2285 *
2286 * Functional description
2287 * Close down and purge a database.
2288 *
2289 **************************************/
2290 try
2291 {
2292 reset(status);
2293
2294 CHECK_HANDLE(rdb, isc_bad_db_handle);
2295 rem_port* port = rdb->rdb_port;
2296 RemotePortGuard portGuard(port, FB_FUNCTION);
2297
2298 try
2299 {
2300 release_object(status, rdb, op_drop_database, rdb->rdb_id);
2301 }
2302 catch (const status_exception& ex)
2303 {
2304 ex.stuffException(status);
2305 if (ex.value()[1] != isc_drdb_completed_with_errs)
2306 {
2307 return;
2308 }
2309 }
2310
2311 while (rdb->rdb_events)
2312 release_event(rdb->rdb_events);
2313
2314 while (rdb->rdb_requests)
2315 release_request(rdb->rdb_requests);
2316
2317 while (rdb->rdb_sql_requests)
2318 release_sql_request(rdb->rdb_sql_requests);
2319
2320 while (rdb->rdb_transactions)
2321 release_transaction(rdb->rdb_transactions);
2322
2323 if (port->port_statement)
2324 release_statement(&port->port_statement);
2325
2326 disconnect(port);
2327 rdb = NULL;
2328 }
2329 catch (const Exception& ex)
2330 {
2331 ex.stuffException(status);
2332 }
2333}
2334
2335

Callers

nothing calls this directly

Calls 11

CHECK_HANDLEFunction · 0.85
release_objectFunction · 0.85
resetFunction · 0.70
release_eventFunction · 0.70
release_requestFunction · 0.70
release_sql_requestFunction · 0.70
release_transactionFunction · 0.70
release_statementFunction · 0.70
disconnectFunction · 0.70
stuffExceptionMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected