mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Fixed CORE-5762: Wrong transaction number in RDB$PAGES relation may cause infinite recusrion in engine and segfault
This commit is contained in:
parent
42630c1c83
commit
6e461ec1c5
@ -3106,6 +3106,12 @@ static bool get_header(WIN* window, USHORT line, record_param* rpb)
|
||||
rpb->rpb_b_line = header->rhdf_b_line;
|
||||
rpb->rpb_transaction_nr = Ods::getTraNum(header);
|
||||
rpb->rpb_format_number = header->rhdf_format;
|
||||
|
||||
if (rpb->rpb_relation->rel_id == 0 /*i.e.RDB$PAGES*/ && rpb->rpb_transaction_nr != 0)
|
||||
{
|
||||
// RDB$PAGES relation should be modified only by system transaction
|
||||
BUGCHECK(307);
|
||||
}
|
||||
}
|
||||
|
||||
FB_SIZE_T header_size;
|
||||
|
@ -12,7 +12,7 @@ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUM
|
||||
('2018-02-19 19:40:00', 'GBAK', 12, 372)
|
||||
('2015-08-05 12:40:00', 'SQLERR', 13, 1045)
|
||||
('1996-11-07 13:38:42', 'SQLWARN', 14, 613)
|
||||
('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307)
|
||||
('2018-02-27 14:50:31', 'JRD_BUGCHK', 15, 308)
|
||||
('2016-05-26 13:53:45', 'ISQL', 17, 196)
|
||||
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
||||
('2017-03-09 21:51:33', 'GSTAT', 21, 61)
|
||||
|
@ -2924,6 +2924,7 @@ COMMIT WORK;
|
||||
(NULL, 'CMP_get_desc', 'cmp.cpp', NULL, 15, 306, NULL, 'Found array data type with more than 16 dimensions', NULL, NULL);
|
||||
-- Do not change the arguments of the previous JRD_BUGCHK messages.
|
||||
-- Write the new JRD_BUGCHK messages here.
|
||||
(NULL, 'get_header', 'dpm.epp', NULL, 15, 307, NULL, 'RDB$PAGES written by non-system transaction, DB appears to be damaged', NULL, NULL);
|
||||
-- ISQL
|
||||
('GEN_ERR', 'errmsg', 'isql.e', NULL, 17, 0, NULL, 'Statement failed, SQLSTATE = @1', NULL, NULL);
|
||||
('USAGE', 'ISQL_main', 'isql.epp', NULL, 17, 1, NULL, 'usage: isql [options] [<database>]', NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user