2001-05-23 15:26:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: JRD Access Method
|
2003-11-10 10:16:38 +01:00
|
|
|
* MODULE: ppg.cpp
|
2001-05-23 15:26:42 +02:00
|
|
|
* DESCRIPTION: Database page print module
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
2001-08-08 04:01:26 +02:00
|
|
|
*
|
|
|
|
* 2001.08.07 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
|
|
|
* conditionals, second attempt
|
2001-05-23 15:26:42 +02:00
|
|
|
*/
|
|
|
|
|
2001-07-30 01:43:24 +02:00
|
|
|
#include "firebird.h"
|
2004-04-29 00:36:29 +02:00
|
|
|
#include <stdio.h>
|
2001-05-23 15:26:42 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include "../jrd/common.h"
|
2003-02-14 03:14:41 +01:00
|
|
|
#include "../jrd/jrd_time.h"
|
2003-11-08 17:40:17 +01:00
|
|
|
#include "../jrd/ibase.h"
|
2001-05-23 15:26:42 +02:00
|
|
|
#include "../jrd/ods.h"
|
2003-09-08 22:23:46 +02:00
|
|
|
#include "../jrd/os/guid.h"
|
|
|
|
#include "../jrd/nbak.h"
|
2001-05-23 15:26:42 +02:00
|
|
|
#include "../jrd/gds_proto.h"
|
|
|
|
|
|
|
|
#ifdef SUPERSERVER
|
|
|
|
#ifndef INCLUDE_FB_BLK
|
|
|
|
#include "../include/fb_blk.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "../jrd/svc.h"
|
|
|
|
#include "../jrd/svc_proto.h"
|
2003-07-15 04:43:36 +02:00
|
|
|
#include "../utilities/gstat/ppg_proto.h"
|
2001-05-23 15:26:42 +02:00
|
|
|
|
|
|
|
#define exit(code) {service->svc_handle = 0; return (code);}
|
|
|
|
#define FPRINTF SVC_fprintf
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FPRINTF
|
2004-04-29 00:36:29 +02:00
|
|
|
#define FPRINTF fprintf
|
2001-05-23 15:26:42 +02:00
|
|
|
#endif
|
|
|
|
|
2004-03-20 15:57:40 +01:00
|
|
|
// gstat directly reads database files, therefore
|
|
|
|
using namespace Ods;
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2004-06-01 18:22:34 +02:00
|
|
|
void PPG_print_header(const header_page* header, SLONG page, bool nocreation,
|
2001-05-23 15:26:42 +02:00
|
|
|
#ifdef SUPERSERVER
|
2004-03-20 15:57:40 +01:00
|
|
|
Jrd::Service* outfile)
|
2001-05-23 15:26:42 +02:00
|
|
|
#else
|
2004-04-29 00:36:29 +02:00
|
|
|
FILE* outfile)
|
2001-05-23 15:26:42 +02:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
/**************************************
|
|
|
|
*
|
|
|
|
* P P G _ p r i n t _ h e a d e r
|
|
|
|
*
|
|
|
|
**************************************
|
|
|
|
*
|
|
|
|
* Functional description
|
|
|
|
* Print database header page.
|
|
|
|
*
|
|
|
|
**************************************/
|
|
|
|
SLONG number;
|
|
|
|
struct tm time;
|
|
|
|
TEXT temp[257];
|
|
|
|
SSHORT flag_count = 0;
|
|
|
|
|
|
|
|
if (page == HEADER_PAGE)
|
|
|
|
FPRINTF(outfile, "Database header page information:\n");
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "Database overflow header page information:\n");
|
|
|
|
|
|
|
|
|
|
|
|
if (page == HEADER_PAGE) {
|
2004-03-18 06:56:06 +01:00
|
|
|
FPRINTF(outfile, "\tFlags\t\t\t%d\n", header->pag_flags);
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\tChecksum\t\t%d\n",
|
2004-03-18 06:56:06 +01:00
|
|
|
header->pag_checksum);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tGeneration\t\t%"ULONGFORMAT"\n",
|
2004-03-18 06:56:06 +01:00
|
|
|
header->pag_generation);
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\tPage size\t\t%d\n", header->hdr_page_size);
|
|
|
|
FPRINTF(outfile, "\tODS version\t\t%d.%d\n", header->hdr_ods_version,
|
|
|
|
header->hdr_ods_minor);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tOldest transaction\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_oldest_transaction);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tOldest active\t\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_oldest_active);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tOldest snapshot\t\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_oldest_snapshot);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tNext transaction\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_next_transaction);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tBumped transaction\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_bumped_transaction);
|
|
|
|
FPRINTF(outfile, "\tSequence number\t\t%d\n", header->hdr_sequence);
|
|
|
|
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tNext attachment ID\t%"SLONGFORMAT"\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_attachment_id);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tImplementation ID\t%d\n",
|
2001-05-23 15:26:42 +02:00
|
|
|
header->hdr_implementation);
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tShadow count\t\t%"SLONGFORMAT"\n"
|
|
|
|
, header->hdr_shadow_count);
|
|
|
|
FPRINTF(outfile, "\tPage buffers\t\t%"ULONGFORMAT"\n"
|
|
|
|
, header->hdr_page_buffers);
|
2001-05-23 15:26:42 +02:00
|
|
|
}
|
|
|
|
|
2003-04-01 13:35:44 +02:00
|
|
|
FPRINTF(outfile, "\tNext header page\t%"ULONGFORMAT"\n"
|
|
|
|
, header->hdr_next_page);
|
2001-05-23 15:26:42 +02:00
|
|
|
#ifdef DEV_BUILD
|
|
|
|
FPRINTF(outfile, "\tClumplet End\t\t%d\n", header->hdr_end);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (page == HEADER_PAGE) {
|
|
|
|
|
|
|
|
/* If the database dialect is not set to 3, then we need to
|
|
|
|
* assume it was set to 1. The reason for this is that a dialect
|
|
|
|
* 1 database has no dialect information written to the header.
|
|
|
|
*/
|
|
|
|
if (header->hdr_flags & hdr_SQL_dialect_3)
|
|
|
|
FPRINTF(outfile, "\tDatabase dialect\t3\n");
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "\tDatabase dialect\t1\n");
|
|
|
|
|
2004-06-01 18:22:34 +02:00
|
|
|
if (!nocreation) {
|
|
|
|
isc_decode_date(reinterpret_cast<const ISC_QUAD*>(header->hdr_creation_date),
|
|
|
|
&time);
|
|
|
|
FPRINTF(outfile, "\tCreation date\t\t%s %d, %d %d:%02d:%02d\n",
|
|
|
|
FB_SHORT_MONTHS[time.tm_mon], time.tm_mday, time.tm_year + 1900,
|
|
|
|
time.tm_hour, time.tm_min, time.tm_sec);
|
|
|
|
}
|
2001-05-23 15:26:42 +02:00
|
|
|
}
|
|
|
|
|
2004-03-07 08:58:55 +01:00
|
|
|
USHORT flags;
|
|
|
|
|
2001-05-23 15:26:42 +02:00
|
|
|
if ((page == HEADER_PAGE) && (flags = header->hdr_flags)) {
|
|
|
|
FPRINTF(outfile, "\tAttributes\t\t");
|
|
|
|
if (flags & hdr_force_write) {
|
|
|
|
FPRINTF(outfile, "force write");
|
|
|
|
flag_count++;
|
|
|
|
}
|
|
|
|
if (flags & hdr_no_reserve) {
|
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "no reserve");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flags & hdr_disable_cache) {
|
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "shared cache disabled");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flags & hdr_active_shadow) {
|
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "active shadow");
|
|
|
|
}
|
|
|
|
|
2004-03-07 08:58:55 +01:00
|
|
|
const USHORT sd_flags = flags & hdr_shutdown_mask;
|
|
|
|
if (sd_flags == hdr_shutdown_multi) {
|
2001-05-23 15:26:42 +02:00
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
2004-02-25 02:50:40 +01:00
|
|
|
FPRINTF(outfile, "multi-user maintenance");
|
|
|
|
}
|
|
|
|
|
2004-03-07 08:58:55 +01:00
|
|
|
if (sd_flags == hdr_shutdown_single) {
|
2004-02-25 02:50:40 +01:00
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "single-user maintenance");
|
|
|
|
}
|
|
|
|
|
2004-03-07 08:58:55 +01:00
|
|
|
if (sd_flags == hdr_shutdown_full) {
|
2004-02-25 02:50:40 +01:00
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "full shutdown");
|
2001-05-23 15:26:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (flags & hdr_read_only) {
|
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
|
|
|
FPRINTF(outfile, "read only");
|
|
|
|
}
|
2003-09-08 22:23:46 +02:00
|
|
|
if (flags & hdr_backup_mask) {
|
|
|
|
if (flag_count++)
|
|
|
|
FPRINTF(outfile, ", ");
|
2004-05-14 01:20:50 +02:00
|
|
|
if ((flags & hdr_backup_mask) == Jrd::nbak_state_stalled)
|
2003-09-08 22:23:46 +02:00
|
|
|
FPRINTF(outfile, "backup lock");
|
|
|
|
else
|
2004-05-14 01:20:50 +02:00
|
|
|
if ((flags & hdr_backup_mask) == Jrd::nbak_state_merge)
|
2003-09-08 22:23:46 +02:00
|
|
|
FPRINTF(outfile, "backup merge");
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "wrong backup state %d", flags & hdr_backup_mask);
|
|
|
|
}
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
FPRINTF(outfile, "\n Variable header data:\n");
|
|
|
|
|
2003-12-05 11:35:47 +01:00
|
|
|
const UCHAR* p = header->hdr_data;
|
|
|
|
for (const UCHAR* const end = p + header->hdr_page_size;
|
2001-05-23 15:26:42 +02:00
|
|
|
p < end && *p != HDR_end; p += 2 + p[1])
|
2003-12-05 11:35:47 +01:00
|
|
|
{
|
2001-05-23 15:26:42 +02:00
|
|
|
switch (*p) {
|
|
|
|
case HDR_root_file_name:
|
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tRoot file name:\t\t%s\n", temp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_journal_server:
|
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tJournal server:\t\t%s\n", temp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_file:
|
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tContinuation file:\t\t%s\n", temp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_last_page:
|
|
|
|
memcpy(&number, p + 2, sizeof(number));
|
|
|
|
FPRINTF(outfile, "\tLast logical page:\t\t%ld\n", number);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_unlicensed:
|
|
|
|
memcpy(&number, p + 2, sizeof(number));
|
|
|
|
FPRINTF(outfile, "\tUnlicensed accesses:\t\t%ld\n", number);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_sweep_interval:
|
|
|
|
memcpy(&number, p + 2, sizeof(number));
|
|
|
|
FPRINTF(outfile, "\tSweep interval:\t\t%ld\n", number);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_log_name:
|
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tReplay logging file:\t\t%s\n", temp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_cache_file:
|
2003-09-08 22:23:46 +02:00
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tShared Cache file:\t\t%s\n", temp);
|
2001-05-23 15:26:42 +02:00
|
|
|
break;
|
|
|
|
|
2003-09-08 22:23:46 +02:00
|
|
|
case HDR_difference_file:
|
|
|
|
memcpy(temp, p + 2, p[1]);
|
|
|
|
temp[p[1]] = '\0';
|
|
|
|
FPRINTF(outfile, "\tBackup difference file:\t%s\n", temp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HDR_backup_guid: {
|
|
|
|
char buff[GUID_BUFF_SIZE];
|
2003-12-05 11:35:47 +01:00
|
|
|
GuidToString(buff, reinterpret_cast<const FB_GUID*>(p+2));
|
2003-09-08 22:23:46 +02:00
|
|
|
FPRINTF(outfile, "\tDatabase backup GUID:\t%s\n", buff);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2001-05-23 15:26:42 +02:00
|
|
|
default:
|
|
|
|
if (*p > HDR_max)
|
|
|
|
FPRINTF(outfile, "\tUnrecognized option %d, length %d\n",
|
|
|
|
p[0], p[1]);
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "\tEncoded option %d, length %d\n", p[0],
|
|
|
|
p[1]);
|
|
|
|
break;
|
|
|
|
}
|
2003-12-05 11:35:47 +01:00
|
|
|
}
|
2001-05-23 15:26:42 +02:00
|
|
|
|
|
|
|
FPRINTF(outfile, "\t*END*\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-06-01 18:22:34 +02:00
|
|
|
void PPG_print_log(const log_info_page* logp, SLONG page, bool nocreation,
|
2001-05-23 15:26:42 +02:00
|
|
|
#ifdef SUPERSERVER
|
2004-03-20 15:57:40 +01:00
|
|
|
Jrd::Service* outfile)
|
2001-05-23 15:26:42 +02:00
|
|
|
#else
|
2004-04-29 00:36:29 +02:00
|
|
|
FILE* outfile)
|
2001-05-23 15:26:42 +02:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
/**************************************
|
|
|
|
*
|
|
|
|
* P P G _ p r i n t _ l o g
|
|
|
|
*
|
|
|
|
**************************************
|
|
|
|
*
|
|
|
|
* Functional description
|
|
|
|
* Print log page information
|
|
|
|
*
|
|
|
|
**************************************/
|
|
|
|
if (page == LOG_PAGE)
|
|
|
|
FPRINTF(outfile, "Database log page information:\n");
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "Database overflow log page information:\n");
|
|
|
|
|
|
|
|
if (page == LOG_PAGE) {
|
|
|
|
if (logp->log_mod_tid)
|
|
|
|
FPRINTF(outfile, "\tModified by transaction\t%ld\n",
|
|
|
|
logp->log_mod_tid);
|
|
|
|
if (logp->log_mod_tip)
|
|
|
|
FPRINTF(outfile, "\tModified tip page\t%ld\n", logp->log_mod_tip);
|
|
|
|
|
2004-06-01 18:22:34 +02:00
|
|
|
if (!nocreation) {
|
|
|
|
if (!logp->log_creation_date[0] && !logp->log_creation_date[1])
|
|
|
|
{
|
|
|
|
FPRINTF(outfile, "\tCreation date\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
struct tm time;
|
|
|
|
isc_decode_date(reinterpret_cast<const ISC_QUAD*>(logp->log_creation_date),
|
|
|
|
&time);
|
|
|
|
FPRINTF(outfile,
|
|
|
|
"\tCreation date\t%s %d, %d %d:%02d:%02d\n",
|
|
|
|
FB_SHORT_MONTHS[time.tm_mon],
|
|
|
|
time.tm_mday,
|
|
|
|
time.tm_year + 1900,
|
|
|
|
time.tm_hour,
|
|
|
|
time.tm_min,
|
|
|
|
time.tm_sec);
|
|
|
|
}
|
2001-05-23 15:26:42 +02:00
|
|
|
}
|
|
|
|
|
2004-02-02 12:02:12 +01:00
|
|
|
// Legacy information, zero for FB 2.
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\tLog flags:\t%ld\n", logp->log_flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
FPRINTF(outfile, "\tNext log page:\t%ld\n", logp->log_next_page);
|
|
|
|
#ifdef DEV_BUILD
|
|
|
|
FPRINTF(outfile, "\tClumplet End\t%d\n", logp->log_end);
|
|
|
|
#endif
|
|
|
|
|
2004-03-18 06:56:06 +01:00
|
|
|
/* Firebird doesn't pay attention to this legacy WAL/JOURNAL data.
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\n Variable log data:\n");
|
|
|
|
|
2004-03-18 06:56:06 +01:00
|
|
|
SLONG ltemp;
|
|
|
|
SSHORT stemp;
|
|
|
|
USHORT ustemp;
|
|
|
|
TEXT temp[257];
|
|
|
|
|
|
|
|
for (const UCHAR* p = logp->log_data; *p != HDR_end; p += 2 + p[1]) {
|
2001-05-23 15:26:42 +02:00
|
|
|
switch (*p) {
|
|
|
|
case LOG_ctrl_file1:
|
|
|
|
FPRINTF(outfile, "\tControl Point 1:\n");
|
|
|
|
memcpy(temp, p + 2, logp->log_cp_1.cp_fn_length);
|
|
|
|
temp[logp->log_cp_1.cp_fn_length] = '\0';
|
|
|
|
FPRINTF(outfile, "\t\tFile name:\t%s\n", temp);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ",
|
2001-05-23 15:26:42 +02:00
|
|
|
logp->log_cp_1.cp_p_offset);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_cp_1.cp_seqno);
|
|
|
|
FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_cp_1.cp_offset);
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\n");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_ctrl_file2:
|
|
|
|
FPRINTF(outfile, "\tControl Point 2:\n");
|
|
|
|
memcpy(temp, p + 2, logp->log_cp_2.cp_fn_length);
|
|
|
|
temp[logp->log_cp_2.cp_fn_length] = '\0';
|
|
|
|
FPRINTF(outfile, "\t\tFile name:\t%s\n", temp);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ",
|
2001-05-23 15:26:42 +02:00
|
|
|
logp->log_cp_2.cp_p_offset);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_cp_2.cp_seqno);
|
|
|
|
FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_cp_2.cp_offset);
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\n");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_logfile:
|
|
|
|
FPRINTF(outfile, "\tCurrent File:\n");
|
|
|
|
memcpy(temp, p + 2, logp->log_file.cp_fn_length);
|
|
|
|
temp[logp->log_file.cp_fn_length] = '\0';
|
|
|
|
FPRINTF(outfile, "\t\tFile name:\t\t%s\n", temp);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\t\tPartition offset: %"SLONGFORMAT" ",
|
2001-05-23 15:26:42 +02:00
|
|
|
logp->log_file.cp_p_offset);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tSeqno: %"SLONGFORMAT" ", logp->log_file.cp_seqno);
|
|
|
|
FPRINTF(outfile, "\tOffset: %"SLONGFORMAT" ", logp->log_file.cp_offset);
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\n");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_chkpt_len:
|
|
|
|
memcpy(<emp, p + 2, p[1]);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tCheck Point Length %"SLONGFORMAT"\n", ltemp);
|
2001-05-23 15:26:42 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_num_bufs:
|
|
|
|
memcpy(&stemp, p + 2, p[1]);
|
|
|
|
FPRINTF(outfile, "\tNumber of WAL buffers %d\n", stemp);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_bufsize:
|
|
|
|
memcpy(&ustemp, p + 2, p[1]);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tWAL buffer Size %u\n", ustemp);
|
2001-05-23 15:26:42 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case LOG_grp_cmt_wait:
|
|
|
|
memcpy(<emp, p + 2, p[1]);
|
2003-04-03 03:51:03 +02:00
|
|
|
FPRINTF(outfile, "\tGroup Commit Wait Time %"SLONGFORMAT"\n", ltemp);
|
2001-05-23 15:26:42 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
if (*p > LOG_max)
|
|
|
|
FPRINTF(outfile, "\tUnrecognized option %d, length %d\n",
|
|
|
|
p[0], p[1]);
|
|
|
|
else
|
|
|
|
FPRINTF(outfile, "\tEncoded option %d, length %d\n", p[0],
|
|
|
|
p[1]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2004-03-18 06:56:06 +01:00
|
|
|
*/
|
2001-05-23 15:26:42 +02:00
|
|
|
FPRINTF(outfile, "\t*END*\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|