mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 14:03:02 +01:00
Backported fix for CORE-5501: Unclear gstat's diagnostic when damaged page in DB file appears encrypted
This commit is contained in:
parent
d8fd4b9fda
commit
3e5ac85546
@ -1028,7 +1028,6 @@ namespace Jrd {
|
|||||||
|
|
||||||
if (page->pag_flags & Ods::crypted_page)
|
if (page->pag_flags & Ods::crypted_page)
|
||||||
{
|
{
|
||||||
fb_assert(cryptPlugin);
|
|
||||||
if (!cryptPlugin)
|
if (!cryptPlugin)
|
||||||
{
|
{
|
||||||
Arg::Gds(isc_decrypt_error).copyTo(sv);
|
Arg::Gds(isc_decrypt_error).copyTo(sv);
|
||||||
|
@ -15,7 +15,7 @@ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUM
|
|||||||
('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307)
|
('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307)
|
||||||
('2016-01-18 19:20:48', 'ISQL', 17, 195)
|
('2016-01-18 19:20:48', 'ISQL', 17, 195)
|
||||||
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
||||||
('2015-01-07 18:01:51', 'GSTAT', 21, 58)
|
('2017-03-09 21:51:33', 'GSTAT', 21, 59)
|
||||||
('2013-12-19 17:31:31', 'FBSVCMGR', 22, 58)
|
('2013-12-19 17:31:31', 'FBSVCMGR', 22, 58)
|
||||||
('2009-07-18 12:12:12', 'UTL', 23, 2)
|
('2009-07-18 12:12:12', 'UTL', 23, 2)
|
||||||
('2015-01-07 18:01:51', 'NBACKUP', 24, 77)
|
('2015-01-07 18:01:51', 'NBACKUP', 24, 77)
|
||||||
|
@ -3223,6 +3223,7 @@ Analyzing database pages ...', NULL, NULL);
|
|||||||
(NULL, 'main', 'dba.epp', NULL, 21, 55, NULL, 'no encrypted database support, only -e and -h can be used', NULL, NULL)
|
(NULL, 'main', 'dba.epp', NULL, 21, 55, NULL, 'no encrypted database support, only -e and -h can be used', NULL, NULL)
|
||||||
(NULL, 'main', 'dba.epp', NULL, 21, 56, NULL, ' Empty pages: @1, full pages: @2', NULL, NULL);
|
(NULL, 'main', 'dba.epp', NULL, 21, 56, NULL, ' Empty pages: @1, full pages: @2', NULL, NULL);
|
||||||
(NULL, 'dba_in_sw_table', 'dbaswi.h', NULL, 21, 57, NULL, ' -role SQL role name', NULL, NULL);
|
(NULL, 'dba_in_sw_table', 'dbaswi.h', NULL, 21, 57, NULL, ' -role SQL role name', NULL, NULL);
|
||||||
|
(NULL, 'main', 'dba.epp', NULL, 21, 58, NULL, 'Other pages: total @1, ENCRYPTED @2 (DB problem!), non-crypted @3', NULL, NULL)
|
||||||
-- FBSVCMGR
|
-- FBSVCMGR
|
||||||
-- All messages use the new format.
|
-- All messages use the new format.
|
||||||
('fbsvcmgr_bad_am', 'putAccessMode', 'fbsvcmgr.cpp', NULL, 22, 1, NULL, 'Wrong value for access mode', NULL, NULL);
|
('fbsvcmgr_bad_am', 'putAccessMode', 'fbsvcmgr.cpp', NULL, 22, 1, NULL, 'Wrong value for access mode', NULL, NULL);
|
||||||
|
@ -676,10 +676,15 @@ int gstat(Firebird::UtilSvc* uSvc)
|
|||||||
++non;
|
++non;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasCrypted()
|
||||||
|
{
|
||||||
|
return enc > 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ULONG enc, non;
|
ULONG enc, non;
|
||||||
};
|
};
|
||||||
Statist data, index, blob;
|
Statist data, index, blob, other;
|
||||||
|
|
||||||
for (page = 0; true; ++page)
|
for (page = 0; true; ++page)
|
||||||
{
|
{
|
||||||
@ -700,6 +705,9 @@ int gstat(Firebird::UtilSvc* uSvc)
|
|||||||
case pag_blob:
|
case pag_blob:
|
||||||
blob.log(p->pag_flags);
|
blob.log(p->pag_flags);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
other.log(p->pag_flags);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,6 +715,8 @@ int gstat(Firebird::UtilSvc* uSvc)
|
|||||||
data.print(52);
|
data.print(52);
|
||||||
index.print(53);
|
index.print(53);
|
||||||
blob.print(54);
|
blob.print(54);
|
||||||
|
if (other.hasCrypted())
|
||||||
|
other.print(58);
|
||||||
|
|
||||||
dba_exit(FINI_OK, tddba);
|
dba_exit(FINI_OK, tddba);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user