diff --git a/src/isql/isql.h b/src/isql/isql.h index 9d2f7ebe8f..5efa24b9be 100644 --- a/src/isql/isql.h +++ b/src/isql/isql.h @@ -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 diff --git a/src/isql/show.epp b/src/isql/show.epp index be40ca61cb..990e917b43 100644 --- a/src/isql/show.epp +++ b/src/isql/show.epp @@ -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) diff --git a/src/msgs/facilities2.sql b/src/msgs/facilities2.sql index 410a8f5728..a152bc6c75 100644 --- a/src/msgs/facilities2.sql +++ b/src/msgs/facilities2.sql @@ -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) diff --git a/src/msgs/messages2.sql b/src/msgs/messages2.sql index 787ca706a5..8a9cff0747 100644 --- a/src/msgs/messages2.sql +++ b/src/msgs/messages2.sql @@ -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);