mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:43:04 +01:00
Misc
This commit is contained in:
parent
2ddf17a744
commit
1899067660
@ -1123,6 +1123,7 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
|
|||||||
ERR_post(Arg::Gds(isc_expression_eval_err));
|
ERR_post(Arg::Gds(isc_expression_eval_err));
|
||||||
}
|
}
|
||||||
// FALL INTO
|
// FALL INTO
|
||||||
|
|
||||||
case dtype_timestamp:
|
case dtype_timestamp:
|
||||||
node->nod_flags |= nod_date;
|
node->nod_flags |= nod_date;
|
||||||
|
|
||||||
|
@ -1460,7 +1460,7 @@ static void check_dependencies(thread_db* tdbb,
|
|||||||
|
|
||||||
if (field_name)
|
if (field_name)
|
||||||
{
|
{
|
||||||
ERR_post( Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
||||||
Arg::Gds(isc_field_name) << Arg::Str(field_name) <<
|
Arg::Gds(isc_field_name) << Arg::Str(field_name) <<
|
||||||
Arg::Gds(isc_dependency) << Arg::Num(total)); /* Msg310: there are %ld dependencies */
|
Arg::Gds(isc_dependency) << Arg::Num(total)); /* Msg310: there are %ld dependencies */
|
||||||
@ -1504,7 +1504,7 @@ static void check_dependencies(thread_db* tdbb,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_post( Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_no_delete) << /* can not delete */
|
Arg::Gds(isc_no_delete) << /* can not delete */
|
||||||
Arg::Gds(obj_type) << Arg::Str(dpdo_name) <<
|
Arg::Gds(obj_type) << Arg::Str(dpdo_name) <<
|
||||||
Arg::Gds(isc_dependency) << Arg::Num(total)); /* there are %ld dependencies */
|
Arg::Gds(isc_dependency) << Arg::Num(total)); /* there are %ld dependencies */
|
||||||
@ -1576,12 +1576,12 @@ static bool formatsAreEqual(const Format* old_format, const Format* new_format)
|
|||||||
|
|
||||||
while (old_desc != old_end)
|
while (old_desc != old_end)
|
||||||
{
|
{
|
||||||
if ((old_desc->dsc_dtype != new_desc->dsc_dtype)
|
if ((old_desc->dsc_dtype != new_desc->dsc_dtype) ||
|
||||||
|| (old_desc->dsc_scale != new_desc->dsc_scale)
|
(old_desc->dsc_scale != new_desc->dsc_scale) ||
|
||||||
|| (old_desc->dsc_length != new_desc->dsc_length)
|
(old_desc->dsc_length != new_desc->dsc_length) ||
|
||||||
|| (old_desc->dsc_sub_type != new_desc->dsc_sub_type)
|
(old_desc->dsc_sub_type != new_desc->dsc_sub_type) ||
|
||||||
|| (old_desc->dsc_flags != new_desc->dsc_flags)
|
(old_desc->dsc_flags != new_desc->dsc_flags) ||
|
||||||
|| (old_desc->dsc_address != new_desc->dsc_address))
|
(old_desc->dsc_address != new_desc->dsc_address))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1927,14 +1927,18 @@ static bool create_index( thread_db* tdbb,
|
|||||||
{
|
{
|
||||||
EXE_unwind(tdbb, request);
|
EXE_unwind(tdbb, request);
|
||||||
if (!idx.idx_count)
|
if (!idx.idx_count)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_idx_seg_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_idx_seg_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg304: segment count of 0 defined for index %s */
|
/* Msg304: segment count of 0 defined for index %s */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_idx_key_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_idx_key_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg311: too many keys defined for index %s */
|
/* Msg311: too many keys defined for index %s */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (IDX.RDB$UNIQUE_FLAG)
|
if (IDX.RDB$UNIQUE_FLAG)
|
||||||
idx.idx_flags |= idx_unique;
|
idx.idx_flags |= idx_unique;
|
||||||
if (IDX.RDB$INDEX_TYPE == 1)
|
if (IDX.RDB$INDEX_TYPE == 1)
|
||||||
@ -1962,25 +1966,34 @@ static bool create_index( thread_db* tdbb,
|
|||||||
!FLD.RDB$DIMENSIONS.NULL)
|
!FLD.RDB$DIMENSIONS.NULL)
|
||||||
{
|
{
|
||||||
EXE_unwind(tdbb, request);
|
EXE_unwind(tdbb, request);
|
||||||
|
|
||||||
if (key_count > idx.idx_count)
|
if (key_count > idx.idx_count)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_idx_key_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_idx_key_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg311: too many keys defined for index %s */
|
/* Msg311: too many keys defined for index %s */
|
||||||
|
}
|
||||||
else if (SEG.RDB$FIELD_POSITION > idx.idx_count)
|
else if (SEG.RDB$FIELD_POSITION > idx.idx_count)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_inval_key_posn) <<
|
Arg::Gds(isc_inval_key_posn) <<
|
||||||
/* Msg358: invalid key position */
|
/* Msg358: invalid key position */
|
||||||
Arg::Gds(isc_field_name) << Arg::Str(RFR.RDB$FIELD_NAME) <<
|
Arg::Gds(isc_field_name) << Arg::Str(RFR.RDB$FIELD_NAME) <<
|
||||||
Arg::Gds(isc_index_name) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_index_name) << Arg::Str(work->dfw_name));
|
||||||
|
}
|
||||||
else if (FLD.RDB$FIELD_TYPE == blr_blob)
|
else if (FLD.RDB$FIELD_TYPE == blr_blob)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_blob_idx_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_blob_idx_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg350: attempt to index blob column in index %s */
|
/* Msg350: attempt to index blob column in index %s */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_array_idx_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_array_idx_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg351: attempt to index array column in index %s */
|
/* Msg351: attempt to index array column in index %s */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
idx.idx_rpt[SEG.RDB$FIELD_POSITION].idx_field = RFR.RDB$FIELD_ID;
|
idx.idx_rpt[SEG.RDB$FIELD_POSITION].idx_field = RFR.RDB$FIELD_ID;
|
||||||
|
|
||||||
@ -2010,22 +2023,28 @@ static bool create_index( thread_db* tdbb,
|
|||||||
REQUEST(irq_c_index) = request;
|
REQUEST(irq_c_index) = request;
|
||||||
|
|
||||||
if (key_count != idx.idx_count)
|
if (key_count != idx.idx_count)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_key_field_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_key_field_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg352: too few key columns found for index %s (incorrect column name?) */
|
/* Msg352: too few key columns found for index %s (incorrect column name?) */
|
||||||
|
}
|
||||||
if (!relation)
|
if (!relation)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_idx_create_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_idx_create_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg308: can't create index %s */
|
/* Msg308: can't create index %s */
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure the relation info is all current */
|
/* Make sure the relation info is all current */
|
||||||
|
|
||||||
MET_scan_relation(tdbb, relation);
|
MET_scan_relation(tdbb, relation);
|
||||||
|
|
||||||
if (relation->rel_view_rse)
|
if (relation->rel_view_rse)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_idx_create_err) << Arg::Str(work->dfw_name));
|
Arg::Gds(isc_idx_create_err) << Arg::Str(work->dfw_name));
|
||||||
/* Msg308: can't create index %s */
|
/* Msg308: can't create index %s */
|
||||||
|
}
|
||||||
|
|
||||||
/* Actually create the index */
|
/* Actually create the index */
|
||||||
|
|
||||||
@ -2884,10 +2903,12 @@ static bool delete_field( thread_db* tdbb,
|
|||||||
CMP_release(tdbb, handle);
|
CMP_release(tdbb, handle);
|
||||||
|
|
||||||
if (field_count)
|
if (field_count)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||||
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
||||||
Arg::Gds(isc_domain_name) << Arg::Str(work->dfw_name) <<
|
Arg::Gds(isc_domain_name) << Arg::Str(work->dfw_name) <<
|
||||||
Arg::Gds(isc_dependency) << Arg::Num(field_count)); /* Msg310: there are %ld dependencies */
|
Arg::Gds(isc_dependency) << Arg::Num(field_count)); /* Msg310: there are %ld dependencies */
|
||||||
|
}
|
||||||
|
|
||||||
check_dependencies(tdbb, work->dfw_name.c_str(), NULL,
|
check_dependencies(tdbb, work->dfw_name.c_str(), NULL,
|
||||||
obj_field, transaction);
|
obj_field, transaction);
|
||||||
|
@ -176,8 +176,10 @@ void ERR_duplicate_error(IDX_E code,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (haveConstraint)
|
if (haveConstraint)
|
||||||
|
{
|
||||||
ERR_post(Arg::Gds(isc_unique_key_violation) << Arg::Str(constraint) <<
|
ERR_post(Arg::Gds(isc_unique_key_violation) << Arg::Str(constraint) <<
|
||||||
Arg::Str(relation->rel_name));
|
Arg::Str(relation->rel_name));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ERR_post(Arg::Gds(isc_no_dup) << Arg::Str(index));
|
ERR_post(Arg::Gds(isc_no_dup) << Arg::Str(index));
|
||||||
}
|
}
|
||||||
@ -271,7 +273,7 @@ bool ERR_post_warning(const Firebird::Arg::StatusVector& v)
|
|||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
int indx = 0, warning_indx = 0;
|
int indx = 0, warning_indx = 0;
|
||||||
ISC_STATUS* status_vector = ((thread_db*) JRD_get_thread_data())->tdbb_status_vector;
|
ISC_STATUS* status_vector = JRD_get_thread_data()->tdbb_status_vector;
|
||||||
|
|
||||||
if (status_vector[0] != isc_arg_gds ||
|
if (status_vector[0] != isc_arg_gds ||
|
||||||
(status_vector[0] == isc_arg_gds && status_vector[1] == 0 &&
|
(status_vector[0] == isc_arg_gds && status_vector[1] == 0 &&
|
||||||
|
@ -58,7 +58,7 @@ void ERR_error(int);
|
|||||||
void ERR_error_msg(const TEXT*);
|
void ERR_error_msg(const TEXT*);
|
||||||
void ERR_post(const Firebird::Arg::StatusVector& v);
|
void ERR_post(const Firebird::Arg::StatusVector& v);
|
||||||
void ERR_post_nothrow(const Firebird::Arg::StatusVector& v);
|
void ERR_post_nothrow(const Firebird::Arg::StatusVector& v);
|
||||||
void ERR_punt(void);
|
void ERR_punt();
|
||||||
void ERR_warning(const Firebird::Arg::StatusVector& v);
|
void ERR_warning(const Firebird::Arg::StatusVector& v);
|
||||||
void ERR_log(int, int, const TEXT*);
|
void ERR_log(int, int, const TEXT*);
|
||||||
void ERR_make_permanent(ISC_STATUS* s);
|
void ERR_make_permanent(ISC_STATUS* s);
|
||||||
@ -66,4 +66,3 @@ void ERR_append_status(ISC_STATUS*, const Firebird::Arg::StatusVector& v);
|
|||||||
void ERR_build_status(ISC_STATUS*, const Firebird::Arg::StatusVector& v);
|
void ERR_build_status(ISC_STATUS*, const Firebird::Arg::StatusVector& v);
|
||||||
|
|
||||||
#endif /* JRD_ERR_PROTO_H */
|
#endif /* JRD_ERR_PROTO_H */
|
||||||
|
|
||||||
|
@ -1033,8 +1033,7 @@ void EXE_start(thread_db* tdbb, jrd_req* request, jrd_tra* transaction)
|
|||||||
BLKCHK(transaction, type_tra);
|
BLKCHK(transaction, type_tra);
|
||||||
|
|
||||||
if (request->req_flags & req_active)
|
if (request->req_flags & req_active)
|
||||||
ERR_post(Arg::Gds(isc_req_sync) <<
|
ERR_post(Arg::Gds(isc_req_sync) << Arg::Gds(isc_reqinuse));
|
||||||
Arg::Gds(isc_reqinuse));
|
|
||||||
|
|
||||||
if (transaction->tra_flags & TRA_prepared)
|
if (transaction->tra_flags & TRA_prepared)
|
||||||
ERR_post(Arg::Gds(isc_req_no_trans));
|
ERR_post(Arg::Gds(isc_req_no_trans));
|
||||||
@ -3647,8 +3646,7 @@ static void set_error(thread_db* tdbb, const xcp_repeat* exception, jrd_nod* msg
|
|||||||
replace the above assignment with the following lines:
|
replace the above assignment with the following lines:
|
||||||
|
|
||||||
if (length > sizeof(message) - 1)
|
if (length > sizeof(message) - 1)
|
||||||
ERR_post(Arg::Gds(isc_imp_exc) <<
|
ERR_post(Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blktoobig));
|
||||||
Arg::Gds(isc_blktoobig));
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
memcpy(message, string, length);
|
memcpy(message, string, length);
|
||||||
|
Loading…
Reference in New Issue
Block a user