8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:03:02 +01:00

Fixed CORE-1055. A change in METD_get_relation() seems to not be strongly required, but I keep it in HEAD for testing.

This commit is contained in:
dimitr 2006-12-15 16:04:40 +00:00
parent 06c7f7d1c1
commit 7c10900395

View File

@ -1236,6 +1236,13 @@ dsql_prc* METD_get_procedure(dsql_req* request, const dsql_str* name)
dsql_prc* temp; dsql_prc* temp;
SSHORT type, count, defaults; SSHORT type, count, defaults;
// see if the procedure is the one currently being defined in this request
if (((temp = request->req_procedure) != NULL) &&
!strcmp((char*) temp->prc_name, (char*) name->str_data)) {
return temp;
}
RecMutexHolder holder; RecMutexHolder holder;
// Start by seeing if symbol is already defined // Start by seeing if symbol is already defined
@ -1244,13 +1251,6 @@ dsql_prc* METD_get_procedure(dsql_req* request, const dsql_str* name)
if (symbol) if (symbol)
return (dsql_prc*) symbol->sym_object; return (dsql_prc*) symbol->sym_object;
// see if the procedure is the one currently being defined in this request
if (((temp = request->req_procedure) != NULL) &&
!strcmp((char*) temp->prc_name, (char*) name->str_data)) {
return temp;
}
// now see if it is in the database // now see if it is in the database
ISC_STATUS_ARRAY isc_status = {0}; ISC_STATUS_ARRAY isc_status = {0};
@ -1450,9 +1450,15 @@ dsql_rel* METD_get_relation(dsql_req* request, const dsql_str* name)
dsql_fld* field; dsql_fld* field;
dsql_fld** ptr; dsql_fld** ptr;
dsql_rel* temp; dsql_rel* temp;
tsql* tdsql;
tdsql = DSQL_get_thread_data(); // See if the relation is the one currently being defined in this request
if (((temp = request->req_relation) != NULL) &&
!strcmp((char*) temp->rel_name, (char*) name->str_data)) {
return temp;
}
tsql* tdsql = DSQL_get_thread_data();
RecMutexHolder holder; RecMutexHolder holder;
@ -1462,13 +1468,6 @@ dsql_rel* METD_get_relation(dsql_req* request, const dsql_str* name)
if (symbol) if (symbol)
return (dsql_rel*) symbol->sym_object; return (dsql_rel*) symbol->sym_object;
// See if the relation is the one currently being defined in this request
if (((temp = request->req_relation) != NULL) &&
!strcmp((char*) temp->rel_name, (char*) name->str_data)) {
return temp;
}
ISC_STATUS_ARRAY isc_status = {0}; ISC_STATUS_ARRAY isc_status = {0};
dbb = request->req_dbb; dbb = request->req_dbb;
isc_db_handle DB = dbb->dbb_database_handle; isc_db_handle DB = dbb->dbb_database_handle;