Skip to content

Commit

Permalink
Fixed CORE-1055. A change in METD_get_relation() seems to not be stro…
Browse files Browse the repository at this point in the history
…ngly required, but I keep it in HEAD for testing.
  • Loading branch information
dyemanov committed Dec 15, 2006
1 parent 06c7f7d commit 7c10900
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/dsql/metd.epp
Expand Up @@ -1236,6 +1236,13 @@ dsql_prc* METD_get_procedure(dsql_req* request, const dsql_str* name)
dsql_prc* temp;
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;

// Start by seeing if symbol is already defined
Expand All @@ -1244,13 +1251,6 @@ dsql_prc* METD_get_procedure(dsql_req* request, const dsql_str* name)
if (symbol)
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

ISC_STATUS_ARRAY isc_status = {0};
Expand Down Expand Up @@ -1450,9 +1450,15 @@ dsql_rel* METD_get_relation(dsql_req* request, const dsql_str* name)
dsql_fld* field;
dsql_fld** ptr;
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;

Expand All @@ -1462,13 +1468,6 @@ dsql_rel* METD_get_relation(dsql_req* request, const dsql_str* name)
if (symbol)
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};
dbb = request->req_dbb;
isc_db_handle DB = dbb->dbb_database_handle;
Expand Down

0 comments on commit 7c10900

Please sign in to comment.