From: <ale...@us...> - 2010-10-13 09:15:55
|
Revision: 51666 http://firebird.svn.sourceforge.net/firebird/?rev=51666&view=rev Author: alexpeshkoff Date: 2010-10-13 09:15:48 +0000 (Wed, 13 Oct 2010) Log Message: ----------- Full fix for CORE-3024 Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/evl.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2010-10-13 09:15:48 UTC (rev 51666) @@ -1450,8 +1450,10 @@ PARAMETER (GDS__private_function = 335545018) INTEGER*4 GDS__private_procedure PARAMETER (GDS__private_procedure = 335545019) + INTEGER*4 GDS__request_outdated + PARAMETER (GDS__request_outdated = 335545020) INTEGER*4 GDS__bad_events_handle - PARAMETER (GDS__bad_events_handle = 335545020) + PARAMETER (GDS__bad_events_handle = 335545021) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/lang_helpers/gds_codes.pas 2010-10-13 09:15:48 UTC (rev 51666) @@ -732,7 +732,8 @@ gds_async_active = 335545017; gds_private_function = 335545018; gds_private_procedure = 335545019; - gds_bad_events_handle = 335545020; + gds_request_outdated = 335545020; + gds_bad_events_handle = 335545021; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/include/gen/codetext.h 2010-10-13 09:15:48 UTC (rev 51666) @@ -721,7 +721,8 @@ {"async_active", 335545017}, {"private_function", 335545018}, {"private_procedure", 335545019}, - {"bad_events_handle", 335545020}, + {"request_outdated", 335545020}, + {"bad_events_handle", 335545021}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/include/gen/iberror.h 2010-10-13 09:15:48 UTC (rev 51666) @@ -755,7 +755,8 @@ const ISC_STATUS isc_async_active = 335545017L; const ISC_STATUS isc_private_function = 335545018L; const ISC_STATUS isc_private_procedure = 335545019L; -const ISC_STATUS isc_bad_events_handle = 335545020L; +const ISC_STATUS isc_request_outdated = 335545020L; +const ISC_STATUS isc_bad_events_handle = 335545021L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1174,7 +1175,7 @@ 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 = 1118; +const ISC_STATUS isc_err_max = 1119; #else /* c definitions */ @@ -1899,7 +1900,8 @@ #define isc_async_active 335545017L #define isc_private_function 335545018L #define isc_private_procedure 335545019L -#define isc_bad_events_handle 335545020L +#define isc_request_outdated 335545020L +#define isc_bad_events_handle 335545021L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2318,7 +2320,7 @@ #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 1118 +#define isc_err_max 1119 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/include/gen/msgs.h 2010-10-13 09:15:48 UTC (rev 51666) @@ -724,7 +724,8 @@ {335545017, "Asynchronous call is already running for this attachment"}, /* async_active */ {335545018, "Function @1 is private to package @2"}, /* private_function */ {335545019, "Procedure @1 is private to package @2"}, /* private_procedure */ - {335545020, "invalid events id (handle)"}, /* bad_events_handle */ + {335545020, "Request can't access new records in relation @1 and should be recompiled"}, /* request_outdated */ + {335545021, "invalid events id (handle)"}, /* bad_events_handle */ {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 */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/include/gen/sql_code.h 2010-10-13 09:15:48 UTC (rev 51666) @@ -720,7 +720,8 @@ {335545017, -532}, /* 697 async_active */ {335545018, -901}, /* 698 private_function */ {335545019, -901}, /* 699 private_procedure */ - {335545020, -901}, /* 700 bad_events_handle */ + {335545020, -904}, /* 700 request_outdated */ + {335545021, -901}, /* 701 bad_events_handle */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/include/gen/sql_state.h 2010-10-13 09:15:48 UTC (rev 51666) @@ -720,7 +720,8 @@ {335545017, "HY018"}, // 697 async_active {335545018, "42000"}, // 698 private_function {335545019, "42000"}, // 699 private_procedure - {335545020, "08003"}, // 700 bad_events_handle + {335545020, "24000"}, // 700 request_outdated + {335545021, "08003"}, // 701 bad_events_handle {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/jrd/evl.cpp =================================================================== --- firebird/trunk/src/jrd/evl.cpp 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/jrd/evl.cpp 2010-10-13 09:15:48 UTC (rev 51666) @@ -410,37 +410,42 @@ // ASF: CORE-1432 - If the the record is not on the latest format, upgrade it. // AP: for fields that are missing in original format use record's one. - if (compileFormat && - record->rec_format->fmt_version != compileFormat->fmt_version && - id < compileFormat->fmt_desc.getCount() && - !DSC_EQUIV(&impure->vlu_desc, &compileFormat->fmt_desc[id], true)) + if (compileFormat && record->rec_format->fmt_version != compileFormat->fmt_version) { - dsc desc = impure->vlu_desc; - impure->vlu_desc = compileFormat->fmt_desc[id]; + if (record->rec_format->fmt_version > compileFormat->fmt_version) + { + ERR_post(Arg::Gds(isc_request_outdated) << rpb.rpb_relation->rel_name); + } - if (impure->vlu_desc.isText()) + if (!DSC_EQUIV(&impure->vlu_desc, &compileFormat->fmt_desc[id], true)) { - // Allocate a string block of sufficient size. - VaryingString* string = impure->vlu_string; - if (string && string->str_length < impure->vlu_desc.dsc_length) + dsc desc = impure->vlu_desc; + impure->vlu_desc = compileFormat->fmt_desc[id]; + + if (impure->vlu_desc.isText()) { - delete string; - string = NULL; - } + // Allocate a string block of sufficient size. + VaryingString* string = impure->vlu_string; + if (string && string->str_length < impure->vlu_desc.dsc_length) + { + delete string; + string = NULL; + } - if (!string) - { - string = impure->vlu_string = FB_NEW_RPT(*tdbb->getDefaultPool(), - impure->vlu_desc.dsc_length) VaryingString(); - string->str_length = impure->vlu_desc.dsc_length; + if (!string) + { + string = impure->vlu_string = FB_NEW_RPT(*tdbb->getDefaultPool(), + impure->vlu_desc.dsc_length) VaryingString(); + string->str_length = impure->vlu_desc.dsc_length; + } + + impure->vlu_desc.dsc_address = string->str_data; } + else + impure->vlu_desc.dsc_address = (UCHAR*) &impure->vlu_misc; - impure->vlu_desc.dsc_address = string->str_data; + MOV_move(tdbb, &desc, &impure->vlu_desc); } - else - impure->vlu_desc.dsc_address = (UCHAR*) &impure->vlu_misc; - - MOV_move(tdbb, &desc, &impure->vlu_desc); } } Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/msgs/facilities2.sql 2010-10-13 09:15:48 UTC (rev 51666) @@ -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 (?, ?, ?, ?); -- -('2010-10-11 19:51:12', 'JRD', 0, 701) +('2010-10-13 12:38:13', 'JRD', 0, 702) ('2010-03-15 06:59:09', 'QLI', 1, 531) -- --('2008-11-28 20:27:04', 'GDEF', 2, 346) Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/msgs/messages2.sql 2010-10-13 09:15:48 UTC (rev 51666) @@ -807,7 +807,8 @@ ('async_active', 'REM_cancel_operation', 'interface.cpp', NULL, 0, 697, NULL, 'Asynchronous call is already running for this attachment', NULL, NULL) ('private_function', 'METD_get_function', 'metd.epp', NULL, 0, 698, NULL, 'Function @1 is private to package @2', NULL, NULL) ('private_procedure', 'METD_get_procedure', 'metd.epp', NULL, 0, 699, NULL, 'Procedure @1 is private to package @2', NULL, NULL) -('bad_events_handle', NULL, NULL, NULL, 0, 700, NULL, 'invalid events id (handle)', NULL, NULL); +('request_outdated', 'EVL_expr', 'evl.cpp', NULL, 0, 700, NULL, 'Request can''t access new records in relation @1 and should be recompiled', NULL, NULL) +('bad_events_handle', NULL, NULL, NULL, 0, 701, NULL, 'invalid events id (handle)', 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); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2010-10-13 07:42:07 UTC (rev 51665) +++ firebird/trunk/src/msgs/system_errors2.sql 2010-10-13 09:15:48 UTC (rev 51666) @@ -705,7 +705,8 @@ (-532, 'HY', '018', 0, 697, 'async_active', NULL, NULL) (-901, '42', '000', 0, 698, 'private_function', NULL, NULL) (-901, '42', '000', 0, 699, 'private_procedure', NULL, NULL) -(-901, '08', '003', 0, 700, 'bad_events_handle', NULL, 'ERROR') +(-904, '24', '000', 0, 700, 'request_outdated', NULL, NULL) +(-901, '08', '003', 0, 701, 'bad_events_handle', NULL, 'ERROR') -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |