Compare commits

...

1 Commits

Author SHA1 Message Date
Amul Shah 0eede9a40b Synchronize with upstream GT.M V6.0-000
Please refer to the release notes for more information about this
version.
http://tinco.pair.com/bhaskar/gtm/doc/articles/GTM_V6.0-000_Release_Notes.html

This commit includes all files from the x86 and x86_64 source tarballs,
including generated files.
2012-10-29 18:54:31 -04:00
728 changed files with 19997 additions and 12194 deletions

View File

@ -15,7 +15,10 @@
cmake_minimum_required(VERSION 2.8.5)
project(GTM C ASM)
set(version V5.5-000)
set(version V6.0-000)
if("${version}" EQUAL "")
set(version V9.9-0)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
set(arch "x86")
else()
@ -240,14 +243,14 @@ foreach(m chk2lev.m chkop.m gendash.m genout.m loadop.m loadvx.m msg.m tttgen.m
)
endforeach()
set(mumps_ttt_args -run tttgen
${GTM_SOURCE_DIR}/sr_unix/ttt.txt
${GTM_SOURCE_DIR}/sr_port/opcode_def.h
${GTM_SOURCE_DIR}/sr_port/vxi.h
)
foreach(f ttt.txt opcode_def.h vxi.h)
select_file(src ${f})
list(APPEND tttfiles ${src})
endforeach()
set(mumps_ttt_args -run tttgen ${tttfiles})
add_custom_command(
OUTPUT gen/ttt.c
DEPENDS ${GTM_SOURCE_DIR}/sr_unix/ttt.txt
DEPENDS ${tttfiles}
gen/chk2lev.m gen/chkop.m gen/gendash.m gen/genout.m gen/loadop.m
gen/loadvx.m gen/tttgen.m gen/tttscan.m
${GTM_SOURCE_DIR}/sr_unix/mumps.cmake ${gen_bootstrap_depend}
@ -736,6 +739,6 @@ install(FILES sr_unix/lowerc_cp.sh DESTINATION ${GTM_INSTALL_DIR}
)
install(FILES COPYING DESTINATION ${GTM_INSTALL_DIR})
install(FILES sr_port/README.txt DESTINATION ${GTM_INSTALL_DIR})
add_custom_target(place_files ALL DEPENDS ${files_to_place})

0
COPYING Executable file → Normal file
View File

136
README Executable file → Normal file
View File

@ -5,111 +5,67 @@ file included in this package, it contains the terms of the license under
which the package is provided to you. If there is not a COPYING file in
the package, you must ensure that your use of FIS GT.M complies with the
license under which it is provided. If you are unsure as to the terms of
your license, please consult with the entity that provided you with the package.
your license, please consult with the entity that provided you with the
package.
The make file enclosed (sr_unix/comlist.mk) will build GT.M from source.
The prerequisites are GNU make, GT.M binary installation (which you can
download from http://sourceforge.net/projects/fis-gtm/), Linux x86, tcsh,
Unicode and GPG include files. Unicode include files are automatically
installed if ICU is installed. GPG include files require installing the
GNUPG and related library development packages. GNU make 3.81,
Ubuntu 10.04 LTS and RHEL 5.0 were used to do the test builds for this
distribution. The default ICU and GPG packages were taken from the OS
vendors' repositories.
GT.M relies on CMake to generate the Makefiles to build GT.M from source. The
prerequisites are CMake (at least 2.8.5), GNU make (at least 3.81), Linux
(either x86 or x86_64), Unicode include files and GPG. Unicode include files
are automatically installed if ICU is installed. GPG include files require
installing the GNUPG and related library development packages. Debian 6, Ubuntu
12.04 LTS and RHEL 6.0 were used to do the test builds for this distribution.
The default ICU and GPG packages were taken from the distribution repositories.
To build a production version GT.M for linux do the following steps:
1. Fulfill the pre-requisites.
Download and install GT.M binary distribution from SourceForge if you
do not have GT.M installed already. The build procedure needs an
existing GT.M mumps installed on the machine.
To build GT.M for Linux, do the following steps:
You can download GT.M from http://sourceforge.net/projects/fis-gtm/
Unpack the tar file and run the configure script as root. Note: the tar
file unpacks everything into your current working directory, not a new
subdirectory. The Linux Standard Base (LSB) install path for GT.M
V54002 is /opt/lsb-gtm/V5.4-002_i686 or /opt/lsb-gtm/V5.4-002_x8664.
$ tar xfz gtm_V54002_linux_i686_src.tar.gz
1. Fulfill the pre-requisites
Install developement libraries libelf, zlib, libicu, libgpgme, libgpg-error,
libgcrypt.
[optional] The GT.M source tarball includes pre-generated files. To generate
these files requires a binary distribution of GT.M. You can download GT.M
from http://sourceforge.net/projects/fis-gtm/ Unpack the tar file and run
the configure script as root. Note: the tar file unpacks everything into
your current working directory, not a new subdirectory. The Linux Standard
Base (LSB) install path for GT.M V60000 is /opt/lsb-gtm/V6.0-000_i686 or
/opt/lsb-gtm/V6.0-000_x8664.
$ tar xfz gtm_V60000_linux_i686_pro.tar.gz
$ sudo sh ./configure
# Provide the directory path to cmake using
# -D GTM_DIST:PATH=$gtm_dist
2. Unpack the GT.M sources
Change directory in the directory that you will place the GT.M source,
here after referred to as <gtm-directory>.
$ mkdir <gtm-directory>
$ cd <gtm-directory>
$ tar xfz gtm_V54002_linux_i686_src.tar.gz
$ tar xfz gtm_V60000_linux_i686_src.tar.gz
You should find this README, COPYING file and sr_* source directroies.
You should find this README, COPYING and CMakeLitst.txt file and sr_* source
directories.
3. Define environment variables needed to build GT.M
You will need to use tcsh to build GT.M. GT.M uses several csh script
files the define environment variables used in the build process. You
will need to define several variables prior to intiating your GT.M build.
3. Building GT.M -
<gtm-builddir> can be a sub directory of the source directory <gtm-directory>
- Define 'gtm_curpro' and 'gtm_exe' so that you can compile M programs.
This is the directory in which you installed the GT.M binaries from
SourceForge.
$ setenv gtm_curpro <path to installed GT.M>
$ setenv gtm_exe $gtm_curpro
$ setenv HOSTOS `uname -s`
$ mkdir <gtm-builddir>
$ cd <gtm-builddir>
$ cmake <gtm-directory>
- Define 'gtm_tools' and 'gtm_inc'
$ setenv gtm_tools $PWD/sr_linux
$ setenv gtm_inc $PWD/sr_linux
- [OPTIONAL] Ubuntu users must define 'distro'
$ setenv distro ubuntu
# By default the build produces release versions of GT.M. To build a debug
# version of GT.M supply the following parameter to cmake
# -D CMAKE_BUILD_TYPE=DEBUG
#
# Note that the default install location is driven by CMAKE_INSTALL_PREFIX.
# You can change this when executing cmake
# -D CMAKE_INSTALL_PREFIX:PATH=/opt/lsb-gtm
#
$ make
- [OPTIONAL] By default the build procedure will build 64 bit version of
GT.M on a x86_64 bit machine.
If you intend to build 32 bit version of GT.M on a x86_64 bit machine you
have to explicitly set the environment variable 'OBJECT_MODE' to '32'
$ setenv OBJECT_MODE 32
$ make install
- Specify which ICU version is installed.
ICU version needs to be of the form #.# If the result of running
"icu-config --version" has the form #.#.#, just use the first two
parts. For example, if "icu-config --version" returns 3.8.1, use
3.8 in the "setenv" step.
$ icu-config --version
$ setenv gtm_icu_version <result of previous step>
- Define 'gtm_version_change' and execute gtm_env.csh
$ setenv gtm_version_change 1
$ source sr_unix/gtm_env.csh
4. Building GT.M -
By default, the gmake will build a production version GT.M. The build type
of GT.M can be controlled by a parameter "buildtypes" - dbg (debug),
bta (beta), and pro (production). Passing a subset of dbg, bta, or pro in
"buildtypes" from the environment or the command line will build that subset.
For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=dbg gtm_ver=$PWD
will build just a debuggable GT.M release.
You can clean your builds by appending 'clean' to the make line.
For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=dbg gtm_ver=$PWD clean
5. Packaging GT.M -
Once the required builds have been done the object distribution can be
tar'ed by doing:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux gtm_ver=$PWD package
Again, buildtypes can be used to package just a subset. For example:
gmake -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver=$PWD package
Appendix: Known warnings and errors
- "cc1: note: obsolete option -I- used, please use -iquote instead"
You can safely ignore this warning
- "chk2lev.mdep:2: *** missing separator. Stop."
tcsh is using the builtin echo, you need to set the environment variable
'distro' to 'ubuntu' and clean your build.
$ setenv distro ubuntu
$ make clean
4. Packaging GT.M -
Create a tar file from the installed directory

View File

@ -15,7 +15,7 @@
#include "i386.h"
#include "urx.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "op.h"
#include <auto_zlink.h>

View File

@ -12,7 +12,7 @@
#include "mdef.h"
#include "compiler.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "opcode.h"
#include "xfer_enum.h"

View File

@ -1,6 +1,6 @@
#################################################################
# #
# Copyright 2001, 2007 Fidelity Information Services, Inc #
# Copyright 2001, 2012 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
@ -36,16 +36,13 @@ chnd_jmp = 12
.else
# setjmp is really __sigsetjmp(env,0)
.extern __sigsetjmp
.extern gtm_asm_establish
.endif
.sbttl error.si ESTABLISH
.macro ESTABLISH x, label
addl $chnd_size,ctxt # ctxt++
call gtm_asm_establish # Bulk of ESTABLISH macro
movl ctxt,%eax
movl active_ch,%edx # ctxt->save_active_ch = active_ch
movl %edx,chnd_save_active(%eax)
movl $0,chnd_ch_active(%eax) # ctxt->ch_active = FALSE
movl %eax,active_ch # active_ch = ctxt
movl $\x,chnd_ch(%eax) # ctxt->ch = x
addl $chnd_jmp,%eax # setjmp(ctxt->jmp)
.ifndef cygwin

View File

@ -12,7 +12,7 @@
#include "mdef.h"
#include "xfer_enum.h"
#include "i386.h"
#include "rtnhdr.h" /* Needed by zbreak.h */
#include <rtnhdr.h> /* Needed by zbreak.h */
#include "zbreak.h"
zb_code *find_line_call(void *addr)

View File

@ -70,6 +70,7 @@ LITDEF err_msg gdeerrors[] = {
"NONASCII", "!AD is illegal for a !AD as it contains non-ASCII characters", 4,
"CRYPTNOMM", "!AD is an encrypted database. Cannot support MM access method.", 2,
"JNLALLOCGROW", "Increased Journal ALLOCATION from [!AD blocks] to [!AD blocks] to match AUTOSWITCHLIMIT for !AD !AD", 8,
"KEYFORBLK", "But block size !AD can only support key size !AD", 4,
};
LITDEF int GDE_BLKSIZ512 = 150503435;
@ -129,9 +130,10 @@ LITDEF int GDE_WRITEERROR = 150503859;
LITDEF int GDE_NONASCII = 150503866;
LITDEF int GDE_CRYPTNOMM = 150503874;
LITDEF int GDE_JNLALLOCGROW = 150503883;
LITDEF int GDE_KEYFORBLK = 150503891;
GBLDEF err_ctl gdeerrors_ctl = {
248,
"GDE",
&gdeerrors[0],
57};
58};

View File

@ -16,7 +16,7 @@
#include "gtm_string.h"
#include <errno.h>
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "compiler.h"
#include "urx.h"
#include "objlabel.h" /* needed for masscomp.h */

View File

@ -14,7 +14,7 @@
#include "gtm_string.h"
#include "error.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "op.h"
#include "i386.h"
#include "inst_flush.h"

View File

@ -14,7 +14,7 @@
#include "gtm_string.h"
#include "error.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "op.h"
#include "i386.h"
#include "inst_flush.h"

View File

@ -427,8 +427,8 @@ const static readonly int error_ansi[] = {
0, /* JNLINVEXT */
0, /* MUPCLIERR */
0, /* JNLTMQUAL4 */
0, /* JNLBUFFTOOLG */
0, /* JNLBUFFTOOSM */
0, /* UNUSEDMSG594 */
0, /* UNUSEDMSG595 */
0, /* MUNODBNAME */
0, /* FILECREATE */
0, /* FILENOTCREATE */
@ -642,7 +642,7 @@ const static readonly int error_ansi[] = {
0, /* JNLRDONLY */
0, /* ANCOMPTINC */
0, /* ABNCOMPTINC */
0, /* GTMSECSHRLOGF */
0, /* UNUSEDMSG809 */
0, /* SOCKNOTFND */
0, /* CURRSOCKOFR */
79, /* SOCKETEXIST */
@ -731,8 +731,8 @@ const static readonly int error_ansi[] = {
0, /* SCNDDBNOUPD */
0, /* MUINFOUINT4 */
0, /* NLMISMATCHCALC */
0, /* GTMSECSHRLOGSWH */
0, /* GTMSECSHRDEFLOG */
0, /* UNUSEDMSG898 */
0, /* UNUSEDMSG899 */
0, /* DBBADNSUB */
0, /* DBBADKYNM */
0, /* DBBADPNTR */
@ -964,7 +964,7 @@ const static readonly int error_ansi[] = {
0, /* PREVJNLLINKCUT */
0, /* PREVJNLLINKSET */
0, /* FILENAMETOOLONG */
0, /* UNUSEDMSG1131 */
0, /* REQRECOV */
0, /* JNLTRANS2BIG */
0, /* JNLSWITCHTOOSM */
0, /* JNLSWITCHSZCHG */
@ -1088,7 +1088,7 @@ const static readonly int error_ansi[] = {
0, /* REPLINSTSEQORD */
0, /* REPLINSTSTNDALN */
0, /* REPLREQROLLBACK */
0, /* UNUSEDMSG1255 */
0, /* REQROLLBACK */
0, /* UNUSEDMSG1256 */
0, /* SRCSRVEXISTS */
0, /* SRCSRVNOTEXIST */
@ -1246,12 +1246,12 @@ const static readonly int error_ansi[] = {
0, /* NORESYNCUPDATERONLY */
0, /* NOSUPPLSUPPL */
0, /* REPL2OLD */
0, /* RCVR2MANY */
0, /* RLBKCONFIGBNDRY */
0, /* UNUSEDMSG1413 */
0, /* UNUSEDMSG1414 */
0, /* SECNOTSUPPLEMENTARY */
0, /* SUPRCVRNEEDSSUPSRC */
0, /* SYNCTOSAMETYPE */
0, /* TARGINSRUNNING */
0, /* UNUSEDMSG1417 */
0, /* UNUSEDMSG1418 */
0, /* UPDSYNC2MTINS */
0, /* UPDSYNCINSTFILE */
0, /* REUSEINSTNAME */
@ -1270,7 +1270,7 @@ const static readonly int error_ansi[] = {
0, /* ORLBKNOV4BLK */
0, /* DBROLLEDBACK */
0, /* DSEWCREINIT */
0, /* RNDWNSKIPCNT */
0, /* UNUSEDMSG1437 */
0, /* REPLONLNRLBK */
0, /* SRVLCKWT2LNG */
0, /* IGNBMPMRKFREE */
@ -1293,4 +1293,35 @@ const static readonly int error_ansi[] = {
0, /* STRMSEQMISMTCH */
0, /* LOCKSPACEINFO */
0, /* JRTNULLFAIL */
0, /* LOCKSUB2LONG */
0, /* RESRCWAIT */
0, /* RESRCINTRLCKBYPAS */
0, /* DBFHEADERRANY */
0, /* REPLINSTFROZEN */
0, /* REPLINSTFREEZECOMMENT */
0, /* REPLINSTUNFROZEN */
0, /* DSKNOSPCAVAIL */
0, /* DSKNOSPCBLOCKED */
0, /* DSKSPCAVAILABLE */
0, /* ENOSPCQIODEFER */
0, /* CUSTOMFILOPERR */
0, /* CUSTERRNOTFND */
0, /* CUSTERRSYNTAX */
0, /* ORLBKINPROG */
0, /* DBSPANGLOINCMP */
0, /* DBSPANCHUNKORD */
0, /* DBDATAMX */
0, /* DBIOERR */
0, /* INITORRESUME */
0, /* GTMSECSHRNOARG0 */
0, /* GTMSECSHRISNOT */
0, /* GTMSECSHRBADDIR */
0, /* JNLBUFFREGUPD */
0, /* JNLBUFFDBUPD */
0, /* LOCKINCR2HIGH */
0, /* LOCKIS */
0, /* LDSPANGLOINCMP */
0, /* MUFILRNDWNFL2 */
0, /* MUINSTFROZEN */
0, /* MUINSTUNFROZEN */
};

View File

@ -305,8 +305,8 @@ LITDEF err_msg merrors[] = {
"DBBLEVMN", "!AD Block level less than zero", 2,
"DBBSIZMN", "!AD Block too small", 2,
"DBBSIZMX", "!AD Block larger than file block size", 2,
"DBRSIZMN", "!AD Record too small", 2,
"DBRSIZMX", "!AD Record too large", 2,
"DBRSIZMN", "!AD Physical record too small", 2,
"DBRSIZMX", "!AD Physical record too large", 2,
"DBCMPNZRO", "!AD First record of block has nonzero compression count", 2,
"DBSTARSIZ", "!AD Star record has wrong size", 2,
"DBSTARCMP", "!AD Star record has nonzero compression count", 2,
@ -429,8 +429,8 @@ LITDEF err_msg merrors[] = {
"JNLINVEXT", "Journal file extension !UL is greater than the maximum allowed size of !UL. Journal file not created.", 2,
"MUPCLIERR", "Action not taken due to CLI errors", 0,
"JNLTMQUAL4", "Time qualifier BEFORE_TIME=\"!AZ\" is less than AFTER_TIME=\"!AZ\"", 2,
"JNLBUFFTOOLG", "Journal file buffer !UL is greater than the maximum allowed size of !UL. Journal file not created.", 2,
"JNLBUFFTOOSM", "Journal file buffer !UL is less than minimum of database block size in 512 byte pages + 1 (!UL)", 2,
"UNUSEDMSG594", "JNLBUFFTOOLG Last used in V5.5-000", 0,
"UNUSEDMSG595", "JNLBUFFTOOSM Last used in V5.5-000", 0,
"MUNODBNAME", "A database name or the region qualifier must be specified", 0,
"FILECREATE", "!AD file !AD created", 4,
"FILENOTCREATE", "!AD file !AD not created", 4,
@ -505,7 +505,7 @@ LITDEF err_msg merrors[] = {
"CENOINDIR", "Indirection type information not available for compiler escape feature", 0,
"COLLATIONUNDEF", "Collation type !UL is not defined", 1,
"RBWRNNOTCHG", "Not all specified database files were changed", 0,
"GTMSECSHRSRVF", "!AD - !UL : Attempt to service request failed", 3,
"GTMSECSHRSRVF", "!AD - !UL : Attempt to service request failed (retry = !UL)", 4,
"FREEZECTRL", "Control Y or control C encountered during attempt to freeze the database. Aborting freeze.", 0,
"JNLFLUSH", "Error flushing journal buffers to journal file !AD", 2,
"CCPSIGDMP", "CCP non fatal dump, continuing operation. Report to your GT.M Support Channel.", 0,
@ -583,11 +583,11 @@ LITDEF err_msg merrors[] = {
"BLKSIZ512", "Block size !UL rounds to !UL", 2,
"MUTEXERR", "Mutual Exclusion subsystem failure", 0,
"JNLVSIZE", "Journal File !AD has incorrect virtual_filesize !UL. Allocation : !UL, Extension : !UL, Filesize : !UL, File system block size : !UL", 7,
"MUTEXLCKALERT", "Mutual Exclusion subsystem ALERT - lock attempt threshold crossed for region !AD. Process !UL is in crit.", 3,
"MUTEXLCKALERT", "Mutual Exclusion subsystem ALERT - lock attempt threshold crossed for region !AD. Process !UL is in crit cycle !UL.", 4,
"MUTEXFRCDTERM", "Mutual Exclusion subsystem detected forced termination of process !UL. Crit salvaged from region !AD.", 3,
"GTMSECSHR", "!UL : Error during gtmsecshr operation", 1,
"GTMSECSHRSRVFID", "!AD: !UL - Attempt to service request failed.!/ client id: !UL, mesg type: !UL, mesg data: !UL.", 6,
"GTMSECSHRSRVFIL", "!AD: !UL - Attempt to service request failed.!/ client id: !UL, mesg type: !UL!/file: !AD.", 7,
"GTMSECSHRSRVFID", "!AD: !UL - Attempt to service request failed.!/ client id: !UL, mesg type: !UL, mesg data: !UL", 6,
"GTMSECSHRSRVFIL", "!AD: !UL - Attempt to service request failed.!/ client id: !UL, mesg type: !UL!/file: !AD", 7,
"SOCKACTNA", "Action not appropriate for current socket", 0,
"PROTNOTSUP", "Protocol !AD not supported", 2,
"DELIMSIZNA", "Delimiter size is not appropriate", 0,
@ -644,7 +644,7 @@ LITDEF err_msg merrors[] = {
"JNLRDONLY", "Journal file !AD read only", 2,
"ANCOMPTINC", "Deviceparameter !AD is not compatible with any other deviceparameters in the !AD command", 4,
"ABNCOMPTINC", "Deviceparameter !AD and deviceparameter !AD are not compatible in the !AD command", 6,
"GTMSECSHRLOGF", "!AD - !UL : Error while creating gtmsecshr log file", 3,
"UNUSEDMSG809", "GTMSECSHRLOGF last used in V5.5-000", 0,
"SOCKNOTFND", "Socket !AD not found", 2,
"CURRSOCKOFR", "Current socket of index !UL is out of range. There are only !UL sockets.", 2,
"SOCKETEXIST", "Socket !AD already exists", 2,
@ -733,8 +733,8 @@ LITDEF err_msg merrors[] = {
"SCNDDBNOUPD", "Database Updates not allowed on the secondary", 0,
"MUINFOUINT4", "!AD : !UL [0x!XL]", 4,
"NLMISMATCHCALC", "Location of !AD expected at 0x!XL, but found at 0x!XL", 4,
"GTMSECSHRLOGSWH", "Error switching gtmsecshr log file gtmsecshr log -- !AD original log -- !AD error phase -- !AD process id -- !UL", 7,
"GTMSECSHRDEFLOG", "$gtm_log is either undefined or not defined to an absolute path, thus gtm_log is set to its default !AD", 2,
"UNUSEDMSG898", "GTMSECSHRLOGSWH last used in V5.5-000", 0,
"UNUSEDMSG899", "GTMSECSHRDEFLOG last used in V5.5-000", 0,
"DBBADNSUB", "!AD Bad numeric subscript", 2,
"DBBADKYNM", "!AD Bad key name", 2,
"DBBADPNTR", "!AD Bad pointer value in directory", 2,
@ -813,8 +813,8 @@ LITDEF err_msg merrors[] = {
"DBADDRANGE8", "Database file !AD, element location 0x!XJ: blk = 0x!XL: control 0x!16@XQ was outside !AD range 0x!16@XQ to 0x!16@XQ", 9,
"RNDWNSEMFAIL", "Attempting to acquire gds_rundown semaphore when it is already owned", 0,
"GTMSECSHRSHUTDN", "gtmsecshr process has received a shutdown request -- shutting down", 0,
"NOSPACECRE", "Not enough space to create database file !AD. !UL blocks are needed, only !UL available.", 4,
"LOWSPACECRE", "Disk space for database file !AD is not enough for !UL future extensions. !UL !UL-byte blocks are needed, only !UL available.", 6,
"NOSPACECRE", "Not enough space to create database file !AD. !@ZQ blocks are needed, only !@ZQ available.", 4,
"LOWSPACECRE", "Disk space for database file !AD is not enough for !UL future extensions. !@ZQ !UL-byte blocks are needed, only !@ZQ available.", 6,
"WAITDSKSPACE", "Process 0x!XL will wait !UL seconds for necessary disk space to become available for !AD ", 4,
"OUTOFSPACE", "Database file !AD ran out of disk space. Detected by process !UL. !/Exit without clearing shared memory due to the disk space constraints. !/Make space and then perform mupip rundown to ensure database integrity.", 3,
"JNLPVTINFO", "Pid 0x!XL!/ cycle 0x!XL fd_mismatch 0x!XL channel 0x!XL sync_io 0x!XL!/ pini_addr 0x!XL qio_active 0x!XL old_channel 0x!XL", 8,
@ -966,7 +966,7 @@ LITDEF err_msg merrors[] = {
"PREVJNLLINKCUT", "Previous journal file name link set to NULL in new journal file !AD created for database file !AD", 4,
"PREVJNLLINKSET", "Previous generation journal file name is changed from !AD to !AD", 4,
"FILENAMETOOLONG", "File name too long", 0,
"UNUSEDMSG1131", "JNLCREATERR Last used in V5.4-001", 0,
"REQRECOV", "Error accessing database !AD. Must be recovered on cluster node !AD.", 4,
"JNLTRANS2BIG", "Transaction needs an estimated [!UL blocks] in journal file !AD which exceeds the AUTOSWITCHLIMIT of !UL blocks", 4,
"JNLSWITCHTOOSM", "Journal AUTOSWITCHLIMIT [!UL blocks] is less than Journal ALLOCATION [!UL blocks] for database file !AD", 4,
"JNLSWITCHSZCHG", "Journal AUTOSWITCHLIMIT [!UL blocks] is rounded down to [!UL blocks] to equal the sum of Journal ALLOCATION [!UL blocks] and a multiple of Journal EXTENSION [!UL blocks] for database file !AD", 6,
@ -1090,7 +1090,7 @@ LITDEF err_msg merrors[] = {
"REPLINSTSEQORD", "!AD has seqno [0x!16@XQ] which is less than last record seqno [0x!16@XQ] in replication instance file !AD", 6,
"REPLINSTSTNDALN", "Could not get exclusive access to replication instance file !AD", 2,
"REPLREQROLLBACK", "Replication instance file !AD indicates abnormal shutdown or an incomplete ROLLBACK. Run MUPIP JOURNAL ROLLBACK first", 2,
"UNUSEDMSG1255", "REPLUPGRADEPRI : Last used in V5.4-002B", 0,
"REQROLLBACK", "Error accessing database !AD. Run MUPIP JOURNAL ROLLBACK on cluster node !AD.", 4,
"UNUSEDMSG1256", "REPLUPGRADESEC : Last used in V5.4-002B", 0,
"SRCSRVEXISTS", "Source server for secondary instance !AD is already running with pid !UL", 3,
"SRCSRVNOTEXIST", "Source server for secondary instance !AD is not alive", 2,
@ -1132,7 +1132,7 @@ LITDEF err_msg merrors[] = {
"COMMITWAITPID", "Pid !UL waited !UL minute(s) for pid !UL to finish commits to block 0x!XL in database file !AD", 6,
"UPDREPLSTATEOFF", "Error replicating global ^!AD as it maps to database !AD which has replication turned OFF", 4,
"LITNONGRAPH", "M standard requires graphics in string literals", 0,
"DBFHEADERR8", "Database file !AD: control problem: !AD was 0x!XJ expecting 0x!XJ", 6,
"DBFHEADERR8", "Database file !AD: control problem: !AD was 0x!16@XQ expecting 0x!16@XQ", 6,
"MMBEFOREJNL", "BEFORE image journaling cannot be set with MM access method in database file !AD", 2,
"MMNOBFORRPL", "Replication cannot be used in database file !AD which uses MM access method and NOBEFORE image journaling", 2,
"KILLABANDONED", "Abandoned kills counter is greater than zero for file !AD, !AD", 4,
@ -1248,12 +1248,12 @@ LITDEF err_msg merrors[] = {
"NORESYNCUPDATERONLY", "NORESYNC qualifier only allowed on a Supplementary Instance which allows local updates", 0,
"NOSUPPLSUPPL", "Instance !AD is configured to perform local updates so it cannot receive from Supplementary Instance !AD", 4,
"REPL2OLD", "Instance !AD uses a GT.M version that does not support connection with the current version on instance !AD", 4,
"RCVR2MANY", "The instance already has the maximum supportable number of receiver servers [!UL] active", 1,
"RLBKCONFIGBNDRY", "Rollback encountered journal records indicating current source !AD replaced old source !AD; cannot rollback past sequence number 0x!16@XQ", 5,
"UNUSEDMSG1413", "RCVR2MANY: Never used before so slot free for reuse", 0,
"UNUSEDMSG1414", "RLBKCONFIGBNDRY: Never used before so slot free for reuse", 0,
"SECNOTSUPPLEMENTARY", "!AD is a Supplementary Instance and so cannot act as a source to non-Supplementary Instance !AD ", 4,
"SUPRCVRNEEDSSUPSRC", "Instance !AD is not configured to perform local updates so it cannot act as a receiver for non-Supplementary Instance !AD", 4,
"SYNCTOSAMETYPE", "Source instance !AD and receiver instance !AD must either be both supplementary or both non-supplementary for them to synchronize their state", 4,
"TARGINSRUNNING", "Cannot change the instance definition of instance !AD while it is running", 2,
"UNUSEDMSG1417", "SYNCTOSAMETYPE: Never used before so slot free for reuse", 0,
"UNUSEDMSG1418", "TARGINSRUNNING: Never used before so slot free for reuse", 0,
"UPDSYNC2MTINS", "Can only UPDATERESYNC with an empty instance file", 0,
"UPDSYNCINSTFILE", "Error with instance file name specified in UPDATERESYNC qualifier", 0,
"REUSEINSTNAME", "Error with instance name specified in REUSE qualifier", 0,
@ -1272,7 +1272,7 @@ LITDEF err_msg merrors[] = {
"ORLBKNOV4BLK", "Region !AD (!AD) has V4 format blocks. Database upgrade required. ONLINE ROLLBACK cannot continue", 4,
"DBROLLEDBACK", "Concurrent ONLINE ROLLBACK detected on one or more regions. The current operation is no longer valid", 0,
"DSEWCREINIT", "Database cache reinitialized by DSE for region !AD", 2,
"RNDWNSKIPCNT", "A total of !UL process(es) skipped database rundown due to a concurrent ONLINE ROLLBACK", 1,
"UNUSEDMSG1437", "A total of !UL process(es) skipped database rundown due to a concurrent ONLINE ROLLBACK", 1,
"REPLONLNRLBK", "ONLINE ROLLBACK detected. Starting afresh", 0,
"SRVLCKWT2LNG", "PID !UL is holding the source server lock. Waited for !UL minute(s). Now exiting", 2,
"IGNBMPMRKFREE", "Ignoring bitmap free-up operation for region !AD (!AD) due to concurrent ONLINE ROLLBACK", 4,
@ -1295,6 +1295,37 @@ LITDEF err_msg merrors[] = {
"STRMSEQMISMTCH", "Unable to play update on Stream !2UL with seqno [0x!16@XQ] as receiving instance has a different stream seqno [0x!16@XQ]", 3,
"LOCKSPACEINFO", "Region: !AD: processes on queue: !UL/!UL; LOCK slots in use: !UL/!UL; name space!ADfull", 8,
"JRTNULLFAIL", "Applying NULL journal record failed. Failure code: !AD.", 2,
"LOCKSUB2LONG", "Following subscript is !UL bytes long which exceeds 255 byte limit.", 1,
"RESRCWAIT", "Waiting briefly for the !AD semaphore for region !AD (!AD) was held by PID !UL (Sem. ID: !UL).", 8,
"RESRCINTRLCKBYPAS", "!AD with PID !UL bypassing the !AD semaphore for region !AD (!AD) was held by PID !UL.", 10,
"DBFHEADERRANY", "Database file !AD: control problem: !AD was 0x!XJ expecting 0x!XJ", 6,
"REPLINSTFROZEN", "Instance !AZ is now Frozen", 1,
"REPLINSTFREEZECOMMENT", "Freeze Comment: !AZ", 1,
"REPLINSTUNFROZEN", "Instance !AZ is now Unfrozen", 1,
"DSKNOSPCAVAIL", "Attempted write to file !AD failed due to lack of disk space. Retrying indefinitely.", 2,
"DSKNOSPCBLOCKED", "Retry of write to file !AD suspended due to new instance freeze. Waiting for instance to be unfrozen.", 2,
"DSKSPCAVAILABLE", "Write to file !AD succeeded after out-of-space condition cleared", 2,
"ENOSPCQIODEFER", "Write to file !AD deferred due to lack of disk space", 2,
"CUSTOMFILOPERR", "Error while doing !AD operation on file !AD", 4,
"CUSTERRNOTFND", "Error mnemonic !AD specified in custom errors file is not valid for this version of GT.M", 2,
"CUSTERRSYNTAX", "Syntax error in file !AD at line number !UL", 3,
"ORLBKINPROG", "Online ROLLBACK in progress by PID !UL in region !AD", 3,
"DBSPANGLOINCMP", "!AD Spanning node is missing. Block no !UL of spanning node is missing", 3,
"DBSPANCHUNKORD", "!AD Chunk of !UL blocks is out of order", 3,
"DBDATAMX", "!AD Record too large", 2,
"DBIOERR", "Error while doing write operation on region !AD (!AD)", 4,
"INITORRESUME", "UPDATERESYNC on a Supplementary Instance must additionally specify INITIALIZE or RESUME", 0,
"GTMSECSHRNOARG0", "gtmsecshr cannot identify its origin - argv[0] is null", 0,
"GTMSECSHRISNOT", "gtmsecshr is not running as gtmsecshr but !AD - must be gtmsecshr", 2,
"GTMSECSHRBADDIR", "gtmsecshr is not running from $gtm_dist/gtmsecshrdir or $gtm_dist cannot be determined", 0,
"JNLBUFFREGUPD", "Journal file buffer size for region !AD has been adjusted from !UL to !UL.", 4,
"JNLBUFFDBUPD", "Journal file buffer size for database file !AD has been adjusted from !UL to !UL.", 4,
"LOCKINCR2HIGH", "Attempt to increment a LOCK more than !UL times", 1,
"LOCKIS", "!_!_Resource name: !AD", 2,
"LDSPANGLOINCMP", "Incomplete spanning node found during load", 0,
"MUFILRNDWNFL2", "Database section (id = !UL) belonging to database file !AD rundown failed", 3,
"MUINSTFROZEN", "!AD : Instance !AZ is frozen. Waiting for instance to be unfrozen before proceeding with writes to database file !AD", 5,
"MUINSTUNFROZEN", "!AD : Instance !AZ is now Unfrozen. Continuing with writes to database file !AD", 5,
};
LITDEF int ERR_ACK = 150372361;
@ -1383,7 +1414,7 @@ LITDEF int ERR_INDMAXNEST = 150373018;
LITDEF int ERR_INDRMAXLEN = 150373026;
LITDEF int ERR_INSFFBCNT = 150373034;
LITDEF int ERR_INTEGERRS = 150373042;
LITDEF int ERR_INVCMD = 150373050;
LITDEF int ERR_INVCMD = 150373048;
LITDEF int ERR_INVFCN = 150373058;
LITDEF int ERR_INVOBJ = 150373066;
LITDEF int ERR_INVSVN = 150373074;
@ -1713,8 +1744,8 @@ LITDEF int ERR_JNLINVALLOC = 150375656;
LITDEF int ERR_JNLINVEXT = 150375664;
LITDEF int ERR_MUPCLIERR = 150375674;
LITDEF int ERR_JNLTMQUAL4 = 150375682;
LITDEF int ERR_JNLBUFFTOOLG = 150375688;
LITDEF int ERR_JNLBUFFTOOSM = 150375696;
LITDEF int ERR_UNUSEDMSG594 = 150375690;
LITDEF int ERR_UNUSEDMSG595 = 150375698;
LITDEF int ERR_MUNODBNAME = 150375706;
LITDEF int ERR_FILECREATE = 150375715;
LITDEF int ERR_FILENOTCREATE = 150375723;
@ -1928,7 +1959,7 @@ LITDEF int ERR_MUKILLIP = 150377376;
LITDEF int ERR_JNLRDONLY = 150377386;
LITDEF int ERR_ANCOMPTINC = 150377394;
LITDEF int ERR_ABNCOMPTINC = 150377402;
LITDEF int ERR_GTMSECSHRLOGF = 150377410;
LITDEF int ERR_UNUSEDMSG809 = 150377410;
LITDEF int ERR_SOCKNOTFND = 150377418;
LITDEF int ERR_CURRSOCKOFR = 150377426;
LITDEF int ERR_SOCKETEXIST = 150377434;
@ -2017,8 +2048,8 @@ LITDEF int ERR_SECONDAHEAD = 150378090;
LITDEF int ERR_SCNDDBNOUPD = 150378098;
LITDEF int ERR_MUINFOUINT4 = 150378107;
LITDEF int ERR_NLMISMATCHCALC = 150378114;
LITDEF int ERR_GTMSECSHRLOGSWH = 150378122;
LITDEF int ERR_GTMSECSHRDEFLOG = 150378131;
LITDEF int ERR_UNUSEDMSG898 = 150378122;
LITDEF int ERR_UNUSEDMSG899 = 150378131;
LITDEF int ERR_DBBADNSUB = 150378138;
LITDEF int ERR_DBBADKYNM = 150378146;
LITDEF int ERR_DBBADPNTR = 150378154;
@ -2250,7 +2281,7 @@ LITDEF int ERR_JNLFNF = 150379955;
LITDEF int ERR_PREVJNLLINKCUT = 150379963;
LITDEF int ERR_PREVJNLLINKSET = 150379971;
LITDEF int ERR_FILENAMETOOLONG = 150379978;
LITDEF int ERR_UNUSEDMSG1131 = 150379986;
LITDEF int ERR_REQRECOV = 150379986;
LITDEF int ERR_JNLTRANS2BIG = 150379994;
LITDEF int ERR_JNLSWITCHTOOSM = 150380002;
LITDEF int ERR_JNLSWITCHSZCHG = 150380011;
@ -2374,7 +2405,7 @@ LITDEF int ERR_REPLINSTSECUNDF = 150380946;
LITDEF int ERR_REPLINSTSEQORD = 150380954;
LITDEF int ERR_REPLINSTSTNDALN = 150380962;
LITDEF int ERR_REPLREQROLLBACK = 150380970;
LITDEF int ERR_UNUSEDMSG1255 = 150380978;
LITDEF int ERR_REQROLLBACK = 150380978;
LITDEF int ERR_UNUSEDMSG1256 = 150380986;
LITDEF int ERR_SRCSRVEXISTS = 150380994;
LITDEF int ERR_SRCSRVNOTEXIST = 150381002;
@ -2532,12 +2563,12 @@ LITDEF int ERR_NORESYNCSUPPLONLY = 150382210;
LITDEF int ERR_NORESYNCUPDATERONLY = 150382218;
LITDEF int ERR_NOSUPPLSUPPL = 150382226;
LITDEF int ERR_REPL2OLD = 150382234;
LITDEF int ERR_RCVR2MANY = 150382242;
LITDEF int ERR_RLBKCONFIGBNDRY = 150382250;
LITDEF int ERR_UNUSEDMSG1413 = 150382243;
LITDEF int ERR_UNUSEDMSG1414 = 150382251;
LITDEF int ERR_SECNOTSUPPLEMENTARY = 150382258;
LITDEF int ERR_SUPRCVRNEEDSSUPSRC = 150382266;
LITDEF int ERR_SYNCTOSAMETYPE = 150382274;
LITDEF int ERR_TARGINSRUNNING = 150382282;
LITDEF int ERR_UNUSEDMSG1417 = 150382275;
LITDEF int ERR_UNUSEDMSG1418 = 150382283;
LITDEF int ERR_UPDSYNC2MTINS = 150382290;
LITDEF int ERR_UPDSYNCINSTFILE = 150382298;
LITDEF int ERR_REUSEINSTNAME = 150382306;
@ -2556,7 +2587,7 @@ LITDEF int ERR_ORLBKFRZOVER = 150382403;
LITDEF int ERR_ORLBKNOV4BLK = 150382410;
LITDEF int ERR_DBROLLEDBACK = 150382418;
LITDEF int ERR_DSEWCREINIT = 150382427;
LITDEF int ERR_RNDWNSKIPCNT = 150382435;
LITDEF int ERR_UNUSEDMSG1437 = 150382435;
LITDEF int ERR_REPLONLNRLBK = 150382442;
LITDEF int ERR_SRVLCKWT2LNG = 150382450;
LITDEF int ERR_IGNBMPMRKFREE = 150382459;
@ -2579,9 +2610,40 @@ LITDEF int ERR_STRMNUMMISMTCH2 = 150382586;
LITDEF int ERR_STRMSEQMISMTCH = 150382594;
LITDEF int ERR_LOCKSPACEINFO = 150382603;
LITDEF int ERR_JRTNULLFAIL = 150382610;
LITDEF int ERR_LOCKSUB2LONG = 150382618;
LITDEF int ERR_RESRCWAIT = 150382627;
LITDEF int ERR_RESRCINTRLCKBYPAS = 150382635;
LITDEF int ERR_DBFHEADERRANY = 150382643;
LITDEF int ERR_REPLINSTFROZEN = 150382650;
LITDEF int ERR_REPLINSTFREEZECOMMENT = 150382659;
LITDEF int ERR_REPLINSTUNFROZEN = 150382667;
LITDEF int ERR_DSKNOSPCAVAIL = 150382675;
LITDEF int ERR_DSKNOSPCBLOCKED = 150382682;
LITDEF int ERR_DSKSPCAVAILABLE = 150382691;
LITDEF int ERR_ENOSPCQIODEFER = 150382699;
LITDEF int ERR_CUSTOMFILOPERR = 150382706;
LITDEF int ERR_CUSTERRNOTFND = 150382714;
LITDEF int ERR_CUSTERRSYNTAX = 150382722;
LITDEF int ERR_ORLBKINPROG = 150382731;
LITDEF int ERR_DBSPANGLOINCMP = 150382738;
LITDEF int ERR_DBSPANCHUNKORD = 150382746;
LITDEF int ERR_DBDATAMX = 150382754;
LITDEF int ERR_DBIOERR = 150382762;
LITDEF int ERR_INITORRESUME = 150382770;
LITDEF int ERR_GTMSECSHRNOARG0 = 150382778;
LITDEF int ERR_GTMSECSHRISNOT = 150382786;
LITDEF int ERR_GTMSECSHRBADDIR = 150382794;
LITDEF int ERR_JNLBUFFREGUPD = 150382800;
LITDEF int ERR_JNLBUFFDBUPD = 150382808;
LITDEF int ERR_LOCKINCR2HIGH = 150382818;
LITDEF int ERR_LOCKIS = 150382827;
LITDEF int ERR_LDSPANGLOINCMP = 150382834;
LITDEF int ERR_MUFILRNDWNFL2 = 150382843;
LITDEF int ERR_MUINSTFROZEN = 150382851;
LITDEF int ERR_MUINSTUNFROZEN = 150382859;
GBLDEF err_ctl merrors_ctl = {
246,
"GTM",
&merrors[0],
1282};
1313};

View File

@ -16,7 +16,7 @@
#include <errno.h>
#include "compiler.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "obj_gen.h"
#include "cgp.h"
#include "mdq.h"

View File

@ -10,15 +10,15 @@
****************************************************************/
#ifdef __CYGWIN__
#define GTM_RELEASE_NAME "GT.M V5.5-000A CYGWIN x86"
#define GTM_RELEASE_NAME "GT.M V6.0-000 CYGWIN x86"
#elif defined(__ia64)
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux IA64"
#define GTM_RELEASE_NAME "GT.M V6.0-000 Linux IA64"
#elif defined(__x86_64__)
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux x86_64"
#define GTM_RELEASE_NAME "GT.M V6.0-000 Linux x86_64"
#elif defined(__s390__)
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux S390X"
#define GTM_RELEASE_NAME "GT.M V6.0-000 Linux S390X"
#else
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux x86"
#define GTM_RELEASE_NAME "GT.M V6.0-000 Linux x86"
#endif
#define GTM_PRODUCT "GT.M"
#define GTM_VERSION "V5.5"
#define GTM_VERSION "V6.0"

View File

@ -1,5 +0,0 @@
All software in this package is part of FIS GT.M (http://fis-gtm.com) which is Copyright 2012 Fidelity Information
Services, Inc., and provided to you under the terms of a license. If there is a COPYING file included in this package,
it contains the terms of the license under which the package is provided to you. If there is not a COPYING file in the
package, you must ensure that your use of FIS GT.M complies with the license under which it is provided. If you are
unsure as to the terms of your license, please consult with the entity that provided you with the package.

View File

@ -19,7 +19,7 @@
#include "collseq.h"
#include "spec_type.h"
#ifdef GTM_TRIGGER
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "gv_trigger.h"
#endif

View File

@ -11,7 +11,7 @@
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
GBLREF stack_frame *frame_pointer;

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "op.h"
#include "stp_parms.h"

View File

@ -0,0 +1,271 @@
/****************************************************************
* *
* Copyright 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef _ANTICIPATORY_FREEZE_H
#define _ANTICIPATORY_FREEZE_H
#ifdef UNIX
#include "gtm_time.h" /* needed for GET_CUR_TIME */
#include "gdsroot.h"
#include "gdsbt.h"
#include "gdsblk.h"
#include "gdsfhead.h"
#include "repl_msg.h" /* needed for gtmsource.h */
#include "gtmsource.h" /* needed for jnlpool_addrs typedef */
#include "sleep_cnt.h" /* needed for SLEEP_INSTFREEZEWAIT macro */
#include "wait_for_disk_space.h" /* needed by DB_LSEEKWRITE macro for prototype */
#include "gtmimagename.h" /* needed for IS_GTM_IMAGE */
boolean_t is_anticipatory_freeze_needed(int msg_id);
void set_anticipatory_freeze(int msg_id);
boolean_t init_anticipatory_freeze_errors(void);
/* Define function pointers to certain functions to avoid executables like gtmsecshr from unnecessarily
* linking with these functions (which causes the database/replication stuff to be pulled in).
*/
typedef boolean_t (*is_anticipatory_freeze_needed_t)(int msgid);
typedef void (*set_anticipatory_freeze_t)(int msg_id);
GBLREF is_anticipatory_freeze_needed_t is_anticipatory_freeze_needed_fnptr;
GBLREF set_anticipatory_freeze_t set_anticipatory_freeze_fnptr;
GBLREF boolean_t pool_init;
error_def(ERR_MUINSTFROZEN);
error_def(ERR_MUINSTUNFROZEN);
error_def(ERR_MUNOACTION);
error_def(ERR_REPLINSTFREEZECOMMENT);
error_def(ERR_REPLINSTFROZEN);
error_def(ERR_REPLINSTUNFROZEN);
#define SET_ANTICIPATORY_FREEZE_IF_NEEDED(MSG_ID, FREEZE_SET) \
{ \
GBLREF jnlpool_addrs jnlpool; \
DCL_THREADGBL_ACCESS; \
\
SETUP_THREADGBL_ACCESS; \
if (ANTICIPATORY_FREEZE_AVAILABLE && (NULL != is_anticipatory_freeze_needed_fnptr)) \
{ /* NOT gtmsecshr */ \
assert(NULL != set_anticipatory_freeze_fnptr); \
if (IS_REPL_INST_UNFROZEN && (*is_anticipatory_freeze_needed_fnptr)(MSG_ID)) \
{ \
(*set_anticipatory_freeze_fnptr)(MSG_ID); \
FREEZE_SET = TRUE; \
} \
} \
}
#define REPORT_INSTANCE_FROZEN(FREEZE_SET) \
{ \
GBLREF jnlpool_addrs jnlpool; \
\
if (FREEZE_SET) \
{ \
send_msg(VARLSTCNT(3) ERR_REPLINSTFROZEN, 1, jnlpool.repl_inst_filehdr->inst_info.this_instname); \
send_msg(VARLSTCNT(3) ERR_REPLINSTFREEZECOMMENT, 1, jnlpool.jnlpool_ctl->freeze_comment); \
} \
}
#define CLEAR_ANTICIPATORY_FREEZE(FREEZE_CLEARED) \
{ \
GBLREF jnlpool_addrs jnlpool; \
\
if (IS_REPL_INST_FROZEN) \
{ \
jnlpool.jnlpool_ctl->freeze = 0; \
FREEZE_CLEARED = TRUE; \
} \
}
#define REPORT_INSTANCE_UNFROZEN(FREEZE_CLEARED) \
{ \
GBLREF jnlpool_addrs jnlpool; \
\
if (FREEZE_CLEARED) \
send_msg(VARLSTCNT(3) ERR_REPLINSTUNFROZEN, 1, jnlpool.repl_inst_filehdr->inst_info.this_instname); \
}
#define AFREEZE_MASK 0x01
#define ANTICIPATORY_FREEZE_AVAILABLE (0 != (TREF(gtm_custom_errors)).len)
#define ANTICIPATORY_FREEZE_HONORED(CSA) (DBG_ASSERT(NULL != CSA) \
((NULL != jnlpool.jnlpool_ctl) \
&& (REPL_ALLOWED(((sgmnt_addrs *)CSA)->hdr))))
#define ANTICIPATORY_FREEZE_ENABLED(CSA) (ANTICIPATORY_FREEZE_HONORED(CSA) \
&& ANTICIPATORY_FREEZE_AVAILABLE \
&& (((sgmnt_addrs *)CSA)->hdr->freeze_on_fail))
#define IS_REPL_INST_FROZEN ((NULL != jnlpool.jnlpool_ctl) && jnlpool.jnlpool_ctl->freeze)
#define IS_REPL_INST_UNFROZEN ((NULL != jnlpool.jnlpool_ctl) && !jnlpool.jnlpool_ctl->freeze)
#define INST_FROZEN_COMMENT "PID %d encountered %s; Instance frozen"
#define GENERATE_INST_FROZEN_COMMENT(BUF, BUF_LEN, MSG_ID) \
{ \
GBLREF uint4 process_id; \
const err_ctl *ctl; \
const err_msg *msginfo; \
\
ctl = err_check(MSG_ID); \
assert(NULL != ctl); \
GET_MSG_INFO(MSG_ID, ctl, msginfo); \
SNPRINTF(BUF, BUF_LEN, INST_FROZEN_COMMENT, process_id, msginfo->tag); \
}
/* This is a version of the macro which waits for the instance freeze to be lifted off assuming the process has
* already attached to the journal pool. We need to wait for the freeze only if the input database cares about
* anticipatory freeze. Examples of those databases that dont care are non-replicated databases, databases with
* "freeze_on_fail" field set to FALSE in the file header etc. Hence the use of ANTICIPATORY_FREEZE_ENABLED below.
* Note: Do not use "hiber_start" as that uses timers and if we are already in a timer handler now, nested timers
* wont work. Since SHORT_SLEEP allows a max of 1000, we use 500 (half a second) for now.
*/
#define WAIT_FOR_REPL_INST_UNFREEZE(CSA) \
{ \
gd_region *reg; \
char *time_ptr, time_str[CTIME_BEFORE_NL + 2]; /* for GET_CUR_TIME macro */ \
now_t now; \
DCL_THREADGBL_ACCESS; \
\
SETUP_THREADGBL_ACCESS; \
assert(NULL != CSA); \
if (ANTICIPATORY_FREEZE_HONORED(CSA)) \
{ \
reg = ((sgmnt_addrs *)CSA)->region; \
if (!IS_GTM_IMAGE) \
{ \
GET_CUR_TIME; \
gtm_putmsg(VARLSTCNT(7) ERR_MUINSTFROZEN, 5, CTIME_BEFORE_NL, time_ptr, \
jnlpool.repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg)); \
} \
WAIT_FOR_REPL_INST_UNFREEZE_NOCSA; \
if (!IS_GTM_IMAGE) \
{ \
GET_CUR_TIME; \
gtm_putmsg(VARLSTCNT(7) ERR_MUINSTUNFROZEN, 5, CTIME_BEFORE_NL, time_ptr, \
jnlpool.repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg)); \
} \
} \
}
/* This is a safer version of the WAIT_FOR_REPL_INST_UNFREEZE macro, which waits for the instance freeze
* to be lifted off but is not sure if the process has access to the journal pool yet.
* If it does not, then it assumes the instance is not frozen.
*/
#define WAIT_FOR_REPL_INST_UNFREEZE_SAFE(CSA) \
{ \
GBLREF jnlpool_addrs jnlpool; \
\
assert(NULL != CSA); \
if (IS_REPL_INST_FROZEN) \
WAIT_FOR_REPL_INST_UNFREEZE(CSA); \
}
/* Below are similar macros like the above but with no CSA to specifically check for */
#define WAIT_FOR_REPL_INST_UNFREEZE_NOCSA \
{ \
GBLREF jnlpool_addrs jnlpool; \
GBLREF volatile int4 exit_state; \
GBLREF int4 exi_condition; \
GBLREF int4 forced_exit_err; \
\
assert(NULL != jnlpool.jnlpool_ctl); \
/* If this region is not replicated, do not care for instance freezes */ \
while (jnlpool.jnlpool_ctl->freeze) \
{ \
if (exit_state != 0) \
{ \
send_msg(VARLSTCNT(1) forced_exit_err); \
gtm_putmsg(VARLSTCNT(1) forced_exit_err); \
exit(-exi_condition); \
} \
SHORT_SLEEP(SLEEP_INSTFREEZEWAIT); \
} \
}
#define WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_SAFE \
{ \
GBLREF jnlpool_addrs jnlpool; \
\
if (IS_REPL_INST_FROZEN) \
WAIT_FOR_REPL_INST_UNFREEZE_NOCSA; \
}
/* GTM_DB_FSYNC/GTM_JNL_FSYNC are similar to GTM_FSYNC except that we dont do the fsync
* (but instead hang) if we detect the instance is frozen. We proceed with the fsync once the freeze clears.
* CSA is a parameter indicating which database it is that we want to fsync.
* GTM_REPL_INST_FSYNC is different in that we currently dont care about instance freeze for replication
* instance file writes.
*/
#define GTM_DB_FSYNC(CSA, FD, RC) \
{ \
GBLREF jnlpool_addrs jnlpool; \
node_local_ptr_t cnl; \
\
assert((NULL != CSA) || (NULL == jnlpool.jnlpool_ctl)); \
if (NULL != CSA) \
{ \
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(CSA); \
cnl = (CSA)->nl; \
if (NULL != cnl) \
INCR_GVSTATS_COUNTER((CSA), cnl, n_db_fsync, 1); \
} \
GTM_FSYNC(FD, RC); \
}
#define GTM_JNL_FSYNC(CSA, FD, RC) \
{ \
GBLREF jnlpool_addrs jnlpool; \
node_local_ptr_t cnl; \
\
assert((NULL != CSA) || (NULL == jnlpool.jnlpool_ctl)); \
if (NULL != CSA) \
{ \
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(CSA); \
cnl = (CSA)->nl; \
if (NULL != cnl) \
INCR_GVSTATS_COUNTER((CSA), cnl, n_jnl_fsync, 1); \
} \
GTM_FSYNC(FD, RC); \
}
#define GTM_REPL_INST_FSYNC(FD, RC) GTM_FSYNC(FD, RC)
#define DB_LSEEKWRITE(csa, db_fn, fd, new_eof, buff, size, status) \
{ \
int lcl_status; \
\
if (NULL != csa) \
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(csa); \
LSEEKWRITE(fd, new_eof, buff, size, lcl_status); \
if (ENOSPC == lcl_status) \
wait_for_disk_space(csa, (char *)db_fn, fd, (off_t)new_eof, (char *)buff, (size_t)size, &lcl_status); \
status = lcl_status; \
}
/* Currently, writes to journal files are treated the same way as database files.
* But the macros are defined so we have the ability to easily change them in the future in case needed.
*/
#define JNL_LSEEKWRITE DB_LSEEKWRITE
/* Currently, writes to replication instance files do NOT trigger instance freeze behavior.
* Neither does a pre-existing instance freeze affect replication instance file writes.
* Hence this is defined as simple LSEEKWRITE.
*/
#define REPL_INST_LSEEKWRITE LSEEKWRITE
#define REPL_INST_AVAILABLE (repl_inst_get_name((char *)replpool_id.instfilename, &full_len, SIZEOF(replpool_id.instfilename), \
return_on_error))
#else /* #ifdef UNIX */
# define ANTICIPATORY_FREEZE_AVAILABLE FALSE
# define ANTICIPATORY_FREEZE_ENABLED(CSA) FALSE
# define REPL_INST_AVAILABLE FALSE
# define WAIT_FOR_REPL_INST_UNFREEZE
# define WAIT_FOR_REPL_INST_UNFREEZE_SAFE
#endif /* #ifdef UNIX */
#endif /* #ifndef _ANTICIPATORY_FREEZE_H */

View File

@ -13,7 +13,7 @@
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
GBLREF unsigned char *stacktop, *stackwarn, *msp;

View File

@ -81,18 +81,7 @@ block_id bm_getfree(block_id orig_hint, boolean_t *blk_used, unsigned int cw_wor
uint4 status;
srch_blk_status blkhist;
# ifdef GTM_TRUNCATE
if (dba_mm == cs_data->acc_meth)
{
total_blks = cs_addrs->total_blks;
} else
{
total_blks = cs_addrs->ti->total_blks;
cs_addrs->total_blks = MAX(cs_addrs->total_blks, total_blks);
}
# else
total_blks = (dba_mm == cs_data->acc_meth) ? cs_addrs->total_blks : cs_addrs->ti->total_blks;
# endif
if (orig_hint >= total_blks) /* for TP, hint can be > total_blks */
orig_hint = 1;
hint = orig_hint;
@ -116,10 +105,6 @@ block_id bm_getfree(block_id orig_hint, boolean_t *blk_used, unsigned int cw_wor
return (FILE_EXTENDED);
hint = total_blks;
total_blks = cs_addrs->ti->total_blks;
# ifdef GTM_TRUNCATE
assert(dba_mm != cs_data->acc_meth);
cs_addrs->total_blks = MAX(cs_addrs->total_blks, total_blks);
# endif
hint_cycled = DIVIDE_ROUND_UP(total_blks, BLKS_PER_LMAP);
local_maps = hint_cycled + 2; /* for (up to) 2 wraps */
/*

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -40,7 +40,7 @@ bt_rec_ptr_t bt_get(int4 block) /* block = block # to get */
if (bt->blk == BT_QUEHEAD)
return NULL;
}
SET_TRACEABLE_VAR(csa->hdr->wc_blocked, TRUE);
SET_TRACEABLE_VAR(csa->nl->wc_blocked, TRUE);
BG_TRACE_PRO_ANY(csa, wc_blocked_bt_get);
return NULL; /* actually should return BT_INVALID or some such value but callers check only for NULL */
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -35,6 +35,10 @@ GBLREF volatile boolean_t in_wcs_recover; /* TRUE if in "wcs_recover" */
GBLREF uint4 process_id;
GBLREF jnl_gbls_t jgbl;
error_def(ERR_BTFAIL);
error_def(ERR_WCFAIL);
error_def(ERR_WCBLOCKED);
bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
{
bt_rec_ptr_t bt, q0, q1, hdr;
@ -45,10 +49,6 @@ bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
trans_num lcl_tn;
uint4 lcnt;
error_def(ERR_BTFAIL);
error_def(ERR_WCFAIL);
error_def(ERR_WCBLOCKED);
csa = (sgmnt_addrs *)&FILE_INFO(reg)->s_addrs;
csd = csa->hdr;
assert(csa->now_crit || csd->clustered);
@ -72,7 +72,7 @@ bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
BG_TRACE_PRO_ANY(csa, bt_put_flush_dirty);
if (FALSE == wcs_get_space(reg, 0, cr))
{
assert(csd->wc_blocked); /* only reason we currently know
assert(csa->nl->wc_blocked); /* only reason we currently know
* why wcs_get_space could fail */
assert(gtm_white_box_test_case_enabled);
BG_TRACE_PRO_ANY(csa, wcb_bt_put);

View File

@ -46,7 +46,7 @@ void bt_refresh(sgmnt_addrs *csa, boolean_t init)
insqt((que_ent_ptr_t)((sm_uc_ptr_t)ptr + (2 * SIZEOF(sm_off_t))), (que_ent_ptr_t)csa->th_base);
}
}
((th_rec *)((uchar_ptr_t)csa->th_base + csa->th_base->tnque.fl))->tn = csa->ti->curr_tn - 1;
SET_OLDEST_HIST_TN(csa, csa->ti->curr_tn - 1);
csa->ti->mm_tn = 0;
return;
}

View File

@ -22,8 +22,9 @@ LITREF octabstruct oc_tab[];
void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean_t sense, oprtype *addr)
{
boolean_t expr_fini;
oprtype *i, *p;
triple *ref0, *ref1, *t0, *t1;
oprtype *adj_addr, *i, *p;
tbp *tripbp;
triple *ref0, *ref1, *ref2, *t0, *t1;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
@ -40,72 +41,100 @@ void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean
assert(NULL == TREF(boolchain_ptr));
bx_tail(t->operand[0].oprval.tref, jmp_type_one, p);
bx_tail(t->operand[1].oprval.tref, sense, addr);
} else
{ /* got a side effect and don't want them short circuited - this violates info hiding big-time
* This code relies on the original technique of setting up a jump ladder
* then it changes the jumps into stotemps and creates a new ladder using the saved evaluations
* for the relocated jumps to work with
* The most interesting part is getting the addresses for the new jump operands (targets)
* In theory we could turn this technique on and off around each side effect, but that's even more
* complicated, requiring additional instructions, and we don't predict the typical boolean expression
* has enough subexpressions to justify the extra trouble, although the potential pay-back would be to
* avoid unnecessary global references - again not expecting that many in a typical boolean expresion
*/
assert(TREF(shift_side_effects));
t->opcode = OC_NOOP;
t->operand[0].oprclass = t->operand[1].oprclass = NOCLASS;
return;
}
/* got a side effect and don't want them short circuited */
/* This code violates info hiding big-time and relies on the original technique of setting up a jump ladder
* then it changes the jumps into stotemps and creates a new ladder using the saved evaluations
* for the relocated jumps to use for controlling conditional transfers, When the stotemps reference mvals,
* they are optimized away when possible. The most interesting part is getting the addresses for the new jump
* operands (targets) - see comment below. In theory we could turn this technique on and off around each side effect,
* but that's even more complicated, requiring additional instructions, and we don't predict the typical boolean
* expression has enough subexpressions to justify the extra trouble, although the potential pay-back would be to
* avoid unnecessary global references - again, not expecting that many in a typical boolean expresion.
*/
assert(TREF(shift_side_effects));
if (expr_fini = (NULL == TREF(boolchain_ptr))) /* NOTE assignment */
{ /* initialize work on boolean section of the AST */
TREF(boolchain_ptr) = &(TREF(boolchain));
dqinit(TREF(boolchain_ptr), exorder);
t0 = t->exorder.fl;
if (expr_fini = (NULL == TREF(boolchain_ptr))) /* NOTE assignment */
{
if (OC_BOOLFINI == t0->opcode)
{ /* ex_tail wraps bools that produce a value with OC_BOOLINIT and OC_BOOLFINI */
assert(OC_COMVAL == t0->exorder.fl->opcode);
assert(TRIP_REF == t0->operand[0].oprclass);
} else
assert(((OC_NOOP == t0->opcode) && (t0 == TREF(curtchain)))
|| (oc_tab[t0->opcode].octype & OCT_BOOL));
TREF(boolchain_ptr) = &(TREF(boolchain));
dqinit(TREF(boolchain_ptr), exorder);
if (NULL == TREF(bool_targ_ptr))
{ /* first time - set up anchor */
TREF(bool_targ_ptr) = &(TREF(bool_targ_anchor)); /* mcalloc won't persist over multiple complies */
dqinit(TREF(bool_targ_ptr), que);
} else /* queue should be empty */
assert((TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.fl)
&& (TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.bl));
/* ex_tail wraps bools that produce a value with OC_BOOLINIT (clr) and OC_BOOLFINI (set) */
assert((OC_BOOLFINI != t0->opcode)
|| ((OC_COMVAL == t0->exorder.fl->opcode) && (TRIP_REF == t0->operand[0].oprclass)));
}
for (i = t->operand; i < ARRAYTOP(t->operand); i++)
{
assert(NULL != TREF(boolchain_ptr));
t1 = i->oprval.tref;
if (&(t->operand[0]) == i)
bx_tail(t1, jmp_type_one, p); /* do normal transform */
else
{ /* operand[1] */
bx_tail(t1, sense, addr); /* do normal transform */
if (!expr_fini)
break; /* only need to relocate last operand[1] */
}
for (i = t->operand; i < ARRAYTOP(t->operand); i++)
{
t1 = i->oprval.tref;
if (&(t->operand[0]) == i)
bx_tail(t1, jmp_type_one, p);
else
{ /* operand[1] */
bx_tail(t1, sense, addr);
if (!expr_fini)
break; /* only need to relocate last operand[1] */
}
if (OC_NOOP == t1->opcode)
{ /* the technique of sprinkling noops means fishing around for the actual instruction */
do
{
t1 = t1->exorder.bl;
assert(TREF(curtchain) != t1->exorder.bl);
} while (OC_NOOP == t1->opcode);
if ((oc_tab[t1->opcode].octype & OCT_JUMP) && (OC_JMPTSET != t1->opcode) && (OC_JMPTCLR != t1->opcode))
t1 = t1->exorder.bl;
if (OC_NOOP == t1->opcode)
{ /* the technique of sprinkling noops means fishing around for the actual instruction */
do
{
t1 = t1->exorder.bl;
} while (OC_NOOP == t1->opcode);
if (oc_tab[t1->opcode].octype & OCT_JUMP)
t1 = t1->exorder.bl;
else
{
for (t1 = i->oprval.tref; OC_NOOP == t1->opcode; t1 = t1->exorder.fl)
;
}
{
for (t1 = i->oprval.tref; OC_NOOP == t1->opcode; t1 = t1->exorder.fl)
assert(TREF(curtchain) != t1->exorder.fl);
}
assert(NULL != TREF(boolchain_ptr));
switch (t1->opcode)
{ /* time to subvert the original jump ladder entry */
}
assert(OC_NOOP != t1->opcode);
assert((oc_tab[t1->exorder.fl->opcode].octype & OCT_JUMP)
||(OC_JMPTSET != t1->exorder.fl->opcode) || (OC_JMPTCLR != t1->exorder.fl->opcode));
ref0 = maketriple(t1->opcode); /* copy operation for place in new ladder */
ref1 = (TREF(boolchain_ptr))->exorder.bl; /* common setup for above op insert */
switch (t1->opcode)
{ /* time to subvert original jump ladder entry */
case OC_COBOOL:
/* insert COBOOL and copy of following JMP in boolchain; overlay them with STOTEMP and NOOP */
assert(oc_tab[t1->exorder.fl->opcode].octype & OCT_JUMP);
ref0 = maketriple(OC_COBOOL); /* coerce later while pulling it out of temp */
ref0->operand[0] = put_tref(t1);
ref1 = (TREF(boolchain_ptr))->exorder.bl;
assert(TRIP_REF == t1->operand[0].oprclass);
dqins(ref1, exorder, ref0);
t1->opcode = OC_STOTEMP; /* save the value instead of coercing now */
if (oc_tab[t1->operand[0].oprval.tref->opcode].octype & OCT_MVAL)
{ /* do we need a STOTEMP? */
switch (t1->operand[0].oprval.tref->opcode)
{
case OC_INDGLVN: /* indirect actions not happy without STOTEMP */
case OC_INDNAME:
case OC_VAR: /* variable could change so must save it */
t1->opcode = OC_STOTEMP;
ref0->operand[0] = put_tref(t1);/* new COBOOL points to this OC_STOTEMP */
break;
default: /* else no temporary if it's mval */
ref0->operand[0] = put_tref(t1->operand[0].oprval.tref);
t1->opcode = OC_NOOP;
t1->operand[0].oprclass = NOCLASS;
}
} else
{ /* make it an mval instead of COBOOL now */
t1->opcode = OC_COMVAL;
ref0->operand[0] = put_tref(t1); /* new COBOOL points to this OC_COMVAL */
}
t1 = t1->exorder.fl;
ref0 = maketriple(t1->opcode); /* create new jump on result of coerce */
ref0 = maketriple(t1->opcode); /* create new jmp on result of coerce */
ref0->operand[0] = t1->operand[0];
t1->opcode = OC_NOOP; /* wipe out original jmp */
t1->operand[0].oprclass = NOCLASS;
t1->opcode = OC_NOOP; /* wipe out original jump */
break;
case OC_CONTAIN:
case OC_EQU:
@ -114,85 +143,134 @@ void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean
case OC_PATTERN:
case OC_SORTS_AFTER:
/* insert copies of orig OC and following JMP in boolchain & overly originals with STOTEMPs */
assert(oc_tab[t1->exorder.fl->opcode].octype & OCT_JUMP);
assert(TRIP_REF == t1->operand[0].oprclass);
assert(TRIP_REF == t1->operand[1].oprclass);
ref0 = maketriple(t1->opcode); /* copy operands with the stotemps as args */
ref0->operand[0] = put_tref(t1);
ref0->operand[1] = put_tref(t1->exorder.fl);
ref1 = (TREF(boolchain_ptr))->exorder.bl;
dqins(ref1, exorder, ref0);
t1->opcode = OC_STOTEMP; /* overlay the original op with 1st stotemp */
if (OC_VAR == t1->operand[0].oprval.tref->opcode)
{ /* VAR could change so must save it */
t1->opcode = OC_STOTEMP; /* overlay the original op with a STOTEMP */
ref0->operand[0] = put_tref(t1); /* new op points to thi STOTEMP */
} else
{ /* no need for a temporary unless it's a VAR */
ref0->operand[0] = put_tref(t1->operand[0].oprval.tref);
t1->opcode = OC_NOOP;
}
ref1 = t1;
t1 = t1->exorder.fl;
ref0 = maketriple(t1->opcode); /* copy jmp */
ref0->operand[0] = t1->operand[0];
t1->operand[0] = t1->exorder.bl->operand[1];
t1->opcode = OC_STOTEMP; /* overlay jmp with 2nd stotemp */
ref2 = maketriple(t1->opcode); /* copy jmp */
ref2->operand[0] = t1->operand[0];
if (OC_VAR == ref1->operand[1].oprval.tref->opcode)
{ /* VAR could change so must save it */
ref0->operand[1] = put_tref(t1); /* new op points to STOTEMP overlaying the jmp */
t1->operand[0] = ref1->operand[1];
t1->opcode = OC_STOTEMP; /* overlay jmp with 2nd STOTEMP */
} else
{ /* no need for a temporary unless it's a VAR */
ref0->operand[1] = put_tref(ref1->operand[1].oprval.tref);
t1->opcode = OC_NOOP;
t1->operand[0].oprclass = NOCLASS;
}
if (OC_NOOP == ref1->opcode) /* does op[0] need cleanup? */
ref1->operand[0].oprclass = ref1->operand[1].oprclass = NOCLASS;
ref0 = ref2;
break;
case OC_JMPTSET:
case OC_JMPTCLR:
/* move copy of jmp to boolchain and NOOP it */
ref0 = maketriple(t1->opcode);
ref0->operand[0] = t1->operand[0];
/* move copy of jmp to boolchain and NOOP it */
ref0->operand[0] = t1->operand[0]; /* new jmpt gets old target */
ref2 = maketriple(OC_NOOP); /* insert a NOOP in new chain inplace of COBOOL */
dqins(ref1, exorder, ref2);
t1->opcode = OC_NOOP; /* wipe out original jmp */
t1->operand[0].oprclass = NOCLASS;
t1->opcode = OC_NOOP; /* wipe out original jump */
break;
default:
GTMASSERT;
}
if (jmp_to_next) /* mark target for later adjustment */
ref0->operand[1].oprval.tref = ref0->operand[0].oprval.tref;
ref1 = (TREF(boolchain_ptr))->exorder.bl;
dqins(ref1, exorder, ref0);
}
if (expr_fini)
{ /* time to deal with new jump ladder */
assert(NULL != TREF(boolchain_ptr));
t0 = t0->exorder.bl;
assert(oc_tab[t0->opcode].octype & OCT_BOOL);
assert(t0 == t);
dqadd(t0, TREF(boolchain_ptr), exorder); /* insert the new jump ladder */
ref0 = (TREF(boolchain_ptr))->exorder.bl->exorder.fl;
if (ref0 == TREF(curtchain))
{
newtriple(OC_NOOP);
ref0 = (TREF(curtchain))->exorder.bl;
}
assert(ref0);
t0 = t->exorder.fl;
if ((OC_JMPTSET != t0->opcode) && (OC_JMPTCLR != t0->opcode))
t0 = t0->exorder.fl;
for (; (t0 != TREF(curtchain)) && oc_tab[t0->opcode].octype & OCT_JUMP; t0 = t1)
{ /* check for jumps with targets */
assert(INDR_REF == t0->operand[0].oprclass);
t1 = t0->exorder.fl;
if (oc_tab[t1->opcode].octype & OCT_BOOL)
t1 = ref1 = t1->exorder.fl;
else
{
if ((OC_JMPTSET == t1->opcode) || (OC_JMPTCLR == t1->opcode))
ref1 = t1;
else
break;
}
if (t0->operand[1].oprval.tref == t0->operand[0].oprval.tref)
{ /* adjust relocated jump to "next" */
if (oc_tab[ref1->opcode].octype & OCT_JUMP)
ref1 = ref1->exorder.fl;
if ((ref1 == TREF(curtchain)
|| (t == t0->operand[0].oprval.tref->exorder.fl)))
ref1 = ref0;
assert((OC_NOOP == ref1->opcode) || (OC_BOOLFINI == ref1->opcode)
|| (OC_COMVAL == ref1->opcode) || (oc_tab[ref1->opcode].octype & OCT_BOOL));
t0->operand[0] = put_tjmp(ref1);
t0->operand[1].oprval.tref = NULL;
} else if (TJMP_REF == t0->operand[0].oprval.indr->oprclass)
t0->operand[0] = put_tjmp(ref0); /* adjust jump to "addr" */
}
TREF(boolchain_ptr) = NULL;
assertpro(FALSE);
}
assert((OC_STOTEMP == t1->opcode) || (OC_NOOP == t1->opcode) || (OC_COMVAL == t1->opcode));
assert(oc_tab[ref0->opcode].octype & OCT_JUMP);
ref1 = (TREF(boolchain_ptr))->exorder.bl;
dqins(ref1, exorder, ref0); /* common insert for new jmp */
}
t->opcode = OC_NOOP;
assert(oc_tab[t->opcode].octype & OCT_BOOL);
t->opcode = OC_NOOP; /* wipe out the original boolean op */
t->operand[0].oprclass = t->operand[1].oprclass = NOCLASS;
tripbp = &t->jmplist; /* borrow jmplist to track jmp targets */
assert(NULL == tripbp->bpt);
assert((tripbp == tripbp->que.fl) && (tripbp == tripbp->que.bl));
tripbp->bpt = jmp_to_next ? (TREF(boolchain_ptr))->exorder.bl : ref0; /* point op triple at op[1] position or op[0] */
dqins(TREF(bool_targ_ptr), que, tripbp); /* queue jmplist for clean-up */
if (!expr_fini)
return;
/* time to deal with new jump ladder */
assert(NULL != TREF(boolchain_ptr));
assert(NULL != TREF(bool_targ_ptr));
assert(TREF(bool_targ_ptr) != (TREF(bool_targ_ptr))->que.fl);
assert(t0->exorder.bl == t);
assert(t0 == t->exorder.fl);
dqadd(t, TREF(boolchain_ptr), exorder); /* insert the new jump ladder */
ref0 = (TREF(boolchain_ptr))->exorder.bl->exorder.fl;
t0 = t->exorder.fl;
if (ref0 == TREF(curtchain))
{ /* add a safe target */
newtriple(OC_NOOP);
ref0 = (TREF(curtchain))->exorder.bl;
}
assert((OC_COBOOL == t0->opcode) ||(OC_JMPTSET != t0->opcode) || (OC_JMPTCLR != t0->opcode)) ;
t0 = t0->exorder.fl;
assert(oc_tab[t0->opcode].octype & OCT_JUMP);
for (; (t0 != ref0) && oc_tab[t0->opcode].octype & OCT_JUMP; t0 = t0->exorder.fl)
{ /* process replacement jmps */
adj_addr = &t0->operand[0];
assert(INDR_REF == adj_addr->oprclass);
if (NULL != (t1 = (adj_addr = adj_addr->oprval.indr)->oprval.tref))
{ /* need to adjust target; NOTE assignments above */
if (OC_BOOLFINI != t1->opcode)
{ /* not past the end of the new chain */
assert(TJMP_REF == adj_addr->oprclass);
if ((t == t1) || (t1 == ref0))
ref1 = ref0; /* adjust to end of boolean expression */
else
{ /* old target should have jmplist entry */
/* from the jmp jmplisted in the old target we move past the next
* test (or NOOP) and jmp which correspond to the old target and pick
* the subsequent test (or NOOP) and jmp which correspond to those that originally followed
* the logic after the old target and are therefore the appropriate new target for this jmp
*/
assert(OC_NOOP == t1->opcode);
assert(&(t1->jmplist) != t1->jmplist.que.fl);
assert(NULL != t1->jmplist.bpt);
assert(oc_tab[t1->jmplist.bpt->opcode].octype & OCT_JUMP);
ref1 = t1->jmplist.bpt->exorder.fl;
assert((oc_tab[ref1->opcode].octype & OCT_BOOL) || (OC_NOOP == ref1->opcode));
assert(oc_tab[ref1->exorder.fl->opcode].octype & OCT_JUMP);
ref1 = ref1->exorder.fl->exorder.fl;
assert((oc_tab[ref1->opcode].octype & OCT_BOOL) || (OC_BOOLFINI == ref1->opcode)
|| ((OC_NOOP == ref1->opcode) && ((OC_JMPTCLR == ref1->exorder.fl->opcode)
|| (OC_JMPTSET == ref1->exorder.fl->opcode)
|| (TREF(curtchain) == ref1->exorder.fl))));
}
t0->operand[0] = put_tjmp(ref1); /* no indrection simplifies later interations */
}
}
t0 = t0->exorder.fl;
if ((OC_BOOLFINI == t0->opcode) || (TREF(curtchain) == t0->exorder.fl))
break;
assert((oc_tab[t0->opcode].octype & OCT_BOOL)
|| (OC_JMPTSET == t0->exorder.fl->opcode) || (OC_JMPTCLR == t0->exorder.fl->opcode));
}
dqloop(TREF(bool_targ_ptr), que, tripbp) /* clean up borrowed jmplist entries */
{
dqdel(tripbp, que);
tripbp->bpt = NULL;
}
assert((TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.fl)
&& (TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.bl));
TREF(boolchain_ptr) = NULL;
if (TREF(expr_start) != TREF(expr_start_orig))
{ /* inocculate against an unwanted GVRECTARG */
ref0 = maketriple(OC_NOOP);
dqins(TREF(expr_start), exorder, ref0);
TREF(expr_start) = ref0;
}
return;
}

View File

@ -13,7 +13,7 @@
#include "objlabel.h"
#include "cache.h"
#include "hashtab_objcode.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "cache_cleanup.h"

View File

@ -16,7 +16,7 @@
#include "hashtab_objcode.h"
#include "cachectl.h"
#include "cacheflush.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "gtm_text_alloc.h"
#include "io.h"

View File

@ -40,11 +40,13 @@
CDB_SC_NUM_ENTRY( cdb_sc_normal, 0) /* 0 success */
CDB_SC_NUM_ENTRY( cdb_sc_endtree, 1) /* 1 gvcst_lftsib or gvcst_rtsib searched past end of tree */
CDB_SC_NUM_ENTRY( cdb_sc_delete_parent, 2) /* 2 gvcst_kill_blk succeeded, but signals gvcst_kill that block was completely deleted */
CDB_SC_NUM_ENTRY( cdb_sc_delete_parent, 2) /* 2 gvcst_kill_blk succeeded, but signals gvcst_kill
* that block was completely deleted */
CDB_SC_NUM_ENTRY( cdb_sc_nolock, 3) /* 3 mutex_lockwim was unable to obtain a lock */
CDB_SC_NUM_ENTRY( cdb_sc_needcrit, 4) /* 4 on 4th attempt and need crit for this region -- restart transaction no penalty */
CDB_SC_NUM_ENTRY( cdb_sc_needcrit, 4) /* 4 on 4th attempt and need crit for this region -- restart transaction
* no penalty */
CDB_SC_NUM_ENTRY( cdb_sc_helpedout, 5) /* 5 wcs_blocked when t_tries >= CDB_STAGNATE */
CDB_SC_NUM_ENTRY( cdb_sc_gbloflow, 6) /* 6 t_end or tp_tend found the database full and could not be extended */
CDB_SC_NUM_ENTRY( cdb_sc_gbloflow, 6) /* 6 t_end or tp_tend found database full and could not be extended */
CDB_SC_NUM_ENTRY( cdb_sc_oprnotneeded, 7) /* 7 reorg operation was not required */
CDB_SC_NUM_ENTRY( cdb_sc_starrecord, 8) /* 8 star record was found while reading the block */
CDB_SC_NUM_ENTRY( cdb_sc_extend, 9) /* 9 extend requested when none seemed needed - from gdsfilext */
@ -54,45 +56,63 @@ CDB_SC_UCHAR_ENTRY(cdb_sc_rmisalign1, FALSE, 'A') /* 'A' gvcst_get found
CDB_SC_UCHAR_ENTRY(cdb_sc_keyoflow, FALSE, 'B') /* 'B' gvcst_expand_key or gvcst_search (3) found key overflow */
CDB_SC_UCHAR_ENTRY(cdb_sc_rmisalign, FALSE, 'C') /* 'C' Record misaligned from nearly everyone */
CDB_SC_UCHAR_ENTRY(cdb_sc_r2small, FALSE, 'D') /* 'D' gvcst_expand_key found record too small */
CDB_SC_UCHAR_ENTRY(cdb_sc_losthist, TRUE, 'E') /* 'E' t_end or tp_tend (both mm or bg) - tn could not be verified from history */
CDB_SC_UCHAR_ENTRY(cdb_sc_losthist, TRUE, 'E') /* 'E' t_end/tp_tend (mm/bg) - tn could not be verified from history */
CDB_SC_UCHAR_ENTRY(cdb_sc_mapfail, FALSE, 'F') /* 'F' t_end or op_tcommit (from bm_getfree) failed to acquire new block */
CDB_SC_UCHAR_ENTRY(cdb_sc_lostcr, TRUE, 'G') /* 'G' gvcst_...sib, t_end, tp_tend, tp_check_hist - found cache buffer modified */
CDB_SC_UCHAR_ENTRY(cdb_sc_mkblk, FALSE, 'H') /* 'H' Composing a local block failed, from gvcst_kill (3) gvcst_put (14) */
CDB_SC_UCHAR_ENTRY(cdb_sc_rdfail, FALSE, 'I') /* 'I' t_qread found block number requested is outside size of file as described by fileheader */
CDB_SC_UCHAR_ENTRY(cdb_sc_badlvl, FALSE, 'J') /* 'J' gvcst_search found a child block didn't have the next block level below its parent */
CDB_SC_UCHAR_ENTRY(cdb_sc_lostcr, TRUE, 'G') /* 'G' gvcst_...sib, t_end/tp_tend/tp_hist - found cache buffer modified */
CDB_SC_UCHAR_ENTRY(cdb_sc_mkblk, FALSE, 'H') /* 'H' Composing a local block failed, from gvcst_kill(3) gvcst_put(14) */
CDB_SC_UCHAR_ENTRY(cdb_sc_rdfail, FALSE, 'I') /* 'I' t_qread found block number requested is outside size of file
* as described by fileheader */
CDB_SC_UCHAR_ENTRY(cdb_sc_badlvl, FALSE, 'J') /* 'J' gvcst_search found a child block didn't have the next block level
* below its parent */
CDB_SC_UCHAR_ENTRY(cdb_sc_cacheprob, TRUE, 'K') /* 'K' db_csh_get, ... found a cache control problem */
CDB_SC_UCHAR_ENTRY(cdb_sc_blkmod, FALSE, 'L') /* 'L' t_end, or tp_tend found block modified */
CDB_SC_UCHAR_ENTRY(cdb_sc_uperr, FALSE, 'M') /* 'M' t_ch received an unpredicatable error */
CDB_SC_UCHAR_ENTRY(cdb_sc_comfail, FALSE, 'N') /* 'N' Commit failed used in t_end_sysops (8) by (?) */
CDB_SC_UCHAR_ENTRY(cdb_sc_lostbefor, TRUE, 'O') /* 'O' t_end or tp_tend found the before image needed for journaling was removed from the cache */
CDB_SC_UCHAR_ENTRY(cdb_sc_lostbefor, TRUE, 'O') /* 'O' t_end or tp_tend found the before image needed for journaling was
* removed from the cache */
CDB_SC_UCHAR_ENTRY(cdb_sc_committfail, FALSE, 'P') /* 'P' t_commit_cleanup found a partially committed block split */
CDB_SC_UCHAR_ENTRY(cdb_sc_dbccerr, FALSE, 'Q') /* 'Q' mutex found (in 1 of 3 places) an interlock instruction failure in critical mechanism */
CDB_SC_UCHAR_ENTRY(cdb_sc_critreset, FALSE, 'R') /* 'R' mutex found (in 1 of 6 places) that the segment crit crash count has been incremented */
CDB_SC_UCHAR_ENTRY(cdb_sc_maxlvl, FALSE, 'S') /* 'S' t_write_root or gvcst_search found maximum legal block level for database exceeded */
CDB_SC_UCHAR_ENTRY(cdb_sc_blockflush, FALSE, 'T') /* 'T' t_end (hist, or bitmap) found an to update a buffer that is being flushed (GT.CX) */
CDB_SC_UCHAR_ENTRY(cdb_sc_cyclefail, TRUE, 'U') /* 'U' t_end or tp_tend found a buffer in read(only) set was overwritten though tn static */
CDB_SC_UCHAR_ENTRY(cdb_sc_dbccerr, FALSE, 'Q') /* 'Q' mutex found (in 1 of 3 places) an interlock instruction failure
* in critical mechanism */
CDB_SC_UCHAR_ENTRY(cdb_sc_critreset, FALSE, 'R') /* 'R' mutex found (in 1 of 6 places) that the segment crit crash count
* has been incremented */
CDB_SC_UCHAR_ENTRY(cdb_sc_maxlvl, FALSE, 'S') /* 'S' t_write_root or gvcst_search found maximum legal block level for
* database exceeded */
CDB_SC_UCHAR_ENTRY(cdb_sc_blockflush, FALSE, 'T') /* 'T' t_end (hist, or bitmap) found an to update a buffer that is being
* flushed (GT.CX) */
CDB_SC_UCHAR_ENTRY(cdb_sc_cyclefail, TRUE, 'U') /* 'U' t_end or tp_tend found a buffer in read(only) set was overwritten
* though tn static */
CDB_SC_UCHAR_ENTRY(cdb_sc_optrestart, FALSE, 'V') /* 'V' TP restart explicitly signaled by the TRESTART command */
CDB_SC_UCHAR_ENTRY(cdb_sc_future_read, FALSE, 'W') /* 'W' dsk_read return to t_qread indicated block transaction exceeds curr_tn (GT.CX) */
CDB_SC_UCHAR_ENTRY(cdb_sc_future_read, FALSE, 'W') /* 'W' dsk_read return to t_qread indicated block transaction exceeds
* curr_tn (GT.CX) */
CDB_SC_UCHAR_ENTRY(cdb_sc_badbitmap, FALSE, 'X') /* 'X' bm_getfree found bitmap had bad size or level */
CDB_SC_UCHAR_ENTRY(cdb_sc_badoffset, FALSE, 'Y') /* 'Y' gvcst_blk_search (in gvcst_search_blk or gvcst_search_tail) found a bad record offset */
CDB_SC_UCHAR_ENTRY(cdb_sc_blklenerr, FALSE, 'Z') /* 'Z' gvcst_blk_search (in gvcst_search_blk or gvcst_search_tail) reached the end with no match */
CDB_SC_UCHAR_ENTRY(cdb_sc_badoffset, FALSE, 'Y') /* 'Y' gvcst_blk_search (in gvcst_search_blk or gvcst_search_tail) found
* a bad record offset */
CDB_SC_UCHAR_ENTRY(cdb_sc_blklenerr, FALSE, 'Z') /* 'Z' gvcst_blk_search (in gvcst_search_blk or gvcst_search_tail) reached
* the end with no match */
CDB_SC_LCHAR_ENTRY(cdb_sc_bmlmod, FALSE, 'a') /* 'a' t_end or tp_tend (mm or bg) found bit_map modified */
CDB_SC_LCHAR_ENTRY(cdb_sc_lostbmlhist, TRUE, 'b') /* 'b' t_end or tp_tend (bg) - tn could not be verified from history */
CDB_SC_LCHAR_ENTRY(cdb_sc_lostbmlcr, TRUE, 'c') /* 'c' t_end or tp_tend (bg) - found cache buffer modified */
CDB_SC_LCHAR_ENTRY(cdb_sc_lostoldblk, FALSE, 'd') /* 'd' t_qread or op_tcommit (tp and before image) - old_block of a used block is NULL */
CDB_SC_LCHAR_ENTRY(cdb_sc_lostoldblk, FALSE, 'd') /* 'd' t_qread or op_tcommit (tp and before image) - old_block of a used
* block is NULL */
CDB_SC_LCHAR_ENTRY(cdb_sc_blknumerr, FALSE, 'e') /* 'e' t_qread or op_tcommit - block number is impossible */
CDB_SC_LCHAR_ENTRY(cdb_sc_blksplit, FALSE, 'f') /* 'f' recompute_upd_array recognized that the block needs to be split */
CDB_SC_LCHAR_ENTRY(cdb_sc_toomanyrecompute, FALSE, 'g') /* 'g' more than 25% of the blocks in read-set need to be recomputed */
CDB_SC_LCHAR_ENTRY(cdb_sc_jnlstatemod, FALSE, 'h') /* 'h' csd->jnl_state changed or csd->jnl_before_image changed since start of the transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_needlock, FALSE, 'i') /* 'i' on final retry and need to wait for M-lock - restart transaction - allow for max of 16 such restarts */
CDB_SC_LCHAR_ENTRY(cdb_sc_bkupss_statemod, FALSE, 'j') /* 'j' t_end/tp_tend found that either online-backup-in-progress or snapshot
state changed since start of transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_jnlstatemod, FALSE, 'h') /* 'h' csd->jnl_state changed or csd->jnl_before_image changed since start
* of the transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_needlock, FALSE, 'i') /* 'i' on final retry and need to wait for M-lock - restart transaction
* - allow for max of 16 such restarts */
CDB_SC_LCHAR_ENTRY(cdb_sc_bkupss_statemod, FALSE, 'j') /* 'j' t_end/tp_tend found that either online-backup-in-progress or
* snapshot state changed since start of transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_crbtmismatch, TRUE, 'k') /* 'k' cr->blk and bt->blk does not match */
CDB_SC_LCHAR_ENTRY(cdb_sc_phase2waitfail, TRUE, 'l') /* 'l' wcs_phase2_commit_wait timed out when called from t_qread */
CDB_SC_LCHAR_ENTRY(cdb_sc_inhibitkills, FALSE, 'm') /* 'm' t_end/tp_tend found inhibit_kills counter greater than zero */
CDB_SC_LCHAR_ENTRY(cdb_sc_triggermod, FALSE, 'n') /* 'n' csd->db_trigger_cycle changed since start of of transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_onln_rlbk1, FALSE, 'o') /* 'o' csa->onln_rlbk_cycle changed since start of transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_onln_rlbk2, FALSE, 'p') /* 'p' csa->db_onln_rlbkd_cycle changed since start of transaction */
CDB_SC_LCHAR_ENTRY(cdb_sc_truncate, FALSE, 'q') /* 'q' t_end or tp_tend (bg) - found the database truncated where it wanted to allocate blocks */
CDB_SC_LCHAR_ENTRY(cdb_sc_truncate, FALSE, 'q') /* 'q' t_qread tried to read a block beyond the end of a database
* that has been concurrently truncated */
CDB_SC_LCHAR_ENTRY(cdb_sc_gvtrootmod, FALSE, 'r') /* 'r' gvcst_kill found a need to redo the gvcst_root_search */
CDB_SC_LCHAR_ENTRY(cdb_sc_instancefreeze, FALSE, 's') /* 's' instance freeze detected in t_end/tp_tend, requires retry */
CDB_SC_LCHAR_ENTRY(cdb_sc_gvtrootmod2, FALSE, 't') /* 't' t_end/tp_tend detected root blocks moved by reorg */
CDB_SC_LCHAR_ENTRY(cdb_sc_spansize, FALSE, 'u') /* 'u' chunks of spanning node don't add up */

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,6 +42,34 @@
GBLREF uint4 dollar_tlevel;
GBLREF boolean_t dse_running;
error_def(ERR_DBBLEVMX);
error_def(ERR_DBBLEVMN);
error_def(ERR_DBBSIZMN);
error_def(ERR_DBBSIZMX);
error_def(ERR_DBRSIZMN);
error_def(ERR_DBRSIZMX);
error_def(ERR_DBCMPNZRO);
error_def(ERR_DBSTARSIZ);
error_def(ERR_DBSTARCMP);
error_def(ERR_DBCMPMX);
error_def(ERR_DBKEYMX);
error_def(ERR_DBKEYMN);
error_def(ERR_DBCMPBAD);
error_def(ERR_DBKEYORD);
error_def(ERR_DBPTRNOTPOS);
error_def(ERR_DBPTRMX);
error_def(ERR_DBPTRMAP);
error_def(ERR_DBLVLINC);
error_def(ERR_DBBMSIZE);
error_def(ERR_DBBMBARE);
error_def(ERR_DBBMINV);
error_def(ERR_DBBMMSTR);
error_def(ERR_DBROOTBURN);
error_def(ERR_DBDIRTSUBSC);
error_def(ERR_DBMAXNRSUBS); /* same error as ERR_MAXNRSUBSCRIPTS, but has a string output as well */
error_def(ERR_DBINVGBL);
error_def(ERR_DBBDBALLOC);
#define BITS_PER_UCHAR 8
#define BLKS_PER_UINT4 ((SIZEOF(uint4) / SIZEOF(unsigned char)) * BITS_PER_UCHAR) / BML_BITS_PER_BLK
#define BLOCK_WINDOW 8
@ -72,7 +100,8 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
sm_uint_ptr_t chunk_p; /* Value is unaligned so will be assigned to chunk */
uint4 chunk;
sm_uc_ptr_t blk_top, blk_id_ptr, next_tp_child_ptr, key_base, mp, b_ptr;
unsigned char rec_cmpc, min_cmpc; /* the minimum cmpc expected in any record (except star-key) in a gvt */
unsigned short rec_cmpc, min_cmpc; /* the minimum cmpc expected in any record (except star-key) in a gvt */
int tmp_cmpc;
unsigned char ch, prior_expkey[MAX_KEY_SZ + 1];
unsigned int prior_expkeylen;
unsigned short temp_ushort;
@ -85,34 +114,6 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
sgmnt_data_ptr_t csd;
boolean_t is_gvt, is_directory, first_key, full, prev_char_is_delimiter;
error_def(ERR_DBBLEVMX);
error_def(ERR_DBBLEVMN);
error_def(ERR_DBBSIZMN);
error_def(ERR_DBBSIZMX);
error_def(ERR_DBRSIZMN);
error_def(ERR_DBRSIZMX);
error_def(ERR_DBCMPNZRO);
error_def(ERR_DBSTARSIZ);
error_def(ERR_DBSTARCMP);
error_def(ERR_DBCMPMX);
error_def(ERR_DBKEYMX);
error_def(ERR_DBKEYMN);
error_def(ERR_DBCMPBAD);
error_def(ERR_DBKEYORD);
error_def(ERR_DBPTRNOTPOS);
error_def(ERR_DBPTRMX);
error_def(ERR_DBPTRMAP);
error_def(ERR_DBLVLINC);
error_def(ERR_DBBMSIZE);
error_def(ERR_DBBMBARE);
error_def(ERR_DBBMINV);
error_def(ERR_DBBMMSTR);
error_def(ERR_DBROOTBURN);
error_def(ERR_DBDIRTSUBSC);
error_def(ERR_DBMAXNRSUBS); /* same error as ERR_MAXNRSUBSCRIPTS, but has a string output as well */
error_def(ERR_DBINVGBL);
error_def(ERR_DBBDBALLOC);
csa = &FILE_INFO(reg)->s_addrs;
csd = csa->hdr;
bplmap = csd->bplmap;
@ -279,13 +280,13 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
RTS_ERROR_FUNC(ERR_DBRSIZMN, util_buff);
return FALSE;
}
if (rec_size > (short)((sm_ulong_t)blk_top - (sm_ulong_t)rp))
if (rec_size > (unsigned short)((sm_ulong_t)blk_top - (sm_ulong_t)rp))
{
RTS_ERROR_FUNC(ERR_DBRSIZMX, util_buff);
return FALSE;
}
r_top = (rec_hdr_ptr_t)((sm_ulong_t)rp + rec_size);
rec_cmpc = rp->cmpc;
rec_cmpc = EVAL_CMPC(rp);
if (first_key)
{
if (rec_cmpc)

View File

@ -12,7 +12,7 @@
#include "mdef.h"
#include "compiler.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "obj_file.h"
#include "cg_var.h"
#include "stringpool.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -19,6 +19,7 @@
#include "advancewindow.h"
#include "cmd.h"
#include "namelook.h"
#include "error.h"
#define VMS_OS 01
#define UNIX_OS 02
@ -223,9 +224,12 @@ LITDEF struct
}
if (0 > (x = namelook(cmd_index, cmd_names, c, (TREF(window_ident)).len)))
{
stx_error(ERR_INVCMD);
if (0 > (x = namelook(cmd_index, cmd_names, "ZINVCMD", 7)))
if ((TK_COLON != TREF(director_token)) || (0 > (x = namelook(cmd_index, cmd_names, "ZINVCMD", 7))))
{ /* the 2nd term of the above if should perform the assignment, but never be true - we're just paranoid */
stx_error(MAKE_MSG_TYPE(ERR_INVCMD, ERROR)); /* force INVCMD to an error so stx_error sees it as hard */
return FALSE;
}
stx_error(ERR_INVCMD); /* the warning form so stx_error treats it as provisional */
}
if (!VALID_CMD(x) )
{
@ -234,8 +238,10 @@ LITDEF struct
}
advancewindow();
if ((TK_COLON != TREF(window_token)) || !cmd_data[x].pcnd_ok)
{
assert((m_zinvcmd != cmd_data[x].fcn));
cr = NULL;
else
} else
{
advancewindow();
cr = (oprtype *)mcalloc(SIZEOF(oprtype));
@ -244,8 +250,8 @@ LITDEF struct
stx_error(ERR_PCONDEXPECTED);
return FALSE;
}
if (shifting = (TREF(expr_start) != TREF(expr_start_orig))) /* WARNING - assignent */
{
if (shifting = ((TREF(expr_start) != TREF(expr_start_orig)) && (OC_NOOP != (TREF(expr_start))->opcode)))
{ /* NOTE - assignent above */
temp_expr_start = TREF(expr_start);
triptr = newtriple(OC_GVRECTARG);
triptr->operand[0] = put_tref(temp_expr_start);
@ -291,7 +297,5 @@ LITDEF struct
tnxtarg(cr);
}
}
if (!cr && (m_zinvcmd == cmd_data[x].fcn))
return FALSE;
return rval;
}

View File

@ -15,7 +15,7 @@
#include "mdq.h"
#include "cgp.h"
#include "cmd_qlf.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "obj_file.h"
#include "list_file.h"
#include <emit_code.h>

View File

@ -15,7 +15,7 @@
#include "opcode.h"
#include "toktyp.h"
#include "stringpool.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "mv_stent.h"
#include "cgp.h"
#include "alloc_reg.h"

View File

@ -14,7 +14,7 @@
#include "gtm_stdio.h"
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "mv_stent.h"
#include "copy.h"

View File

@ -15,7 +15,7 @@
#include "stp_parms.h"
#include "compiler.h"
#include "stringpool.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "mv_stent.h"
#include "opcode.h"
#include "cgp.h"

View File

@ -205,9 +205,10 @@ typedef struct
#define NO_FORMALLIST (-1)
/* Some errors should not cause stx_error to issue an rts_error. These are the errors related to
* a) Invalid Intrinsic Special Variables
* a) Invalid Intrinsic Commands
* b) Invalid Intrinsic Function Names
* c) Invalid Deviceparameters for IO commands
* c) Invalid Intrinsic Special Variables
* d) Invalid Deviceparameters for IO commands
* These should cause an error at runtime if and only if that codepath is reached.
* PostConditionals can cause this path to be avoided in which case we do not want to issue an error at compile time.
* Therefore issue only a warning at compile-time and proceed with compilation as if this codepath will not be reached at runtime.
@ -216,15 +217,16 @@ error_def(ERR_DEVPARINAP);
error_def(ERR_DEVPARUNK);
error_def(ERR_DEVPARVALREQ);
error_def(ERR_FNOTONSYS);
error_def(ERR_INVCMD);
error_def(ERR_INVFCN);
error_def(ERR_INVSVN);
error_def(ERR_SVNONEW);
error_def(ERR_SVNOSET);
#define IS_STX_WARN(errcode) \
((ERR_INVFCN == errcode) || (ERR_FNOTONSYS == errcode) || (ERR_INVSVN == errcode) \
|| (ERR_SVNONEW == errcode) || (ERR_SVNOSET == errcode) || (ERR_DEVPARUNK == errcode) \
|| (ERR_DEVPARINAP == errcode) || (ERR_DEVPARVALREQ == errcode))
#define IS_STX_WARN(errcode) \
((ERR_DEVPARINAP == errcode) || (ERR_DEVPARUNK == errcode) || (ERR_DEVPARVALREQ == errcode) \
|| (ERR_FNOTONSYS == errcode) || (ERR_INVCMD == errcode) || (ERR_INVFCN == errcode) \
|| (ERR_INVSVN == errcode) || (ERR_SVNONEW == errcode) || (ERR_SVNOSET == errcode))
/* This macro does an "stx_error" of the input errcode but before that it asserts that the input errcode is one
* of the known error codes that are to be handled as a compile-time warning (instead of an error). It also set
@ -305,6 +307,21 @@ error_def(ERR_SVNOSET);
} \
}
#define ENCOUNTERED_SIDE_EFFECT \
{ /* Needs #include "show_source_line" and #include "fullbool.h" */ \
char source_line_buff[MAX_SRCLINE + SIZEOF(ARROW)]; \
\
if (TREF(shift_side_effects)) \
{ \
TREF(saw_side_effect) = TRUE; \
if (!run_time && (FULL_BOOL_WARN == TREF(gtm_fullbool))) \
{ /* warnings requested by by gtm_fullbool and enabled by eval_expr */ \
show_source_line(source_line_buff, SIZEOF(source_line_buff), TRUE); \
dec_err(VARLSTCNT(1) ERR_BOOLSIDEFFECT); \
} \
} \
}
/* the macro below tucks a code reference into the for_stack so a FOR that's done can move on correctly when done */
#define FOR_END_OF_SCOPE(DEPTH, RESULT) \
{ \

View File

@ -16,7 +16,7 @@
#include "cmd_qlf.h"
#include "list_file.h"
#include "source_file.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "obj_file.h"
#include "reinit_externs.h"
#include "compiler.h"

View File

@ -13,7 +13,7 @@
#include "gtm_stdio.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "mprof.h"
#include "error.h"

View File

@ -50,6 +50,7 @@
#include "get_fs_block_size.h"
#include "wbox_test_init.h"
#include "gt_timer.h"
#include "anticipatory_freeze.h"
/* Note : Now all system error messages are issued here. So callers do not need to issue them again */
#define STATUS_MSG(info) \
@ -188,7 +189,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
#endif
int idx;
trans_num db_tn;
uint4 temp_offset, temp_checksum;
uint4 temp_offset, temp_checksum, pfin_offset, eof_offset;
uint4 jnl_fs_block_size;
jrecbuf = NULL;
@ -325,7 +326,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
{
zero_size = (blk + ZERO_SIZE_IN_BLOCKS <= info->alloc) ?
ZERO_SIZE : (info->alloc - blk) * DISK_BLOCK_SIZE;
DO_FILE_WRITE(channel, blk * DISK_BLOCK_SIZE, jrecbuf, zero_size, info->status, info->status2);
JNL_DO_FILE_WRITE(NULL, NULL, channel, blk * DISK_BLOCK_SIZE, jrecbuf, zero_size, info->status, info->status2);
STATUS_MSG(info);
RETURN_ON_ERROR(info);
}
@ -334,7 +335,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
memcpy(jnlfile_id.fid, &nam.nam$w_fid, SIZEOF(jnlfile_id.fid));
jnl_fs_block_size = get_fs_block_size(channel);
#endif
info->checksum = jnl_get_checksum_entire((uint4 *)&jnlfile_id, SIZEOF(gd_id));
info->checksum = compute_checksum(INIT_CHECKSUM_SEED, (uint4 *)&jnlfile_id, SIZEOF(gd_id));
/* Journal file header size relies on this assert */
assert(256 == GTMCRYPT_RESERVED_HASH_LEN);
header = (jnl_file_header *)(ROUND_UP2((uintszofptr_t)hdr_base, jnl_fs_block_size));
@ -350,7 +351,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
* write is not so much since it is only once per journal file at creation time. All future writes of the
* file header write only the real file header and not the 0-padding.
*/
DO_FILE_WRITE(channel, 0, header, JNL_HDR_LEN, info->status, info->status2);
JNL_DO_FILE_WRITE(info->csa, create_fn, channel, 0, header, JNL_HDR_LEN, info->status, info->status2);
STATUS_MSG(info);
RETURN_ON_ERROR(info);
assert(DISK_BLOCK_SIZE >= EPOCH_RECLEN + EOF_RECLEN + PFIN_RECLEN + PINI_RECLEN);
@ -361,14 +362,16 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
pini_record->prefix.tn = db_tn;
pini_record->prefix.pini_addr = JNL_HDR_LEN;
pini_record->prefix.time = jgbl.gbl_jrec_time; /* callers must set it */
temp_offset = JNL_HDR_LEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
pini_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
pini_record->suffix.suffix_code = JNL_REC_SUFFIX_CODE;
assert(prc_vec);
memcpy((unsigned char*)&pini_record->process_vector[CURR_JPV], (unsigned char*)prc_vec, SIZEOF(jnl_process_vector));
/* Already process_vector[ORIG_JPV] is memset 0 */
pini_record->prefix.pini_addr = JNL_HDR_LEN;
pini_record->filler = 0;
pini_record->prefix.checksum = INIT_CHECKSUM_SEED;
temp_checksum = compute_checksum(INIT_CHECKSUM_SEED, (uint4 *)pini_record, SIZEOF(struct_jrec_pini));
temp_offset = JNL_HDR_LEN;
ADJUST_CHECKSUM(temp_checksum, temp_offset, temp_checksum);
ADJUST_CHECKSUM(temp_checksum, info->checksum, pini_record->prefix.checksum);
/* EPOCHs are written unconditionally in Unix while they are written only for BEFORE_IMAGE in VMS */
if (JNL_HAS_EPOCH(info))
{
@ -382,9 +385,6 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
epoch_record->free_blocks = info->free_blocks;
epoch_record->total_blks = info->total_blks;
epoch_record->fully_upgraded = info->csd->fully_upgraded;
temp_offset = JNL_HDR_LEN + PINI_RECLEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
epoch_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
epoch_record->suffix.suffix_code = JNL_REC_SUFFIX_CODE;
epoch_record->jnl_seqno = info->reg_seqno;
UNIX_ONLY(
@ -399,25 +399,24 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
for (idx = 0; idx < MAX_SUPPL_STRMS; idx++)
assert(0 == epoch_record->strm_seqno[idx]); /* should have been zeroed already by above memset */
)
epoch_record->filler = 0;
epoch_record->prefix.checksum = INIT_CHECKSUM_SEED;
temp_checksum = compute_checksum(INIT_CHECKSUM_SEED,
(uint4 *)epoch_record, SIZEOF(struct_jrec_epoch));
temp_offset = JNL_HDR_LEN + PINI_RECLEN;
ADJUST_CHECKSUM(temp_checksum, temp_offset, temp_checksum);
ADJUST_CHECKSUM(temp_checksum, info->checksum, epoch_record->prefix.checksum);
pfin_record = (struct_jrec_pfin *)&jrecbuf[PINI_RECLEN + EPOCH_RECLEN];
temp_offset = JNL_HDR_LEN + PINI_RECLEN + EPOCH_RECLEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
pfin_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
pfin_offset = JNL_HDR_LEN + PINI_RECLEN + EPOCH_RECLEN;
eof_record = (struct_jrec_eof *)&jrecbuf[PINI_RECLEN + EPOCH_RECLEN + PFIN_RECLEN];
temp_offset = JNL_HDR_LEN + PINI_RECLEN + EPOCH_RECLEN + PFIN_RECLEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
eof_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
eof_offset = JNL_HDR_LEN + PINI_RECLEN + EPOCH_RECLEN + PFIN_RECLEN;
cre_jnl_rec_size = PINI_RECLEN + EPOCH_RECLEN + PFIN_RECLEN + EOF_RECLEN;
} else
{
pfin_record = (struct_jrec_pfin *)&jrecbuf[PINI_RECLEN];
temp_offset = JNL_HDR_LEN + PINI_RECLEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
pfin_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
pfin_offset = JNL_HDR_LEN + PINI_RECLEN;
eof_record = (struct_jrec_eof *)&jrecbuf[PINI_RECLEN + PFIN_RECLEN];
temp_offset = JNL_HDR_LEN + PINI_RECLEN + PFIN_RECLEN;
temp_checksum = ADJUST_CHECKSUM(INIT_CHECKSUM_SEED, temp_offset);
eof_record->prefix.checksum = ADJUST_CHECKSUM(temp_checksum, info->checksum);
eof_offset = JNL_HDR_LEN + PINI_RECLEN + PFIN_RECLEN;
cre_jnl_rec_size = PINI_RECLEN + PFIN_RECLEN + EOF_RECLEN;
}
pfin_record->prefix.jrec_type = JRT_PFIN;
@ -426,6 +425,11 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
pfin_record->prefix.pini_addr = JNL_HDR_LEN;
pfin_record->prefix.time = jgbl.gbl_jrec_time;
pfin_record->suffix.suffix_code = JNL_REC_SUFFIX_CODE;
pfin_record->filler = 0;
pfin_record->prefix.checksum = INIT_CHECKSUM_SEED;
temp_checksum = compute_checksum(INIT_CHECKSUM_SEED, (uint4 *)pfin_record, SIZEOF(struct_jrec_pfin));
ADJUST_CHECKSUM(temp_checksum, pfin_offset, temp_checksum);
ADJUST_CHECKSUM(temp_checksum, info->checksum, pfin_record->prefix.checksum);
eof_record->prefix.jrec_type = JRT_EOF;
eof_record->prefix.forwptr = eof_record->suffix.backptr = EOF_RECLEN;
eof_record->prefix.tn = db_tn;
@ -433,6 +437,11 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
eof_record->prefix.time = jgbl.gbl_jrec_time;
QWASSIGN(eof_record->jnl_seqno, info->reg_seqno);
eof_record->suffix.suffix_code = JNL_REC_SUFFIX_CODE;
eof_record->filler = 0;
eof_record->prefix.checksum = INIT_CHECKSUM_SEED;
temp_checksum = compute_checksum(INIT_CHECKSUM_SEED, (uint4 *)eof_record, SIZEOF(struct_jrec_eof));
ADJUST_CHECKSUM(temp_checksum, eof_offset, temp_checksum);
ADJUST_CHECKSUM(temp_checksum, info->checksum, eof_record->prefix.checksum);
/* Assert that the journal file header and journal records are all in sync with respect to the db tn. */
assert(header->bov_tn == db_tn);
assert(header->eov_tn == db_tn);
@ -449,10 +458,10 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
*/
assert(ROUND_UP2(header->virtual_size, jnl_fs_block_size/DISK_BLOCK_SIZE)
> DIVIDE_ROUND_UP(JNL_HDR_LEN + write_size, DISK_BLOCK_SIZE));
DO_FILE_WRITE(channel, JNL_HDR_LEN, jrecbuf, write_size, info->status, info->status2);
JNL_DO_FILE_WRITE(info->csa, create_fn, channel, JNL_HDR_LEN, jrecbuf, write_size, info->status, info->status2);
STATUS_MSG(info);
RETURN_ON_ERROR(info);
UNIX_ONLY(GTM_FSYNC(channel, status);)
UNIX_ONLY(GTM_JNL_FSYNC(info->csa, channel, status);)
F_CLOSE(channel, status); /* resets "channel" to FD_INVALID */
free(jrecbuf_base);
jrecbuf_base = NULL;
@ -463,6 +472,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
* Following does rename of a.mjl to a.mjl_timestamp.
* So system will have a.mjl_timestamp and a.mjl_new for a crash after this call
*/
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(info->csa); /* wait for instance freeze before journal file renames */
if (SS_NORMAL != (info->status = gtm_rename((char *)info->jnl, (int)info->jnl_len,
(char *)rename_fn, rename_fn_len, &info->status2)))
{
@ -476,6 +486,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
/* Following does rename of a.mjl_new to a.mjl.
* So system will have a.mjl_timestamp as previous generation and a.mjl as new/current journal file
*/
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(info->csa); /* wait for instance freeze before journal file renames */
if (SS_NORMAL != (info->status = gtm_rename((char *)create_fn, create_fn_len,
(char *)info->jnl, (int)info->jnl_len, &info->status2)))
{
@ -493,6 +504,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
DEBUG_ONLY(
if (gtm_white_box_test_case_enabled && (WBTEST_JNL_CREATE_INTERRUPT == gtm_white_box_test_case_number))
{
UNIX_ONLY(DBGFPF((stderr, "CRE_JNL_FILE: started a wait\n"))); /* this white-box test is for UNIX */
LONG_SLEEP(600);
assert(FALSE); /* Should be killed before that */
}

View File

@ -13,7 +13,7 @@
#include "iosp.h"
#include "error.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "inst_flush.h"
#include "private_code_copy.h"
#include "stack_frame.h"

View File

@ -123,8 +123,12 @@ void db_auto_upgrade(gd_region *reg)
/* In addition, V55000 introduced before_trunc_total_blks for MUPIP REORG -TRUNCATE.
* Since it is a new field no initialization necessary.
*/
break;
case GDSMV55000:
UNIX_ONLY(csd->freeze_on_fail = FALSE;)
UNIX_ONLY(csd->span_node_absent = TRUE;)
UNIX_ONLY(csd->maxkeysz_assured = FALSE;)
break;
case GDSMV60000:
/* Nothing to do for this version since it is GDSMVCURR for now. */
assert(FALSE); /* When this assert fails, it means a new GDSMV* was created, */
break; /* so a new "case" needs to be added BEFORE the assert. */

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -189,7 +189,7 @@ cache_rec_ptr_t db_csh_getn(block_id block)
if (FALSE == wcs_get_space(gv_cur_region, 0, cr))
{ /* failed to flush it out - force a rebuild */
BG_TRACE_PRO(wc_blocked_db_csh_getn_wcsstarvewrt);
assert(csd->wc_blocked); /* only reason we currently know why wcs_get_space could fail */
assert(csa->nl->wc_blocked); /* only reason we currently know why wcs_get_space could fail */
assert(gtm_white_box_test_case_enabled);
break;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2005, 2010 Fidelity Information Services, Inc *
* Copyright 2005, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -32,9 +32,10 @@
#include <signal.h>
#ifdef UNIX
#include "sig_init.h"
# include "continue_handler.h"
# include "sig_init.h"
#else
#include "desblk.h" /* for desblk structure */
# include "desblk.h" /* for desblk structure */
#endif
#include "gdsroot.h"
#include "v15_gdsroot.h"
@ -55,6 +56,7 @@
#include "cli.h"
#include "gtm_imagetype_init.h"
#include "gtm_threadgbl_init.h"
#include "wbox_test_init.h"
GBLREF uint4 process_id;
GBLREF boolean_t gtm_utf8_mode;
@ -83,15 +85,14 @@ int UNIX_ONLY(main)VMS_ONLY(dbcertify)(int argc, char **argv)
psa_gbl = malloc(SIZEOF(*psa_gbl));
memset(psa_gbl, 0, SIZEOF(*psa_gbl));
UNIX_ONLY(err_init(dbcertify_base_ch));
UNIX_ONLY(sig_init(dbcertify_signal_handler, dbcertify_signal_handler, NULL));
UNIX_ONLY(sig_init(dbcertify_signal_handler, dbcertify_signal_handler, NULL, continue_handler));
VMS_ONLY(util_out_open(0));
VMS_ONLY(SET_EXIT_HANDLER(exi_blk, dbcertify_exit_handler, exi_condition)); /* Establish exit handler */
VMS_ONLY(ESTABLISH(dbcertify_base_ch));
process_id = getpid();
/* Structure checks .. */
assert((24 * 1024) == SIZEOF(v15_sgmnt_data)); /* Verify V4 file header hasn't suddenly increased for some odd reason */
OPERATOR_LOG_MSG;
/* Platform dependent method to get the option scan going and invoke necessary driver routine */
dbcertify_parse_and_dispatch(argc, argv);
return SS_NORMAL;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2005, 2011 Fidelity Information Services, Inc *
* Copyright 2005, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -112,6 +112,7 @@ void dbcertify_certify_phase(void)
char_ptr_t errmsg;
boolean_t restart_transaction, p1rec_read;
unsigned short buff_len;
int tmp_cmpc;
char ans[2];
unsigned char dbfn[MAX_FN_LEN + 1];
file_control *fc;
@ -299,7 +300,7 @@ void dbcertify_certify_phase(void)
{
if (psa->blocks_to_process != rec_num)
{
((sgmnt_data_ptr_t)psa->dbc_cs_data)->certified_for_upgrade_to = GDSV5;
((sgmnt_data_ptr_t)psa->dbc_cs_data)->certified_for_upgrade_to = GDSV6;
psa->dbc_fhdr_dirty = TRUE;
gtm_putmsg(VARLSTCNT(6) ERR_DBCDBCERTIFIED, 4, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn),
RTS_ERROR_LITERAL("GT.M V5"));
@ -416,6 +417,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
int prev_rec_offset, new_blk_len, new_rec_len, remain_offset, remain_len, blk_seg_cnt;
int new_lh_blk_len, new_rh_blk_len, created_blocks, extent_size;
int local_map_max, lbm_blk_index, lcl_blk, curr_rec_cmpc, cmpc;
int tmp_cmpc;
int4 lclmap_not_full;
uint4 total_blks;
boolean_t dummy_bool;
@ -524,7 +526,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
*/
GET_ULONG(blk_ptr, (psa->blk_set[dtblk_index].curr_rec + SIZEOF(rec_hdr)
+ psa->blk_set[dtblk_index].curr_blk_key->end + 1
- ((rec_hdr *)psa->blk_set[dtblk_index].curr_rec)->cmpc));
- EVAL_CMPC((rec_hdr *)psa->blk_set[dtblk_index].curr_rec)));
gvtblk_index = dbc_read_dbblk(psa, blk_ptr, gdsblk_gvtroot);
assert(-1 != gvtblk_index);
/* If our target block was not the gvtroot block we just read in then we keep scanning for our
@ -682,7 +684,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
GET_USHORT(us_rec_len, &((rec_hdr *)rec_p)->rsiz);
curr_rec_len = us_rec_len;
dbc_find_key(psa, blk_set_p->curr_blk_key, rec_p, blk_set_p->blk_levl);
blk_set_p->curr_match = ((rec_hdr *)rec_p)->cmpc;
blk_set_p->curr_match = EVAL_CMPC((rec_hdr *)rec_p);
next_rec_p = rec_p + curr_rec_len;
if (next_rec_p >= blk_endp) /* We have reached the last record in the block. Cannot skip anymore. */
break;
@ -753,7 +755,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
assert(insert_point); /* This is supposed to *be* the insert point */
}
/* Make convenient copies of some commonly used record fields */
curr_rec_cmpc = ((rec_hdr *)blk_set_p->curr_rec)->cmpc;
curr_rec_cmpc = EVAL_CMPC((rec_hdr *)blk_set_p->curr_rec);
curr_rec_shrink = blk_set_p->curr_match - curr_rec_cmpc;
curr_rec_offset = (int)(blk_set_p->curr_rec - blk_set_p->old_buff);
GET_USHORT(us_rec_len, &((rec_hdr *)blk_set_p->curr_rec)->rsiz);
@ -799,7 +801,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
/* Setup new record header */
new_rec_len = (int)(SIZEOF(rec_hdr) + ins_rec_len - blk_set_p->prev_match);
ins_rec_hdr->rsiz = new_rec_len;
ins_rec_hdr->cmpc = blk_set_p->prev_match;
SET_CMPC(ins_rec_hdr, blk_set_p->prev_match);
BLK_SEG(bs_ptr, (sm_uc_ptr_t)ins_rec_hdr, SIZEOF(rec_hdr));
/* Setup key */
BLK_ADDR(cp1,
@ -817,7 +819,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
*/
BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr); /* Replacement rec header */
next_rec_hdr->rsiz = curr_rec_len - curr_rec_shrink;
next_rec_hdr->cmpc = blk_set_p->curr_match;
SET_CMPC(next_rec_hdr, blk_set_p->curr_match);
BLK_SEG(bs_ptr, (sm_uc_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
remain_offset = curr_rec_shrink + SIZEOF(rec_hdr); /* Where rest of record plus any
further records begin */
@ -886,7 +888,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
}
assert(0 < new_lh_blk_len);
/* Right hand side has key of curr_rec expanded since is first key of blcok */
new_rh_blk_len = (int)(SIZEOF(v15_blk_hdr) + ((rec_hdr *)blk_set_p->curr_rec)->cmpc +
new_rh_blk_len = (int)(SIZEOF(v15_blk_hdr) + EVAL_CMPC((rec_hdr *)blk_set_p->curr_rec) +
(curr_blk_len - curr_rec_offset));
assert(0 < new_rh_blk_len);
/* Common initialization */
@ -940,12 +942,12 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
- SIZEOF(v15_blk_hdr));
BLK_ADDR(new_star_hdr, SIZEOF(rec_hdr), rec_hdr);
new_star_hdr->rsiz = BSTAR_REC_SIZE;
new_star_hdr->cmpc = 0;
SET_CMPC(new_star_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)new_star_hdr, SIZEOF(rec_hdr));
BLK_SEG(bs_ptr, (ins_rec_len ? (uchar_ptr_t)&blk_set_p->ins_rec.blk_id
: (blk_set_p->prev_rec + SIZEOF(rec_hdr)
+ blk_set_p->prev_blk_key->end + 1
- ((rec_hdr *)blk_set_p->prev_rec)->cmpc)),
- EVAL_CMPC((rec_hdr *)blk_set_p->prev_rec))),
SIZEOF(block_id));
}
/* Complete our LHS block */
@ -1001,7 +1003,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
blk_set_rhs_p->upd_addr = bs1; /* Block building roadmap.. */
BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
next_rec_hdr->rsiz = curr_rec_len + curr_rec_cmpc;
next_rec_hdr->cmpc = 0;
SET_CMPC(next_rec_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
/* Copy the previously compressed part of the key out of curr_rec. Note, if this
key is a star rec key, nothing is written because cmpc is zero */
@ -1090,7 +1092,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
/* Replace last record with star key rec */
BLK_ADDR(new_star_hdr, SIZEOF(rec_hdr), rec_hdr);
new_star_hdr->rsiz = BSTAR_REC_SIZE;
new_star_hdr->cmpc = 0;
SET_CMPC(new_star_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)new_star_hdr, SIZEOF(rec_hdr));
/* Output pointer from prev_rec as star key record's value */
BLK_SEG(bs_ptr, blk_set_p->curr_rec - SIZEOF(block_id), SIZEOF(block_id));
@ -1149,7 +1151,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
BLK_ADDR(ins_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
ins_rec_hdr->rsiz = SIZEOF(rec_hdr) + blk_set_p->ins_rec.ins_key->end + 1
+ SIZEOF(block_id);
ins_rec_hdr->cmpc = 0;
SET_CMPC(ins_rec_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)ins_rec_hdr, SIZEOF(rec_hdr));
/* Now for the inserted record key */
BLK_SEG(bs_ptr,
@ -1162,7 +1164,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
it is now the second record in the new block. */
BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
next_rec_hdr->rsiz = curr_rec_len - curr_rec_shrink;
next_rec_hdr->cmpc = blk_set_p->curr_match;
SET_CMPC(next_rec_hdr, blk_set_p->curr_match);
BLK_SEG(bs_ptr, (uchar_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
remain_offset = curr_rec_shrink + SIZEOF(rec_hdr); /* Where rest of record plus any
further records begin */
@ -1190,8 +1192,8 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
GTMASSERT;
/* First record will have last key in LHS block */
BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
next_rec_hdr->rsiz = SIZEOF(rec_hdr) + last_rec_key->end + 1 + SIZEOF(block_id);;
next_rec_hdr->cmpc = 0;
next_rec_hdr->rsiz = SIZEOF(rec_hdr) + last_rec_key->end + 1 + SIZEOF(block_id);
SET_CMPC(next_rec_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
BLK_SEG(bs_ptr, last_rec_key->base, (last_rec_key->end + 1));
BLK_ADDR(lhs_block_id_p, SIZEOF(block_id), block_id); /* First record's value */
@ -1200,7 +1202,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
/* Second record is a star key record pointing to the RHS block */
BLK_ADDR(new_star_hdr, SIZEOF(rec_hdr), rec_hdr);
new_star_hdr->rsiz = BSTAR_REC_SIZE;
new_star_hdr->cmpc = 0;
SET_CMPC(new_star_hdr, 0);
BLK_SEG(bs_ptr, (uchar_ptr_t)new_star_hdr, SIZEOF(rec_hdr));
BLK_ADDR(rhs_block_id_p, SIZEOF(block_id), block_id); /* First record's value */
BLK_SEG(bs_ptr, (uchar_ptr_t)rhs_block_id_p, SIZEOF(block_id));

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2005, 2011 Fidelity Information Services, Inc *
* Copyright 2005, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -632,10 +632,11 @@ int dbc_read_dbblk(phase_static_area *psa, int blk_num, enum gdsblk_type blk_typ
void dbc_find_key(phase_static_area *psa, dbc_gv_key *key, uchar_ptr_t rec_p, int blk_levl)
{
int cmpc, rec_len;
int tmp_cmpc;
unsigned short us_rec_len;
uchar_ptr_t key_targ_p, key_src_p;
cmpc = ((rec_hdr_ptr_t)rec_p)->cmpc;
cmpc = EVAL_CMPC((rec_hdr *)rec_p);
GET_USHORT(us_rec_len, &((rec_hdr_ptr_t)rec_p)->rsiz);
rec_len = us_rec_len;
if (BSTAR_REC_SIZE == rec_len && 0 < blk_levl)
@ -694,6 +695,7 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
uchar_ptr_t rec_p, blk_p, blk_top, key1, key2;
unsigned short us_rec_len;
int blk_ptr, blk_levl, key_len, key_len1, key_len2, rec_len;
int tmp_cmpc;
enum gdsblk_type blk_type;
block_info *blk_set_p;
@ -770,7 +772,7 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
DBC_DEBUG(("DBC_DEBUG: dbc_find_record: Recursing down a level via keyed index record at offset 0x%lx\n",
(rec_p - blk_p)));
GET_ULONG(blk_ptr, (rec_p + SIZEOF(rec_hdr) + blk_set_p->curr_blk_key->end
- ((rec_hdr *)rec_p)->cmpc + 1));
- EVAL_CMPC((rec_hdr *)rec_p) + 1));
blk_index = dbc_read_dbblk(psa, blk_ptr, blk_type);
return dbc_find_record(psa, key, blk_index, min_levl, blk_type, fail_ok);
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2005, 2011 Fidelity Information Services, Inc *
* Copyright 2005, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -444,6 +444,7 @@ void dbc_write_p1out(phase_static_area *psa, void *obuf, int olen)
void dbc_process_block(phase_static_area *psa, int blk_num, gtm_off_t dbptr)
{
int rec_len, rec1_cmpc, rec2_cmpc, key_len, blk_levl, rec1_len, rec2_len, rec2_rlen;
int tmp_cmpc;
int free_bytes, blk_len;
int save_errno, mm_offset;
ssize_t rc;
@ -468,7 +469,7 @@ void dbc_process_block(phase_static_area *psa, int blk_num, gtm_off_t dbptr)
dbc_integ_error(psa, blk_num, "Bad block level");
/* Isolate first record for length check */
rec1_ptr = psa->block_buff + SIZEOF(v15_blk_hdr);
rec1_cmpc = ((rec_hdr_ptr_t)rec1_ptr)->cmpc;
rec1_cmpc = EVAL_CMPC((rec_hdr_ptr_t)rec1_ptr);
if (0 != rec1_cmpc)
dbc_integ_error(psa, blk_num, "Bad compression count");
GET_USHORT(us_rec_len, &((rec_hdr_ptr_t)rec1_ptr)->rsiz);
@ -480,7 +481,7 @@ void dbc_process_block(phase_static_area *psa, int blk_num, gtm_off_t dbptr)
* record has no value (null value).
*/
rec2_ptr = rec1_ptr + rec1_len;
rec2_cmpc = ((rec_hdr_ptr_t)rec2_ptr)->cmpc;
rec2_cmpc = EVAL_CMPC((rec_hdr_ptr_t)rec2_ptr);
if (rec2_cmpc > rec1_len)
dbc_integ_error(psa, blk_num, "Compression count too large");
GET_USHORT(us_rec_len, &((rec_hdr_ptr_t)rec2_ptr)->rsiz);
@ -752,6 +753,7 @@ void dbc_integ_error(phase_static_area *psa, block_id blk_num, char_ptr_t emsg)
uchar_ptr_t dbc_format_key(phase_static_area *psa, uchar_ptr_t trec_p)
{
int dtblk_index, hdr_len, rec_value_len, rec_len, rec_cmpc;
int tmp_cmpc;
size_t len;
uchar_ptr_t blk_p, rec_value_p, subrec_p, key_end_p, rec_p;
block_info *blk_set_p;
@ -782,7 +784,7 @@ uchar_ptr_t dbc_format_key(phase_static_area *psa, uchar_ptr_t trec_p)
blk_set_p = &psa->blk_set[dtblk_index];
blk_p = blk_set_p->old_buff;
assert(0 == ((v15_blk_hdr_ptr_t)blk_p)->levl);
rec_cmpc = ((rec_hdr *)blk_set_p->curr_rec)->cmpc;
rec_cmpc = EVAL_CMPC((rec_hdr *)blk_set_p->curr_rec);
rec_value_p = (blk_set_p->curr_rec + SIZEOF(rec_hdr) + blk_set_p->curr_blk_key->end + 1 - rec_cmpc);
/* Verify that the dt record we found is the exact one we were looking for */
if ((psa->first_rec_key->gvn_len + 1) != blk_set_p->curr_blk_key->end)

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2005, 2011 Fidelity Information Services, Inc *
* Copyright 2005, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -41,6 +41,15 @@ GBLREF jnl_gbls_t jgbl;
GBLREF uint4 process_id;
GBLREF inctn_detail_t inctn_detail; /* holds detail to fill in to inctn jnl record */
error_def(ERR_COMMITWAITSTUCK);
error_def(ERR_CRYPTNOV4);
error_def(ERR_DBDSRDFMTCHNG);
error_def(ERR_MMNODYNDWNGRD);
error_def(ERR_MUDWNGRDTN);
error_def(ERR_MUNOACTION);
error_def(ERR_SNAPSHOTNOV4);
error_def(ERR_WCBLOCKED);
/* input parameter "command_name" is a string that is either "MUPIP REORG UPGRADE/DOWNGRADE" or "MUPIP SET VERSION" */
int4 desired_db_format_set(gd_region *reg, enum db_ver new_db_format, char *command_name)
{
@ -56,14 +65,6 @@ int4 desired_db_format_set(gd_region *reg, enum db_ver new_db_format, char *comm
jnl_private_control *jpc;
jnl_buffer_ptr_t jbp;
error_def(ERR_COMMITWAITSTUCK);
error_def(ERR_DBDSRDFMTCHNG);
error_def(ERR_MMNODYNDWNGRD);
error_def(ERR_MUDWNGRDTN);
error_def(ERR_MUNOACTION);
error_def(ERR_WCBLOCKED);
error_def(ERR_CRYPTNOV4);
error_def(ERR_SNAPSHOTNOV4);
assert(reg->open);
csa = &FILE_INFO(reg)->s_addrs;
csd = csa->hdr;
@ -87,7 +88,7 @@ int4 desired_db_format_set(gd_region *reg, enum db_ver new_db_format, char *comm
if (FALSE == was_crit)
grab_crit(reg);
/* if MM and desired_db_format is not V5, gvcst_init would have issued MMNODYNDWNGRD error. assert that. */
assert(dba_bg == csd->acc_meth || (dba_mm == csd->acc_meth) && (GDSV5 == csd->desired_db_format));
assert(dba_bg == csd->acc_meth || (dba_mm == csd->acc_meth) && (GDSV6 == csd->desired_db_format));
if (csd->desired_db_format == new_db_format)
{ /* no change in db_format. fix max_tn_warn if necessary and return right away. */
status = ERR_MUNOACTION;
@ -127,7 +128,7 @@ int4 desired_db_format_set(gd_region *reg, enum db_ver new_db_format, char *comm
/* Wait for concurrent phase2 commits to complete before switching the desired db format */
if (csa->nl->wcs_phase2_commit_pidcnt && !wcs_phase2_commit_wait(csa, NULL))
{ /* Set wc_blocked so next process to get crit will trigger cache-recovery */
SET_TRACEABLE_VAR(csd->wc_blocked, TRUE);
SET_TRACEABLE_VAR(csa->nl->wc_blocked, TRUE);
wcblocked_ptr = WCS_PHASE2_COMMIT_WAIT_LIT;
send_msg(VARLSTCNT(8) ERR_WCBLOCKED, 6, LEN_AND_STR(wcblocked_ptr),
process_id, &csd->trans_hist.curr_tn, DB_LEN_STR(reg));
@ -168,8 +169,8 @@ int4 desired_db_format_set(gd_region *reg, enum db_ver new_db_format, char *comm
case GDSV4:
csd->max_tn = MAX_TN_V4;
break;
case GDSV5:
csd->max_tn = MAX_TN_V5;
case GDSV6:
csd->max_tn = MAX_TN_V6;
break;
default:
GTMASSERT;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -59,6 +59,7 @@ LITDEF nametabent dev_param_names[] =
,{4,"DELE*"} ,{4,"DELE"}
,{4,"DELI*"}
,{4,"DEST*" } ,{7,"DESTROY"}
,{3,"DET*"}
,{3,"DOU*"}
,{3,"DOW*"}
@ -114,6 +115,7 @@ LITDEF nametabent dev_param_names[] =
,{4,"NOCE*"} ,{6,"NOCENE"}
,{6,"NOCONV*"}
,{6,"NODELI*"}
,{6,"NODEST*"} ,{9,"NODESTROY"}
,{5,"NODOU*"}
,{4,"NOEB*"}
,{4,"NOEC*"} ,{6,"NOECHO"}
@ -259,22 +261,22 @@ LITDEF nametabent dev_param_names[] =
LITDEF unsigned char dev_param_index[27] =
{
/* A B C D E F G H I J K L M N */
0, 5, 9, 26, 32, 45, 57, 59, 63, 69, 69, 69, 77, 80,
0, 5, 9, 26, 34, 47, 59, 61, 65, 71, 71, 71, 79, 82,
/* O P Q R S T U V W X Y Z end */
140, 145, 164, 165, 178, 196, 205, 211, 212, 227, 228, 229, 243
144, 149, 168, 169, 182, 200, 209, 215, 216, 231, 232, 233, 247
};
/* Offset of string within letter in dev_param_names */
/* maintained in conjunction with zshow_params.h = offset in letter, letter */
LITDEF zshow_index zshow_param_index[] =
{
/* ALLO BLOC COMMAND CONV CTRA DELE EBCD EDIT EXCE EXTE FIELD FIL FIXED HOST */
{2,0}, {2,1}, {9,2}, {12,2}, {16,2}, {1,3}, {1,4}, {4,4}, {9,4}, {11,4}, {2,5}, {5,5}, {8,5}, {3,7},
/* ICHSET INDEPENDENT INSE LAB */
{0,8}, {2,8}, {4,8}, {1,11},
/* LENG NOCENE NOECHO NOEDIT NOESCA NOHOST NOINSE */
{3,11}, {7,13}, {13,13}, {15,13}, {17,13}, {25,13}, {27,13},
/* ALLO BLOC COMMAND CONV CTRA DELE DEST EBCD EDIT EXCE EXTE FIELD FIL FIXED */
{2,0}, {2,1}, {9,2}, {12,2}, {16,2}, {1,3}, {3,3}, {1,4}, {4,4}, {9,4}, {11,4}, {2,5}, {5,5}, {8,5},
/* HOST ICHSET INDEPENDENT INSE LAB */
{3,7}, {0,8}, {2,8}, {4,8}, {1,11},
/* LENG NOCENE NODEST NOECHO NOEDIT NOESCA NOHOST NOINSE */
{3,11}, {7,13}, {10,13}, {15,13}, {17,13}, {19,13}, {27,13}, {29,13},
/* NOPAST NOREADS NOTTSY NOTYPE NOWRAP OCHSET PAD PARSE PAST PRMMBX RCHK */
{33,13}, {38,13}, {49,13}, {51,13}, {57,13}, {1,14}, {8,15}, {11,15}, {13,15}, {17,15}, {1,17},
{35,13}, {40,13}, {51,13}, {53,13}, {59,13}, {1,14}, {8,15}, {11,15}, {13,15}, {17,15}, {1,17},
/* READ READS REC SHAR SHELL STDERR TERM TTSY TYPE UIC WAIT WCHK WIDTH WRITE */
{2,17}, {4,17}, {5,17}, {5,18}, {7,18}, {15,18}, {1,19}, {6,19}, {8,19}, {1,20}, {2,22}, {4,22}, {6,22}, {10,22}
};
@ -321,6 +323,7 @@ int deviceparameters(oprtype *c, char who_calls)
,iop_delete ,iop_delete
,iop_delimiter
,iop_destroy ,iop_destroy
,iop_detach
,iop_doublespace
,iop_downscroll
@ -376,6 +379,7 @@ int deviceparameters(oprtype *c, char who_calls)
,iop_nocenable ,iop_nocenable
,iop_noconvert
,iop_nodelimiter
,iop_nodestroy ,iop_nodestroy
,iop_nodoublespace
,iop_noebcdic
,iop_noecho ,iop_noecho

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -10,13 +10,11 @@
****************************************************************/
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "dm_setup.h"
#ifdef UNIX
#include "io.h"
GBLREF io_desc *gtm_err_dev;
#endif
GBLREF stack_frame *frame_pointer;

View File

@ -13,7 +13,7 @@
#include "gtm_string.h"
#include "toktyp.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "indir_enum.h"
#include "cmd_qlf.h"

View File

@ -13,7 +13,7 @@
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "op.h"
#include "get_ret_targ.h"

View File

@ -10,7 +10,7 @@
****************************************************************/
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "dollar_zlevel.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,6 +42,8 @@ LITREF char gde_labels[GDE_LABEL_NUM][GDE_LABEL_SIZE];
STATICDEF gdr_name *gdr_name_head;
STATICDEF gd_addr *gd_addr_head;
error_def(ERR_GDINVALID);
/*+
Function: ZGBLDIR
@ -136,7 +138,6 @@ gd_addr *gd_load(mstr *v)
gd_region *reg, *reg_top;
uint4 t_offset, size;
short i;
error_def(ERR_GDINVALID);
file_ptr = open_gd_file(v);
@ -169,13 +170,16 @@ gd_addr *gd_load(mstr *v)
table->regions = (struct gd_region_struct *)((UINTPTR_T)table->regions + (UINTPTR_T)table);
table->segments = (struct gd_segment_struct *)((UINTPTR_T)table->segments + (UINTPTR_T)table);
table->end = (table->end + (UINTPTR_T)table);
for (map = table->maps, map_top = map + table->n_maps; map < map_top; map++)
{
t_offset = map->reg.offset;
map->reg.addr = (gd_region *)((char *)table + t_offset);
assert(SIZEOF(map->name) == (MAX_MIDENT_LEN + 1));
map->name[MAX_MIDENT_LEN] = '\0'; /* reset 32nd byte to 0 since only 31 bytes are used in map.
* this is necessary so "mid_len" can be invoked on this
* as it expects a null-terminated string.
*/
}
for (reg = table->regions, reg_top = reg + table->n_regions; reg < reg_top; reg++)
{
t_offset = reg->dyn.offset;

View File

@ -16,6 +16,10 @@ error_def(ERR_DSEWCREINIT);
#define PATCH_SAVE_SIZE 128
#define DSE_DMP_TIME_FMT "DD-MON-YEAR 24:60:SS"
#define SPAN_START_BYTE 0x02
#define SPAN_BYTE_MAX 255
#define SPAN_BYTE_MIN 1
#define GET_CURR_TIME_IN_DOLLARH_AND_ZDATE(dollarh_mval, dollarh_buffer, zdate_mval, zdate_buffer) \
{ /* gets current time in the mval "dollarh_mval" in dollarh format and in the mval "zdate_mval" in ZDATE format \
@ -138,6 +142,7 @@ int dse_data(char *dst, int *len);
int dse_getki(char *dst, int *len, char *qual, int qual_len);
int dse_is_blk_in(sm_uc_ptr_t rp, sm_uc_ptr_t r_top, short size);
int dse_ksrch(block_id srch, block_id_ptr_t pp, int4 *off, char *targ_key, int targ_len);
int dse_key_srch(block_id srch, block_id_ptr_t pp, int4 *off, char *targ_key, int targ_len);
int dse_order(block_id srch, block_id_ptr_t pp, int4 *op, char *targ_key, short int targ_len,
bool dir_data_blk);
void dse_rmsb(void);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -9,34 +9,34 @@
* *
****************************************************************/
#include <mdef.h>
#include "mdef.h"
#include <gtm_string.h>
#include <gdsroot.h>
#include <gtm_facility.h>
#include <fileinfo.h>
#include <gdsbt.h>
#include <gdsfhead.h>
#include <gdsblk.h>
#include "gtm_string.h"
#include "gdsroot.h"
#include "gtm_facility.h"
#include "fileinfo.h"
#include "gdsbt.h"
#include "gdsfhead.h"
#include "gdsblk.h"
#include "min_max.h" /* needed for gdsblkops.h */
#include <gdsblkops.h>
#include <gdscc.h>
#include <cli.h>
#include <copy.h>
#include <filestruct.h>
#include <jnl.h>
#include <skan_offset.h>
#include <skan_rnum.h>
#include <dse.h>
#include "gdsblkops.h"
#include "gdscc.h"
#include "cli.h"
#include "copy.h"
#include "filestruct.h"
#include "jnl.h"
#include "skan_offset.h"
#include "skan_rnum.h"
#include "dse.h"
/* Include prototypes */
#include <t_qread.h>
#include <t_write.h>
#include <t_end.h>
#include <t_begin_crit.h>
#include <gvcst_blk_build.h>
#include <util.h>
#include <t_abort.h>
#include "t_qread.h"
#include "t_write.h"
#include "t_end.h"
#include "t_begin_crit.h"
#include "gvcst_blk_build.h"
#include "util.h"
#include "t_abort.h"
GBLREF char *update_array, *update_array_ptr;
GBLREF uint4 update_array_size;
@ -46,7 +46,7 @@ GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF gd_addr *gd_header;
GBLREF char patch_comp_key[MAX_KEY_SZ + 1];
GBLREF unsigned char patch_comp_count;
GBLREF unsigned short patch_comp_count;
GBLREF gd_region *gv_cur_region;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
@ -55,7 +55,8 @@ GBLREF unsigned char *non_tp_jfb_buff_ptr;
void dse_adrec(void)
{
char data[MAX_LINE], key[MAX_KEY_SZ + 1];
unsigned char cc;
unsigned short cc;
int tmp_cmpc;
sm_uc_ptr_t new_bp, lbp, b_top, rp, r_top, key_top;
short int size, new_len, rsize;
int data_len, key_len;
@ -181,7 +182,7 @@ void dse_adrec(void)
size = (key_len < patch_comp_count) ? key_len : patch_comp_count;
for (cc = 0; cc < size && patch_comp_key[cc] == key[cc]; cc++)
;
((rec_hdr_ptr_t)new_bp)->cmpc = cc;
SET_CMPC((rec_hdr_ptr_t)new_bp, cc);
new_len = key_len - cc + data_len + SIZEOF(rec_hdr);
PUT_SHORT(&((rec_hdr_ptr_t)new_bp)->rsiz, new_len);
MEMCP(new_bp, &key[cc], SIZEOF(rec_hdr), key_len - cc, blk_size);
@ -203,10 +204,10 @@ void dse_adrec(void)
if (!*key_top++ && !*key_top++)
break;
}
if (((rec_hdr_ptr_t)rp)->cmpc > patch_comp_count)
if (EVAL_CMPC((rec_hdr_ptr_t)rp) > patch_comp_count)
cc = patch_comp_count;
else
cc = ((rec_hdr_ptr_t)rp)->cmpc;
cc = EVAL_CMPC((rec_hdr_ptr_t)rp);
size = key_top - rp - SIZEOF(rec_hdr);
if (size > SIZEOF(patch_comp_key) - 2 - cc)
size = SIZEOF(patch_comp_key) - 2 - cc;
@ -217,7 +218,7 @@ void dse_adrec(void)
size = (key_len < patch_comp_count) ? key_len : patch_comp_count;
for (cc = 0; cc < size && patch_comp_key[cc] == key[cc]; cc++)
;
((rec_hdr_ptr_t)(new_bp + new_len))->cmpc = cc;
SET_CMPC((rec_hdr_ptr_t)(new_bp + new_len), cc);
rsize = patch_comp_count - cc + r_top - key_top + SIZEOF(rec_hdr);
PUT_SHORT(&((rec_hdr_ptr_t)(new_bp + new_len))->rsiz, rsize);
MEMCP(new_bp, &patch_comp_key[cc], new_len + SIZEOF(rec_hdr), patch_comp_count - cc, blk_size);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -55,6 +55,7 @@ void dse_adstar(void)
blk_segment *bs1, *bs_ptr;
int4 blk_seg_cnt, blk_size;
short rsize;
int tmp_cmpc;
srch_blk_status blkhist;
error_def(ERR_DBRDONLY);
@ -112,7 +113,7 @@ void dse_adstar(void)
}
rsize = SIZEOF(rec_hdr) + SIZEOF(block_id);
PUT_SHORT(&((rec_hdr_ptr_t)b_top)->rsiz, rsize);
((rec_hdr_ptr_t) b_top)->cmpc = 0;
SET_CMPC((rec_hdr_ptr_t)b_top, 0);
PUT_LONG((block_id_ptr_t)(b_top + SIZEOF(rec_hdr)), blk);
((blk_hdr_ptr_t)lbp)->bsiz += (unsigned int)(SIZEOF(rec_hdr) + SIZEOF(block_id));

View File

@ -22,7 +22,6 @@
#if defined(UNIX)
#include "gtm_ipc.h"
GBLREF uint4 user_id;
#endif
#include "gdsblk.h"
@ -40,9 +39,8 @@ GBLREF uint4 user_id;
#include "min_max.h" /* needed for init_root_gv.h */
#include "init_root_gv.h"
#include "dse.h"
#ifdef UNIX
#include "mutex.h"
# include "mutex.h"
#endif
#include "wcs_flu.h"
#include <signal.h> /* for VSIG_ATOMIC_T */

View File

@ -121,7 +121,7 @@ boolean_t dse_b_dmp(void)
util_len += i2hexl_nofill(((blk_hdr_ptr_t)bp)->tn, &util_buff[util_len], 16);
memcpy(&util_buff[util_len], " ", 1);
util_len++;
ondsk_blkver = (!is_mm ? cr->ondsk_blkver : GDSV5);
ondsk_blkver = (!is_mm ? cr->ondsk_blkver : GDSV6);
len = STRLEN(gtm_dbversion_table[ondsk_blkver]);
memcpy(&util_buff[util_len], gtm_dbversion_table[ondsk_blkver], len);
util_len += len;
@ -183,7 +183,7 @@ boolean_t dse_b_dmp(void)
util_len += i2hexl_nofill(((blk_hdr_ptr_t)bp)->tn, &util_buff[util_len], 16);
memcpy(&util_buff[util_len], " ", 1);
util_len++;
ondsk_blkver = (!is_mm ? cr->ondsk_blkver : GDSV5);
ondsk_blkver = (!is_mm ? cr->ondsk_blkver : GDSV6);
len = STRLEN(gtm_dbversion_table[ondsk_blkver]);
memcpy(&util_buff[util_len], gtm_dbversion_table[ondsk_blkver], len);
util_len += len;

View File

@ -29,6 +29,9 @@
#include "op.h" /* for op_fnzdate and op_horolog prototype */
#include "wcs_recover.h" /* for wcs_recover prototype */
#include "wcs_phase2_commit_wait.h"
#include "sleep_cnt.h" /* for SIGNAL_WRITERS_TO_STOP/RESUME and WAIT_FOR_WRITERS_TO_STOP macro */
#include "memcoherency.h" /* for SIGNAL_WRITERS_TO_STOP/RESUME and WAIT_FOR_WRITERS_TO_STOP macro */
#include "wcs_sleep.h" /* for SIGNAL_WRITERS_TO_STOP/RESUME and WAIT_FOR_WRITERS_TO_STOP macro */
GBLREF gd_region *gv_cur_region;
GBLREF gd_addr *original_header;
@ -42,6 +45,8 @@ error_def(ERR_SIZENOTVALID4);
#define RECOVER_DONE "recovery complete (see operator log for details)"
#define RECOVER_NOT_APPLIC "recovery not applicable with MM access method"
error_def(ERR_SIZENOTVALID4);
void dse_cache(void)
{
boolean_t all_present, change_present, recover_present, show_present, verify_present, was_crit, is_clean;
@ -50,13 +55,13 @@ void dse_cache(void)
sgmnt_addrs *csa;
mval dollarh_mval, zdate_mval;
int4 size;
uint4 offset, value, old_value;
uint4 offset, value, old_value, lcnt;
char dollarh_buffer[MAXNUMLEN], zdate_buffer[SIZEOF(DSE_DMP_TIME_FMT)];
char temp_str[256], temp_str1[256];
sm_uc_ptr_t chng_ptr;
cache_rec_ptr_t cr_que_lo;
mmblk_rec_ptr_t mr_que_lo;
boolean_t is_mm, was_hold_onto_crit;
boolean_t is_mm, was_hold_onto_crit, wc_blocked_ok;
all_present = (CLI_PRESENT == cli_present("ALL"));
@ -98,23 +103,33 @@ void dse_cache(void)
{
GET_CURR_TIME_IN_DOLLARH_AND_ZDATE(dollarh_mval, dollarh_buffer, zdate_mval, zdate_buffer);
if (verify_present)
{ /* Before invoking wcs_verify, wait for any pending phase2 commits to finish.
* Need to wait as otherwise ongoing phase2 commits can result in cache verification
* returning FALSE (e.g. due to DBCRERR message indicating that cr->in_tend is non-zero).
{ /* Before invoking wcs_verify, wait for any pending phase2 commits to finish. Need to wait as
* otherwise ongoing phase2 commits can result in cache verification returning FALSE (e.g. due to
* DBCRERR message indicating that cr->in_tend is non-zero).
* Also, need to wait for concurrent writers to stop to avoid wcs_verify from incorrectly concluding
* that there is a problem with the active queue.
*/
wc_blocked_ok = UNIX_ONLY(TRUE) VMS_ONLY(!is_mm); /* MM on VMS doesn't support wcs_recvoer */
if (wc_blocked_ok)
SIGNAL_WRITERS_TO_STOP(csa->nl); /* done sooner to avoid any new writers starting up */
if (csa->nl->wcs_phase2_commit_pidcnt && !is_mm)
{ /* No need to check return value since even if it fails, we want to do cache verification */
wcs_phase2_commit_wait(csa, NULL);
}
is_clean = wcs_verify(reg, TRUE, FALSE); /* expect_damage is TRUE, caller_is_wcs_recover is FALSE */
if (wc_blocked_ok)
WAIT_FOR_WRITERS_TO_STOP(csa->nl, lcnt, MAXWTSTARTWAIT / 4); /* reduced wait time for DSE */
is_clean = wcs_verify(reg, FALSE, FALSE); /* expect_damage is FALSE, caller_is_wcs_recover is
* FALSE */
if (wc_blocked_ok)
SIGNAL_WRITERS_TO_RESUME(csa->nl);
} else
{
if (UNIX_ONLY(TRUE)VMS_ONLY(!is_mm))
{
SET_TRACEABLE_VAR(csa->hdr->wc_blocked, TRUE);
SET_TRACEABLE_VAR(csa->nl->wc_blocked, TRUE);
/* No need to invoke function "wcs_phase2_commit_wait" as "wcs_recover" does that anyways */
wcs_recover(reg);
assert(FALSE == csa->hdr->wc_blocked); /* wcs_recover() should have cleared this */
assert(FALSE == csa->nl->wc_blocked); /* wcs_recover() should have cleared this */
}
}
assert(20 == STR_LIT_LEN(DSE_DMP_TIME_FMT)); /* if they are not the same, the !20AD below should change */

View File

@ -66,7 +66,7 @@ void dse_chng_fhead(void)
{
int4 x, index_x, save_x;
unsigned short buf_len;
boolean_t was_crit, was_hold_onto_crit;
boolean_t was_crit, was_hold_onto_crit, corrupt_file_present;
boolean_t override = FALSE;
int4 nocrit_present;
int4 location_present, value_present, size_present, size;
@ -83,26 +83,32 @@ void dse_chng_fhead(void)
char hash_buff[GTMCRYPT_HASH_LEN];
int crypt_status;
)
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (gv_cur_region->read_only)
rts_error(VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(gv_cur_region));
memset(temp_str, 0, 256);
memset(temp_str1, 0, 256);
memset(buf, 0, MAX_LINE);
was_crit = cs_addrs->now_crit;
/* If the user requested DSE CHANGE -FILE -CORRUPT, then skip the check in grab_crit, which triggers an rts_error, as this
* is one of the ways of turning off the file_corrupt flag in the file header
*/
TREF(skip_file_corrupt_check) = corrupt_file_present = (CLI_PRESENT == cli_present("CORRUPT_FILE"));
nocrit_present = (CLI_NEGATED == cli_present("CRIT"));
DSE_GRAB_CRIT_AS_APPROPRIATE(was_crit, was_hold_onto_crit, nocrit_present, cs_addrs, gv_cur_region);
TREF(skip_file_corrupt_check) = FALSE; /* Now that grab_crit is done, reset the global variable */
if (CLI_PRESENT == cli_present("OVERRIDE"))
override = TRUE;
#ifdef VMS
# ifdef VMS
if (cs_addrs->hdr->freeze && (cs_addrs->hdr->freeze != process_id ||
cs_addrs->hdr->image_count != image_count) && !override)
#endif
#ifdef UNIX
# endif
# ifdef UNIX
if (cs_addrs->hdr->freeze && (cs_addrs->hdr->image_count != process_id)
&& !override)
#endif
# endif
{
DSE_REL_CRIT_AS_APPROPRIATE(was_crit, was_hold_onto_crit, nocrit_present, cs_addrs, gv_cur_region);
util_out_print("Region: !AD is frozen by another user, not releasing freeze.",
@ -260,6 +266,8 @@ void dse_chng_fhead(void)
}
if ((CLI_PRESENT == cli_present("KEY_MAX_SIZE")) && (cli_get_int("KEY_MAX_SIZE", &x)))
{
if (cs_addrs->hdr->max_key_size > x)
cs_addrs->hdr->maxkeysz_assured = FALSE;
cs_addrs->hdr->max_key_size = x;
gv_cur_region->max_key_size = x;
}
@ -431,7 +439,7 @@ void dse_chng_fhead(void)
if ( -1 != (x = cli_t_f_n("STDNULLCOLL")))
gv_cur_region->std_null_coll = cs_addrs->hdr->std_null_coll = x;
}
if (CLI_PRESENT == cli_present("CORRUPT_FILE"))
if (corrupt_file_present)
{
x = cli_t_f_n("CORRUPT_FILE");
if (1 == x)
@ -717,6 +725,18 @@ void dse_chng_fhead(void)
else
cs_addrs->hdr->yield_lmt = x;
}
if (CLI_PRESENT == cli_present("QDBRUNDOWN"))
{
cs_addrs->hdr->mumps_can_bypass = TRUE;
util_out_print("Database file !AD now has quick database rundown flag set to TRUE", TRUE,
gv_cur_region->dyn.addr->fname_len, (char *)gv_cur_region->dyn.addr->fname);
}
else if (CLI_NEGATED == cli_present("QDBRUNDOWN"))
{
cs_addrs->hdr->mumps_can_bypass = FALSE;
util_out_print("Database file !AD now has quick database rundown flag set to FALSE", TRUE,
gv_cur_region->dyn.addr->fname_len, (char *)gv_cur_region->dyn.addr->fname);
}
#endif
if (CLI_PRESENT == cli_present(UNIX_ONLY("JNL_SYNCIO") VMS_ONLY("JNL_CACHE")))
{

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,7 +42,7 @@ GBLREF gd_region *gv_cur_region;
GBLREF uint4 update_array_size;
GBLREF srch_hist dummy_hist;
GBLREF block_id patch_curr_blk;
GBLREF unsigned char patch_comp_count;
GBLREF unsigned short patch_comp_count;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF gd_addr *gd_header;
@ -58,6 +58,7 @@ void dse_chng_rhead(void)
uint4 x;
blk_segment *bs1, *bs_ptr;
int4 blk_seg_cnt, blk_size;
int tmp_cmpc;
srch_blk_status blkhist;
error_def(ERR_DBRDONLY);
@ -102,7 +103,7 @@ void dse_chng_rhead(void)
return;
}
GET_SHORT(new_rec.rsiz, &((rec_hdr_ptr_t)rp)->rsiz);
new_rec.cmpc = ((rec_hdr_ptr_t)rp)->cmpc;
SET_CMPC(&new_rec, EVAL_CMPC((rec_hdr_ptr_t)rp));
if (cli_present("CMPC") == CLI_PRESENT)
{
if (!cli_get_hex("CMPC", &x))
@ -110,7 +111,7 @@ void dse_chng_rhead(void)
t_abort(gv_cur_region, cs_addrs);
return;
}
if (x > 0x7f)
if (x >= MAX_KEY_SZ)
{
util_out_print("Error: invalid cmpc.",TRUE);
t_abort(gv_cur_region, cs_addrs);
@ -118,7 +119,7 @@ void dse_chng_rhead(void)
}
if (x > patch_comp_count)
util_out_print("Warning: specified compression count is larger than the current expanded key size.", TRUE);
new_rec.cmpc = x;
SET_CMPC(&new_rec, x);
chng_rec = TRUE;
}
if (cli_present("RSIZ") == CLI_PRESENT)

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -250,7 +250,17 @@ void dse_dmp_fhead (void)
UNIX_ONLY(
util_out_print(" Commit Wait Spin Count!12UL", TRUE, csd->wcs_phase2_commit_wait_spincnt);
)
util_out_print(" Database file encrypted !AD", TRUE, 5, csd->is_encrypted ? " TRUE" : "FALSE");
util_out_print(" Database file encrypted !AD", UNIX_ONLY(FALSE) VMS_ONLY(TRUE), 5,
csd->is_encrypted ? " TRUE" : "FALSE");
UNIX_ONLY(
util_out_print(" Inst Freeze on Error !AD", TRUE, 5, csd->freeze_on_fail ? " TRUE" : "FALSE");
)
UNIX_ONLY(
util_out_print(" Spanning Node Absent !AD", FALSE, 5, csd->span_node_absent ? " TRUE" : "FALSE");
)
UNIX_ONLY(
util_out_print(" Maximum Key Size Assured !AD", TRUE, 5, csd->maxkeysz_assured ? " TRUE" : "FALSE");
)
}
if (CLI_PRESENT == cli_present("ALL"))
{ /* Only dump if -/ALL as if part of above display */
@ -271,8 +281,14 @@ void dse_dmp_fhead (void)
util_out_print(" Write cache timer count 0x!XL", TRUE, cnl->wcs_timers);
util_out_print(" Free Global Buffers 0x!XL", FALSE, cnl->wc_in_free);
util_out_print(" wcs_wtstart pid count 0x!XL", TRUE, cnl->in_wtstart);
util_out_print(" Write Cache is Blocked !AD", FALSE, 5, (csd->wc_blocked ? " TRUE" : "FALSE"));
util_out_print(" Write Cache is Blocked !AD", FALSE, 5, (cnl->wc_blocked ? " TRUE" : "FALSE"));
util_out_print(" wcs_wtstart intent cnt 0x!XL", TRUE, cnl->intent_wtstart);
# ifdef UNIX
util_out_print(0, TRUE);
util_out_print(" Quick database rundown is active !AD", TRUE, 5, (csd->mumps_can_bypass ? " TRUE" : "FALSE"));
util_out_print(" Access control rundown bypasses !9UL", FALSE, cnl->dbrndwn_access_skip);
util_out_print(" FTOK rundown bypasses !10UL", TRUE, cnl->dbrndwn_ftok_skip);
# endif
new_line = FALSE;
for (index = 0; MAX_WTSTART_PID_SLOTS > index; index++)
{

View File

@ -38,7 +38,7 @@ void dse_f_key(void)
int size, size_root, root_path_count, count, util_len;
boolean_t found, was_crit, was_hold_onto_crit;
if (!dse_getki(&targ_key[0],&size,LIT_AND_LEN("KEY")))
if (!dse_getki(&targ_key[0], &size, LIT_AND_LEN("KEY")))
return;
patch_path_count = 1;
root_path[0] = get_dir_root();
@ -52,7 +52,7 @@ void dse_f_key(void)
was_crit = cs_addrs->now_crit;
nocrit_present = (CLI_NEGATED == cli_present("CRIT"));
DSE_GRAB_CRIT_AS_APPROPRIATE(was_crit, was_hold_onto_crit, nocrit_present, cs_addrs, gv_cur_region);
if (!dse_ksrch(root_path[0],&root_path[1],&root_offset[0],&targ_key_root[0],size_root))
if (!dse_key_srch(root_path[0], &root_path[1], &root_offset[0], &targ_key_root[0], size_root))
{
util_out_print("!/Key not found, no root present.!/",TRUE);
DSE_REL_CRIT_AS_APPROPRIATE(was_crit, was_hold_onto_crit, nocrit_present, cs_addrs, gv_cur_region);
@ -62,7 +62,7 @@ void dse_f_key(void)
patch_path_count = 1;
path[0] = ksrch_root;
patch_find_root_search = FALSE;
if (!dse_ksrch(path[0],&path[1],&offset[0],&targ_key[0],size))
if (!dse_key_srch(path[0], &path[1], &offset[0], &targ_key[0], size))
{ memcpy(util_buff,"!/Key not found, would be in block ",36);
util_len = 36;
util_len += i2hex_nofill(path[patch_path_count - 2], (uchar_ptr_t)&util_buff[util_len], 8);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -11,8 +11,8 @@
#include "mdef.h"
#include "gtm_string.h"
#include "mlkdef.h"
#include "gdsroot.h"
#include "gdsbt.h"
#include "gtm_facility.h"
@ -22,8 +22,27 @@
#include "cli.h"
#include "dse.h"
#include "gvsub2str.h"
#include "gdsblk.h"
#include "zshow.h"
#define COUNT_TRAILING_ZERO(NUM, WCP, TRAIL_ZERO) \
{ \
if (0 == NUM) \
*WCP++ = '0'; \
for (TRAIL_ZERO = 0; (NUM > 0) && (0 == (NUM % 10)); TRAIL_ZERO++, NUM /= 10) \
; \
}
#define OUTPUT_NUMBER(NUM, WCP, TRAIL_ZERO) \
{ \
for (rev_num = 0; NUM > 0; rev_num = (rev_num * 10 + NUM % 10), NUM /= 10) \
; \
for (; rev_num > 0; *WCP++ = (rev_num % 10 + ASCII_0), rev_num /= 10) \
; \
for (; TRAIL_ZERO > 0 ; *WCP++ = '0', TRAIL_ZERO--) \
; \
}
GBLREF enum dse_fmt dse_dmp_format;
GBLREF gd_region *gv_cur_region;
GBLREF char patch_comp_key[MAX_KEY_SZ + 1];
@ -35,6 +54,11 @@ boolean_t dse_fdmp(sm_uc_ptr_t data, int len)
{
unsigned char *key_char_ptr, *work_char_ptr;
int dest_len;
unsigned char *ret_addr;
boolean_t is_snblk=FALSE;
span_subs *ss_ptr; /*spanning node key pointer */
unsigned int snbid, offset, trail_zero, rev_num, num;
unsigned short blk_sz;
if (work_buff_length < ZWR_EXP_RATIO(gv_cur_region->max_rec_size))
{
@ -53,7 +77,7 @@ boolean_t dse_fdmp(sm_uc_ptr_t data, int len)
return FALSE;
}
key_char_ptr++;
if (*key_char_ptr)
if (SPAN_START_BYTE != *key_char_ptr) /*Global has subscript*/
{
*work_char_ptr++ = '(';
for (;;)
@ -67,12 +91,54 @@ boolean_t dse_fdmp(sm_uc_ptr_t data, int len)
for (; *key_char_ptr ; key_char_ptr++)
;
key_char_ptr++;
/* Check if this is spanning node if yes break out of the loop */
if (SPAN_START_BYTE == *key_char_ptr
&& (int)*(key_char_ptr + 1) >= SPAN_BYTE_MIN
&& (int)*(key_char_ptr + 2) >= SPAN_BYTE_MIN)
{
is_snblk = TRUE;
break;
}
if (*key_char_ptr)
*work_char_ptr++ = ',';
else
break;
}
*work_char_ptr++ = ')';
} else /*Spanning node without subscript*/
is_snblk = TRUE;
if (is_snblk)
{
ss_ptr = (span_subs *)key_char_ptr;
snbid = SPAN_GVSUBS2INT(ss_ptr);
key_char_ptr = key_char_ptr + SPAN_SUBS_LEN + 1; /* Move out of special subscript of spanning node */
blk_sz = gv_cur_region->dyn.addr->blk_size;
/* Decide the offset of the content of a block inside the value of spanning node*/
offset = (snbid) ? (blk_sz - (SIZEOF(blk_hdr) + SIZEOF(rec_hdr) + gv_cur_region->dyn.addr->reserved_bytes
+ (key_char_ptr - (uchar_ptr_t)patch_comp_key + 1))) * (snbid - 1) : 0 ;
ret_addr =(unsigned char *)memmove((void *)(work_buff+4), (void *)work_buff, (work_char_ptr - work_buff));
assert(*ret_addr == '^');
*work_buff = '$';
*(work_buff + 1) = 'z';
*(work_buff + 2) = 'e';
*(work_buff + 3) = '(';
/* length of "$ze(" is 4, so move the work_char_ptr by 4*/
work_char_ptr = work_char_ptr + 4;
*work_char_ptr++ = ',';
/* Dump the offset of the content of a block inside the value of spanning node */
num = snbid ? offset : 0;
COUNT_TRAILING_ZERO(num, work_char_ptr, trail_zero);
num = offset;
OUTPUT_NUMBER(num, work_char_ptr, trail_zero);
*work_char_ptr++ = ',';
/* Dump the length of the content of a block */
num = snbid ? len : 0;
COUNT_TRAILING_ZERO(num, work_char_ptr, trail_zero);
num = snbid ? len : 0;
OUTPUT_NUMBER(num, work_char_ptr, trail_zero);
*work_char_ptr++ = ')';
}
assert(MAX_ZWR_KEY_SZ >= work_char_ptr - work_buff);
if (GLO_FMT == dse_dmp_format)
@ -85,7 +151,13 @@ boolean_t dse_fdmp(sm_uc_ptr_t data, int len)
{
assert(ZWR_FMT == dse_dmp_format);
*work_char_ptr++ = '=';
format2zwr(data, len, work_char_ptr, &dest_len);
if(is_snblk && !snbid)
{
*work_char_ptr++ = '"';
*work_char_ptr++ = '"';
dest_len = 0;
} else
format2zwr(data, len, work_char_ptr, &dest_len);
if (!dse_fdmp_output(work_buff, (int4)(work_char_ptr + dest_len - work_buff)))
return FALSE;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -33,7 +33,7 @@
#ifdef GTM_TRIGGER
#include "hashtab_mname.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "gv_trigger.h" /* needed for INIT_ROOT_GVT */
#include "targ_alloc.h"
#endif
@ -55,8 +55,11 @@ int dse_getki(char *dst, int *len, char *qual, int qual_len)
short int max_key;
unsigned short buf_len;
int key_len, dlr_num, dlr_len;
int num;
unsigned char *ptr;
mval key_subsc;
sgmnt_addrs *csa;
span_subs subs;
buf_len = SIZEOF(buf);
if (!cli_get_str(qual, buf, &buf_len))
@ -71,7 +74,7 @@ int dse_getki(char *dst, int *len, char *qual, int qual_len)
}
if ((*src >= 'A' && *src <= 'Z') ||
(*src >= 'a' && *src <= 'z') ||
(*src == '%')) /* first letter must be an alphabet or % */
(*src == '%') || (*src == '#')) /* first letter must be an alphabet or % or # */
{
*temp_dst++ = *src++;
} else
@ -100,13 +103,13 @@ int dse_getki(char *dst, int *len, char *qual, int qual_len)
bot = (char *)&gv_currkey->base[0];
temp_dst = (char *)&gv_currkey->base[0] + gv_currkey->end;
max_key = gv_cur_region->max_key_size;
if (*src == '(')
if ('(' == *src)
{
src++;
for (;;)
{
key_subsc.mvtype = MV_STR;
if (*src == '$') /* may be a $char() */
if ('$' == *src) /* may be a $char() */
{
src++;
if ((dlr_len = parse_dlr_char(src, top, slit)) > 0)
@ -119,6 +122,26 @@ int dse_getki(char *dst, int *len, char *qual, int qual_len)
util_out_print("Error: invalid key.", TRUE);
return FALSE;
}
} else if ('#' == *src)
{ /*Special spanning global subscript*/
if ('S' != toupper(*(src + 1)) && 'P' != toupper(*(src + 2))
&& 'A' != toupper(*(src + 3)) && 'N' != toupper(*(src + 4)))
{
util_out_print("Error: invalid key.", TRUE);
return FALSE;
}
src = src + SPAN_SUBS_LEN + 1;
for (num = 0, src++; *src != ')'; num = (num * DECIMAL_BASE + (int)(*src++ - ASCII_0)))
;
ptr = gv_currkey->base + gv_currkey->end;
num = num - 1;
SPAN_INITSUBS(&subs, num);
SPAN_SUBSCOPY_SRC2DST(ptr, (unsigned char *)&subs);
ptr = ptr + SPAN_SUBS_LEN;
*ptr++ = KEY_DELIMITER;
*ptr = KEY_DELIMITER;
gv_currkey->end = ptr - gv_currkey->base;
break;
} else if (*src != '\"') /* numerical subscript */
{
for (key_subsc.str.addr = src ; *src != ')' && *src != ','; src++)

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -29,10 +29,12 @@
GBLREF short int patch_path_count;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF char patch_comp_key[MAX_KEY_SZ + 1];
GBLREF unsigned char patch_comp_count;
GBLREF unsigned short patch_comp_count;
GBLREF bool patch_find_root_search;
GBLDEF block_id ksrch_root;
error_def(ERR_DSEBLKRDFAIL);
int dse_ksrch(block_id srch,
block_id_ptr_t pp,
int4 *off,
@ -40,14 +42,14 @@ int dse_ksrch(block_id srch,
int targ_len)
{
sm_uc_ptr_t bp, b_top, rp, r_top, key_top, blk_id;
unsigned char cc;
unsigned short cc;
int tmp_cmpc;
int rsize;
ssize_t size;
int4 cmp;
short dummy_short;
unsigned short dummy_short;
int4 dummy_int;
cache_rec_ptr_t dummy_cr;
error_def(ERR_DSEBLKRDFAIL);
if(!(bp = t_qread(srch, &dummy_int, &dummy_cr)))
rts_error(VARLSTCNT(1) ERR_DSEBLKRDFAIL);
@ -84,13 +86,13 @@ int dse_ksrch(block_id srch,
if (((blk_hdr_ptr_t)bp)->levl && key_top > (blk_id = r_top - SIZEOF(block_id)))
key_top = blk_id;
if (((rec_hdr_ptr_t) rp)->cmpc > patch_comp_count)
if (EVAL_CMPC((rec_hdr_ptr_t)rp) > patch_comp_count)
cc = patch_comp_count;
else
cc = ((rec_hdr_ptr_t) rp)->cmpc;
cc = EVAL_CMPC((rec_hdr_ptr_t)rp);
size = (ssize_t)(key_top - rp - SIZEOF(rec_hdr));
if (size > SIZEOF(patch_comp_key) - 2 - cc)
size = SIZEOF(patch_comp_key) - 2 - cc;
if (size > MAX_KEY_SZ - cc)
size = MAX_KEY_SZ - cc;
if (size < 0)
size = 0;
memcpy(&patch_comp_key[cc], rp + SIZEOF(rec_hdr), size);
@ -118,5 +120,26 @@ int dse_ksrch(block_id srch,
&& dse_ksrch(*pp, pp + 1, off + 1, targ_key, targ_len))
return TRUE;
return FALSE;
}
int dse_key_srch(block_id srch, block_id_ptr_t key_path, int4 *off, char *targ_key, int targ_len)
{
int status = dse_ksrch(srch, key_path, off, targ_key, targ_len);
if(status)
return status;
else if(!patch_find_root_search)
{ /* We are not searching for the global name in the directory tree and search for the regular-key
* has failed. So, adjust to the input key with special subscript to indicate it as a spanning node key.
* call dse_ksrch() again.
*/
targ_len -= 1; /* back off 1 to overlay terminator */
SPAN_INITSUBS((span_subs *)(targ_key + targ_len), 0);
targ_len += SPAN_SUBS_LEN;
targ_key[targ_len++] = KEY_DELIMITER;
targ_key[targ_len++] = KEY_DELIMITER;
patch_path_count = 1; /*This indicates the length of the path of node in gvtree*/
patch_find_root_search = FALSE;
return(dse_ksrch(srch,key_path, off, targ_key, targ_len));
}
return FALSE;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -32,7 +32,7 @@ GBLREF block_id patch_path[MAX_BT_DEPTH + 1], patch_path1[MAX_BT_DEPTH + 1];
GBLREF bool patch_find_root_search;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF short int patch_path_count;
GBLREF unsigned char patch_comp_count;
GBLREF unsigned short patch_comp_count;
error_def(ERR_DSEBLKRDFAIL);
@ -44,7 +44,8 @@ int dse_order(block_id srch,
bool dir_data_blk)
{
sm_uc_ptr_t bp, b_top, key_top, ptr, rp, r_top;
unsigned char cc;
unsigned short cc;
int tmp_cmpc;
block_id last;
short int rsize, size;
int4 dummy_int;
@ -71,7 +72,7 @@ int dse_order(block_id srch,
r_top = rp + rsize;
if ((r_top > b_top) || (r_top == b_top && ((blk_hdr*)bp)->levl))
{
if ((SIZEOF(rec_hdr) + SIZEOF(block_id) != (b_top - rp)) || ((rec_hdr *)rp)->cmpc)
if ((SIZEOF(rec_hdr) + SIZEOF(block_id) != (b_top - rp)) || EVAL_CMPC((rec_hdr *)rp))
return FALSE;
if (dir_data_blk && !((blk_hdr_ptr_t)bp)->levl)
{
@ -92,10 +93,10 @@ int dse_order(block_id srch,
key_top = ptr;
} else
key_top = r_top - SIZEOF(block_id);
if (((rec_hdr_ptr_t)rp)->cmpc > patch_comp_count)
if (EVAL_CMPC((rec_hdr_ptr_t)rp) > patch_comp_count)
cc = patch_comp_count;
else
cc = ((rec_hdr_ptr_t)rp)->cmpc;
cc = EVAL_CMPC((rec_hdr_ptr_t)rp);
size = key_top - rp - SIZEOF(rec_hdr);
if ((SIZEOF(patch_comp_key) - 2 - cc) < size)
size = SIZEOF(patch_comp_key) - 2 - cc;

View File

@ -45,7 +45,7 @@ error_def(ERR_CTRLC);
void dse_range(void)
{
char lower[256], targ_key[256], upper[256], util_buff[MAX_UTIL_LEN];
char lower[MAX_KEY_SZ + 1], targ_key[MAX_KEY_SZ + 1], upper[MAX_KEY_SZ + 1], util_buff[MAX_UTIL_LEN];
block_id from, to, blk, blk_child;
sm_uc_ptr_t bp, b_top, key_bot, key_top, key_top1, rp, r_top;
char level;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -48,7 +48,7 @@ GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF block_id patch_curr_blk;
GBLREF char patch_comp_key[MAX_KEY_SZ + 1];
GBLREF unsigned char patch_comp_count;
GBLREF unsigned short patch_comp_count;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
@ -64,7 +64,8 @@ void dse_rmrec(void)
int4 count;
uchar_ptr_t lbp, b_top, rp, r_top, key_top, rp_base;
char comp_key[MAX_KEY_SZ + 1];
unsigned char cc, cc_base;
unsigned short cc, cc_base;
int tmp_cmpc;
short int size, i, rsize;
srch_blk_status blkhist;
@ -159,10 +160,10 @@ void dse_rmrec(void)
if (!*key_top++ && !*key_top++)
break;
}
if (((rec_hdr_ptr_t)rp)->cmpc > patch_comp_count)
if (EVAL_CMPC((rec_hdr_ptr_t)rp) > patch_comp_count)
cc = patch_comp_count;
else
cc = ((rec_hdr_ptr_t)rp)->cmpc;
cc = EVAL_CMPC((rec_hdr_ptr_t)rp);
size = key_top - rp - SIZEOF(rec_hdr);
if (size > SIZEOF(patch_comp_key) - 2 - cc)
size = SIZEOF(patch_comp_key) - 2 - cc;
@ -178,7 +179,7 @@ void dse_rmrec(void)
size = (patch_comp_count < cc_base) ? patch_comp_count : cc_base;
for (i = 0; i < size && patch_comp_key[i] == comp_key[i]; i++)
;
((rec_hdr_ptr_t)rp_base)->cmpc = i;
SET_CMPC((rec_hdr_ptr_t)rp_base, i);
rsize = r_top - key_top + SIZEOF(rec_hdr) + patch_comp_count - i;
PUT_SHORT(&((rec_hdr_ptr_t)rp_base)->rsiz, rsize);
memcpy(rp_base + SIZEOF(rec_hdr), &patch_comp_key[i], patch_comp_count - i);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -33,7 +33,7 @@
#ifdef GTM_TRIGGER
#include "hashtab_mname.h"
#include "rtnhdr.h" /* needed for gv_trigger.h */
#include <rtnhdr.h> /* needed for gv_trigger.h */
#include "gv_trigger.h" /* needed for INIT_ROOT_GVT */
#include "targ_alloc.h"
#endif
@ -45,7 +45,7 @@
GBLDEF bool wide_out;
GBLDEF char patch_comp_key[MAX_KEY_SZ + 1];
GBLDEF unsigned char patch_comp_count;
GBLDEF unsigned short patch_comp_count;
GBLDEF int patch_rec_counter;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF VSIG_ATOMIC_T util_interrupt;
@ -65,8 +65,9 @@ sm_uc_ptr_t dump_record(sm_uc_ptr_t rp, block_id blk, sm_uc_ptr_t bp, sm_uc_ptr
sm_uc_ptr_t r_top, key_top, cptr0, cptr1, cptr_top, cptr_base = NULL, cptr_next = NULL;
char key_buf[MAX_KEY_SZ + 1], *temp_ptr, *temp_key, util_buff[MAX_UTIL_LEN];
char *prefix_str, *space_str, *dot_str, *format_str;
unsigned char cc;
short int size;
unsigned short cc;
int tmp_cmpc;
unsigned short size;
int4 util_len, head;
uint4 ch;
int buf_len, field_width,fastate, chwidth = 0;
@ -79,7 +80,7 @@ sm_uc_ptr_t dump_record(sm_uc_ptr_t rp, block_id blk, sm_uc_ptr_t bp, sm_uc_ptr
return NULL;
head = cli_present("HEADER");
GET_SHORT(size, &((rec_hdr_ptr_t)rp)->rsiz);
cc = ((rec_hdr_ptr_t)rp)->cmpc;
cc = EVAL_CMPC((rec_hdr_ptr_t)rp);
if ((CLI_NEGATED != head) && !patch_is_fdmp)
{
MEMCPY_LIT(util_buff, "Rec:");
@ -96,7 +97,7 @@ sm_uc_ptr_t dump_record(sm_uc_ptr_t rp, block_id blk, sm_uc_ptr_t bp, sm_uc_ptr
util_len += i2hex_nofill(size, (uchar_ptr_t)&util_buff[util_len], 4);
MEMCPY_LIT(&util_buff[util_len], " Cmpc ");
util_len += SIZEOF(" Cmpc ") - 1;
util_len += i2hex_nofill(cc, (uchar_ptr_t)&util_buff[util_len], 2);
util_len += i2hex_nofill(cc, (uchar_ptr_t)&util_buff[util_len], 3);
MEMCPY_LIT(&util_buff[util_len], " ");
util_len += SIZEOF(" ") - 1;
util_buff[util_len] = 0;
@ -120,8 +121,6 @@ sm_uc_ptr_t dump_record(sm_uc_ptr_t rp, block_id blk, sm_uc_ptr_t bp, sm_uc_ptr
size = key_top - rp - SIZEOF(rec_hdr);
if (size > SIZEOF(patch_comp_key) - 2 - cc)
size = SIZEOF(patch_comp_key) - 2 - cc;
if (size < 0)
size = 0;
memcpy(&patch_comp_key[cc], rp + SIZEOF(rec_hdr), size);
patch_comp_count = cc + size;
patch_comp_key[patch_comp_count] = patch_comp_key[patch_comp_count + 1] = 0;
@ -147,7 +146,7 @@ sm_uc_ptr_t dump_record(sm_uc_ptr_t rp, block_id blk, sm_uc_ptr_t bp, sm_uc_ptr
}
util_out_print("Key ", FALSE);
if (r_top == b_top
&& ((blk_hdr_ptr_t)bp)->levl && !((rec_hdr_ptr_t)rp)->cmpc
&& ((blk_hdr_ptr_t)bp)->levl && !EVAL_CMPC((rec_hdr_ptr_t)rp)
&& r_top - rp == SIZEOF(rec_hdr) + SIZEOF(block_id))
util_out_print("*", FALSE);
else if (patch_comp_key[0])

View File

@ -14,7 +14,7 @@
#include "gtm_string.h" /* for memcpy() */
#include "min_max.h" /* for MIN macro */
#include "rtnhdr.h" /* for stack_frame.h */
#include <rtnhdr.h> /* for stack_frame.h */
#include "stack_frame.h" /* for stack_frame type */
#include "error_trap.h"

View File

@ -11,7 +11,7 @@
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "error.h" /* for ERROR_RTN */
#include "error_trap.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -256,21 +256,13 @@
* changes its state unless invoked with WNOHANG bit set. Make sure not waiting on current pid \
*/ \
assert(0 != PID); \
assert(getpid() != PID); \
assert(getpid() != PID); \
do \
{ \
RC = waitpid(PID, STATUS, OPTS); \
} while(-1 == RC && EINTR == errno); \
}
#define WRITE_FILE(FD, BUF, SIZE, RC) \
{ \
do \
{ \
RC = write(FD, BUF, SIZE); \
} while(-1 == RC && EINTR == errno); \
}
#define GTM_FSYNC(FD, RC) \
{ \
do \

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -25,7 +25,7 @@
#include "vxt.h"
#include "cgp.h"
#include "obj_gen.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "obj_file.h"
#include "list_file.h"
#include "min_max.h"
@ -121,6 +121,10 @@ static boolean_t ocnt_ref_seen = FALSE;
static oprtype *ocnt_ref_opr;
static triple *current_triple;
error_def(ERR_MAXARGCNT);
error_def(ERR_SRCNAM);
error_def(ERR_UNIMPLOP);
void trip_gen (triple *ct)
{
oprtype **sopr, *opr; /* triple operand */
@ -135,13 +139,9 @@ void trip_gen (triple *ct)
short repcnt;
int off;
error_def (ERR_UNIMPLOP);
error_def (ERR_MAXARGCNT);
# if !defined(TRUTH_IN_REG) && (!(defined(__osf__) || defined(__x86_64__) || defined(Linux390)))
GTMASSERT;
# endif
DEBUG_ONLY(opcode_emitted = FALSE);
current_triple = ct; /* save for possible use by internal rtns */
tp = ttt[ct->opcode];
@ -150,11 +150,9 @@ void trip_gen (triple *ct)
stx_error(ERR_UNIMPLOP);
return;
}
code_idx = 0;
vax_pushes_seen = 0;
vax_number_of_arguments = 0;
if (cg_phase_last != cg_phase)
{
cg_phase_last = cg_phase;
@ -163,7 +161,6 @@ void trip_gen (triple *ct)
else
reset_push_list_ptr();
}
code_reference = ct->rtaddr;
oct = oc_tab[ct->opcode].octype;
sopr = &saved_opr[0];
@ -185,7 +182,6 @@ void trip_gen (triple *ct)
opr++;
}
*sopr = 0;
jmp_offset = 0;
if (oct & OCT_JUMP || ct->opcode == OC_LDADDR || ct->opcode == OC_FORLOOP)
{
@ -268,7 +264,6 @@ void trip_gen (triple *ct)
tsp = &ttt[tp];
} else
tsp = &ttt[tp];
for (; *tsp != VXT_END;)
{
if (*tsp == VXT_IREPAB || *tsp == VXT_IREPL)
@ -282,7 +277,6 @@ void trip_gen (triple *ct)
assert(irep_opr->oprclass == TRIP_REF);
irep_opr = &irep_opr->oprval.tref->operand[1];
}
if (irep_opr->oprclass == TRIP_REF)
{
repl = tsp;
@ -308,9 +302,8 @@ void trip_gen (triple *ct)
if (cg_phase == CGP_ASSEMBLY)
emit_asmlist(ct);
# endif
}/* else */
}/* for */
} /* else */
} /* for */
if (cg_phase == CGP_APPROX_ADDR)
if (vax_pushes_seen > 0)
add_to_vax_push_list(vax_pushes_seen);
@ -368,7 +361,6 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
int branch_idx, branch_offset, loop_top_idx, instr;
code_idx = 0;
switch (cg_phase)
{
case CGP_ASSEMBLY:
@ -415,7 +407,6 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
case VXI_BLBS:
assert(*inst == VXT_REG);
inst++;
# ifdef TRUTH_IN_REG
reg = GTM_REG_CODEGEN_TEMP;
NON_GTM64_ONLY(GEN_LOAD_WORD(reg, gtm_reg(*inst++), 0);)
@ -448,7 +439,6 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
case VXI_BRW:
emit_jmp(GENERIC_OPCODE_BR, &inst, 0);
break;
case VXI_BICB2:
# ifdef TRUTH_IN_REG
GEN_CLEAR_TRUTH;
@ -590,7 +580,7 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
assert(*inst == VXT_XFER);
inst++;
emit_call_xfer((int)*inst++);
/* Callee may have popped some values so we can't count on anything left on the stack. */
/* Callee may have popped some values so we can't count on anything left on the stack. */
stack_depth = 0;
break;
case VXI_MOVAB:
@ -626,7 +616,6 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
its present size and affect other platforms some day, We put the whole code gen
thing in a loop so we can do this regardless of how big it gets.
*/
assert(*inst == VXT_LIT);
inst += 2;
assert(*inst == VXT_VAL);
@ -635,7 +624,6 @@ short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
assert(*inst == VXT_VAL);
inst++;
emit_trip(*(fst_opr + *inst++), TRUE, GENERIC_OPCODE_LDA, MOVC3_TRG_REG);
# if defined(__MVS__) || defined(Linux390)
/* The MVC instruction on zSeries facilitates memory copy(mval in this case) in a single
* instruction instead of multiple 8/4 byte copies.
@ -868,10 +856,8 @@ void emit_jmp (uint4 branchop, short **instp, int reg)
assert((jmp_offset & 3) == 0);
# endif
branch_offset = jmp_offset / INST_SIZE;
/* Some platforms have a different origin for the offset */
EMIT_JMP_ADJUST_BRANCH_OFFSET;
switch (cg_phase)
{
# ifdef DEBUG
@ -954,7 +940,6 @@ void emit_jmp (uint4 branchop, short **instp, int reg)
code_buf[code_idx++] = GENERIC_OPCODE_NOP;
branch_offset--;
# endif
}
if (EMIT_JMP_LONG_CODE_CHECK)
{ /* This is more common unconditional branch generation and should be mutually
@ -1015,7 +1000,6 @@ void emit_pcrel(void)
int branch_offset;
jmp_offset -= INTCAST((char *)&code_buf[code_idx] - (char *)&code_buf[0]);
switch (cg_phase)
{
# ifdef DEBUG
@ -1054,9 +1038,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
triple *ct;
int low, extra, high;
GTM64_ONLY(int next_ptr_offset = 8;)
error_def(ERR_SRCNAM);
if (opr->oprclass == TRIP_REF)
{
ct = opr->oprval.tref;
@ -1064,7 +1045,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
opr = &ct->destination;
/* else lit or error */
}
inst_emitted = FALSE;
switch (cg_phase)
{
@ -1079,7 +1059,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
{
case OC_LIT:
assert(ct->operand[0].oprclass == MLIT_REF);
if (run_time)
reg = GTM_REG_PV;
else
@ -1216,7 +1195,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
}
}
break;
case OCNT_REF:
/* This ref's value is calculated in emit_call_xfer(). This value is related to TSIZ_REF
in that it is used for the same reason to different calls (op_call, op_callsp,
@ -1323,7 +1301,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
break;
}
break;
case TINT_REF:
case TVAL_REF:
assert(val_output);
@ -1360,7 +1337,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
)
emit_base_offset(GTM_REG_FRAME_TMP_PTR, offset);
break;
case TCAD_REF:
case TVAD_REF:
case TVAR_REF:
@ -1405,7 +1381,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
REVERT_GENERICINST_TO_WORD(generic_inst);
}
)
emit_base_offset(reg, offset);
if (val_output) /* indirection */
{
@ -1430,7 +1405,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
}
}
break;
case OCNT_REF:
immediate = opr->oprval.offset;
assert(0 < immediate);
@ -1498,7 +1472,13 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
break;
case OC_TRIPSIZE:
immediate = ct->operand[0].oprval.tsize->size;
# if !defined(__osf__) && !defined(__hppa)
/* Legitimate but odd call to next M line on Tru64 and HPUX-HPPA gives an
* immediate value of zero because of how offsets are calculated on
* these platforms so bypass the assert for them.
*/
assert(0 < immediate);
# endif
assert(MAX_BRANCH_CODEGEN_SIZE > immediate);
EMIT_TRIP_ILIT_GEN;
inst_emitted = TRUE;
@ -1508,7 +1488,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
break;
}
break;
case TINT_REF:
case TVAL_REF:
assert(val_output);
@ -1528,7 +1507,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
)
emit_base_offset(GTM_REG_FRAME_TMP_PTR, offset);
break;
case TCAD_REF:
case TVAD_REF:
case TVAR_REF:
@ -1541,7 +1519,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
REVERT_GENERICINST_TO_WORD(generic_inst);
}
)
NON_GTM64_ONLY(
if (offset < 0 || offset > MAX_OFFSET)
GTMASSERT;
@ -1573,7 +1550,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
}
}
break;
case OCNT_REF:
immediate = opr->oprval.offset;
assert(0 <= immediate);
@ -1583,7 +1559,6 @@ void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
ocnt_ref_seen = TRUE;
ocnt_ref_opr = opr;
break;
default:
GTMASSERT;
break;
@ -1647,18 +1622,15 @@ int get_arg_reg(void)
else
arg_reg_i = GTM_REG_ACCUM;
break;
case CGP_ASSEMBLY:
case CGP_MACHINE:
if (vax_pushes_seen == 0) /* first push of a series */
vax_number_of_arguments = next_vax_push_list();
if (vax_number_of_arguments <= MACHINE_REG_ARGS)
arg_reg_i = GET_ARG_REG(vax_number_of_arguments - 1);
else
arg_reg_i = GTM_REG_ACCUM;
break;
default:
GTMASSERT;
break;
@ -1686,7 +1658,6 @@ int gtm_reg(int vax_reg)
case 9:
reg = GTM_REG_FRAME_TMP_PTR;
break;
# ifdef TRUTH_IN_REG
case 10:
/* The value of $TEST is maintained in r10 for the VAX GT.M
@ -1698,7 +1669,6 @@ int gtm_reg(int vax_reg)
reg = GTM_REG_DOLLAR_TRUTH;
break;
# endif
case 11:
reg = GTM_REG_XFER_TABLE;
break;
@ -1709,7 +1679,6 @@ int gtm_reg(int vax_reg)
GTMASSERT;
break;
}
return reg;
}
@ -1733,7 +1702,6 @@ void emit_push(int reg)
)
}
break;
case CGP_ASSEMBLY:
case CGP_MACHINE:
if (vax_number_of_arguments <= MACHINE_REG_ARGS)
@ -1745,12 +1713,10 @@ void emit_push(int reg)
GEN_STORE_ARG(reg, stack_offset); /* Store arg on stack */
}
break;
default:
GTMASSERT;
break;
}
if (cg_phase == CGP_MACHINE || cg_phase == CGP_ASSEMBLY)
{
vax_number_of_arguments--; /* actually, it's the number of arguments remaining */
@ -1776,13 +1742,9 @@ void emit_pop(int count)
void add_to_vax_push_list(int pushes_seen)
{
error_def(ERR_MAXARGCNT);
/* Make sure there's enough room */
{ /* Make sure there's enough room */
if (pushes_seen > MAX_ARGS)
rts_error(VARLSTCNT(3) ERR_MAXARGCNT, 1, MAX_ARGS);
push_list_index++;
if (push_list_index >= PUSH_LIST_SIZE)
{
@ -1808,7 +1770,6 @@ int next_vax_push_list(void)
GTMASSERT;
current_push_list_ptr = current_push_list_ptr->next;
}
return (current_push_list_ptr->value[push_list_index]);
}
@ -1860,7 +1821,6 @@ void emit_call_xfer(int xfer)
*obpt++ = ' ';
}
# endif
assert(0 == (xfer & 0x3));
offset = (int)(xfer / SIZEOF(char *));
# ifdef __x86_64__
@ -1872,7 +1832,6 @@ void emit_call_xfer(int xfer)
GEN_LOAD_IMMED(I386_REG_RAX, 0);
}
# endif /* __x86_64__ */
# ifdef __ia64
if (GTM_ASM_RTN == xfer_table_desc[offset])
{
@ -1889,7 +1848,6 @@ void emit_call_xfer(int xfer)
/* In the normal case we will return */
if (!ocnt_ref_seen)
return; /* fast test for return .. we hope */
/* If ocnt_ref_seen is set, then we need to compute the value to be used by a recent
OCNT_REF parameter. This parameter is (currently as of 6/2003) used by op_call, op_callsp,
op_forlcldo, and their mprof counterparts and is the number of bytes those entry points

View File

@ -12,7 +12,7 @@
#ifndef EMIT_CODE_INCLUDED
#define EMIT_CODE_INCLUDED
#include "emit_code_sp.h"
#include <emit_code_sp.h>
#ifdef DEBUG
void emit_asmlist(triple *ct);

View File

@ -20,7 +20,7 @@
#include "mlabel2xtern.h"
#include "mrout2xtern.h"
#include "gtmimagename.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
GBLREF stack_frame *frame_pointer;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -50,6 +50,7 @@ typedef struct err_ctl_struct
#ifdef DEBUG_ERRHND
# define DBGEHND(x) DBGFPF(x)
# define DBGEHND_ONLY(x) x
# include "gtm_stdio.h"
#else
# define DBGEHND(x)
# define DBGEHND_ONLY(x)
@ -71,6 +72,7 @@ CONDITION_HANDLER(gds_rundown_ch);
CONDITION_HANDLER(gtcm_ch);
CONDITION_HANDLER(gtcm_exi_ch);
CONDITION_HANDLER(gtm_env_xlate_ch);
CONDITION_HANDLER(gtm_maxstr_ch);
CONDITION_HANDLER(gtmrecv_ch);
CONDITION_HANDLER(gtmrecv_fetchresync_ch);
CONDITION_HANDLER(gtmsource_ch);
@ -78,11 +80,12 @@ CONDITION_HANDLER(gvcmy_open_ch);
CONDITION_HANDLER(gvcmz_netopen_ch);
CONDITION_HANDLER(gvzwrite_ch);
CONDITION_HANDLER(hashtab_rehash_ch);
CONDITION_HANDLER(jobexam_dump_ch);
CONDITION_HANDLER(iob_io_error);
CONDITION_HANDLER(io_init_ch);
CONDITION_HANDLER(iob_io_error);
CONDITION_HANDLER(iomt_ch);
CONDITION_HANDLER(jnl_file_autoswitch_ch);
CONDITION_HANDLER(job_init_ch);
CONDITION_HANDLER(jobexam_dump_ch);
CONDITION_HANDLER(lastchance1);
CONDITION_HANDLER(lastchance2);
CONDITION_HANDLER(lastchance3);
@ -106,7 +109,6 @@ CONDITION_HANDLER(trans_code_ch);
CONDITION_HANDLER(updproc_ch);
CONDITION_HANDLER(util_base_ch);
CONDITION_HANDLER(util_ch);
CONDITION_HANDLER(gtm_maxstr_ch);
CONDITION_HANDLER(zshow_ch);
CONDITION_HANDLER(zyerr_ch);

View File

@ -14,7 +14,7 @@
#include "gtm_stdio.h"
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "mprof.h"
#include "error.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -29,15 +29,15 @@ int expr(oprtype *a, int m_type)
}
coerce(a, (MUMPS_INT == m_type) ? OCT_MINT : OCT_MVAL);
ex_tail(a);
if (TREF(expr_start) != TREF(expr_start_orig))
if (TREF(expr_start) != TREF(expr_start_orig) && (OC_NOOP != (TREF(expr_start))->opcode))
{
assert(TREF(shift_side_effects));
assert((OC_GVSAVTARG == (TREF(expr_start))->opcode));
if ((OC_GVSAVTARG == (TREF(expr_start))->opcode) && (GTM_BOOL == TREF(gtm_fullbool)))
if ((OC_GVSAVTARG == (TREF(expr_start))->opcode) && ((GTM_BOOL == TREF(gtm_fullbool)) || !TREF(saw_side_effect)))
{
if ((OC_GVRECTARG != (TREF(curtchain))->exorder.bl->opcode)
|| ((TREF(curtchain))->exorder.bl->operand[0].oprval.tref != TREF(expr_start)))
newtriple(OC_GVRECTARG)->operand[0] = put_tref(TREF(expr_start));
|| ((TREF(curtchain))->exorder.bl->operand[0].oprval.tref != TREF(expr_start)))
newtriple(OC_GVRECTARG)->operand[0] = put_tref(TREF(expr_start));
}
}
if (!(--(TREF(expr_depth))))

View File

@ -42,21 +42,6 @@ LITREF mval literal_null;
#define f_char f_zchar
#endif
#define ENCOUNTERED_SIDE_EFFECT \
{ /* Needs #include "show_source_line" and #include "fullbool.h" */ \
char source_line_buff[MAX_SRCLINE + SIZEOF(ARROW)]; \
\
if (TREF(shift_side_effects)) \
{ \
TREF(saw_side_effect) = TRUE; \
if (!run_time && (FULL_BOOL_WARN == TREF(gtm_fullbool))) \
{ /* warnings requested by by gtm_fullbool and enabled by eval_expr */ \
show_source_line(source_line_buff, SIZEOF(source_line_buff), TRUE); \
dec_err(VARLSTCNT(1) ERR_BOOLSIDEFFECT); \
} \
} \
}
/* note that svn_index array provides indexes into this array for each letter of the
* alphabet so changes here should be reflected there.
*/

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -38,7 +38,7 @@ static int4 num_records;
/* callers please set up the proper condition-handlers */
/* expects a null-terminated ext_buff. does the equivalent but inverse of jnl2ext */
char *ext2jnlcvt(char *ext_buff, int4 ext_len, jnl_record *rec)
char *ext2jnlcvt(char *ext_buff, int4 ext_len, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved_strm_seqno)
{
char *ext_next;
jnl_record *temp_rec;
@ -47,7 +47,7 @@ char *ext2jnlcvt(char *ext_buff, int4 ext_len, jnl_record *rec)
for ( ; (NULL != (ext_next = strchr(ext_buff, '\n'))); )
{
*ext_next++ = '\0';
rec = (jnl_record *)ext2jnl(ext_buff, rec);
rec = (jnl_record *)ext2jnl(ext_buff, rec, saved_jnl_seqno, saved_strm_seqno);
assert(0 == (INTPTR_T)rec % JNL_REC_START_BNDRY);
if (ext_stop == ext_buff)
break;
@ -62,19 +62,18 @@ char *ext2jnlcvt(char *ext_buff, int4 ext_len, jnl_record *rec)
/* expects a single null-terminated ptr (equivalent to one line in the extract-file) */
char *ext2jnl(char *ptr, jnl_record *rec)
char *ext2jnl(char *ptr, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved_strm_seqno)
{
unsigned char *pool_save, ch, chtmp;
int keylength, keystate, len, i, reclen, temp_reclen;
char *val_off;
int keylength, keystate, len, i, reclen, temp_reclen, val_len;
bool keepgoing;
mstr src, des;
jnl_record *temp_rec;
muextract_type exttype;
enum jnl_record_type rectype;
jrec_suffix *suffix;
seq_num strm_seqno;
uint4 nodeflags;
uint4 strm_num;
DEBUG_ONLY(uint4 tcom_num = 0;)
ext_stop = ptr + strlen(ptr) + 1;
@ -89,11 +88,10 @@ char *ext2jnl(char *ptr, jnl_record *rec)
if (in_tp)
{
if (0 == num_records)
{
num_records++;
rec->prefix.jrec_type = JRT_TSET;
} else
else
rec->prefix.jrec_type = JRT_USET;
num_records++;
} else
rec->prefix.jrec_type = JRT_SET;
break;
@ -102,11 +100,10 @@ char *ext2jnl(char *ptr, jnl_record *rec)
if (in_tp)
{
if (0 == num_records)
{
num_records++;
rec->prefix.jrec_type = JRT_TKILL;
} else
else
rec->prefix.jrec_type = JRT_UKILL;
num_records++;
} else
rec->prefix.jrec_type = JRT_KILL;
break;
@ -115,11 +112,10 @@ char *ext2jnl(char *ptr, jnl_record *rec)
if (in_tp)
{
if (0 == num_records)
{
num_records++;
rec->prefix.jrec_type = JRT_TZKILL;
} else
else
rec->prefix.jrec_type = JRT_UZKILL;
num_records++;
} else
rec->prefix.jrec_type = JRT_ZKILL;
break;
@ -129,11 +125,10 @@ char *ext2jnl(char *ptr, jnl_record *rec)
if (in_tp)
{
if (0 == num_records)
{
num_records++;
rec->prefix.jrec_type = JRT_TZTWORM;
} else
else
rec->prefix.jrec_type = JRT_UZTWORM;
num_records++;
} else
GTMASSERT; /* ZTWORMHOLE should always been seen only inside a TP fence */
break;
@ -141,11 +136,10 @@ char *ext2jnl(char *ptr, jnl_record *rec)
if (in_tp)
{
if (0 == num_records)
{
num_records++;
rec->prefix.jrec_type = JRT_TZTRIG;
} else
else
rec->prefix.jrec_type = JRT_UZTRIG;
num_records++;
} else
GTMASSERT; /* ZTRIGGER should always been seen only inside a TP fence */
break;
@ -204,15 +198,12 @@ char *ext2jnl(char *ptr, jnl_record *rec)
assert(NULL != ptr);
ptr = strtok(NULL, "\\"); /* get the token/jnl_seqno field */
assert(NULL != ptr);
rec->jrec_null.jnl_seqno = asc2l((uchar_ptr_t)ptr,STRLEN(ptr));
rec->jrec_null.jnl_seqno = saved_jnl_seqno;
ptr = strtok(NULL, "\\"); /* get the strm_num field */
assert(NULL != ptr);
strm_num = asc2l((uchar_ptr_t)ptr,STRLEN(ptr));
ptr = strtok(NULL, "\\"); /* get the strm_seqno field */
assert(NULL != ptr);
strm_seqno = asc2l((uchar_ptr_t)ptr,STRLEN(ptr));
UNIX_ONLY(rec->jrec_null.strm_seqno = SET_STRM_INDEX(strm_seqno, strm_num);)
VMS_ONLY(rec->jrec_null.strm_seqno = strm_seqno;)
rec->jrec_null.strm_seqno = saved_strm_seqno;
switch(exttype)
{
case MUEXT_NULL:
@ -234,7 +225,7 @@ char *ext2jnl(char *ptr, jnl_record *rec)
ptr = strtok(NULL, "\\"); /* get the update_num field */
assert(NULL != ptr);
assert(OFFSETOF(struct_jrec_upd, update_num) == OFFSETOF(struct_jrec_ztworm, update_num));
rec->jrec_set_kill.update_num = asc2i((uchar_ptr_t)ptr, STRLEN(ptr));
rec->jrec_set_kill.update_num = num_records;
if (MUEXT_ZTWORM != exttype)
{
ptr = strtok(NULL, "\\"); /* get the nodeflags field */
@ -247,8 +238,8 @@ char *ext2jnl(char *ptr, jnl_record *rec)
{
assert(IS_SET_KILL_ZKILL_ZTRIG(rectype));
len = STRLEN(ptr);
keylength = zwrkeylength(ptr, len); /* determine length of key */
val_off = ptr;
keylength = zwrkeyvallen(ptr, len, &val_off, &val_len, NULL, NULL); /* determine length of key */
REPL_DPRINT2("ext2jnl source:KEY=DATA:%s\n", ptr);
assert(keylength <= len);
str2gvkey_nogvfunc(ptr, keylength, gv_currkey);
@ -266,8 +257,8 @@ char *ext2jnl(char *ptr, jnl_record *rec)
return (char_ptr_t)rec + reclen;
}
/* we have to get the data value now */
src.len = len - keylength - 1;
src.addr = ptr + (keylength + 1);
src.len = val_len;
src.addr = val_off;
} else
{ /* ZTWORMHOLE */
assert(IS_ZTWORM(rectype));

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -44,8 +44,7 @@ int f_next(oprtype *a, opctype op)
ref = TREF(shift_side_effects) ? TREF(expr_start) : (TREF(curtchain))->exorder.bl;
if (!gvn())
return FALSE;
/* the following assumes OC_LIT and OC_GVNAME are all one
* gets for an unsubscripted global variable reference */
/* the following assumes OC_LIT and OC_GVNAME are all one gets for an unsubscripted global variable reference */
if ((TREF(shift_side_effects) ? TREF(expr_start) : TREF(curtchain))->exorder.bl->exorder.bl->exorder.bl == ref)
{
stx_error(ERR_GVNEXTARG);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -17,7 +17,7 @@
#include "mdq.h"
#include "fullbool.h"
error_def (ERR_VAREXPECTED);
error_def(ERR_VAREXPECTED);
int f_query(oprtype *a, opctype op)
{

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -16,6 +16,7 @@
#include "mdq.h"
#include "mmemory.h"
#include "advancewindow.h"
#include "fullbool.h"
error_def(ERR_COLON);
error_def(ERR_SELECTFALSE);
@ -41,7 +42,7 @@ int f_select(oprtype *a, opctype op)
TREF(saw_side_effect) = FALSE;
TREF(expr_depth) = 0;
TREF(expr_start) = TREF(expr_start_orig) = NULL;
if (save_shift)
if ((save_shift) && ((GTM_BOOL == TREF(gtm_fullbool)) || !save_saw_side))
{
dqinit(&tmpchain, exorder);
oldchain = setcurtchain(&tmpchain);
@ -115,7 +116,7 @@ int f_select(oprtype *a, opctype op)
TREF(expr_depth) = save_depth;
TREF(expr_start) = save_start;
TREF(expr_start_orig) = save_start_orig;
if (save_shift)
if ((save_shift) && ((GTM_BOOL == TREF(gtm_fullbool)) || !save_saw_side))
{
newtriple(OC_GVSAVTARG);
setcurtchain(oldchain);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *

View File

@ -17,7 +17,7 @@
#include "gtm_string.h"
#include "stringpool.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "lv_val.h" /* needed by "fgncal.h" */
#include "fgncal.h"

View File

@ -15,7 +15,7 @@
#include "lv_val.h" /* needed by "fgncal.h" */
#include "fgncal.h"
#include "valid_mname.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
GBLREF symval *curr_symval;

View File

@ -10,7 +10,7 @@
****************************************************************/
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "tp_frame.h"
#include "error.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2003, 2005 Fidelity Information Services, Inc *
* Copyright 2003, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -13,5 +13,6 @@
#define FILE_HEAD_WRITE_INCLUDED
boolean_t file_head_write(char *, sgmnt_data_ptr_t, int4);
boolean_t file_head_write_secshr(char *, sgmnt_data_ptr_t, int4);
#endif /* FILE_HEAD_WRITE_INCLUDED */

View File

@ -13,7 +13,7 @@
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "cmd_qlf.h"
#include "gtm_caseconv.h"
#include "min_max.h"

View File

@ -10,7 +10,7 @@
****************************************************************/
#include "mdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
GBLREF unsigned char *stackbase, *stacktop;

View File

@ -16,7 +16,7 @@
#include "iotimer.h"
#include "iotcpdef.h"
#include "iosocketdef.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "mv_stent.h"
#include "find_mvstent.h"
#include "stack_frame.h"

View File

@ -12,7 +12,7 @@
#include "mdef.h"
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "ident.h"
#include "min_max.h"

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -14,7 +14,7 @@
#include "gtm_stdio.h"
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "mv_stent.h"
#include "objlabel.h"
#include "cache.h"
@ -65,9 +65,9 @@ void flush_jmp (rhdtyp *rtn_base, unsigned char *context, unsigned char *transfe
*/
assert(!(frame_pointer->flags & SFF_ETRAP_ERR) || (NULL == error_frame) || (error_frame == frame_pointer));
assert(!(SFT_TRIGR & frame_pointer->type));
frame_pointer->flags &= SFF_ETRAP_ERR_OFF; /* clear the SFF_ETRAP_ERR bit */
frame_pointer->flags &= SFF_TRIGR_CALLD_OFF; /* clear the SFF_TRIGR_CALLD bit since this frame is being rewritten */
GTMTRIG_ONLY(DBGTRIGR((stderr, "flush_jmp: Turrning off SFF_TRIGR_CALLD in frame 0x"lvaddr"\n", frame_pointer)));
frame_pointer->flags &= SFF_ETRAP_ERR_OFF; /* clear SFF_ETRAP_ERR bit */
frame_pointer->flags &= SFF_IMPLTSTART_CALLD_OFF; /* clear SFF_IMPLTSTART_CALLD bit since this frame is being rewritten */
GTMTRIG_ONLY(DBGTRIGR((stderr, "flush_jmp: Turrning off SFF_IMPLTSTART_CALLD_OFF in frame 0x"lvaddr"\n", frame_pointer)));
frame_pointer->rvector = rtn_base;
frame_pointer->vartab_ptr = (char *)VARTAB_ADR(rtn_base);
frame_pointer->vartab_len = frame_pointer->rvector->vartab_len;

View File

@ -29,7 +29,7 @@
#include "gtm_string.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "lv_val.h"
#include "min_max.h"

View File

@ -42,7 +42,7 @@
/* The define of CHEXPAND below causes error.h to create GBLDEFs */
#define CHEXPAND
#include "error.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "gdsroot.h"
#include "gdskill.h"
#include "ccp.h"
@ -109,6 +109,7 @@
#include "parse_file.h" /* for MAX_FBUFF */
#include "repl_sem.h"
#include "gtm_zlib.h"
#include "anticipatory_freeze.h"
#endif
#include "jnl_typedef.h"
@ -123,6 +124,7 @@
#ifdef UNICODE_SUPPORTED
#include "gtm_icu_api.h"
#include "gtm_utf8.h"
#include "gtm_conv.h"
#endif
# ifdef GTM_CRYPT
@ -146,6 +148,7 @@ GBLDEF sgmnt_addrs *cs_addrs_list; /* linked list of csa corresponding to all c
GBLDEF unsigned short proc_act_type;
GBLDEF volatile bool ctrlc_pending;
GBLDEF bool undef_inhibit;
GBLDEF volatile int4 ctrap_action_is;
GBLDEF bool out_of_time;
GBLDEF io_pair io_curr_device; /* current device */
@ -323,7 +326,6 @@ GBLDEF boolean_t heartbeat_started;
#endif
/* DEFERRED EVENTS */
GBLDEF int dollar_zmaxtptime = 0;
GBLDEF bool licensed = TRUE;
#if defined(UNIX)
@ -351,6 +353,10 @@ GBLDEF void (*tp_timeout_action_ptr)(void) = tp_timeout_action_dummy;
GBLDEF void (*ctrlc_handler_ptr)() = ctrlc_handler_dummy;
GBLDEF int (*op_open_ptr)(mval *v, mval *p, int t, mval *mspace) = op_open_dummy;
GBLDEF void (*unw_prof_frame_ptr)(void) = unw_prof_frame_dummy;
GBLDEF void (*heartbeat_timer_ptr)(void); /* Initialized only in gtm_startup() */
#ifdef UNICODE_SUPPORTED
GBLDEF u_casemap_t gtm_strToTitle_ptr; /* Function pointer for gtm_strToTitle */
#endif
GBLDEF boolean_t mu_reorg_process; /* set to TRUE by MUPIP REORG */
GBLDEF boolean_t mu_reorg_in_swap_blk; /* set to TRUE for the duration of the call to "mu_swap_blk" */
GBLDEF boolean_t mu_rndwn_process;
@ -366,7 +372,6 @@ GBLDEF int gtmsecshr_sockpath_len;
GBLDEF int gtmsecshr_cli_sockpath_len;
GBLDEF mstr gtmsecshr_pathname;
GBLDEF int server_start_tries;
GBLDEF int gtmsecshr_log_file;
GBLDEF int gtmsecshr_sockfd = FD_INVALID;
GBLDEF boolean_t gtmsecshr_sock_init_done;
GBLDEF char muext_code[MUEXT_MAX_TYPES][2] =
@ -433,9 +438,9 @@ GBLDEF parmblk_struct *param_list; /* call-in parameters block (defined in uni
GBLDEF unsigned int invocation_mode = MUMPS_COMPILE; /* how mumps has been invoked */
GBLDEF char cli_err_str[MAX_CLI_ERR_STR] = ""; /* Parse Error message buffer */
GBLDEF char *cli_err_str_ptr = NULL;
GBLDEF io_desc *gtm_err_dev = NULL;
GBLDEF boolean_t gtm_pipe_child = FALSE;
#endif
GBLDEF io_desc *gtm_err_dev = NULL;
/* this array is indexed by file descriptor */
GBLDEF boolean_t *lseekIoInProgress_flags = (boolean_t *)0;
@ -690,7 +695,7 @@ LITDEF boolean_t jrt_is_replicated[JRT_RECTYPES] =
#undef JNL_TABLE_ENTRY
};
/* Change the initialization if struct_jrec_tcom in jnl.h changes */
GBLDEF struct_jrec_tcom tcom_record = {{JRT_TCOM, TCOM_RECLEN, 0, 0, 0},
GBLDEF struct_jrec_tcom tcom_record = {{JRT_TCOM, TCOM_RECLEN, 0, 0, 0, 0},
0, 0, 0, 0, "", {TCOM_RECLEN, JNL_REC_SUFFIX_CODE}};
GBLDEF jnl_gbls_t jgbl;
GBLDEF short crash_count;
@ -892,7 +897,6 @@ GBLDEF boolean_t dse_all_dump; /* TRUE if DSE ALL -DUMP is specified */
GBLDEF int socketus_interruptus; /* How many times socket reads have been interrutped */
GBLDEF int4 pending_errtriplecode; /* if non-zero contains the error code to invoke ins_errtriple with */
GBLDEF uint4 process_id;
GBLDEF uint4 image_count; /* not used in UNIX but defined to preserve VMS compatibility */
@ -916,6 +920,7 @@ GBLDEF uint4 max_cache_entries; /* Maximum number of cached indirect compilati
GBLDEF void (*cache_table_relobjs)(void); /* Function pointer to call cache_table_rebuild() */
UNIX_ONLY(GBLDEF ch_ret_type (*ht_rhash_ch)()); /* Function pointer to hashtab_rehash_ch */
UNIX_ONLY(GBLDEF ch_ret_type (*jbxm_dump_ch)()); /* Function pointer to jobexam_dump_ch */
UNIX_ONLY(GBLDEF ch_ret_type (*stpgc_ch)()); /* Function pointer to stp_gcol_ch */
#ifdef VMS
GBLDEF boolean_t tp_has_kill_t_cse; /* cse->mode of kill_t_write or kill_t_create got created in this transaction */
@ -1136,3 +1141,17 @@ GBLDEF boolean_t gv_play_duplicate_kills; /* A TRUE value implies KILLs of non-e
GBLDEF boolean_t donot_fflush_NULL = FALSE; /* Set to TRUE whenever we dont want gtm_putmsg to fflush(NULL). BYPASSOK
* As of Jan 2012, mu_rndwn_all is the only user of this functionality.
*/
GBLDEF boolean_t jnlpool_init_needed; /* TRUE if jnlpool_init should be done at database init time */
#ifdef UNIX
GBLDEF boolean_t span_nodes_disallowed; /* Indicates whether spanning nodes are not allowed. For example,
* they are not allowed for GT.CM OMI and GNP. */
GBLDEF boolean_t argumentless_rundown;
GBLDEF is_anticipatory_freeze_needed_t is_anticipatory_freeze_needed_fnptr;
GBLDEF set_anticipatory_freeze_t set_anticipatory_freeze_fnptr;
#endif
GBLDEF boolean_t in_jnl_file_autoswitch; /* set to TRUE for a short window inside jnl_file_extend when we are about to
* autoswitch; used by jnl_write.
*/

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; Copyright 2001, 2011 Fidelity Information Services, Inc ;
; Copyright 2001, 2012 Fidelity Information Services, Inc ;
; ;
; This source code contains the intellectual property ;
; of its copyright holder(s), and is made available ;
@ -16,13 +16,10 @@ NAME
s nams(NAME)=lquals("REGION")
q
REGION
n nullsub
i $d(regs(REGION)) zm gdeerr("OBJDUP"):"Region":REGION
i '$d(lquals("DYNAMIC_SEGMENT")) zm gdeerr("QUALREQD"):"Dynamic_segment"
i $d(lquals("JOURNAL")),lquals("JOURNAL"),'$d(lquals("BEFORE_IMAGE")) zm gdeerr("QUALREQD"):"Before_image"
i $d(lquals("NULL_SUBSCRIPTS")) d
. s nullsub=lquals("NULL_SUBSCRIPTS")
. s lquals("NULL_SUBSCRIPTS")=$s((nullsub="ALWAYS")!(nullsub="TRUE"):1,nullsub="EXISTING":2,1:0)
i $d(lquals("NULL_SUBSCRIPTS")) d NQUALS^GDEVERIF(.lquals)
i '$$RQUALS^GDEVERIF(.lquals) zm gdeerr("OBJNOTADD"):"Region":REGION
s update=1,s="",regs=regs+1
f s s=$o(tmpreg(s)) q:'$l(s) s regs(REGION,s)=tmpreg(s)

Some files were not shown because too many files have changed in this diff Show More