diff --git a/lang_helpers/gds_codes.ftn b/lang_helpers/gds_codes.ftn index 0814e509c9..76408f9e59 100644 --- a/lang_helpers/gds_codes.ftn +++ b/lang_helpers/gds_codes.ftn @@ -1716,6 +1716,8 @@ C -- PARAMETER (GDS__subproc_not_impl = 335545151) INTEGER*4 GDS__sysf_invalid_hash_algorithm PARAMETER (GDS__sysf_invalid_hash_algorithm = 335545152) + INTEGER*4 GDS__expression_eval_index + PARAMETER (GDS__expression_eval_index = 335545153) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw diff --git a/lang_helpers/gds_codes.pas b/lang_helpers/gds_codes.pas index b77d7eeef2..e204c61f1b 100644 --- a/lang_helpers/gds_codes.pas +++ b/lang_helpers/gds_codes.pas @@ -1711,6 +1711,8 @@ const gds_subproc_not_impl = 335545151; isc_sysf_invalid_hash_algorithm = 335545152; gds_sysf_invalid_hash_algorithm = 335545152; + isc_expression_eval_index = 335545153; + gds_expression_eval_index = 335545153; isc_gfix_db_name = 335740929; gds_gfix_db_name = 335740929; isc_gfix_invalid_sw = 335740930; diff --git a/src/include/gen/codetext.h b/src/include/gen/codetext.h index efc8dab155..90bd5fc4f1 100644 --- a/src/include/gen/codetext.h +++ b/src/include/gen/codetext.h @@ -854,6 +854,7 @@ static const struct { {"subfunc_not_impl", 335545150}, {"subproc_not_impl", 335545151}, {"sysf_invalid_hash_algorithm", 335545152}, + {"expression_eval_index", 335545153}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, diff --git a/src/include/gen/iberror.h b/src/include/gen/iberror.h index e28e087c71..2bc94277ca 100644 --- a/src/include/gen/iberror.h +++ b/src/include/gen/iberror.h @@ -888,6 +888,7 @@ const ISC_STATUS isc_subproc_defvaldecl = 335545149L; const ISC_STATUS isc_subfunc_not_impl = 335545150L; const ISC_STATUS isc_subproc_not_impl = 335545151L; const ISC_STATUS isc_sysf_invalid_hash_algorithm = 335545152L; +const ISC_STATUS isc_expression_eval_index = 335545153L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1362,7 +1363,7 @@ const ISC_STATUS isc_trace_switch_user_only = 337182757L; const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1306; +const ISC_STATUS isc_err_max = 1307; #else /* c definitions */ @@ -2220,6 +2221,7 @@ const ISC_STATUS isc_err_max = 1306; #define isc_subfunc_not_impl 335545150L #define isc_subproc_not_impl 335545151L #define isc_sysf_invalid_hash_algorithm 335545152L +#define isc_expression_eval_index 335545153L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2694,7 +2696,7 @@ const ISC_STATUS isc_err_max = 1306; #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1306 +#define isc_err_max 1307 #endif diff --git a/src/include/gen/msgs.h b/src/include/gen/msgs.h index 20b2f0ab2d..8f586b9e35 100644 --- a/src/include/gen/msgs.h +++ b/src/include/gen/msgs.h @@ -857,6 +857,7 @@ Data source : @4"}, /* eds_statement */ {335545150, "Sub-function @1 was declared but not implemented"}, /* subfunc_not_impl */ {335545151, "Sub-procedure @1 was declared but not implemented"}, /* subproc_not_impl */ {335545152, "Invalid HASH algorithm @1"}, /* sysf_invalid_hash_algorithm */ + {335545153, "Expression evaluation error for index \"@1\" on table \"@2\""}, /* expression_eval_index */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ diff --git a/src/include/gen/sql_code.h b/src/include/gen/sql_code.h index 363b018a4d..772a129023 100644 --- a/src/include/gen/sql_code.h +++ b/src/include/gen/sql_code.h @@ -853,6 +853,7 @@ static const struct { {335545150, -901}, /* 830 subfunc_not_impl */ {335545151, -901}, /* 831 subproc_not_impl */ {335545152, -901}, /* 832 sysf_invalid_hash_algorithm */ + {335545153, -901}, /* 833 expression_eval_index */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ diff --git a/src/include/gen/sql_state.h b/src/include/gen/sql_state.h index 69949ec9ab..e063cc5370 100644 --- a/src/include/gen/sql_state.h +++ b/src/include/gen/sql_state.h @@ -853,6 +853,7 @@ static const struct { {335545150, "42000"}, // 830 subfunc_not_impl {335545151, "42000"}, // 831 subproc_not_impl {335545152, "42000"}, // 832 sysf_invalid_hash_algorithm + {335545153, "42000"}, // 833 expression_eval_index {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index ddc45c7ebf..f7492889ed 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -274,7 +274,7 @@ void IndexErrorContext::raise(thread_db* tdbb, idx_e result, Record* record) { fb_assert(result != idx_e_ok); - if (result == idx_e_conversion || result == idx_e_interrupt) + if (result == idx_e_interrupt) ERR_punt(); const MetaName& relationName = isLocationDefined ? m_location.relation->rel_name : m_relation->rel_name; @@ -297,6 +297,21 @@ void IndexErrorContext::raise(thread_db* tdbb, idx_e result, Record* record) switch (result) { + case idx_e_conversion: + { + Arg::StatusVector newVector; + + newVector << Arg::Gds(isc_expression_eval_index) << + Arg::Str(indexName) << + Arg::Str(relationName); + + newVector.append(Arg::StatusVector(tdbb->tdbb_status_vector)); + + fb_utils::init_status(tdbb->tdbb_status_vector); + ERR_post(newVector); + } + break; + case idx_e_keytoobig: ERR_post_nothrow(Arg::Gds(isc_imp_exc) << Arg::Gds(isc_keytoobig) << Arg::Str(indexName)); diff --git a/src/msgs/facilities2.sql b/src/msgs/facilities2.sql index 4cc0705e59..f430dc2fd7 100644 --- a/src/msgs/facilities2.sql +++ b/src/msgs/facilities2.sql @@ -1,7 +1,7 @@ /* MAX_NUMBER is the next number to be used, always one more than the highest message number. */ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?); -- -('2017-07-24 12:10:00', 'JRD', 0, 833) +('2017-09-11 12:30:00', 'JRD', 0, 834) ('2015-03-17 18:33:00', 'QLI', 1, 533) ('2015-01-07 18:01:51', 'GFIX', 3, 134) ('1996-11-07 13:39:40', 'GPRE', 4, 1) diff --git a/src/msgs/messages2.sql b/src/msgs/messages2.sql index 88e363d8c1..e3e92121f4 100644 --- a/src/msgs/messages2.sql +++ b/src/msgs/messages2.sql @@ -940,6 +940,7 @@ Data source : @4', NULL, NULL) ('subfunc_not_impl', NULL, 'StmtNodes.cpp', NULL, 0, 830, NULL, 'Sub-function @1 was declared but not implemented', NULL, NULL); ('subproc_not_impl', NULL, 'StmtNodes.cpp', NULL, 0, 831, NULL, 'Sub-procedure @1 was declared but not implemented', NULL, NULL); ('sysf_invalid_hash_algorithm', NULL, 'SysFunction.cpp', NULL, 0, 832, NULL, 'Invalid HASH algorithm @1', NULL, NULL); +('expression_eval_index', NULL, 'btr.cpp', NULL, 0, 833, NULL, 'Expression evaluation error for index "@1" on table "@2"', NULL, NULL); -- QLI (NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL); (NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL); diff --git a/src/msgs/system_errors2.sql b/src/msgs/system_errors2.sql index 4db7057ec5..a98363eb23 100644 --- a/src/msgs/system_errors2.sql +++ b/src/msgs/system_errors2.sql @@ -839,6 +839,7 @@ set bulk_insert INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, FA (-901, '42', '000', 0, 830, 'subfunc_not_impl', NULL, NULL) (-901, '42', '000', 0, 831, 'subproc_not_impl', NULL, NULL) (-901, '42', '000', 0, 832, 'sysf_invalid_hash_algorithm', NULL, NULL) +(-901, '42', '000', 0, 833, 'expression_eval_index', NULL, NULL) -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL)