⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 def.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: def.so,v 10.7 2007/04/05 20:37:29 bostic Exp $])m4_ref_title(Application Specific Logging and Recovery,    Defining application-specific log records,,    apprec/intro, apprec/auto)m4_p([dnlBy convention, log records are described in files named m4_path(XXX.src),where "XXX" is typically a descriptive name for a subsystem or otherlogical group of logging functions.  These files contain interfacedefinition language descriptions for each type of log record that isused by the subsystem.])m4_p([dnlAll blank lines and lines beginning with a hash ("[#]") character inthe XXX.src files are ignored.])m4_p([dnlThe first non-comment line in the file should begin with the keywordPREFIX, followed by a string that will be prepended to every generatedfunction name.  Frequently, the PREFIX is either identical or similarto the name of the m4_path(XXX.src) file.  For example, the m4_dbapplication-specific recovery example uses the filem4_path(ex_apprec.src), which begins with the following PREFIX line:])m4_indent([PREFIX ex_apprec])m4_p([dnlFollowing the PREFIX line are the include files required by theautomatically generated functions.  The include files should be listedin order, prefixed by the keyword INCLUDE.  For example, the m4_dbapplication-specific recovery example lists the following includefiles:])m4_indent([dnlINCLUDE [#]include __LT__ctype.h__GT__INCLUDE [#]include __LT__errno.h__GT__INCLUDE [#]include __LT__stdlib.h__GT__INCLUDE [#]include __LT__string.h__GT__INCLUDEINCLUDE [#]include __LT__db.h__GT__INCLUDEINCLUDE [#]include "ex_apprec.h"])m4_p([dnlThe rest of the XXX.src file consists of log record descriptions.  Eachlog record description begins with one of the following lines:])m4_indent([BEGIN m4_italic(RECORD_NAME) m4_italic(DB_VERSION_NUMBER) m4_italic(RECORD_NUMBER)])m4_indent([BEGIN_BUF m4_italic(RECORD_NAME) m4_italic(DB_VERSION_NUMBER)])m4_indent([BEGIN_COMPAT m4_italic(RECORD_NAME) m4_italic(DB_VERSION_NUMBER) m4_italic(RECORD_NUMBER)])m4_p([dnland ends with the line:])m4_indent([END])m4_p([dnlThe m4_italic(BEGIN) line should be used for most record types.])m4_p([dnlThe m4_italic(BEGIN_BUF) is used for records that need only marshalling andunmarshalling of the record, that is logging and reading routines, but nota recovery routine.  These records are specific to the replication system'sinternal initialization process, which sends variable length records containingfile data and file description records.])m4_p([dnlThe m4_italic(BEGIN_COMPAT) is used for log record compatibility to facilitateonline upgrades of replication groups. Records created with this keyword willproduce reading and printing routines, but no logging routines.  The recoveryroutines are retrieved from older releases, so no recovery templates will begenerated for these records.])m4_p([dnlThe m4_italic(DB_VERSION_NUMBER) variable should be replaced with thecurrent major and minor version of m4_db, with all punctuation removed.For example, m4_db version 4.2 should be 42, version 4.5 should be 45.])m4_p([dnlThe m4_italic(RECORD_NAME) variable should be replaced with a recordname for this log record.  The m4_italic(RECORD_NUMBER) variable shouldbe replaced with a record number.])m4_p([dnlThe combination of PREFIX name and m4_italic(RECORD_NAME), and them4_italic(RECORD_NUMBER) must be unique for the application, that is,values for application-specific and m4_db log records may not overlap.Further, because record numbers are stored in log files, which areusually portable across application and m4_db releases, any change tothe record numbers or log record format or should be handled asdescribed in the m4_link(M4RELDIR/ref/upgrade/process, Upgrading m4_dbinstallations) section on log format changes.  The record number spacebelow 10,000 is reserved for m4_db itself; applications should chooserecord number values equal to or greater than 10,000.])m4_p([dnlBetween the BEGIN and END keywords there should be one optionalm4_italic(DUPLICATE) line and one line for eachdata item logged as part of this log record.])m4_p([dnlThe m4_italic(DUPLICATE) line is of the form:])m4_indent([DUPLICATE m4_italic(RECORD_NAME) m4_italic(DB_VERSION_NUMBER) m4_italic(RECORD_NUMBER)])m4_p([dnlThe m4_italic(DUPLICATE) specifier should be used when creating a recordthat requires its own record number but can use the argument structure,reading and printing routines from another record.  In this case, we willcreate a new log record type, but use the enclosing log record type forthe argument structure and the log reading and printing routines.])m4_p([dnlThe format of lines for each data item logged is as follows:])m4_indent([dnlARG | DBT | POINTER	m4_italic(variable_name)	m4_italic(variable_type)	m4_italic(printf_format)])m4_p([dnlThe keyword ARG indicates that the argument is a simple parameter ofthe type specified. For example, a file ID might be logged as:])m4_indent([dnlARG	fileID	int	d])m4_p([dnlThe keyword DBT indicates that the argument is a m4_db DBT structure,containing a length and pointer to a byte string.  The keyword POINTERindicates that the argument is a pointer to the data type specified (ofcourse the data type, not the pointer, is what is logged).])m4_p([dnlThe m4_italic(variable_name) is the field name within the structure thatwill be used to refer to this item.  The m4_italic(variable_type) isthe C-language type of the variable, and the printf format is theC-language format string, without the leading percent ("%") character,that should be used to display the contents of the field (for example,"s" for string, "d" for signed integral type, "u" for unsigned integraltype, "ld" for signed long integral type, "lu" for long unsignedintegral type, and so on).])m4_p([dnlFor example, ex_apprec.src defines a single log record type, used tolog a directory name that has been stored in a DBT:])m4_indent([dnlBEGIN	mkdir		10000DBT	dirname		DBT		sEND])m4_p([dnlAs the name suggests, this example of an application-defined log recordwill be used to log the creation of a directory.  There are many moreexamples of XXX.src files in the m4_db distribution.  For example, thefile btree/btree.src contains the definitions for the log recordssupported by the m4_db Btree access method.])m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -