mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Improvement CORE-5063 : Make "show database" command to show numbers of used and free pages in database
This commit is contained in:
parent
9165f8b596
commit
241059f1d8
@ -261,6 +261,8 @@ const int REPORT_NEW3 = 183; // Buffers = !\nReads = !\nWrites = !\nFetches
|
||||
const int NO_MAP = 184; // There is no mapping from @1 in this database
|
||||
const int NO_MAPS = 185; // There are no mappings in this database
|
||||
const int INVALID_TERM_CHARS = 186; // Invalid characters for SET TERMINATOR are @1
|
||||
const int NUMBER_USED_PAGES = 190; // Number of used DB pages = @1
|
||||
const int NUMBER_FREE_PAGES = 191; // Number of free DB pages = @1
|
||||
|
||||
|
||||
// Initialize types
|
||||
|
@ -236,6 +236,8 @@ static const UCHAR db_items[] =
|
||||
{
|
||||
isc_info_page_size,
|
||||
isc_info_db_size_in_pages,
|
||||
fb_info_pages_used,
|
||||
fb_info_pages_free,
|
||||
isc_info_sweep_interval,
|
||||
isc_info_limbo,
|
||||
isc_info_forced_writes,
|
||||
@ -431,6 +433,28 @@ bool SHOW_dbb_parameters(Firebird::IAttachment* db_handle,
|
||||
sprintf(info, "Number of DB pages allocated = %"SLONGFORMAT"%s", value_out, separator);
|
||||
break;
|
||||
|
||||
case fb_info_pages_used:
|
||||
value_out = ISQL_vax_integer(d, length);
|
||||
if (translate)
|
||||
{
|
||||
IUTILS_msg_get(NUMBER_USED_PAGES, msg, SafeArg() << value_out);
|
||||
sprintf(info, "%s%s", msg, separator);
|
||||
}
|
||||
else
|
||||
sprintf(info, "Number of DB pages used = %"SLONGFORMAT"%s", value_out, separator);
|
||||
break;
|
||||
|
||||
case fb_info_pages_free:
|
||||
value_out = ISQL_vax_integer(d, length);
|
||||
if (translate)
|
||||
{
|
||||
IUTILS_msg_get(NUMBER_FREE_PAGES, msg, SafeArg() << value_out);
|
||||
sprintf(info, "%s%s", msg, separator);
|
||||
}
|
||||
else
|
||||
sprintf(info, "Number of DB pages free = %"SLONGFORMAT"%s", value_out, separator);
|
||||
break;
|
||||
|
||||
case isc_info_sweep_interval:
|
||||
value_out = ISQL_vax_integer(d, length);
|
||||
if (translate)
|
||||
|
@ -13,7 +13,7 @@ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUM
|
||||
('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)
|
||||
('2014-05-07 03:04:46', 'ISQL', 17, 190)
|
||||
('2016-01-02 12:45:00', 'ISQL', 17, 192)
|
||||
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
||||
('2015-01-07 18:01:51', 'GSTAT', 21, 58)
|
||||
('2013-12-19 17:31:31', 'FBSVCMGR', 22, 58)
|
||||
|
@ -3037,6 +3037,8 @@ Fetches = !', NULL, NULL);
|
||||
('REC_DISPLAYCOUNT', 'process_statement', 'isql.epp', NULL, 17, 187, NULL, 'Records displayed: @1', NULL, NULL)
|
||||
('COLUMNS_HIDDEN', 'process_statement', 'isql.epp', NULL, 17, 188, NULL, 'Full NULL columns hidden due to RecordBuff: @1', NULL, NULL)
|
||||
('HLP_SETRECORDBUF', 'help', 'isql.epp', NULL, 17, 189, NULL, ' SET RECORDBuf -- toggle limited buffering and trimming of columns', NULL, NULL)
|
||||
('NUMBER_USED_PAGES', 'SHOW_dbb_parameters', 'show.epp', NULL, 17, 190, NULL, 'Number of DB pages used = @1', NULL, NULL);
|
||||
('NUMBER_FREE_PAGES', 'SHOW_dbb_parameters', 'show.epp', NULL, 17, 191, NULL, 'Number of DB pages free = @1', NULL, NULL);
|
||||
-- GSEC
|
||||
('GsecMsg1', 'get_line', 'gsec.e', NULL, 18, 1, NULL, 'GSEC>', NULL, NULL);
|
||||
('GsecMsg2', 'printhelp', 'gsec.e', 'This message is used in the Help display. It should be the same as number 1 (but in lower case).', 18, 2, NULL, 'gsec', NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user