| 631 | |
| 632 | |
| 633 | ISC_STATUS API_ROUTINE isc_embed_dsql_release(ISC_STATUS* user_status, const SCHAR* stmt_name) |
| 634 | { |
| 635 | /************************************** |
| 636 | * |
| 637 | * i s c _ e m b e d _ d s q l _ r e l e a s e |
| 638 | * |
| 639 | ************************************** |
| 640 | * |
| 641 | * Functional description |
| 642 | * Release request for a dsql statement |
| 643 | * |
| 644 | **************************************/ |
| 645 | ISC_STATUS_ARRAY local_status; |
| 646 | |
| 647 | INIT_DSQL(user_status, local_status); |
| 648 | try |
| 649 | { |
| 650 | // If a request already exists under that name, purge it out |
| 651 | |
| 652 | dsql_stmt* statement = lookup_stmt(stmt_name, statement_names, NAME_statement); |
| 653 | |
| 654 | ISC_STATUS s = isc_dsql_free_statement(user_status, &statement->stmt_handle, DSQL_drop); |
| 655 | if (s) { |
| 656 | return s; |
| 657 | } |
| 658 | |
| 659 | // remove the statement from the symbol tables |
| 660 | |
| 661 | Firebird::WriteLockGuard guard(global_sync, FB_FUNCTION); |
| 662 | |
| 663 | if (statement->stmt_stmt) |
| 664 | remove_name(statement->stmt_stmt, &statement_names); |
| 665 | if (statement->stmt_cursor) |
| 666 | remove_name(statement->stmt_cursor, &cursor_names); |
| 667 | |
| 668 | // and remove this statement from the local list |
| 669 | |
| 670 | dsql_stmt* p; |
| 671 | for (dsql_stmt** stmt_ptr = &statements; (p = *stmt_ptr); stmt_ptr = &p->stmt_next) |
| 672 | { |
| 673 | if (p == statement) |
| 674 | { |
| 675 | *stmt_ptr = statement->stmt_next; |
| 676 | gds__free(statement); |
| 677 | break; |
| 678 | } |
| 679 | } |
| 680 | |
| 681 | return s; |
| 682 | } |
| 683 | catch (const Firebird::Exception& ex) |
| 684 | { |
| 685 | return error(ex); |
| 686 | } |
| 687 | } |
| 688 | |
| 689 | |
| 690 | ISC_STATUS API_ROUTINE isc_dsql_fetch_a(ISC_STATUS* user_status, |
nothing calls this directly
no test coverage detected