/*!***************************************************************************
  module      : gkb00
  author      : JuergenA
  responsible : UweH
  special area: KB_constants_and_types
  last changed: 2000-02-22  17:00
  see also    :
  description :

    ========== licence begin  GPL
    Copyright (C) 2000 SAP AG
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    ========== licence end
 

*****************************************************************************/
 
.tt 1 $SAP$LiveCache$GKB00$
.tt 3 $UweH$KB_constants_and_types$2000-08-28$
 
Module  : KB_constants_and_types
 
Define  :
 
.CM *-END-* define --------------------------------------
 
Use     :
 
.CM *-END-* use -----------------------------------------
 
Synonym :
 
.CM *-END-* synonym -------------------------------------
 
Version : 2002-08-01
 
Release :      Date : 2000-08-28
 
***********************************************************
 
Specification:
 
.CM *-END-* specification -------------------------------
 
***********************************************************
 
Description:
 
.CM *-END-* description ---------------------------------
 
***********************************************************
 
Structure:
 
.CM *-END-* structure -----------------------------------
 
**********************************************************
 
.CM -lll-
Code    :
 
 
CONST
      MAX_LOGPOS_LIST_KB00    =    64;
      MAX_SHORTCOL_LEN_KB00   = MAX_RECLEN_GG00 - cgg_rec_key_offset -
            SURROGATE_MXGG00;
      NIL_LOGENTRY_SEQ_KB00   = '\FF\FF\FF\FF\FF\FF';
      DUMMY_LOGENTRY_SEQ_KB00 = '\FF\FF\FF\FF\FF\FE';
      (**)
      DUMMY_LPNO_KB00         =    -1;
      INDEX_LOCK_BYTE_KB00    =     1;
      PNO_LOG_INFO_KB00       =     2;
      SKIP_COL_BYTE_KB00      =   253;
 
