mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Got rid of redundant cast to jrd_req*
This commit is contained in:
parent
2ac685afcd
commit
1741432859
@ -862,7 +862,7 @@ void DPM_delete_relation( thread_db* tdbb, jrd_rel* relation)
|
||||
X.RDB$RELATION_ID EQ relation->rel_id ERASE X;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
CCH_flush(tdbb, FLUSH_ALL, 0);
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ void DYN_rundown_request(jrd_req* handle, SSHORT id)
|
||||
return;
|
||||
}
|
||||
|
||||
EXE_unwind(tdbb, (jrd_req*)handle);
|
||||
EXE_unwind(tdbb, handle);
|
||||
if (id >= 0 && !DYN_REQUEST(id)) {
|
||||
DYN_REQUEST(id) = handle;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ void DYN_define_constraint(Global* gbl,
|
||||
not_null = false;
|
||||
fb_utils::fb_exact_name_limit(RFR.RDB$FIELD_NAME, sizeof(RFR.RDB$FIELD_NAME));
|
||||
strcpy(null_field_name, RFR.RDB$FIELD_NAME);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -472,7 +472,7 @@ void DYN_define_constraint(Global* gbl,
|
||||
found = false;
|
||||
}
|
||||
if (found) {
|
||||
EXE_unwind(tdbb,(jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
break;
|
||||
}
|
||||
list_index = field_list.getCount() - 1;
|
||||
@ -2034,7 +2034,7 @@ void DYN_define_index(Global* gbl,
|
||||
if (list_index >= 0)
|
||||
found = false;
|
||||
if (found) {
|
||||
EXE_unwind(tdbb,(jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
break;
|
||||
}
|
||||
list_index = field_list.getCount() - 1;
|
||||
@ -3923,7 +3923,7 @@ void DYN_define_trigger(Global* gbl,
|
||||
|
||||
/* the END_STORE_SPECIAL adds the foll. lines of code to the END_STORE
|
||||
if (ignore_perm)
|
||||
((jrd_req*)request)->req_flags |= req_ignore_perm;
|
||||
request->req_flags |= req_ignore_perm;
|
||||
after the request is compiled and before the request is sent.
|
||||
It makes the current request (to define the trigger) go through
|
||||
without checking any permissions lower in the engine */
|
||||
@ -3931,7 +3931,7 @@ void DYN_define_trigger(Global* gbl,
|
||||
END_STORE_SPECIAL;
|
||||
|
||||
if (ignore_perm)
|
||||
((jrd_req*) request)->req_flags &= ~req_ignore_perm;
|
||||
request->req_flags &= ~req_ignore_perm;
|
||||
|
||||
if (!DYN_REQUEST(drq_s_triggers)) {
|
||||
DYN_REQUEST(drq_s_triggers) = request;
|
||||
@ -4298,8 +4298,8 @@ static bool get_who( thread_db* tdbb, Global* gbl, SCHAR* output_name)
|
||||
{
|
||||
request = CMP_compile2(tdbb, who_blr, TRUE);
|
||||
}
|
||||
EXE_start(tdbb, (jrd_req*) request, gbl->gbl_transaction);
|
||||
EXE_receive(tdbb, (jrd_req*) request, 0, MAX_SQL_IDENTIFIER_SIZE,
|
||||
EXE_start(tdbb, request, gbl->gbl_transaction);
|
||||
EXE_receive(tdbb, request, 0, MAX_SQL_IDENTIFIER_SIZE,
|
||||
(UCHAR*) output_name);
|
||||
|
||||
DYN_rundown_request(request, drq_l_user_name);
|
||||
|
@ -446,7 +446,7 @@ void DYN_modify_global_field(
|
||||
DIM_DOM.RDB$FIELD_NAME.NULL = FALSE;
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
CMP_release (tdbb, (jrd_req*) request);
|
||||
CMP_release (tdbb, request);
|
||||
request = NULL;
|
||||
}
|
||||
/* CVC: End modification. */
|
||||
@ -462,7 +462,7 @@ void DYN_modify_global_field(
|
||||
DOM.RDB$FIELD_NAME,
|
||||
DOM.RDB$FIELD_NAME);
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = old_request;
|
||||
END_MODIFY;
|
||||
}
|
||||
@ -494,7 +494,7 @@ void DYN_modify_global_field(
|
||||
new_dom->dyn_dsc.dsc_length = DYN_get_number(ptr);
|
||||
if (++field_adjusted_count > 2)
|
||||
{
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
DYN_error_punt(false, 5, err_one_type_change_only, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
switch (new_dom->dyn_dtype) {
|
||||
@ -518,7 +518,7 @@ void DYN_modify_global_field(
|
||||
new_dom->dyn_dtype = DYN_get_number(ptr);
|
||||
if (++field_adjusted_count > 2)
|
||||
{
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
DYN_error_punt(false, 5, err_one_type_change_only, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ void DYN_modify_global_field(
|
||||
|
||||
case isc_dyn_single_validation:
|
||||
if (single_validate) {
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
DYN_error_punt(false, 160, NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 160: "Only one constraint allowed for a domain" */
|
||||
break;
|
||||
@ -629,7 +629,7 @@ void DYN_modify_global_field(
|
||||
|
||||
case isc_dyn_fld_validation_blr:
|
||||
if (single_validate && (!FLD.RDB$VALIDATION_BLR.NULL)) {
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
DYN_error_punt(false, 160, NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 160: "Only one constraint allowed for a domain" */
|
||||
break;
|
||||
@ -729,7 +729,7 @@ void DYN_modify_global_field(
|
||||
DOM.RDB$FIELD_NAME);
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = old_request;
|
||||
}
|
||||
|
||||
@ -1954,7 +1954,7 @@ static void modify_lfield_position(thread_db* tdbb,
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
|
||||
/* Once the field position has been changed, make sure that there are no
|
||||
@ -1974,7 +1974,7 @@ static void modify_lfield_position(thread_db* tdbb,
|
||||
new_pos += 1;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
catch (const std::exception& ex) {
|
||||
Firebird::stuff_exception(tdbb->tdbb_status_vector, ex);
|
||||
@ -2019,7 +2019,7 @@ static bool check_view_dependency(thread_db* tdbb,
|
||||
view_name = Z.RDB$VIEW_NAME;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
|
||||
if (retval)
|
||||
DYN_error_punt(false, 206, field_name, relation_name, view_name, NULL,
|
||||
@ -2059,7 +2059,7 @@ static bool check_sptrig_dependency(thread_db* tdbb,
|
||||
dep_name = DEP.RDB$DEPENDENT_NAME;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
|
||||
if (retval)
|
||||
DYN_error_punt(false, 206, field_name, relation_name, dep_name, NULL,
|
||||
@ -2106,7 +2106,7 @@ static void modify_lfield_index(thread_db* tdbb,
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
|
||||
static bool field_exists(thread_db* tdbb,
|
||||
@ -2133,7 +2133,7 @@ static bool field_exists(thread_db* tdbb,
|
||||
retval = true;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -2155,7 +2155,7 @@ static bool domain_exists(thread_db* tdbb, Database* dbb, Global* gbl, const TEX
|
||||
retval = true;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -2422,7 +2422,7 @@ void DYN_modify_sql_field(Global* gbl,
|
||||
}
|
||||
}
|
||||
END_FOR; /* FLD in RDB$FIELDS */
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
|
||||
/* Now that we have all of the information needed, let's check to see if the field type can be modifed */
|
||||
@ -2454,7 +2454,7 @@ void DYN_modify_sql_field(Global* gbl,
|
||||
ERASE FLD;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
}
|
||||
request = first_request;
|
||||
@ -2551,7 +2551,7 @@ void DYN_modify_sql_field(Global* gbl,
|
||||
strcpy(FLD.RDB$FIELD_NAME, new_fld->dyn_fld_name);
|
||||
END_STORE;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
}
|
||||
else { /* the original and new definitions are both base types */
|
||||
@ -2597,13 +2597,13 @@ void DYN_modify_sql_field(Global* gbl,
|
||||
|
||||
END_MODIFY;
|
||||
END_FOR; /* FLD in RDB$FIELDS */
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
}
|
||||
} /* else not a domain */
|
||||
request = first_request;
|
||||
END_FOR; /* RFR IN RDB$RELATION_FIELDS */
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
request = NULL;
|
||||
|
||||
if (!found)
|
||||
@ -2678,7 +2678,7 @@ void get_domain_type(thread_db* tdbb, Database* dbb, Global* gbl, dyn_fld* dom_f
|
||||
dom_fld->dyn_null_flag = FLD.RDB$NULL_FLAG != 0;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
|
||||
static ULONG check_update_fld_type(const dyn_fld* orig_fld,
|
||||
|
@ -344,6 +344,7 @@ static void define_default_class(
|
||||
DFW_post_work(dbb->dbb_sys_trans, dfw_scan_relation, &desc, 0);
|
||||
}
|
||||
|
||||
|
||||
#ifdef NOT_USED_OR_REPLACED
|
||||
static void delete_security_class( thread_db* tdbb, const TEXT* s_class)
|
||||
{
|
||||
@ -368,10 +369,11 @@ static void delete_security_class( thread_db* tdbb, const TEXT* s_class)
|
||||
ERASE CLS;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
}
|
||||
#endif // NOT_USED_OR_REPLACED
|
||||
|
||||
|
||||
static void finish_security_class(UCHAR** acl_ptr,
|
||||
SecurityClass::flags_t public_priv,
|
||||
UCharBuffer& start_ptr,
|
||||
@ -915,7 +917,7 @@ static SecurityClass::flags_t save_field_privileges(
|
||||
REQUEST(irq_grant6) = request;
|
||||
|
||||
if (request2)
|
||||
CMP_release(tdbb, (jrd_req*)request2);
|
||||
CMP_release(tdbb, request2);
|
||||
|
||||
/* flush out the last user's info */
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
* 2004.01.16 Vlad Horsun: added support for default parameters
|
||||
*/
|
||||
/*
|
||||
$Id: met.epp,v 1.133 2004-08-16 12:28:19 alexpeshkoff Exp $
|
||||
$Id: met.epp,v 1.134 2004-08-26 11:07:57 robocop Exp $
|
||||
*/
|
||||
// This MUST be at the top of the file
|
||||
#ifdef DARWIN
|
||||
@ -563,7 +563,7 @@ void MET_activate_shadow( thread_db* tdbb)
|
||||
ERASE X;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
const char* dbb_file_name = dbb->dbb_file->fil_string;
|
||||
|
||||
@ -590,9 +590,9 @@ void MET_activate_shadow( thread_db* tdbb)
|
||||
|
||||
if (handle2)
|
||||
{
|
||||
CMP_release(tdbb, (jrd_req*)handle2);
|
||||
CMP_release(tdbb, handle2);
|
||||
}
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
}
|
||||
|
||||
|
||||
@ -751,7 +751,7 @@ void MET_delete_shadow( thread_db* tdbb, USHORT shadow_number)
|
||||
ERASE X;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
for (Shadow* shadow = dbb->dbb_shadow; shadow; shadow = shadow->sdw_next) {
|
||||
if (shadow->sdw_number == shadow_number) {
|
||||
@ -990,7 +990,7 @@ jrd_nod* MET_get_dependencies(thread_db* tdbb,
|
||||
RLF.RDB$FIELD_NAME EQ object_name
|
||||
object_name = FLD.RDB$FIELD_NAME;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
}
|
||||
|
||||
store_dependencies(tdbb, csb, object_name, type);
|
||||
@ -1084,7 +1084,7 @@ void MET_get_shadow_files( thread_db* tdbb, bool delete_files)
|
||||
}
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
/* if any current shadows were not defined in database, mark
|
||||
them to be shutdown since they don't exist anymore */
|
||||
@ -1914,7 +1914,7 @@ bool MET_lookup_partner(
|
||||
}
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
CMP_release(tdbb, request);
|
||||
return found;
|
||||
}
|
||||
|
||||
@ -3584,7 +3584,7 @@ void MET_update_shadow( thread_db* tdbb, Shadow* shadow, USHORT file_flags)
|
||||
FIL.RDB$FILE_FLAGS = file_flags;
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
}
|
||||
|
||||
|
||||
@ -3796,7 +3796,7 @@ static bool get_type(thread_db* tdbb, SSHORT* id, const UCHAR* name, const TEXT*
|
||||
found = true;
|
||||
*id = T.RDB$TYPE;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
return found;
|
||||
}
|
||||
@ -4152,7 +4152,7 @@ static bool resolve_charset_and_collation(
|
||||
*id = CS.RDB$CHARACTER_SET_ID;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
return found;
|
||||
}
|
||||
@ -4166,7 +4166,7 @@ static bool resolve_charset_and_collation(
|
||||
*id = COL.RDB$CHARACTER_SET_ID;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
return found;
|
||||
}
|
||||
@ -4184,7 +4184,7 @@ static bool resolve_charset_and_collation(
|
||||
*id = CS.RDB$CHARACTER_SET_ID;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
return found;
|
||||
}
|
||||
@ -4468,7 +4468,7 @@ static bool verify_TRG_ignore_perm(thread_db* tdbb, const TEXT* trig_name)
|
||||
REQUEST(irq_c_trg_perm) = request;
|
||||
}
|
||||
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
EXE_unwind(tdbb, request);
|
||||
fb_utils::fb_exact_name_limit(REF.RDB$UPDATE_RULE, sizeof(REF.RDB$UPDATE_RULE));
|
||||
fb_utils::fb_exact_name_limit(REF.RDB$DELETE_RULE, sizeof(REF.RDB$DELETE_RULE));
|
||||
|
||||
|
@ -255,7 +255,7 @@ void SCL_check_index(thread_db* tdbb, const TEXT* index_name, UCHAR index_id,
|
||||
default_s_class = SCL_get_class(REL.RDB$DEFAULT_CLASS);
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
else {
|
||||
idx_name_ptr = aux_idx_name;
|
||||
@ -273,7 +273,7 @@ void SCL_check_index(thread_db* tdbb, const TEXT* index_name, UCHAR index_id,
|
||||
default_s_class = SCL_get_class(REL.RDB$DEFAULT_CLASS);
|
||||
END_FOR;
|
||||
|
||||
CMP_release (tdbb, (jrd_req*)request);
|
||||
CMP_release (tdbb, request);
|
||||
}
|
||||
|
||||
// Check if the relation exists. It may not have been created yet.
|
||||
@ -318,11 +318,11 @@ void SCL_check_index(thread_db* tdbb, const TEXT* index_name, UCHAR index_id,
|
||||
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
catch (const std::exception&) {
|
||||
if (request) {
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
CMP_release(tdbb, request);
|
||||
}
|
||||
throw;
|
||||
}
|
||||
@ -674,7 +674,7 @@ void SCL_init(bool create,
|
||||
if (!REQUEST(irq_get_role_name))
|
||||
REQUEST(irq_get_role_name) = request;
|
||||
|
||||
EXE_unwind(tdbb, (jrd_req*) request);
|
||||
EXE_unwind(tdbb, request);
|
||||
ERR_post(isc_login_same_as_role_name,
|
||||
isc_arg_string, ERR_cstring(login_name), 0);
|
||||
|
||||
@ -768,7 +768,7 @@ void SCL_init(bool create,
|
||||
tdbb->tdbb_attachment->att_security_class =
|
||||
SCL_get_class(X.RDB$SECURITY_CLASS);
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*) handle);
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
FOR(REQUEST_HANDLE handle1)
|
||||
FIRST 1 REL IN RDB$RELATIONS
|
||||
@ -786,7 +786,7 @@ void SCL_init(bool create,
|
||||
}
|
||||
}
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (jrd_req*) handle1);
|
||||
CMP_release(tdbb, handle1);
|
||||
}
|
||||
else {
|
||||
user->usr_flags |= USR_owner;
|
||||
|
Loading…
Reference in New Issue
Block a user