mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Misc
This commit is contained in:
parent
2ddf17a744
commit
1899067660
@ -1120,14 +1120,15 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
|
||||
if (DTYPE_IS_TEXT(desc1.dsc_dtype) ||
|
||||
DTYPE_IS_TEXT(desc2.dsc_dtype))
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_expression_eval_err));
|
||||
ERR_post(Arg::Gds(isc_expression_eval_err));
|
||||
}
|
||||
// FALL INTO
|
||||
|
||||
case dtype_timestamp:
|
||||
node->nod_flags |= nod_date;
|
||||
|
||||
fb_assert(DTYPE_IS_DATE(desc1.dsc_dtype) ||
|
||||
DTYPE_IS_DATE(desc2.dsc_dtype));
|
||||
DTYPE_IS_DATE(desc2.dsc_dtype));
|
||||
|
||||
if (COULD_BE_DATE(desc1) && COULD_BE_DATE(desc2)) {
|
||||
if (node->nod_type == nod_subtract) {
|
||||
|
@ -395,8 +395,8 @@
|
||||
#define NO_NFS
|
||||
|
||||
#define SYS_ERR Arg::Windows
|
||||
//#define SLONGFORMAT "ld"
|
||||
//#define ULONGFORMAT "lu"
|
||||
//#define SLONGFORMAT "ld"
|
||||
//#define ULONGFORMAT "lu"
|
||||
//#define XLONGFORMAT "lX"
|
||||
//#define xLONGFORMAT "lx"
|
||||
|
||||
|
@ -1460,10 +1460,10 @@ static void check_dependencies(thread_db* tdbb,
|
||||
|
||||
if (field_name)
|
||||
{
|
||||
ERR_post( Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
||||
Arg::Gds(isc_field_name) << Arg::Str(field_name) <<
|
||||
Arg::Gds(isc_dependency) << Arg::Num(total)); /* Msg310: there are %ld dependencies */
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
||||
Arg::Gds(isc_field_name) << Arg::Str(field_name) <<
|
||||
Arg::Gds(isc_dependency) << Arg::Num(total)); /* Msg310: there are %ld dependencies */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1504,10 +1504,10 @@ static void check_dependencies(thread_db* tdbb,
|
||||
break;
|
||||
}
|
||||
|
||||
ERR_post( Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_no_delete) << /* can not delete */
|
||||
Arg::Gds(obj_type) << Arg::Str(dpdo_name) <<
|
||||
Arg::Gds(isc_dependency) << Arg::Num(total)); /* there are %ld dependencies */
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_no_delete) << /* can not delete */
|
||||
Arg::Gds(obj_type) << Arg::Str(dpdo_name) <<
|
||||
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)
|
||||
{
|
||||
if ((old_desc->dsc_dtype != new_desc->dsc_dtype)
|
||||
|| (old_desc->dsc_scale != new_desc->dsc_scale)
|
||||
|| (old_desc->dsc_length != new_desc->dsc_length)
|
||||
|| (old_desc->dsc_sub_type != new_desc->dsc_sub_type)
|
||||
|| (old_desc->dsc_flags != new_desc->dsc_flags)
|
||||
|| (old_desc->dsc_address != new_desc->dsc_address))
|
||||
if ((old_desc->dsc_dtype != new_desc->dsc_dtype) ||
|
||||
(old_desc->dsc_scale != new_desc->dsc_scale) ||
|
||||
(old_desc->dsc_length != new_desc->dsc_length) ||
|
||||
(old_desc->dsc_sub_type != new_desc->dsc_sub_type) ||
|
||||
(old_desc->dsc_flags != new_desc->dsc_flags) ||
|
||||
(old_desc->dsc_address != new_desc->dsc_address))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -1927,13 +1927,17 @@ static bool create_index( thread_db* tdbb,
|
||||
{
|
||||
EXE_unwind(tdbb, request);
|
||||
if (!idx.idx_count)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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)
|
||||
idx.idx_flags |= idx_unique;
|
||||
@ -1962,24 +1966,33 @@ static bool create_index( thread_db* tdbb,
|
||||
!FLD.RDB$DIMENSIONS.NULL)
|
||||
{
|
||||
EXE_unwind(tdbb, request);
|
||||
|
||||
if (key_count > idx.idx_count)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_inval_key_posn) <<
|
||||
/* Msg358: invalid key position */
|
||||
Arg::Gds(isc_field_name) << Arg::Str(RFR.RDB$FIELD_NAME) <<
|
||||
Arg::Gds(isc_index_name) << Arg::Str(work->dfw_name));
|
||||
}
|
||||
else if (FLD.RDB$FIELD_TYPE == blr_blob)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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;
|
||||
@ -2010,22 +2023,28 @@ static bool create_index( thread_db* tdbb,
|
||||
REQUEST(irq_c_index) = request;
|
||||
|
||||
if (key_count != idx.idx_count)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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 */
|
||||
|
||||
MET_scan_relation(tdbb, relation);
|
||||
|
||||
if (relation->rel_view_rse)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
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 */
|
||||
|
||||
@ -2884,10 +2903,12 @@ static bool delete_field( thread_db* tdbb,
|
||||
CMP_release(tdbb, handle);
|
||||
|
||||
if (field_count)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_no_delete) << /* Msg353: can not delete */
|
||||
Arg::Gds(isc_domain_name) << Arg::Str(work->dfw_name) <<
|
||||
Arg::Gds(isc_dependency) << Arg::Num(field_count)); /* Msg310: there are %ld dependencies */
|
||||
}
|
||||
|
||||
check_dependencies(tdbb, work->dfw_name.c_str(), NULL,
|
||||
obj_field, transaction);
|
||||
@ -3153,7 +3174,7 @@ static bool delete_index(thread_db* tdbb, SSHORT phase, DeferredWork* work,
|
||||
}
|
||||
|
||||
ERR_post(Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_obj_in_use) << Arg::Str("INDEX"));
|
||||
Arg::Gds(isc_obj_in_use) << Arg::Str("INDEX"));
|
||||
}
|
||||
index->idl_count++;
|
||||
}
|
||||
|
@ -176,8 +176,10 @@ void ERR_duplicate_error(IDX_E code,
|
||||
|
||||
default:
|
||||
if (haveConstraint)
|
||||
{
|
||||
ERR_post(Arg::Gds(isc_unique_key_violation) << Arg::Str(constraint) <<
|
||||
Arg::Str(relation->rel_name));
|
||||
}
|
||||
else
|
||||
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;
|
||||
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 ||
|
||||
(status_vector[0] == isc_arg_gds && status_vector[1] == 0 &&
|
||||
@ -516,7 +518,7 @@ void ERR_append_status(ISC_STATUS* status_vector, const Arg::StatusVector& v)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* E R R _ a p p e n d _ s t a t u s
|
||||
* E R R _ a p p e n d _ s t a t u s
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
|
@ -58,7 +58,7 @@ void ERR_error(int);
|
||||
void ERR_error_msg(const TEXT*);
|
||||
void ERR_post(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_log(int, int, const TEXT*);
|
||||
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);
|
||||
|
||||
#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);
|
||||
|
||||
if (request->req_flags & req_active)
|
||||
ERR_post(Arg::Gds(isc_req_sync) <<
|
||||
Arg::Gds(isc_reqinuse));
|
||||
ERR_post(Arg::Gds(isc_req_sync) << Arg::Gds(isc_reqinuse));
|
||||
|
||||
if (transaction->tra_flags & TRA_prepared)
|
||||
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:
|
||||
|
||||
if (length > sizeof(message) - 1)
|
||||
ERR_post(Arg::Gds(isc_imp_exc) <<
|
||||
Arg::Gds(isc_blktoobig));
|
||||
ERR_post(Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blktoobig));
|
||||
*/
|
||||
|
||||
memcpy(message, string, length);
|
||||
|
Loading…
Reference in New Issue
Block a user