TYPE
      tkb00_ConfigPhase = (
            cfpNone_ekb00,
            cfpStartConfig_ekb00,
            cfpConfigured_ekb00,
            cfpActivateStart_ekb00,
            cfpFiller1_ekb00,
            cfpFiller2_ekb00,
            cfpRestartIncomplete_ekb00);
      (* *)
 
      tkb00_Check = RECORD                    (* PTS 1103957 JA 1999-09-15 *)
            chkBackup_kb00     : boolean;
            chkLock_kb00       : boolean;
            chkLockSupply_kb00 : boolean;
            chkLog_kb00        : boolean;
            chkLogQueue_kb00   : boolean;
            chkRegion_kb00     : boolean;
            chkTrans_kb00      : boolean;
            chkFiller1_kb00    : boolean;
      END;
 
      tkb00_LogEntrySeq = tgg90_Cint6;
      tkb00_LogLpnoList = ARRAY [1..MAX_LOGPOS_LIST_KB00] OF tsp00_PageNo;
      tkb00_LogPposList = ARRAY [1..MAX_LOGPOS_LIST_KB00] OF tgg00_PagePos;
 
      tkb00_SaveptParam = RECORD
            svpId_kb00               : tsp00_Uint4;    (* SAPDB_UInt4 *)
            svpReason_kb00           : tsp00_Uint1;    (* Log_SavepointReason *)
            svpFiller1_kb00          : boolean;
            svpOpenTransCnt_kb00     : tsp00_Uint2;    (* SAPDB_UInt2 *)
            (* *)
            svpIOsequence_kb00       : tsp00_Uint4;    (* Log_IOSequenceNo *)
            svpStartOffset_kb00      : tsp00_Uint4;    (* Log_RawDeviceOffset *)
            (* *)
            svpStartEntryOffset_kb00 : tsp00_Uint2;    (* Data_EntryOffset *)
            svpStartEntryType_kb00   : tsp00_Uint1;    (* Log_ActionType   *)
            svpFiller2_kb00          : boolean;
            svpFiller3_kb00          : tsp00_Int4;
            (* *)
            svpOpenTransRoot_kb00    : tsp00_PageNo;   (* Data_PageNo *)
            svpHistoryRoot_kb00      : tsp00_PageNo;   (* Data_PageNo *)
            (* *)
            svpDate_kb00             : tsp00_Uint4;    (* SAPDB_UInt4 *)
            svpTime_kb00             : tsp00_Uint4;    (* SAPDB_UInt4 *)
            (* *)
            svpStartEntryDate_kb00   : tsp00_Uint4;    (* Kernel_Date *)
            svpStartEntryTime_kb00   : tsp00_Uint4;    (* Kernel_Time *)
            (* *)
            svpFiller4_kb00          : tsp00_C48;
            (* *)
            svpFiller5_kb00          : tsp00_Uint4;
            svpFiller6_kb00          : tsp00_Uint4;
      END;(*104*)
 
 
      tkb00_SurrogateParam = RECORD
            srgSession_kb00    : tgg91_SessionNo;
            srgFiller1_kb00    : tsp00_Int4;
            (* *)
            srgSurrogate_kb00  : tgg00_Surrogate;
            (* *)
            srgSyskey_kb00     : tgg00_Surrogate;
            (* *)
            srgWriteTrans_kb00 : tgg91_TransNo;                      (* PTS 1108234 JA 2000-12-13 *)
            srgFiller2_kb00    : tsp00_Int2
      END;
 
 
      tkb00_LogPageHeader = RECORD
            logHeader_kb00   : tgg00_PageHeader;
            logPposFree_kb00 : tgg00_PagePos;
      END;
 
 
      tkb00_Page = RECORD
            CASE integer OF
                1:
                    (pageLpno_kb00            : tsp00_PageNo;
                    pageType_kb00             : tgg00_PageType;
                    pageType2_kb00            : tgg00_PageType2;
                    pageCheck_kb00            : tgg00_PageCheckType;
                    pageMode_kb00             : tgg00_PageMode);
                2:
                    (pageHeader_kb00          : tgg00_PageHeader;
                    pagePposFree_kb00         : tgg00_PagePos;
                    pageLogBody_kb00          : tgg00_LogBody;
                    pageChecksum_kb00         : tsp00_Int4;
                    pageTrailer_kb00          : tgg00_PageTrailer);
                3:
                    (pageLogHeader_kb00       : tkb00_LogPageHeader;
                    pageFiller1_kb00          : tgg00_LogBody;
                    pageCheckTrailer_kb00     : tgg00_PageCheckTrailer);
                4:
                    (pageBuf_kb00             : tsp00_Page);
                5:
                    (pageLogPos_kb00               : tgg00_LogPos;
                    rstFiller1_kb00                : tsp00_Int4;
                    (* *)
                    rstFiller2_kb00                : boolean;
                    rstConfigPhase_kb00            : tkb00_ConfigPhase;
                    rstSetEndReadOnly_kb00         : boolean;
                    rstLastSaveDataSuccessful_kb00 : boolean;
                    rstFiller3_kb00                : tsp00_Int4;
                    (* *)
                    rstConverterVersion_kb00  : tsp00_Int4;
                    rstPrevConverterVers_kb00 : tsp00_Int4;
                    (* *)
                    rstCurrBackupVersion_kb00 : tsp00_Int4;
                    rstPrevBackupVersion_kb00 : tsp00_Int4;
                    (* *)
                    rstFiller4_kb00           : tsp00_Int4;
                    rstFiller5_kb00           : tsp00_Int4;
                    (* *)
                    rstConfigParam_kb00       : tgg00_ConfigRestartParam;
                    rstFurtherUse2a_kb00      : tsp00_C70;
                    rstFurtherUse2b_kb00      : tsp00_C2;
                    (* *)
                    rstLastSavept_kb00        : tkb00_SaveptParam;
                    rstFurtherUse2_kb00       : tsp00_C64;
                    (* *)
                    rstLastSurrogate_kb00     : tkb00_SurrogateParam;
                    rstFurtherUse3_kb00       : tsp00_C70;
                    rstFurtherUse4_kb00       : tsp00_C2;
                    (* *)
                    rstFurtherUse5_kb00       : tsp00_C70;
                    rstFurtherUse6_kb00       : tsp00_C70;
                    rstFiller6_kb00           : tsp00_Int4;
                    (* *)
                    rstDataBackupCnt_kb00     : tsp00_Int4;
                    rstLastDataBackup_kb00    : tsp00_PageNo;
                    (* *)
                    rstReleaseVersion_kb00    : tsp00_Version;
                    rstDbIdent_kb00           : tsp00_Line)
                END;
            (*ENDCASE*) 
 
      tkb00_PagePtr = ^tkb00_Page;
 
      tkb00_UnivType = RECORD
            CASE integer OF
                1:
                    (c    : tsp00_C1);
                2:
                    (mess : tgg00_MessType);
                3:
                    (swap : tsp00_SwapKind)
                END;
            (*ENDCASE*) 
 
 
      tkb00_LogFileRef = RECORD
            lfrFileId_kb00        : tgg00_FileId;
            lfrFileLastPos_kb00   : tgg00_LogPos;
            lfrRightmostPage_kb00 : tsp00_PageNo
      END;
 
      tkb00_LogFileRefPtr = ^tkb00_LogFileRef;
 
      tkb00_LogQueueInfo = RECORD
            lqiCountGroup_kb00      : tsp00_8ByteCounter;        (* PTS 1103743 JA 1999-08-25 *)
            lqiCountInsert_kb00     : tsp00_8ByteCounter;
            lqiCountRequest_kb00    : tsp00_8ByteCounter;
            lqiCountWait_kb00       : tsp00_8ByteCounter;
            lqiAvgSumPagewaits_kb00 : tsp00_8ByteCounter;
            (* *)
            lqiLogQueueSize_kb00    : tsp00_Int4;
            lqiMaxQueueUsed_kb00    : tsp00_Int4;
            (* *)
            lqiMaxWaitLogpage_kb00  : tsp00_Int4;
            lqiFiller_kb00          : tsp00_Int4
      END;
 
 
      tkb00_LogDeviceInfo = RECORD
            ldiPagesUsed_kb00     : tsp00_Int4;
            ldiPagesNotSaved_kb00 : tsp00_Int4;
            (* *)
            ldiPagesSinceBup_kb00 : tsp00_Int4;
            ldiSaveptCount_kb00   : tsp00_Int4;
      END;
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
*-PRETTY-*  statements    :          0
*-PRETTY-*  lines of code :        176        PRETTYX 3.10 
*-PRETTY-*  lines in file :        280         1997-12-10 
.PA 
