| 2276 | |
| 2277 | |
| 2278 | void 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 |
nothing calls this directly
no test coverage detected