Update to newest CSV check out

This commit is contained in:
YuCheng Hu 2024-07-19 11:43:27 -04:00
parent 5f15eafe83
commit 5dfa4084d6
1083 changed files with 50372 additions and 30232 deletions

View File

@ -1,6 +1,6 @@
#################################################################
# #
# Copyright 2012 Fidelity Information Services, Inc #
# Copyright 2012, 2013 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
@ -15,11 +15,63 @@
cmake_minimum_required(VERSION 2.8.5)
project(GTM C ASM)
set(version V5.5-000)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
set(arch "x86")
# Max optimization level is -O2
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(lang ${languages})
get_property(flags CACHE CMAKE_${lang}_FLAGS_RELEASE PROPERTY VALUE)
if("${flags}" MATCHES "-O[3-9]")
string(REGEX REPLACE "-O[3-9]" "-O2" flags "${flags}")
set_property(CACHE CMAKE_${lang}_FLAGS_RELEASE PROPERTY VALUE "${flags}")
endif()
endforeach()
# Defaults
set(version V6.0-003)
if("${version}" STREQUAL "")
set(version V9.9-0)
endif()
# If CMAKE_BUILD_TYPE is not defined make it a Release build
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
# If it's a debug build make sure GT.M uses all of its debug options
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(install_permissions_script
OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
# Only IA64 and x86_64 architectures use this option
set(gen_xfer_desc 0)
# Platform specific libs
set(gtm_osarch_libs "")
# Define these ahead of establishing platforms
set(gt_src_list)
set(sources_used "")
set(extralibs "")
set(is_encryption_supported 1)
set(libmumpsrestoreregex "")
message("--> OS = ${CMAKE_SYSTEM_NAME} / ARCH = ${CMAKE_SYSTEM_PROCESSOR}")
# Establish platform
# Except for Solaris, CMAKE_COMPILER_IS_GNUCC is true
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
include(sr_linux/platform.cmake)
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "HP-UX")
include(sr_hpux/platform.cmake)
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
include(sr_aix/platform.cmake)
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
include(sr_sun/platform.cmake)
else()
set(arch "x86_64")
message(FATAL_ERROR "--> OS = ${CMAKE_SYSTEM_NAME} / ARCH = ${CMAKE_SYSTEM_PROCESSOR}")
endif()
# Choose where to get bootstrap sources.
@ -45,41 +97,6 @@ if(NOT GTM_INSTALL_DIR)
set(GTM_INSTALL_DIR .)
endif()
# Max optimization level is -O2
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(lang ${languages})
get_property(flags CACHE CMAKE_${lang}_FLAGS_RELEASE PROPERTY VALUE)
if("${flags}" MATCHES "-O[3-9]")
string(REGEX REPLACE "-O[3-9]" "-O2" flags "${flags}")
set_property(CACHE CMAKE_${lang}_FLAGS_RELEASE PROPERTY VALUE "${flags}")
endif()
endforeach()
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
set(install_permissions_script
OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
set(CMAKE_INCLUDE_FLAG_ASM "-Wa,-I") # gcc -I does not make it to "as"
set(CMAKE_C_FLAGS
# TODO: Use CMake 2.8.9 POSITION_INDEPENDENT_CODE abstraction for -fPIC in static libs
"${CMAKE_C_FLAGS} -ansi -fsigned-char -fPIC -Wmissing-prototypes")
set(CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} -fno-defer-pop -fno-strict-aliasing -ffloat-store")
add_definitions(
#-DNOLIBGTMSHR #gt_cc_option_DBTABLD=-DNOLIBGTMSHR
-D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64
-D_XOPEN_SOURCE=600
-D_LARGEFILE64_SOURCE
)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
#-----------------------------------------------------------------------------
# Source files are organized into subdirectories named by platform.
@ -88,17 +105,6 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
# appear in multiple directories but only the instance found earliest
# in the search path will be used. Later instances of the same source
# file name will be ignored.
set(gt_src_list)
set(gen_xfer_desc 0)
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
list(APPEND gt_src_list sr_linux)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
list(APPEND gt_src_list sr_i386 sr_x86_regs sr_unix_nsb)
else()
list(APPEND gt_src_list sr_x86_64 sr_x86_regs)
set(gen_xfer_desc 1)
endif()
endif()
list(APPEND gt_src_list
sr_unix_gnp
sr_unix_cm
@ -113,7 +119,7 @@ list(APPEND gt_src_list
foreach(d ${gt_src_list})
set(source_dir_${d} ${GTM_SOURCE_DIR}/${d})
file(GLOB sources_${d} RELATIVE ${source_dir_${d}}
${d}/*.c ${d}/*.s ${d}/*.si)
${d}/*.c ${d}/*.s ${d}/*.si)
endforeach()
if(gen_bootstrap)
# Prefer generated sources over all other locations.
@ -153,15 +159,20 @@ endfunction()
# Macro to search directories ordered by 'gt_src_list' for a given
# list of source file names, assign them to a target, and exclude the
# source file names from inclusion in libmumps.
set(sources_used "")
macro(set_source_list target)
foreach(name ${ARGN})
set(src "")
foreach(d ${gt_src_list})
if(";${sources_${d}};" MATCHES ";(${name}\\.(c|s|si));")
set(src ${d}/${CMAKE_MATCH_1})
set("source_used_${CMAKE_MATCH_1}" 1)
list(APPEND sources_used ${source_dir_${d}}/${CMAKE_MATCH_1})
set(fname ${CMAKE_MATCH_1})
set(src ${d}/${fname})
set("source_used_${fname}" 1)
list(APPEND sources_used ${source_dir_${d}}/${fname})
if(NOT "${libmumpsrestoreregex}" STREQUAL "")
if(";${name};" MATCHES ";(${libmumpsrestoreregex});")
set("source_used_${fname}" 0)
endif()
endif()
break()
endif()
endforeach()
@ -192,6 +203,9 @@ load_source_list(libgtcm sr_unix_cm/libgtcm.list)
load_source_list(liblke sr_unix/liblke.list)
load_source_list(libmupip sr_unix/libmupip.list)
load_source_list(libstub sr_unix/libstub.list)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
load_source_list(libgtmrpc sr_sun/libgtmrpc.list)
endif()
# Assign sources to executables.
set_source_list(gtm_threadgbl_deftypes gtm_threadgbl_deftypes)
@ -213,6 +227,9 @@ set_source_list(maskpass maskpass)
set_source_list(mumps gtm)
set_source_list(mupip mupip mupip_cmd)
set_source_list(semstat2 semstat2)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
set_source_list(gtm_svc gtm_svc gtm_rpc_init gtm_dal_svc)
endif()
#-----------------------------------------------------------------------------
# libmumps gets leftover sources, so compute the remaining list.
@ -240,14 +257,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}
@ -307,6 +324,7 @@ if(gen_xfer_desc)
${GTM_BINARY_DIR}/sources.list
COMMAND ${CMAKE_COMMAND}
-D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-D "arch=${arch}"
-D "includes=${includes}"
-P ${GTM_SOURCE_DIR}/sr_unix/gen_xfer_desc.cmake
VERBATIM
@ -357,6 +375,7 @@ foreach(lib
mupip
stub
mumps
${extralibs}
)
add_library(lib${lib} STATIC ${lib${lib}_SOURCES})
set_property(TARGET lib${lib} PROPERTY OUTPUT_NAME ${lib})
@ -364,61 +383,72 @@ foreach(lib
endforeach()
# TODO: find_package or find_library for system libs?
target_link_libraries(libmumps -lelf -lncurses -lm -ldl -lpthread -lrt)
include_directories ("/usr/local/include")
target_link_libraries(libmumps ${libmumpslibs})
add_executable(mumps ${mumps_SOURCES})
target_link_libraries(mumps libmumps)
add_executable(mumps ${mumps_SOURCES})
target_link_libraries(mumps libmumps)
add_executable(dse ${dse_SOURCES})
target_link_libraries(dse libdse libmumps libstub)
add_executable(dse ${dse_SOURCES})
target_link_libraries(dse libdse libmumps libstub)
list(APPEND with_export dse)
add_executable(dbcertify ${dbcertify_SOURCES})
target_link_libraries(dbcertify libdbcertify libmupip libmumps libstub)
add_executable(dbcertify ${dbcertify_SOURCES})
target_link_libraries(dbcertify libdbcertify libmupip libmumps libstub)
add_executable(geteuid ${geteuid_SOURCES})
add_executable(geteuid ${geteuid_SOURCES})
add_executable(gtmsecshr ${gtmsecshr_SOURCES})
add_dependencies(gtmsecshr gen_gtm_threadgbl_deftypes)
add_executable(gtmsecshr ${gtmsecshr_SOURCES})
add_dependencies(gtmsecshr gen_gtm_threadgbl_deftypes)
add_executable(gtmsecshr_real ${gtmsecshr_real_SOURCES})
add_executable(gtmsecshr_real ${gtmsecshr_real_SOURCES})
target_link_libraries(gtmsecshr_real libmumps)
set_target_properties(gtmsecshr_real PROPERTIES
OUTPUT_NAME gtmsecshr
RUNTIME_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/gtmsecshrdir
)
add_dependencies(gtmsecshr_real gen_gtm_threadgbl_deftypes)
add_dependencies(gtmsecshr_real gen_gtm_threadgbl_deftypes)
add_executable(mupip ${mupip_SOURCES})
target_link_libraries(mupip libmupip libmumps libstub)
add_executable(mupip ${mupip_SOURCES})
target_link_libraries(mupip libmupip libmumps libstub)
list(APPEND with_export mupip)
add_executable(lke ${lke_SOURCES})
target_link_libraries(lke liblke libmumps libgnpclient libmumps libgnpclient libcmisockettcp)
add_executable(lke ${lke_SOURCES})
target_link_libraries(lke liblke libmumps libgnpclient libmumps libgnpclient libcmisockettcp)
list(APPEND with_export lke)
add_executable(gtcm_server ${gtcm_server_SOURCES})
target_link_libraries(gtcm_server libgtcm libmumps libstub)
add_executable(gtcm_server ${gtcm_server_SOURCES})
target_link_libraries(gtcm_server libgtcm libmumps libstub)
list(APPEND with_export gtcm_server)
add_executable(gtcm_gnp_server ${gtcm_gnp_server_SOURCES})
target_link_libraries(gtcm_gnp_server libgnpserver liblke libmumps libcmisockettcp libstub)
add_executable(gtcm_gnp_server ${gtcm_gnp_server_SOURCES})
target_link_libraries(gtcm_gnp_server libgnpserver liblke libmumps libcmisockettcp libstub)
list(APPEND with_export gtcm_gnp_server)
add_executable(gtcm_play ${gtcm_play_SOURCES})
target_link_libraries(gtcm_play libgtcm libmumps libstub)
add_executable(gtcm_play ${gtcm_play_SOURCES})
target_link_libraries(gtcm_play libgtcm libmumps libstub)
list(APPEND with_export gtcm_play)
add_executable(gtcm_pkdisp ${gtcm_pkdisp_SOURCES})
target_link_libraries(gtcm_pkdisp libgtcm libmumps libstub)
add_executable(gtcm_shmclean ${gtcm_shmclean_SOURCES})
target_link_libraries(gtcm_shmclean libgtcm libmumps libstub)
add_executable(semstat2 ${semstat2_SOURCES})
add_executable(ftok ${ftok_SOURCES})
target_link_libraries(ftok libmumps libstub)
add_executable(gtcm_pkdisp ${gtcm_pkdisp_SOURCES})
target_link_libraries(gtcm_pkdisp libgtcm libmumps libstub)
add_executable(gtcm_shmclean ${gtcm_shmclean_SOURCES})
target_link_libraries(gtcm_shmclean libgtcm libmumps libstub)
add_executable(semstat2 ${semstat2_SOURCES})
add_executable(ftok ${ftok_SOURCES})
target_link_libraries(ftok libmumps libstub)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
add_executable(gtm_svc ${gtm_svc_SOURCES})
target_link_libraries(gtm_svc libmumps libgnpclient libcmisockettcp libgtmrpc)
endif()
foreach(t ${with_export})
set_target_properties(${t} PROPERTIES
LINK_FLAGS "-Wl,-u,gtm_filename_to_id -Wl,-u,gtm_zstatus -Wl,--version-script,\"${GTM_BINARY_DIR}/gtmexe_symbols.export\""
LINK_DEPENDS "${GTM_BINARY_DIR}/gtmexe_symbols.export"
LINK_FLAGS "${gtm_link}"
LINK_DEPENDS "${gtm_dep}"
)
add_dependencies(${t} gen_export)
endforeach()
@ -427,68 +457,81 @@ add_library(libgtmshr MODULE ${libgtmshr_SOURCES})
set_property(TARGET libgtmshr PROPERTY OUTPUT_NAME gtmshr)
target_link_libraries(libgtmshr libmumps libgnpclient libcmisockettcp)
set_target_properties(libgtmshr PROPERTIES
LINK_FLAGS "-Wl,-u,gtm_ci -Wl,-u,gtm_filename_to_id -Wl,--version-script,\"${GTM_BINARY_DIR}/gtmshr_symbols.export\""
LINK_DEPENDS "${GTM_BINARY_DIR}/gtmshr_symbols.export"
LINK_FLAGS "${libgtmshr_link}"
LINK_DEPENDS "${libgtmshr_dep}"
)
add_dependencies(libgtmshr gen_export)
add_dependencies(mumps libgtmshr)
add_library(libgtmcrypt MODULE ${libgtmcrypt_SOURCES})
set_target_properties(libgtmcrypt PROPERTIES
OUTPUT_NAME gtmcrypt
COMPILE_DEFINITIONS USE_GCRYPT
LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
)
target_link_libraries(libgtmcrypt gpg-error gpgme gcrypt)
install(TARGETS libgtmcrypt DESTINATION ${GTM_INSTALL_DIR}/plugin)
if(is_encryption_supported)
# Iterate over the list of GPG related libraries
foreach(gpglib gpg-error gpgme gcrypt)
# For each library, we need a new CMake variable, hence GPGLIB_${gpglib}
find_library(GPGLIB_${gpglib} NAME ${gpglib} PATHS ${CMAKE_LIBRARY_PATH})
# Append the found library to the list
set(GPG_LIBRARIES ${GPG_LIBRARIES} ${GPGLIB_${gpglib}})
endforeach()
add_executable(maskpass ${maskpass_SOURCES})
target_link_libraries(maskpass gpg-error gpgme gcrypt)
set_target_properties(maskpass PROPERTIES
COMPILE_DEFINITIONS USE_GCRYPT
RUNTIME_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin/gtmcrypt
)
install(TARGETS maskpass DESTINATION ${GTM_INSTALL_DIR}/plugin/gtmcrypt)
add_library(libgtmcrypt MODULE ${libgtmcrypt_SOURCES})
set_target_properties(libgtmcrypt PROPERTIES
OUTPUT_NAME gtmcrypt
COMPILE_DEFINITIONS "USE_GCRYPT -DUSE_AES256CFB"
LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
)
target_link_libraries(libgtmcrypt ${GPG_LIBRARIES})
install(TARGETS libgtmcrypt DESTINATION ${GTM_INSTALL_DIR}/plugin)
foreach(f
add_db_key.sh
build.sh
encrypt_sign_db_key.sh
gen_keypair.sh
gen_sym_hash.sh
gen_sym_key.sh
gtmcrypt.tab
gtmcrypt_dbk_ref.c
gtmcrypt_dbk_ref.h
gtmcrypt_interface.h
gtmcrypt_pk_ref.c
gtmcrypt_pk_ref.h
gtmcrypt_ref.c
gtmcrypt_ref.h
gtmcrypt_sym_ref.h
gtmxc_types.h
import_and_sign_key.sh
install.sh
maskpass.c
pinentry-gtm.sh
pinentry.m
pinentry.m
add_executable(maskpass ${maskpass_SOURCES})
target_link_libraries(maskpass ${GPG_LIBRARIES})
set_target_properties(maskpass PROPERTIES
COMPILE_DEFINITIONS USE_GCRYPT
RUNTIME_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin/gtmcrypt
)
set(f_in "${GTM_SOURCE_DIR}/sr_unix/${f}")
set(f_out "${GTM_BINARY_DIR}/plugin/gtmcrypt/${f}")
add_custom_command(
OUTPUT "${f_out}"
DEPENDS "${f_in}"
COMMAND ${CMAKE_COMMAND} -E copy "${f_in}" "${f_out}"
)
if("${f}" MATCHES "\\.sh$")
set(permissions PERMISSIONS ${install_permissions_script})
else()
set(permissions "")
endif()
install(FILES "${f_out}" DESTINATION ${GTM_INSTALL_DIR}/plugin/gtmcrypt ${permissions})
list(APPEND files_to_place "${f_out}")
endforeach()
install(TARGETS maskpass DESTINATION ${GTM_INSTALL_DIR}/plugin/gtmcrypt)
foreach(f
add_db_key.sh
build.sh
encrypt_sign_db_key.sh
gen_keypair.sh
gen_sym_hash.sh
gen_sym_key.sh
gtmcrypt.tab
gtmcrypt_dbk_ref.c
gtmcrypt_dbk_ref.h
gtmcrypt_interface.h
gtmcrypt_pk_ref.c
gtmcrypt_pk_ref.h
gtmcrypt_dbk_ref.c
gtmcrypt_dbk_ref.h
gtmcrypt_ref.c
gtmcrypt_ref.h
gtmcrypt_sym_ref.h
gtmxc_types.h
import_and_sign_key.sh
install.sh
maskpass.c
pinentry-gtm.sh
pinentry.m
pinentry.m
show_install_config.sh
)
set(f_in "${GTM_SOURCE_DIR}/sr_unix/${f}")
set(f_out "${GTM_BINARY_DIR}/plugin/gtmcrypt/${f}")
add_custom_command(
OUTPUT "${f_out}"
DEPENDS "${f_in}"
COMMAND ${CMAKE_COMMAND} -E copy "${f_in}" "${f_out}"
)
if("${f}" MATCHES "\\.sh$")
set(permissions PERMISSIONS ${install_permissions_script})
else()
set(permissions "")
endif()
install(FILES "${f_out}" DESTINATION ${GTM_INSTALL_DIR}/plugin/gtmcrypt ${permissions})
list(APPEND files_to_place "${f_out}")
endforeach()
endif()
install(TARGETS
mumps
@ -603,6 +646,7 @@ foreach(f
lke.hlp
mumps.hlp
mupip.hlp
custom_errors_sample.txt
)
select_file(src ${f})
list(APPEND files ${src})
@ -673,7 +717,10 @@ endforeach()
#-----------------------------------------------------------------------------
set(gtm_hlp mumps.hlp)
set(gde_hlp gde.hlp)
foreach(help gtm gde)
set(mupip_hlp mupip.hlp)
set(dse_hlp dse.hlp)
set(lke_hlp lke.hlp)
foreach(help gtm gde mupip dse lke)
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"Change -segment DEFAULT -block=2048 -file=\$gtm_dist/${help}help.dat
Change -region DEFAULT -record=1020 -key=255
@ -736,6 +783,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})

163
README
View File

@ -1,115 +1,90 @@
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
All software in this package is part of FIS GT.M (http://fis-gtm.com)
which is Copyright 2013 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.
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:
1. Fulfill the pre-requisites
Install developement libraries libelf, zlib, libicu, libgpgme, libgpg-error,
libgcrypt.
Ensure that your locale settings are correct, otherwise you will see
GTM-E-NONUTF8LOCALE messages. Refer the Messages and Recovery Procedures
Manual if you do encounter these messages.
[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 V6.0-003 is /opt/fis-gtm/V6.0-003_i686 or
/opt/fis-gtm/V6.0-003_x8664. These instrcutions are written using x8664, please
use i686 as necessary.
$ tar xfz gtm_V60003_linux_x8664_pro.tar.gz
# Note down the installation path for use with cmake below
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
$ sudo sh ./configure
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
The GT.M source tarball extracts to a directory with the version number in
the name, fis-gtm-V6.0-003
$ tar xfz fis-gtm-V6.0-003.tar.gz
$ cd fis-gtm-V6.0-003
You should find this README, COPYING file and sr_* source directroies.
You should find this README, LICENSE, COPYING and CMakeLists.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 -
<fis-gtm-build> can be a sub directory of the source directory,
fis-gtm-V6.0-003, or any other valid path.
- 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 <fis-gtm-build>
$ cd <fis-gtm-build>
- Define 'gtm_tools' and 'gtm_inc'
$ setenv gtm_tools $PWD/sr_linux
$ setenv gtm_inc $PWD/sr_linux
# [optional] If you installed GT.M, provide the directory path to cmake
# -D GTM_DIST:PATH=$gtm_dist
#
# 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 cmake install does not create the final installed GT.M.
# Instead, it stages GT.M for distribution. Change the CMAKE_INSTALL_PREFIX
# to place the staged files in a local directory. To install GT.M, you must
# cd to that installed directory and execute the configure script.
#
# -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package
#
$ cmake <path to>/fis-gtm-V6.0-003 -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package
- [OPTIONAL] Ubuntu users must define 'distro'
$ setenv distro ubuntu
$ 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>
$ cd package/lib/fis-gtm/V6.0-003_x86_64
- Define 'gtm_version_change' and execute gtm_env.csh
$ setenv gtm_version_change 1
$ source sr_unix/gtm_env.csh
# Now you are ready to install GT.M. Answer a few questions and install it.
# The recommended installation path is /opt/fis-gtm/V6.0-003_x86_64
4. Building GT.M -
$ sudo ./configure
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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* Copyright 2001,2013 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,2012 Fidelity Information Services, Inc *
* Copyright 2001,2013 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, 2009 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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"
@ -87,6 +87,9 @@ GBLDEF uint4 txtrel_cnt; /* count of text relocation records */
/* its referenced in ind_code.c */
GBLDEF int calculated_code_size, generated_code_size;
error_def(ERR_UNIMPLOP);
error_def(ERR_MAXARGCNT);
void trip_gen(triple *ct)
{
oprtype **sopr, *opr; /* triple operand */
@ -99,8 +102,6 @@ void trip_gen(triple *ct)
oprtype *irep_opr;
short *repl, repcnt; /* temp irep ptr */
int4 off;
error_def (ERR_UNIMPLOP);
error_def (ERR_MAXARGCNT);
tp = ttt[ct->opcode];
if (tp <= 0)
@ -125,8 +126,8 @@ void trip_gen(triple *ct)
continue;
}
*sopr++ = opr;
if (sopr >= ARRAYTOP(saved_opr))
rts_error(VARLSTCNT(3) ERR_MAXARGCNT, 1, MAX_ARGS);
if (sopr >= ARRAYTOP(saved_opr)) /* user-visible max args is MAX_ARGS - 3 */
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_MAXARGCNT, 1, MAX_ARGS - 3);
}
opr++;
}
@ -752,8 +753,6 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
int4 offset, literal;
triple *ct;
error_def (ERR_UNIMPLOP);
if (opr->oprclass == TRIP_REF)
{
ct = opr->oprval.tref;
@ -790,7 +789,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
temp_reg = I386_REG_ECX;
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
pc_value_idx = code_idx + 5;
@ -832,7 +831,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
code_idx += 1 + SIZEOF(int4);
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
break;
@ -940,7 +939,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
emit_base_offset(use_reg, base_reg, offset);
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
break;
@ -970,7 +969,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
temp_reg = I386_REG_ECX;
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
code_buf[code_idx++] = I386_INS_CALL_Jv;
@ -1032,7 +1031,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
}
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
break;
@ -1146,7 +1145,7 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
emit_base_offset(use_reg, base_reg, offset);
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
break;
@ -1175,9 +1174,6 @@ void emit_xfer(short xfer)
void emit_op_base_offset(generic_op op, short base_reg, int offset, short use_reg)
{
error_def (ERR_UNIMPLOP);
switch (op)
{
case CLEAR:
@ -1221,7 +1217,7 @@ void emit_op_base_offset(generic_op op, short base_reg, int offset, short use_re
code_buf[code_idx++] = 0;
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
}
@ -1271,8 +1267,6 @@ void emit_base_offset (short reg_opcode, short base_reg, int4 offset)
void emit_op_alit (generic_op op, unsigned char use_reg)
{
error_def (ERR_UNIMPLOP);
switch (op)
{
case LOAD_ADDRESS:
@ -1289,7 +1283,7 @@ void emit_op_alit (generic_op op, unsigned char use_reg)
code_buf[code_idx++] = I386_INS_PUSH_Iv;
break;
default:
rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_UNIMPLOP);
break;
}
}

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* Copyright 2001,2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* Copyright 2001,2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -67,7 +67,7 @@ LITDEF err_msg merrors[] = {
"NUMUNXEOR", "!_!AD!/!_!_!_unexpected end of record in numeric subscript", 2,
"EXPR", "Expression expected but not found", 0,
"STRUNXEOR", "!_!AD!/!_!_!_unexpected end of record in string subscript", 2,
"JNLEXTEND", "Journal file extension error. Journal file !AD closed.", 2,
"JNLEXTEND", "Journal file extension error for file !AD", 2,
"FCHARMAXARGS", "Argument count of $CHAR function exceeded the maximum of 255", 0,
"FCNSVNEXPECTED", "Function or special variable expected in this context", 0,
"FNARGINC", "Format specifiers to $FNUMBER are incompatible: \"!AD\"", 2,
@ -95,7 +95,7 @@ LITDEF err_msg merrors[] = {
"GVUNDEF", "Global variable undefined: !AD", 2,
"TRANSNEST", "Maximum transaction nesting levels exceeded", 0,
"INDEXTRACHARS", "Indirection string contains extra trailing characters", 0,
"INDMAXNEST", "Maximum nesting of indirection expressions exceeded", 0,
"UNUSEDMSG260", "INDMAXNEST Last used in V6.0-000", 0,
"INDRMAXLEN", "Maximum length !UL of an indirection argument was exceeded", 1,
"INSFFBCNT", "Insufficient byte count quota left for requested operation", 0,
"INTEGERRS", "Database integrity errors", 0,
@ -195,7 +195,7 @@ LITDEF err_msg merrors[] = {
"TEXTARG", "Invalid argument to $TEXT function", 0,
"TMPSTOREMAX", "Maximum space for temporary values exceeded", 0,
"VIEWCMD", "View parameter is not valid with VIEW command", 0,
"TXTNEGLIN", "A line prior to line number zero was referenced in $TEXT", 0,
"JNI", "!AD", 2,
"TXTSRCFMT", "$TEXT encountered an invalid source program file format", 0,
"UIDMSG", "Unidentified message received", 0,
"UIDSND", "Unidentified sender PID", 0,
@ -204,9 +204,9 @@ LITDEF err_msg merrors[] = {
"VAREXPECTED", "Variable expected in this context", 0,
"VARRECBLKSZ", "Blocksize must be at least record size + 4 bytes", 0,
"MAXARGCNT", "Maximum number of arguments !UL exceeded", 1,
"WCFAIL", "The database cache is corrupt", 0,
"GTMSECSHRSEMGET", "semget error errno = !UL", 1,
"VIEWARGCNT", "View parameter !AD has inappropriate number of subparameters", 2,
"XKILLCNTEXC", "Maximum number of arguments (!UL) to exclusive kill exceeded", 1,
"GTMSECSHRDMNSTARTED", "gtmsecshr daemon started (key: 0x!XL) for version !AD from !AD", 5,
"ZATTACHERR", "Error attaching to \"!AD\"", 2,
"ZDATEFMT", "$ZDATE format string contains invalid character", 0,
"ZEDFILSPEC", "Illegal ZEDIT file specification: !AD", 2,
@ -273,14 +273,14 @@ LITDEF err_msg merrors[] = {
"MULTFORMPARM", "This formal parameter is multiply defined", 0,
"QUITARGUSE", "Quit cannot take an argument in this context", 0,
"NAMEEXPECTED", "A local variable name is expected in this context", 0,
"UNUSEDMSG438", "ACTLSTEXP: Last used in V5.4-002B", 0,
"FALLINTOFLST", "Fall-through to a label with formallist is not allowed", 0,
"NOTEXTRINSIC", "Quit does not return to an extrinsic function: argument not allowed", 0,
"UNUSEDMSG440", "FMLLSTPRESENT: Last used in V5.4-002B", 0,
"GTMSECSHRREMSEMFAIL", "error removing semaphore errno = !UL", 1,
"FMLLSTMISSING", "The formal list is absent from a label called with an actual list: !AD", 2,
"ACTLSTTOOLONG", "More actual parameters than formal parameters: !AD", 2,
"ACTOFFSET", "Actuallist not allowed with offset", 0,
"MAXACTARG", "Maximum number of actual arguments exceeded", 0,
"GTMDUMPFAIL", "Could not create DUMP FILE", 0,
"GTMSECSHRREMSEM", "[client pid !UL] Semaphore (!UL) removed", 2,
"JNLTMQUAL2", "Time qualifier LOOKBACK_TIME=\"!AZ\" is later than SINCE_TIME=\"!AZ\"", 2,
"GDINVALID", "Unrecognized Global Directory file format: !AD, expected label: !AD, found: !AD", 6,
"ASSERT", "Assert failed in !AD line !UL for expression (!AD)", 5,
@ -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,
@ -424,13 +424,13 @@ LITDEF err_msg merrors[] = {
"BEGINST", "Beginning LOAD at record number: !UL", 1,
"INVMVXSZ", "Invalid block size for GOQ load format", 0,
"JNLWRTNOWWRTR", "Journal writer attempting another write", 0,
"MUPGDERR", "Command aborted due to global directory errors", 0,
"GTMSECSHRSHMCONCPROC", "More than one process attached to Shared memory segment (!UL) not removed (!UL)", 2,
"JNLINVALLOC", "Journal file allocation !UL is not within the valid range of !UL to !UL. Journal file not created.", 3,
"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,
"GTMSECSHRREMSHM", "[client pid !UL] Shared memory segment (!UL) removed, nattch = !UL", 3,
"GTMSECSHRREMFILE", "[client pid !UL] File (!AD) removed", 3,
"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,
@ -452,7 +452,7 @@ LITDEF err_msg merrors[] = {
"WCWRNNOTCHG", "Not all specified database files were changed", 0,
"ZCWRONGDESC", "A string longer than 65535 is passed via 32-bit descriptor", 0,
"MUTNWARN", "Database file !AD has 0x!16@XQ more transactions to go before reaching the transaction number limit (0x!16@XQ). Renew database with MUPIP INTEG TN_RESET", 4,
"JNLNAMLEN", "Journal file name !AD: for database file !AD exceeds maximum length of !UL", 5,
"GTMSECSHRUPDDBHDR", "[client pid !UL] database fileheader (!AD) updated !AD", 5,
"LCKSTIMOUT", "DAL timed lock request expired", 0,
"CTLMNEMAXLEN", "The maximum length of a control mnemonic has been exceeded", 0,
"CTLMNEXPECTED", "Control mnemonic is expected in this context", 0,
@ -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,
@ -542,7 +542,7 @@ LITDEF err_msg merrors[] = {
"MUSTANDALONE", "Could not get exclusive access to !AD", 2,
"MUNOACTION", "MUPIP unable to perform requested action", 0,
"RMBIGSHARE", "File with BIGRECORD specified may only be shared if READONLY", 0,
"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: !16@XQ", 14,
"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16@XQ", 14,
"SOCKWRITE", "Write to a TCP/IP socket failed", 0,
"DBCNTRLERR", "Database file !AD: control error suspected but not found", 2,
"NOTERMENV", "Environment variable TERM not set. Assuming \"unknown.\"", 0,
@ -576,26 +576,26 @@ LITDEF err_msg merrors[] = {
"ZCPREALLNUMEX", "Pre-allocation value should be a decimal number", 0,
"ZCPREALLVALPAR", "Pre-allocation allowed only for variables passed by reference", 0,
"VERMISMATCH", "Attempt to access !AD with version !AD, while already using !AD", 6,
"JNLCNTRL", "Journal control unsynchronized. Journaling closed for !AD.", 2,
"JNLCNTRL", "Journal control unsynchronized for !AD.", 2,
"TRIGNAMBAD", "Trigger initialization failed. Error while processing ^#t(\"!AD\",!AD)", 4,
"BUFRDTIMEOUT", "Pid [0x!XL] timed out waiting for buffered read of blk [0x!XL] into cr [0x!XL] by process [0x!XL] to complete in database file !AD", 6,
"INVALIDRIP", "Invalid read-in-progress field in Cache Record. Resetting and continuing. Region: !AD.", 2,
"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,
"SOCKACTNA", "Action not appropriate for current socket", 0,
"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,
"FREEBLKSLOW", "Only !UL free blocks left out of !UL total blocks for !AD", 4,
"PROTNOTSUP", "Protocol !AD not supported", 2,
"DELIMSIZNA", "Delimiter size is not appropriate", 0,
"INVCTLMNE", "Invalid control mnemonics", 0,
"SOCKLISTEN", "Error listening on a socket", 0,
"LQLENGTHNA", "Listening queue length !UL not appropriate. Must be between 1 and 5.", 1,
"ADDRTOOLONG", "Socket address !AD of length !UL is longer than the maximum permissible length !UL", 4,
"UNUSEDMSG760", "LSNCONNOTCMP Last used in V5.4-002A", 0,
"GTMSECSHRGETSEMFAIL", "error getting semaphore errno = !UL", 1,
"CPBEYALLOC", "Attempt to copy beyond the allocated buffer", 0,
"DBRDONLY", "Database file !AD read only", 2,
"DUPTN", "Duplicate transaction found [TN = 0x!16@XQ] at offset 0x!XL in journal file !AD", 4,
@ -616,7 +616,7 @@ LITDEF err_msg merrors[] = {
"NOFORKCORE", "Unable to fork off process to create core. Core creation postponed.", 0,
"JNLREAD", "Error reading from journal file !AD at offset [0x!XL]", 3,
"JNLMINALIGN", "Journal Record Alignment !UL is less than the minimum value of !UL", 2,
"JNLDSKALIGN", "Journal Record Alignment !UL is not a multiple of 512", 1,
"UNUSEDMSG781", "JNLDSKALIGN : Last used in V4.3-000", 0,
"JNLPOOLSETUP", "Journal Pool setup error", 0,
"JNLSTATEOFF", "ROLLBACK or RECOVER BACKWARD cannot proceed as database file !AD does not have journaling ENABLED and ON", 2,
"RECVPOOLSETUP", "Receive Pool setup error", 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,
@ -679,7 +679,7 @@ LITDEF err_msg merrors[] = {
"BUFFLUFAILED", "Error flushing buffers from !AD for database file !AD", 4,
"MUQUALINCOMP", "Incompatible qualifiers - FILE and REGION", 0,
"DISTPATHMAX", "$gtm_dist path is greater than maximum (!UL)", 1,
"MAXTRACEHEIGHT", "The maximum trace tree height (!UL) has been exceeded. The trace information will be incomplete.", 1,
"UNUSEDMSG844", "MAXTRACEHEIGHT last used in V5.4-002", 0,
"IMAGENAME", "The executing module name should be !AD instead of !AD", 4,
"GTMSECSHRPERM", "The gtmsecshr module in $gtm_dist does not have the correct permission and uid", 0,
"GTMDISTUNDEF", "Environment variable $gtm_dist is not defined", 0,
@ -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,
@ -785,7 +785,7 @@ LITDEF err_msg merrors[] = {
"DBMBPFRINT", "!AD Master bit map shows this map has space, agreeing with MUPIP INTEG", 2,
"DBMAXKEYEXC", "!AD Maximum key size for database exceeds design maximum", 2,
"DBMXRSEXCMIN", "!AD Maximum record size for database is less than the design minimum", 2,
"DBMAXRSEXBL", "!AD Maximum record size for database exceeds what the block size can support", 2,
"UNUSEDMSG950", "DBMAXRSEXBL : Last used in V5.5-000", 0,
"DBREADBM", "!AD Read error on bitmap", 2,
"DBCOMPTOOLRG", "!AD Record has too large compression count", 2,
"DBVERPERFWARN2", "Peformance warning: Database !AD is not fully upgraded. Run MUPIP REORG UPGRADE for best overall performance", 2,
@ -807,14 +807,14 @@ LITDEF err_msg merrors[] = {
"SEMWT2LONG", "Process !UL waited !UL second(s) for the !AD lock for region !AD, lock held by pid !UL", 7,
"REPLINSTOPEN", "Error opening replication instance file !AD", 2,
"REPLINSTCLOSE", "Error closing replication instance file !AD", 2,
"JNLNOTFOUND", "File !AD does not exist -- possibly moved or deleted", 2,
"UNUSEDMSG972", "JNLNOTFOUND : Last used in V4.4-000", 0,
"DBCRERR8", "Database file !AD, cr location 0x!XJ blk = 0x!XL error: !AD was 0x!16@XQ, expecting 0x!16@XQ -- called from module !AD at line !UL", 11,
"NUMPROCESSORS", "Could not determine number of processors", 0,
"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,
@ -824,16 +824,16 @@ LITDEF err_msg merrors[] = {
"RENAMEFAIL", "Rename of file !AD to !AD failed", 4,
"FILERENAME", "File !AD is renamed to !AD", 4,
"JNLBUFINFO", "Pid 0x!XL!/ dsk 0x!XL free 0x!XL bytcnt 0x!XL io_in_prog 0x!XL fsync_in_prog 0x!XL!/ dskaddr 0x!XL freeaddr 0x!XL qiocnt 0x!XL now_writer 0x!XL fsync_pid 0x!XL!/filesize 0x!XL cycle 0x!XL errcnt 0x!XL wrtsize 0x!XL fsync_dskaddr 0x!XL", 16,
"JNLQIOLOCKED", "Error obtaining io_in_prog lock on jnl-file !AD", 2,
"JNLEOFPREZERO", "Error while zeroing jnl-file !AD", 2,
"UNUSEDMSG989", "JNLQIOLOCKED : Last used in V4.4-000", 0,
"UNUSEDMSG990", "JNLEOFPREZERO : Last used in V4.4-000", 0,
"TPNOTACID", "!AD at !AD in a final TP retry violates ACID properties of a TRANSACTION; indefinite RESTARTs may occur !AD !AD", 8,
"JNLSETDATA2LONG", "SET journal record has data of length !UL. Target system cannot handle data more than !UL bytes.", 2,
"JNLNEWREC", "Target system cannot recognize journal record of type !UL, last recognized type is !UL", 2,
"REPLFTOKSEM", "Error with replication semaphores for instance file !AD", 2,
"GETCWD", "Error getting current working directory for file !AD", 2,
"UNUSEDMSG995", "GETCWD : Last used before V4.0-001E", 0,
"EXTRIOERR", "Error writing extract file !AD", 2,
"EXTRCLOSEERR", "Error closing extract file !AD", 2,
"TRUNCATE", "Error while truncating jnl-file !AD to length !UL", 3,
"UNUSEDMSG998", "TRUNCATE : Last used in V4.3-001F", 0,
"REPLEXITERR", "Replication process encountered an error while exiting", 0,
"MUDESTROYSUC", "Global section (!AD) corresponding to file !AD successfully destroyed", 4,
"DBRNDWN", "Error during global database rundown for region !AD.!/Notify those responsible for proper database operation.", 2,
@ -846,7 +846,7 @@ LITDEF err_msg merrors[] = {
"TCSETATTR", "Error while setting terminal attributes on file descriptor !UL", 1,
"IOWRITERR", "IO Write by pid 0x!XL to blk 0x!XL of database file !AD failed. Pid 0x!XL retrying the IO.", 5,
"REPLINSTWRITE", "Error writing [0x!XL] bytes at offset [0x!16@XQ] in replication instance file !AD", 4,
"DBBADFREEBLKCTR", "Database !AD free blocks counter in file header: 0x!XL is incorrect, should be 0x!XL. Auto-corrected.", 4,
"DBBADFREEBLKCTR", "Database !AD free blocks counter in file header: 0x!XL appears incorrect, should be 0x!XL. Auto-corrected.", 4,
"REQ2RESUME", "Request to resume suspended processing received from process !UL owned by userid !UL", 2,
"TIMERHANDLER", "Incorrect SIGALRM handler (0x!XJ) found by !AD", 3,
"FREEMEMORY", "Error occurred freeing memory from 0x!XJ", 1,
@ -860,7 +860,7 @@ LITDEF err_msg merrors[] = {
"REPLACCSEM", "Error with replication access semaphore (id = !UL) for instance file !AD", 3,
"JNLFLUSHNOPROG", "No progress while attempting to flush journal file !AD", 2,
"REPLINSTCREATE", "Error creating replication instance file !AD", 2,
"SUSPENDING", "Suspending processing on user request or attempt to do terminal I/O while running in the background", 0,
"SUSPENDING", "Process Received Signal !UL. Suspending processing on user request or attempt to do terminal I/O while running in the background", 1,
"SOCKBFNOTEMPTY", "Socket buffer size cannot be set to 0x!XL due to 0x!XL bytes of buffered data. Read first.", 2,
"ILLESOCKBFSIZE", "The specified socket buffer size is 0x!XL, which is either 0 or too big", 1,
"NOSOCKETINDEV", "There is no socket in the current socket device", 0,
@ -914,7 +914,7 @@ LITDEF err_msg merrors[] = {
"SYSTEMVALUE", "Invalid value for $SYSTEM (!AD)", 2,
"SIZENOTVALID4", "Size (in bytes) must be either 1, 2, or 4", 0,
"STRNOTVALID", "Error: cannot convert !AD value to valid value", 2,
"RECNOCREJNL", "Recover could not create new journal file !AD", 2,
"UNUSEDMSG1079", "RECNOCREJNL : Last used in V4.3-001F", 0,
"ERRWETRAP", "Error while processing $ETRAP", 0,
"TRACINGON", "Tracing already turned on", 0,
"CITABENV", "Environment variable for call-in table !AD not set", 2,
@ -942,9 +942,9 @@ LITDEF err_msg merrors[] = {
"ZDIROUTOFSYNC", "$ZDIRECTORY !AD is not the same as its cached value !AD", 4,
"GBLNOEXIST", "Global !AD no longer exists", 2,
"MAXBTLEVEL", "Global !AD reached maximum level", 2,
"JNLSTRESTFL", "Failed to restore journaling state for database !AD", 2,
"UNUSEDMSG1107", "JNLSTRESTFL : found no evidence it ever was used in a production release", 0,
"JNLALIGNSZCHG", "Journal ALIGNSIZE is rounded up to !UL blocks (closest next higher power of two)", 1,
"MAXTRACELEVEL", "The maximum traceable level of !UL has been exceeded. The frame information will not be maintained.", 1,
"UNUSEDMSG1109", "MAXTRACELEVEL : last used in V5.4-002B", 0,
"GVFAILCORE", "A core file is being created for later analysis if necessary", 0,
"DBCDBNOCERTIFY", "Database !AD HAS NOT been certified due to the preceding errors - rerun DBCERTIFY SCAN", 2,
"DBFRZRESETSUC", "Freeze released successfully on database file !AD", 2,
@ -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,
@ -1145,15 +1145,15 @@ LITDEF err_msg merrors[] = {
"DZWRNOALIAS", "$ZWRTAC cannot be aliased", 0,
"FREEZEERR", "Error while trying to !AD region !AD", 4,
"CLOSEFAIL", "Error while closing file descriptor !SL", 1,
"CRYPTINIT", "Error initializing encryption library. !AD", 2,
"CRYPTOPFAILED", "Encrypt/Decrypt operation failed. !AD", 2,
"CRYPTDLNOOPEN", "Error loading encryption library. !AD", 2,
"CRYPTINIT", "Could not initialize encryption library while opening encrypted file !AD. !AD", 4,
"CRYPTOPFAILED", "Encrypt/Decrypt operation failed for file !AD. !AD", 4,
"CRYPTDLNOOPEN", "Could not load encryption library while opening encrypted file !AD. !AD", 4,
"CRYPTNOV4", "!AD is an encrypted database. Cannot downgrade(to V4) with Encryption option enabled.", 2,
"CRYPTNOMM", "!AD is an encrypted database. Cannot support MM access method.", 2,
"CRYPTJNLWRONGHASH", "Encryption key hash mismatch between journal file !AD and corresponding database file !AD", 4,
"CRYPTKEYFETCHFAILED", "Cannot obtain encryption key for !AD. !AD", 4,
"CRYPTKEYFETCHFAILEDNF", "Cannot obtain encryption key. !AD", 2,
"CRYPTHASHGENFAILED", "Error generating encryption hash. !AD", 2,
"CRYPTKEYFETCHFAILED", "Could not retrieve encryption key corresponding to file !AD. !AD", 4,
"CRYPTKEYFETCHFAILEDNF", "Could not retrieve encryption key during !AD operation key. !AD", 4,
"CRYPTHASHGENFAILED", "Could not generate cryptographic hash for symmetric key corresponding to file !AD. !AD", 4,
"CRYPTNOPSWDINTP", "Cannot prompt for password inside a TP transaction.", 0,
"BADTAG", "Unable to use file !AD (CCSID !UL) with CCSID !UL", 4,
"ICUVERLT36", "!AD !UL.!UL. ICU version greater than or equal to 3.6 should be used", 4,
@ -1189,7 +1189,7 @@ LITDEF err_msg merrors[] = {
"TRIGTLVLCHNG", "Detected a net transaction level ($TLEVEL) change during trigger !AD. Transaction level must be the same at exit as when the trigger started", 2,
"TRIGNAMEUNIQ", "Unable to make trigger name !AD unique beyond !UL versions already loaded", 3,
"ZTRIGINVACT", "Missing or invalid parameter in position !UL given to $ZTRIGGER()", 1,
"UNUSEDMSG1354", "ZTRIGNOTP : Last used in V5.4-001", 0,
"INDRCOMPFAIL", "Compilation of indirection failed", 0,
"QUITALSINV", "QUIT * return when the extrinsic was not invoked with SET *", 0,
"PROCTERM", "!AD process termination due to !AD (return code !UL) from !AD", 7,
"SRCLNNTDSP", "Source lines exceeding !UL character width are not displayed", 1,
@ -1202,10 +1202,10 @@ LITDEF err_msg merrors[] = {
"SSATTACHSHM", "Error while attaching to shared memory identifier !UL", 1,
"TRIGDEFNOSYNC", "Global ^!AD has triggers defined on the !AD instance but none on the !AD instance. Current journal sequence number is 0x!16@XQ", 7,
"TRESTMAX", "TRESTART not allowed in a final TP retry more than once", 0,
"TPLOCKRESTMAX", "Transaction restarts due to unavailability of locks not allowed in a final TP retry more than !UL times", 1,
"UNUSEDMSG1367", "TPLOCKRESTMAX : Last used in V5.5-000", 0,
"GBLEXPECTED", "Global variable reference expected in this context", 0,
"GVZTRIGFAIL", "ZTRIGGER of a global variable failed. Failure code: !AD.", 2,
"UNUSEDMSG1370", "ONLYLDTRIG: Last used in V5.4-001", 0,
"MUUSERLBK", "Abnormal shutdown of replication-enabled database !AD detected", 2,
"SETINSETTRIGONLY", "ISV !AD can only be modified in a 'SET' type trigger", 2,
"DZTRIGINTRIG", "$ZTRIGGER() is not allowed inside trigger context. Trigger name: !AD", 2,
"SECNODZTRIGINTP", "Sequence number 0x!16@XQ contains $ZTRIGGER() updates made inside a transaction which the current replicating instance does not support. The replicating instance must be upgraded to at least V5.4-002 to support this type of transaction. Cannot continue", 1,
@ -1217,7 +1217,7 @@ LITDEF err_msg merrors[] = {
"REPLXENDIANFAIL", "!AD side encountered error while doing endian conversion at journal sequence number 0x!16@XQ", 3,
"ZGOTOINVLVL2", "ZGOTO 0:entryref is not valid on VMS (UNLINK is a UNIX only feature)", 0,
"GTMSECSHRCHDIRF", "gtmsecshr unable to chdir to its temporary directory (!AD)", 2,
"UNUSEDMSG1382", "FORCTRLINDX: Only used in V5.4-002", 0,
"JNLORDBFLU", "Error flushing database blocks to !AD. See related messages in the operator log", 2,
"ZCCLNUPRTNMISNG", "External call: Cleanup routine name missing. Cannot continue", 0,
"ZCINVALIDKEYWORD", "External call: Invalid keyword found. Cannot continue", 0,
"REPLNOMULTILINETRG", "Sequence number 0x!16@XQ contains a trigger definition too large for transmission to the current replicating instance, which does not support multi-line triggers - stopping replication", 1,
@ -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,
"EXTRFILEXISTS", "Error opening output file: !AD -- File exists", 2,
"MUUSERECOV", "Abnormal shutdown of journaled database !AD detected", 2,
"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,
"MURNDWNOVRD", "OVERRIDE qualifier used with MUPIP RUNDOWN on database file !AD", 2,
"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,74 @@ 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,
"GTMEISDIR", "!AD : Is a directory", 2,
"SPCLZMSG", "The following error message cannot be driven through ZMESSAGE", 0,
"MUNOTALLINTEG", "At least one region skipped. See the earlier messages", 0,
"BKUPRUNNING", "Process !UL is currently backing up region !AD. Cannot start another backup.", 3,
"MUSIZEINVARG", "MUPIP SIZE : Invalid parameter value for: !AD", 2,
"MUSIZEFAIL", "MUPIP SIZE : failed. Failure code: !AD.", 2,
"SIDEEFFECTEVAL", "Extrinsic ($$), External call ($&) or $INCREMENT() with potential side effects in actuallist, function arguments, non-Boolean binary operands or subscripts", 0,
"CRYPTINIT2", "Could not initialize encryption library !AD. !AD", 4,
"CRYPTDLNOOPEN2", "Could not load encryption library !AD. !AD", 4,
"CRYPTBADCONFIG", "Could not retrieve data from encrypted file !AD due to bad encryption configuration. !AD", 4,
"DBCOLLREQ", "JOURNAL EXTRACT proceeding without collation information for globals in database. !AD !AD", 4,
"SETEXTRENV", "Database files are missing or Instance is frozen; supply the database files, wait for the freeze to lift or define gtm_extract_nocol to extract possibly incorrect collation", 0,
"NOTALLDBRNDWN", "Not all regions were successfully rundown", 0,
"TPRESTNESTERR", "TP restart signaled while handing error - treated as nested error - Use TROLLBACK in error handler to avoid this", 0,
"JNLFILRDOPN", "Error opening journal file !AD for read for database file !AD", 4,
"SEQNUMSEARCHTIMEOUT", "Timed out trying to find sequence number !@ZQ [0x!16@XQ] in Journal File(s). See above messages for details. Source server exiting", 2,
"FTOKKEY", "FTOK key 0x!XL", 1,
"SEMID", "Semaphore id !UL", 1,
"JNLQIOSALVAGE", "Journal IO lock salvaged", 0,
"FAKENOSPCLEARED", "DEBUG: All fake ENOSPC flags were cleared !UL heartbeats ago", 1,
"MMFILETOOLARGE", "Size of !AD region (!AD) is larger than maximum size supported for memory mapped I/O on this platform", 4,
"BADZPEEKARG", "Missing, invalid or surplus !AD parameter for $ZPEEK()", 2,
"BADZPEEKRANGE", "Access exception raised in memory range given to $ZPEEK()", 0,
"BADZPEEKFMT", "$ZPEEK() value length inappropriate for selected format", 0,
"DBMBMINCFREFIXED", "Master bitmap incorrectly marks local bitmap 0x!XL as free. Auto-corrected", 1,
"NULLENTRYREF", "JOB command did not specify entryref", 0,
"ZPEEKNORPLINFO", "$ZPEEK() unable to access requested replication structure", 0,
"MMREGNOACCESS", "Region !AD (!AD) is no longer accessible. See prior error messages in the operator and application error logs", 4,
"MALLOCMAXUNIX", "Exceeded maximum allocation defined by $gtm_max_storalloc", 0,
"MALLOCMAXVMS", "Exceeded maximum allocation defined by GTM_MAX_STORALLOC", 0,
"HOSTCONFLICT", "Host !AD could not open database file !AD because it is marked as already open on node !AD", 6,
"GETADDRINFO", "Error in getting address info", 0,
"GETNAMEINFO", "Error in getting name info", 0,
"SOCKBIND", "Error in binding TCP socket", 0,
"INSTFRZDEFER", "Instance Freeze initiated by !AD error on region !AD deferred due to critical resource conflict", 4,
"REGOPENRETRY", "Attempt to open region !AD (!AD) using startup shortcut failed due to conflicting database shutdown. Retrying...", 4,
"REGOPENFAIL", "Failed to open region !AD (!AD) due to conflicting database shutdown activity", 4,
};
LITDEF int ERR_ACK = 150372361;
@ -1379,11 +1447,11 @@ LITDEF int ERR_GVSUBOFLOW = 150372986;
LITDEF int ERR_GVUNDEF = 150372994;
LITDEF int ERR_TRANSNEST = 150373002;
LITDEF int ERR_INDEXTRACHARS = 150373010;
LITDEF int ERR_INDMAXNEST = 150373018;
LITDEF int ERR_UNUSEDMSG260 = 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;
@ -1479,7 +1547,7 @@ LITDEF int ERR_TERMASTQUOTA = 150373786;
LITDEF int ERR_TEXTARG = 150373794;
LITDEF int ERR_TMPSTOREMAX = 150373802;
LITDEF int ERR_VIEWCMD = 150373810;
LITDEF int ERR_TXTNEGLIN = 150373818;
LITDEF int ERR_JNI = 150373818;
LITDEF int ERR_TXTSRCFMT = 150373826;
LITDEF int ERR_UIDMSG = 150373834;
LITDEF int ERR_UIDSND = 150373842;
@ -1488,9 +1556,9 @@ LITDEF int ERR_UNIMPLOP = 150373858;
LITDEF int ERR_VAREXPECTED = 150373866;
LITDEF int ERR_VARRECBLKSZ = 150373874;
LITDEF int ERR_MAXARGCNT = 150373882;
LITDEF int ERR_WCFAIL = 150373890;
LITDEF int ERR_GTMSECSHRSEMGET = 150373890;
LITDEF int ERR_VIEWARGCNT = 150373898;
LITDEF int ERR_XKILLCNTEXC = 150373906;
LITDEF int ERR_GTMSECSHRDMNSTARTED = 150373907;
LITDEF int ERR_ZATTACHERR = 150373914;
LITDEF int ERR_ZDATEFMT = 150373922;
LITDEF int ERR_ZEDFILSPEC = 150373930;
@ -1545,7 +1613,7 @@ LITDEF int ERR_GVRUNDOWN = 150374314;
LITDEF int ERR_LKRUNDOWN = 150374322;
LITDEF int ERR_IORUNDOWN = 150374330;
LITDEF int ERR_FILENOTFND = 150374338;
LITDEF int ERR_MUFILRNDWNFL = 150374347;
LITDEF int ERR_MUFILRNDWNFL = 150374346;
LITDEF int ERR_JNLTMQUAL1 = 150374354;
LITDEF int ERR_FORCEDHALT = 150374364;
LITDEF int ERR_LOADEOF = 150374370;
@ -1557,14 +1625,14 @@ LITDEF int ERR_GVZPREVFAIL = 150374410;
LITDEF int ERR_MULTFORMPARM = 150374418;
LITDEF int ERR_QUITARGUSE = 150374426;
LITDEF int ERR_NAMEEXPECTED = 150374434;
LITDEF int ERR_UNUSEDMSG438 = 150374442;
LITDEF int ERR_FALLINTOFLST = 150374442;
LITDEF int ERR_NOTEXTRINSIC = 150374450;
LITDEF int ERR_UNUSEDMSG440 = 150374458;
LITDEF int ERR_GTMSECSHRREMSEMFAIL = 150374458;
LITDEF int ERR_FMLLSTMISSING = 150374466;
LITDEF int ERR_ACTLSTTOOLONG = 150374474;
LITDEF int ERR_ACTOFFSET = 150374482;
LITDEF int ERR_MAXACTARG = 150374490;
LITDEF int ERR_GTMDUMPFAIL = 150374498;
LITDEF int ERR_GTMSECSHRREMSEM = 150374498;
LITDEF int ERR_JNLTMQUAL2 = 150374506;
LITDEF int ERR_GDINVALID = 150374514;
LITDEF int ERR_ASSERT = 150374524;
@ -1708,17 +1776,17 @@ LITDEF int ERR_LDGOQFMT = 150375618;
LITDEF int ERR_BEGINST = 150375627;
LITDEF int ERR_INVMVXSZ = 150375636;
LITDEF int ERR_JNLWRTNOWWRTR = 150375642;
LITDEF int ERR_MUPGDERR = 150375650;
LITDEF int ERR_GTMSECSHRSHMCONCPROC = 150375650;
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_GTMSECSHRREMSHM = 150375691;
LITDEF int ERR_GTMSECSHRREMFILE = 150375699;
LITDEF int ERR_MUNODBNAME = 150375706;
LITDEF int ERR_FILECREATE = 150375715;
LITDEF int ERR_FILENOTCREATE = 150375723;
LITDEF int ERR_JNLPROCSTUCK = 150375731;
LITDEF int ERR_JNLPROCSTUCK = 150375728;
LITDEF int ERR_INVGLOBALQUAL = 150375738;
LITDEF int ERR_COLLARGLONG = 150375746;
LITDEF int ERR_NOPINI = 150375754;
@ -1736,7 +1804,7 @@ LITDEF int ERR_WCERRNOTCHG = 150375842;
LITDEF int ERR_WCWRNNOTCHG = 150375848;
LITDEF int ERR_ZCWRONGDESC = 150375858;
LITDEF int ERR_MUTNWARN = 150375864;
LITDEF int ERR_JNLNAMLEN = 150375874;
LITDEF int ERR_GTMSECSHRUPDDBHDR = 150375875;
LITDEF int ERR_LCKSTIMOUT = 150375880;
LITDEF int ERR_CTLMNEMAXLEN = 150375890;
LITDEF int ERR_CTLMNEXPECTED = 150375898;
@ -1872,14 +1940,14 @@ LITDEF int ERR_MUTEXFRCDTERM = 150376928;
LITDEF int ERR_GTMSECSHR = 150376938;
LITDEF int ERR_GTMSECSHRSRVFID = 150376944;
LITDEF int ERR_GTMSECSHRSRVFIL = 150376952;
LITDEF int ERR_SOCKACTNA = 150376962;
LITDEF int ERR_FREEBLKSLOW = 150376960;
LITDEF int ERR_PROTNOTSUP = 150376970;
LITDEF int ERR_DELIMSIZNA = 150376978;
LITDEF int ERR_INVCTLMNE = 150376986;
LITDEF int ERR_SOCKLISTEN = 150376994;
LITDEF int ERR_LQLENGTHNA = 150377002;
LITDEF int ERR_ADDRTOOLONG = 150377010;
LITDEF int ERR_UNUSEDMSG760 = 150377018;
LITDEF int ERR_GTMSECSHRGETSEMFAIL = 150377018;
LITDEF int ERR_CPBEYALLOC = 150377026;
LITDEF int ERR_DBRDONLY = 150377034;
LITDEF int ERR_DUPTN = 150377040;
@ -1900,7 +1968,7 @@ LITDEF int ERR_BCKUPBUFLUSH = 150377154;
LITDEF int ERR_NOFORKCORE = 150377160;
LITDEF int ERR_JNLREAD = 150377170;
LITDEF int ERR_JNLMINALIGN = 150377176;
LITDEF int ERR_JNLDSKALIGN = 150377184;
LITDEF int ERR_UNUSEDMSG781 = 150377186;
LITDEF int ERR_JNLPOOLSETUP = 150377194;
LITDEF int ERR_JNLSTATEOFF = 150377202;
LITDEF int ERR_RECVPOOLSETUP = 150377210;
@ -1928,7 +1996,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;
@ -1963,7 +2031,7 @@ LITDEF int ERR_RECSIZENOTEVEN = 150377658;
LITDEF int ERR_BUFFLUFAILED = 150377666;
LITDEF int ERR_MUQUALINCOMP = 150377674;
LITDEF int ERR_DISTPATHMAX = 150377682;
LITDEF int ERR_MAXTRACEHEIGHT = 150377691;
LITDEF int ERR_UNUSEDMSG844 = 150377690;
LITDEF int ERR_IMAGENAME = 150377698;
LITDEF int ERR_GTMSECSHRPERM = 150377706;
LITDEF int ERR_GTMDISTUNDEF = 150377714;
@ -2017,8 +2085,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;
@ -2069,7 +2137,7 @@ LITDEF int ERR_DBMBPFRDLBM = 150378504;
LITDEF int ERR_DBMBPFRINT = 150378512;
LITDEF int ERR_DBMAXKEYEXC = 150378522;
LITDEF int ERR_DBMXRSEXCMIN = 150378530;
LITDEF int ERR_DBMAXRSEXBL = 150378538;
LITDEF int ERR_UNUSEDMSG950 = 150378538;
LITDEF int ERR_DBREADBM = 150378546;
LITDEF int ERR_DBCOMPTOOLRG = 150378554;
LITDEF int ERR_DBVERPERFWARN2 = 150378560;
@ -2091,7 +2159,7 @@ LITDEF int ERR_MUTEXRSRCCLNUP = 150378683;
LITDEF int ERR_SEMWT2LONG = 150378690;
LITDEF int ERR_REPLINSTOPEN = 150378698;
LITDEF int ERR_REPLINSTCLOSE = 150378706;
LITDEF int ERR_JNLNOTFOUND = 150378715;
LITDEF int ERR_UNUSEDMSG972 = 150378714;
LITDEF int ERR_DBCRERR8 = 150378723;
LITDEF int ERR_NUMPROCESSORS = 150378728;
LITDEF int ERR_DBADDRANGE8 = 150378739;
@ -2108,16 +2176,16 @@ LITDEF int ERR_REPLJNLCLOSED = 150378818;
LITDEF int ERR_RENAMEFAIL = 150378824;
LITDEF int ERR_FILERENAME = 150378835;
LITDEF int ERR_JNLBUFINFO = 150378843;
LITDEF int ERR_JNLQIOLOCKED = 150378850;
LITDEF int ERR_JNLEOFPREZERO = 150378858;
LITDEF int ERR_UNUSEDMSG989 = 150378850;
LITDEF int ERR_UNUSEDMSG990 = 150378858;
LITDEF int ERR_TPNOTACID = 150378867;
LITDEF int ERR_JNLSETDATA2LONG = 150378874;
LITDEF int ERR_JNLNEWREC = 150378882;
LITDEF int ERR_REPLFTOKSEM = 150378890;
LITDEF int ERR_GETCWD = 150378898;
LITDEF int ERR_UNUSEDMSG995 = 150378898;
LITDEF int ERR_EXTRIOERR = 150378906;
LITDEF int ERR_EXTRCLOSEERR = 150378914;
LITDEF int ERR_TRUNCATE = 150378922;
LITDEF int ERR_UNUSEDMSG998 = 150378922;
LITDEF int ERR_REPLEXITERR = 150378930;
LITDEF int ERR_MUDESTROYSUC = 150378939;
LITDEF int ERR_DBRNDWN = 150378946;
@ -2130,7 +2198,7 @@ LITDEF int ERR_TCGETATTR = 150378994;
LITDEF int ERR_TCSETATTR = 150379002;
LITDEF int ERR_IOWRITERR = 150379010;
LITDEF int ERR_REPLINSTWRITE = 150379018;
LITDEF int ERR_DBBADFREEBLKCTR = 150379027;
LITDEF int ERR_DBBADFREEBLKCTR = 150379024;
LITDEF int ERR_REQ2RESUME = 150379035;
LITDEF int ERR_TIMERHANDLER = 150379040;
LITDEF int ERR_FREEMEMORY = 150379050;
@ -2138,11 +2206,11 @@ LITDEF int ERR_MUREPLSECDEL = 150379059;
LITDEF int ERR_MUREPLSECNOTDEL = 150379067;
LITDEF int ERR_MUJPOOLRNDWNSUC = 150379075;
LITDEF int ERR_MURPOOLRNDWNSUC = 150379083;
LITDEF int ERR_MUJPOOLRNDWNFL = 150379091;
LITDEF int ERR_MURPOOLRNDWNFL = 150379099;
LITDEF int ERR_MUJPOOLRNDWNFL = 150379090;
LITDEF int ERR_MURPOOLRNDWNFL = 150379098;
LITDEF int ERR_MUREPLPOOL = 150379107;
LITDEF int ERR_REPLACCSEM = 150379114;
LITDEF int ERR_JNLFLUSHNOPROG = 150379122;
LITDEF int ERR_JNLFLUSHNOPROG = 150379120;
LITDEF int ERR_REPLINSTCREATE = 150379130;
LITDEF int ERR_SUSPENDING = 150379139;
LITDEF int ERR_SOCKBFNOTEMPTY = 150379146;
@ -2198,7 +2266,7 @@ LITDEF int ERR_NOSUBSCRIPT = 150379538;
LITDEF int ERR_SYSTEMVALUE = 150379546;
LITDEF int ERR_SIZENOTVALID4 = 150379554;
LITDEF int ERR_STRNOTVALID = 150379562;
LITDEF int ERR_RECNOCREJNL = 150379571;
LITDEF int ERR_UNUSEDMSG1079 = 150379570;
LITDEF int ERR_ERRWETRAP = 150379578;
LITDEF int ERR_TRACINGON = 150379587;
LITDEF int ERR_CITABENV = 150379594;
@ -2216,7 +2284,7 @@ LITDEF int ERR_SETZDIR = 150379682;
LITDEF int ERR_JOBACTREF = 150379690;
LITDEF int ERR_ECLOSTMID = 150379696;
LITDEF int ERR_ZFF2MANY = 150379706;
LITDEF int ERR_JNLFSYNCLSTCK = 150379715;
LITDEF int ERR_JNLFSYNCLSTCK = 150379712;
LITDEF int ERR_DELIMWIDTH = 150379722;
LITDEF int ERR_DBBMLCORRUPT = 150379730;
LITDEF int ERR_DLCKAVOIDANCE = 150379738;
@ -2226,9 +2294,9 @@ LITDEF int ERR_INVZDIRFORM = 150379762;
LITDEF int ERR_ZDIROUTOFSYNC = 150379768;
LITDEF int ERR_GBLNOEXIST = 150379779;
LITDEF int ERR_MAXBTLEVEL = 150379786;
LITDEF int ERR_JNLSTRESTFL = 150379794;
LITDEF int ERR_UNUSEDMSG1107 = 150379794;
LITDEF int ERR_JNLALIGNSZCHG = 150379803;
LITDEF int ERR_MAXTRACELEVEL = 150379811;
LITDEF int ERR_UNUSEDMSG1109 = 150379810;
LITDEF int ERR_GVFAILCORE = 150379818;
LITDEF int ERR_DBCDBNOCERTIFY = 150379826;
LITDEF int ERR_DBFRZRESETSUC = 150379835;
@ -2250,7 +2318,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 +2442,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;
@ -2473,7 +2541,7 @@ LITDEF int ERR_TRIGTCOMMIT = 150381738;
LITDEF int ERR_TRIGTLVLCHNG = 150381746;
LITDEF int ERR_TRIGNAMEUNIQ = 150381754;
LITDEF int ERR_ZTRIGINVACT = 150381762;
LITDEF int ERR_UNUSEDMSG1354 = 150381770;
LITDEF int ERR_INDRCOMPFAIL = 150381770;
LITDEF int ERR_QUITALSINV = 150381778;
LITDEF int ERR_PROCTERM = 150381784;
LITDEF int ERR_SRCLNNTDSP = 150381795;
@ -2486,10 +2554,10 @@ LITDEF int ERR_TCOMMITDISALLOW = 150381842;
LITDEF int ERR_SSATTACHSHM = 150381850;
LITDEF int ERR_TRIGDEFNOSYNC = 150381856;
LITDEF int ERR_TRESTMAX = 150381866;
LITDEF int ERR_TPLOCKRESTMAX = 150381874;
LITDEF int ERR_UNUSEDMSG1367 = 150381874;
LITDEF int ERR_GBLEXPECTED = 150381882;
LITDEF int ERR_GVZTRIGFAIL = 150381890;
LITDEF int ERR_UNUSEDMSG1370 = 150381898;
LITDEF int ERR_MUUSERLBK = 150381898;
LITDEF int ERR_SETINSETTRIGONLY = 150381906;
LITDEF int ERR_DZTRIGINTRIG = 150381914;
LITDEF int ERR_SECNODZTRIGINTP = 150381922;
@ -2501,7 +2569,7 @@ LITDEF int ERR_REPLNOXENDIAN = 150381962;
LITDEF int ERR_REPLXENDIANFAIL = 150381970;
LITDEF int ERR_ZGOTOINVLVL2 = 150381978;
LITDEF int ERR_GTMSECSHRCHDIRF = 150381986;
LITDEF int ERR_UNUSEDMSG1382 = 150381994;
LITDEF int ERR_JNLORDBFLU = 150381994;
LITDEF int ERR_ZCCLNUPRTNMISNG = 150382002;
LITDEF int ERR_ZCINVALIDKEYWORD = 150382010;
LITDEF int ERR_REPLNOMULTILINETRG = 150382018;
@ -2532,12 +2600,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_EXTRFILEXISTS = 150382242;
LITDEF int ERR_MUUSERECOV = 150382250;
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 +2624,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_MURNDWNOVRD = 150382435;
LITDEF int ERR_REPLONLNRLBK = 150382442;
LITDEF int ERR_SRVLCKWT2LNG = 150382450;
LITDEF int ERR_IGNBMPMRKFREE = 150382459;
@ -2579,9 +2647,77 @@ 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 = 150382842;
LITDEF int ERR_MUINSTFROZEN = 150382851;
LITDEF int ERR_MUINSTUNFROZEN = 150382859;
LITDEF int ERR_GTMEISDIR = 150382866;
LITDEF int ERR_SPCLZMSG = 150382874;
LITDEF int ERR_MUNOTALLINTEG = 150382880;
LITDEF int ERR_BKUPRUNNING = 150382890;
LITDEF int ERR_MUSIZEINVARG = 150382898;
LITDEF int ERR_MUSIZEFAIL = 150382906;
LITDEF int ERR_SIDEEFFECTEVAL = 150382912;
LITDEF int ERR_CRYPTINIT2 = 150382922;
LITDEF int ERR_CRYPTDLNOOPEN2 = 150382930;
LITDEF int ERR_CRYPTBADCONFIG = 150382938;
LITDEF int ERR_DBCOLLREQ = 150382944;
LITDEF int ERR_SETEXTRENV = 150382954;
LITDEF int ERR_NOTALLDBRNDWN = 150382962;
LITDEF int ERR_TPRESTNESTERR = 150382970;
LITDEF int ERR_JNLFILRDOPN = 150382978;
LITDEF int ERR_SEQNUMSEARCHTIMEOUT = 150382986;
LITDEF int ERR_FTOKKEY = 150382995;
LITDEF int ERR_SEMID = 150383003;
LITDEF int ERR_JNLQIOSALVAGE = 150383011;
LITDEF int ERR_FAKENOSPCLEARED = 150383019;
LITDEF int ERR_MMFILETOOLARGE = 150383026;
LITDEF int ERR_BADZPEEKARG = 150383034;
LITDEF int ERR_BADZPEEKRANGE = 150383042;
LITDEF int ERR_BADZPEEKFMT = 150383050;
LITDEF int ERR_DBMBMINCFREFIXED = 150383056;
LITDEF int ERR_NULLENTRYREF = 150383066;
LITDEF int ERR_ZPEEKNORPLINFO = 150383074;
LITDEF int ERR_MMREGNOACCESS = 150383082;
LITDEF int ERR_MALLOCMAXUNIX = 150383090;
LITDEF int ERR_MALLOCMAXVMS = 150383098;
LITDEF int ERR_HOSTCONFLICT = 150383106;
LITDEF int ERR_GETADDRINFO = 150383114;
LITDEF int ERR_GETNAMEINFO = 150383122;
LITDEF int ERR_SOCKBIND = 150383130;
LITDEF int ERR_INSTFRZDEFER = 150383139;
LITDEF int ERR_REGOPENRETRY = 150383147;
LITDEF int ERR_REGOPENFAIL = 150383154;
GBLDEF err_ctl merrors_ctl = {
246,
"GTM",
&merrors[0],
1282};
1350};

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 #
@ -95,6 +95,19 @@ top = 8
addl $4,%esp
movl %eax, \mval
\label:
.endm
.sbttl mval_def.si mv_force_defined_strict
# ---------------------------------------
# mv_force_defined_strict(mval, label)
# ---------------------------------------
.macro mv_force_defined_strict mval, label
testw $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
jne \label
pushl \mval
call underr_strict
addl $4,%esp
\label:
.endm
.sbttl mval_def.si mv_force_str

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

@ -1,6 +1,6 @@
#################################################################
# #
# Copyright 2001, 2008 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 #
@ -53,7 +53,7 @@ ENTRY op_forloop
pushl %esi
pushl %ebx
movl indx(%ebp),%esi
mv_force_defined %esi, l0
mv_force_defined_strict %esi, l0 # disregard NOUNDEF
movl %esi, indx(%ebp)
mv_force_num %esi, l1
movl indx(%ebp),%esi

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 #
@ -29,9 +29,9 @@
# PUBLIC opp_iretmval
ENTRY opp_iretmval # /* PROC */
putframe
addl $4,%esp
addl $4,%esp # /* burn return pc */
call op_iretmval
addl $4,%esp
addl $8,%esp # /* burn two passed-in args */
getframe
ret
# opp_iretmval ENDP

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#################################################################
# #
# Copyright 2001, 2012 Fidelity Information Services, Inc #
# Copyright 2001, 2013 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
@ -182,11 +182,12 @@ if ( $?gtm_version_change == "1" ) then
# -fno-defer-pop to prevent problems with assembly/generated code with optimization
# -fno-strict-aliasing since we don't comply with the rules
# -ffloat-store for consistent results avoiding rounding differences
# -fno-omit-frame-pointer so %rbp always gets set up (required by caller_id()). Default changed in gcc 4.6.
if ( "ia64" != $mach_type ) then
setenv gt_cc_option_optimize "-O2 -fno-defer-pop -fno-strict-aliasing -ffloat-store"
if ( "32" == $gt_build_type ) then
# applies to 32bit x86_64, ia32 and cygwin
setenv gt_cc_option_optimize "$gt_cc_option_optimize -march=i686"
setenv gt_cc_option_optimize "$gt_cc_option_optimize -fno-omit-frame-pointer -march=i686"
endif
endif
# -g generate debugging information for dbx (no longer overrides -O)

View File

@ -65,25 +65,10 @@ gt_cc_option_nooptimize=
gt_cc_option_optimize=-O2 -fno-defer-pop -fno-strict-aliasing -ffloat-store
gt_cc_options_common+= -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -fsigned-char
ifeq ($(gt_build_type),32)
gt_cc_option_I=-I-
endif
ifeq ($(gt_machine_type), x86_64)
ifeq ($(gt_build_type),32)
# Do not lookup the source directory before include directories specified by -I.
# gcc complains about -I- being obsolete, but using -iquote cause build errors for gcc and as - ABS 2008.12.09
#
# The -I- option is only needed for 32 bit builds on x86_64. It provides a feature that is not present in
# -iquote - namely -I- disables the ability to search the current directory for include files. This is needed
# when compiling something in sr_port which includes a file that is in both sr_port and the architecture specific
# sr_386. We don't want the sr_port version. An example is sr_port/code_gen.c which includes emit_code.h.
# emit_code.h is found in both sr_port and sr_i386. Using -I- will find the sr_i386 version, but without it the
# sr_port version is used. SLJ 2010.03.31
# The /emul/ia32-linux/... directory doesn't exist on most machines, but when it's there we need it. No problem
# with always includeing it.
gt_cc_option_I+= -I/emul/ia32-linux/usr/include/
else
gt_cc_option_I=

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-003 CYGWIN x86"
#elif defined(__ia64)
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux IA64"
#define GTM_RELEASE_NAME "GT.M V6.0-003 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-003 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-003 Linux S390X"
#else
#define GTM_RELEASE_NAME "GT.M V5.5-000A Linux x86"
#define GTM_RELEASE_NAME "GT.M V6.0-003 Linux x86"
#endif
#define GTM_PRODUCT "GT.M"
#define GTM_VERSION "V5.5"
#define GTM_VERSION "V6.0"

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -13,15 +13,22 @@
#include "compiler.h"
#include "opcode.h"
#include "toktyp.h"
#include "mdq.h"
#include "fullbool.h"
#include "advancewindow.h"
#include "show_source_line.h"
error_def (ERR_MAXACTARG);
error_def (ERR_NAMEEXPECTED);
error_def (ERR_COMMAORRPAREXP);
GBLREF boolean_t run_time;
error_def(ERR_COMMAORRPAREXP);
error_def(ERR_MAXACTARG);
error_def(ERR_NAMEEXPECTED);
error_def(ERR_SIDEEFFECTEVAL);
int actuallist (oprtype *opr)
{
int mask, parmcount;
boolean_t se_warn;
int i, j, mask, parmcount;
oprtype ot;
triple *counttrip, *masktrip, *ref0, *ref1, *ref2;
DCL_THREADGBL_ACCESS;
@ -96,6 +103,29 @@ error_def (ERR_COMMAORRPAREXP);
}
ref0 = ref1;
}
if ((1 < parmcount) && (TREF(side_effect_base))[TREF(expr_depth)])
{ /* at least two arguments and at least one side effect - look for lvns needing protection */
assert(OLD_SE != TREF(side_effect_handling));
se_warn = (!run_time && (SE_WARN == TREF(side_effect_handling)));
for (i = 0, j = parmcount, ref0 = counttrip->operand[1].oprval.tref; --j;
ref0 = ref0->operand[1].oprval.tref)
{ /* no need to do the last argument - can't have a side effect after it */
assert(OC_PARAMETER == ref0->opcode);
assert((TRIP_REF == ref0->operand[0].oprclass) && (TRIP_REF == ref0->operand[1].oprclass));
if (!((1 << i++) & mask) && (OC_VAR == ref0->operand[0].oprval.tref->opcode))
{ /* can only protect pass-by-value (not pass-by-reference) */
ref1 = maketriple(OC_STOTEMP);
ref1->operand[0] = put_tref(ref0->operand[0].oprval.tref);
ref0->operand[0].oprval.tref = ref1;
dqins(ref0, exorder, ref1); /* NOTE:this violates information hiding */
if (se_warn)
ISSUE_SIDEEFFECTEVAL_WARNING(ref0->src.column);
}
}
/* the following asserts check we're getting only TRIP_REF or empty operands */
assert((NO_REF == ref0->operand[0].oprclass) || (TRIP_REF == ref0->operand[0].oprclass));
assert(((NO_REF == ref0->operand[0].oprclass) ? TRIP_REF : NO_REF) == ref0->operand[1].oprclass);
}
}
advancewindow();
masktrip->operand[0] = put_ilit(mask);

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -52,7 +52,7 @@ static readonly unsigned char apos_ok[] =
void advancewindow(void)
{
unsigned char *cp1, *cp2, *cp3, x;
char *tmp, source_line_buff[MAX_SRCLINE + SIZEOF(ARROW)];
char *tmp;
int y, charlen;
# ifdef UNICODE_SUPPORTED
uint4 ch;
@ -96,7 +96,7 @@ void advancewindow(void)
}
if (!run_time)
{
show_source_line(source_line_buff, SIZEOF(source_line_buff), TRUE);
show_source_line(TRUE);
dec_err(VARLSTCNT(1) ERR_LITNONGRAPH);
}
}
@ -151,7 +151,7 @@ void advancewindow(void)
{
if (cp2 < cp3)
*cp2++ = x;
y = ctypetab[x = *++lexical_ptr];
y = ctypetab[x = *++lexical_ptr]; /* note assignment */
if ((TK_UPPER != y) && (TK_DIGIT != y) && (TK_LOWER != y))
break;
}
@ -159,7 +159,7 @@ void advancewindow(void)
TREF(director_token) = TK_IDENT;
return;
case TK_PERIOD:
if (ctypetab[x = *(lexical_ptr + 1)] != TK_DIGIT)
if (ctypetab[x = *(lexical_ptr + 1)] != TK_DIGIT) /* note assignment */
break;
case TK_DIGIT:
(TREF(director_mval)).str.addr = lexical_ptr;
@ -186,14 +186,14 @@ void advancewindow(void)
}
return;
case TK_APOSTROPHE:
if (( x = *++lexical_ptr) >= 32)
if (32 <= (x = *++lexical_ptr)) /* note assignment */
{
x -= 32;
if (x < SIZEOF(apos_ok) / SIZEOF(unsigned char))
if (x < ARRAYSIZE(apos_ok))
{
if (y = apos_ok[x])
{
if (DEL < (x = *++lexical_ptr))
if (DEL < (x = *++lexical_ptr)) /* note assignment */
{
TREF(director_token) = TK_ERROR;
return;
@ -210,6 +210,14 @@ void advancewindow(void)
}
TREF(director_token) = TK_APOSTROPHE;
return;
case TK_GREATER:
case TK_LESS:
if (TK_EQUAL == ctypetab[*(lexical_ptr + 1)])
{
++lexical_ptr;
y = ((TK_LESS == y) ? TK_NGREATER : TK_NLESS);
}
break;
case TK_SEMICOLON:
while (*++lexical_ptr)
;
@ -217,7 +225,7 @@ void advancewindow(void)
TREF(director_token) = TK_EOL;
return; /* if next character is terminator, avoid incrementing past it */
case TK_ASTERISK:
if (DEL < (x = *(lexical_ptr + 1)))
if (DEL < (x = *(lexical_ptr + 1))) /* note assignment */
{
TREF(director_token) = TK_ERROR;
return;
@ -229,7 +237,7 @@ void advancewindow(void)
}
break;
case TK_RBRACKET:
if ((x = *(lexical_ptr + 1)) > DEL)
if ((x = *(lexical_ptr + 1)) > DEL) /* note assignment */
{
TREF(director_token) = TK_ERROR;
return;
@ -240,6 +248,17 @@ void advancewindow(void)
y = TK_SORTS_AFTER;
}
break;
case TK_ATSIGN:
if (DEL < (x = *(lexical_ptr + 1))) /* note assignment */
{
TREF(director_token) = TK_ERROR;
return;
}
if (TK_HASH == ctypetab[x])
{
lexical_ptr++;
y = TK_ATHASH;
}
default:
;
}

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -23,8 +23,6 @@
#include "alloc_reg.h"
#include "cdbg_dump.h"
#define MAX_TEMP_COUNT 128
GBLDEF int4 sa_temps[VALUED_REF_TYPES];
GBLDEF int4 sa_temps_offset[VALUED_REF_TYPES];
@ -44,8 +42,12 @@ LITDEF int4 sa_class_sizes[VALUED_REF_TYPES] =
};
LITREF octabstruct oc_tab[];
#define MAX_TEMP_COUNT 1024
error_def(ERR_TMPSTOREMAX);
STATICFNDCL void remove_backptr(triple *curtrip, oprtype *opnd, char (*tempcont)[MAX_TEMP_COUNT]);
void alloc_reg(void)
{
triple *x, *y, *ref;
@ -94,14 +96,22 @@ void alloc_reg(void)
COMPDBG(PRINTF(" ** Converting triple to NOOP (rsn 2) **\n"););
continue; /* continue, because 'normal' NOOP continues from this switch */
}
# ifndef DEBUG
break;
# endif
case OC_LINEFETCH:
# ifdef DEBUG
for (c = temphigh[TVAL_REF]; 0 <= c; c--)
assert(0 == tempcont[TVAL_REF][c]); /* check against leaking TVAL temps */
if (OC_LINESTART == opc)
break;
# endif
case OC_FETCH:
assert((TRIP_REF == x->operand[0].oprclass) && (OC_ILIT == x->operand[0].oprval.tref->opcode));
if (x->operand[0].oprval.tref->operand[0].oprval.ilit == mvmax)
{
x->operand[0].oprval.tref->operand[0].oprval.ilit = 0;
x->operand[1].oprclass = 0;
x->operand[1].oprclass = NO_REF;
}
break;
case OC_STO:
@ -121,50 +131,24 @@ void alloc_reg(void)
&& (0 == x->operand[0].oprval.tref->operand[0].oprval.mlit->v.str.len))
{
x->operand[0] = x->operand[1];
x->operand[1].oprclass = 0;
x->operand[1].oprclass = NO_REF;
opc = x->opcode = OC_EQUNUL;
} else if ((TRIP_REF == x->operand[1].oprclass) && (OC_LIT == x->operand[1].oprval.tref->opcode)
&& (0 == x->operand[1].oprval.tref->operand[0].oprval.mlit->v.str.len))
{
x->operand[1].oprclass = 0;
x->operand[1].oprclass = NO_REF;
opc = x->opcode = OC_EQUNUL;
}
break;
}
for (j = x->operand, y = x; j < ARRAYTOP(y->operand); )
{
if (TRIP_REF == j->oprclass)
{
ref = j->oprval.tref;
if (OC_PARAMETER == ref->opcode)
{
y = ref;
j = y->operand;
continue;
}
if (r = ref->destination.oprclass) /* Note assignment */
{
dqloop(&ref->backptr, que, b)
{
if (b->bpt == y)
{
dqdel(b, que);
break;
}
}
if ((ref->backptr.que.fl == &ref->backptr) && (TVAR_REF != r))
tempcont[r][j->oprval.tref->destination.oprval.temp] = 0;
}
}
j++;
}
if (OC_PASSTHRU == x->opcode)
{
COMPDBG(PRINTF(" *** OC_PASSTHRU opcode being NOOP'd\n"););
remove_backptr(x, &x->operand[0], tempcont);
x->opcode = OC_NOOP;
continue;
}
if (!(dest_type = x->destination.oprclass)) /* Note assignment */
if (NO_REF == (dest_type = x->destination.oprclass)) /* Note assignment */
{
oct = oc_tab[opc].octype;
if ((oct & OCT_VALUE) && (x->backptr.que.fl != &x->backptr) && !(oct & OCT_CGSKIP))
@ -175,7 +159,7 @@ void alloc_reg(void)
{
x->destination = y->operand[0];
y->opcode = OC_NOOP;
y->operand[0].oprclass = y->operand[1].oprclass = 0;
y->operand[0].oprclass = y->operand[1].oprclass = NO_REF;
} else
{
oct &= OCT_VALUE | OCT_MVADDR;
@ -186,7 +170,7 @@ void alloc_reg(void)
for (c = 0; tempcont[r][c] && (MAX_TEMP_COUNT > c); c++)
;
if (MAX_TEMP_COUNT <= c)
rts_error(VARLSTCNT(1) ERR_TMPSTOREMAX);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TMPSTOREMAX);
tempcont[r][c] = 1;
x->destination.oprclass = r;
x->destination.oprval.temp = c;
@ -201,6 +185,27 @@ void alloc_reg(void)
assert(x->destination.oprval.tref->destination.oprclass);
x->destination = x->destination.oprval.tref->destination;
}
for (j = x->operand, y = x; j < ARRAYTOP(y->operand); )
{ /* Loop through all the parameters of the current opcode. For each parameter that requires an intermediate
* temporary, decrement (this is what remove_backptr does) the "reference count" -- opcodes yet to be
* processed that still need the intermediate result -- and if that number is zero, mark the temporary
* available. We can then reuse the temp to hold the results of subsequent opcodes. Note that remove_backptr
* is essentially the resolve_tref() in resolve_ref.c. resolve_tref increments the "reference count",
* while remove_backptr decrements it.
*/
if (TRIP_REF == j->oprclass)
{
ref = j->oprval.tref;
if (OC_PARAMETER == ref->opcode)
{
y = ref;
j = y->operand;
continue;
}
remove_backptr(y, j, tempcont);
}
j++;
}
}
for (r = 0; VALUED_REF_TYPES > r; r++)
sa_temps[r] = temphigh[r] + 1;
@ -208,10 +213,40 @@ void alloc_reg(void)
size = sa_temps[TVAL_REF] * sa_class_sizes[TVAL_REF];
sa_temps_offset[TVAL_REF] = size;
/* Since we need to align the temp region to the largest types, align even int temps to SIZEOF(char*) */
size += ROUND_UP2(sa_temps[TINT_REF] * sa_class_sizes[TINT_REF], SIZEOF(char *));
size += ROUND_UP2(sa_temps[TINT_REF] *sa_class_sizes[TINT_REF], SIZEOF(char *));
sa_temps_offset[TINT_REF] = size;
size += sa_temps[TVAD_REF] * sa_class_sizes[TVAD_REF];
sa_temps_offset[TVAD_REF] = size;
size += sa_temps[TCAD_REF] * sa_class_sizes[TCAD_REF];
sa_temps_offset[TCAD_REF] = size;
}
void remove_backptr(triple *curtrip, oprtype *opnd, char (*tempcont)[MAX_TEMP_COUNT])
{
triple *ref;
tbp *b;
int r;
assert(TRIP_REF == opnd->oprclass);
ref = opnd->oprval.tref;
while (OC_PASSTHRU == opnd->oprval.tref->opcode)
{
ref = ref->operand[0].oprval.tref;
opnd = &ref->operand[0];
assert(TRIP_REF == opnd->oprclass);
}
r = ref->destination.oprclass;
if (NO_REF != r)
{
dqloop(&ref->backptr, que, b)
{
if (b->bpt == curtrip)
{
dqdel(b, que);
break;
}
}
if ((ref->backptr.que.fl == &ref->backptr) && (TVAR_REF != r))
tempcont[r][ref->destination.oprval.temp] = 0;
}
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001 Sanchez Computer Associates, Inc. *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -11,24 +11,53 @@
#include "mdef.h"
unsigned int asc_hex2i(p,len)
char *p;
int len;
LITREF unsigned char lower_to_upper_table[];
unsigned int asc_hex2i(uchar_ptr_t p, int len)
{
char *c;
int ret;
uchar_ptr_t c;
unsigned char ch;
int ret;
ret = 0;
for (c = p + len; c > p; p++)
{
if (*p >= '0' && *p <= '9')
ret = ret * 16 + *p - '0';
else if (*p >= 'a' && *p <= 'f')
ret = ret * 16 + *p - 'a' + 10;
else if (*p >= 'A' && *p <= 'F')
ret = ret * 16 + *p - 'A' + 10;
if (('0' <= *p) && ('9' >= *p))
ret = (ret << 4) + (*p - '0');
else
return (uint4)-1;
{
ch = lower_to_upper_table[*p];
if (('A' <= ch) && ('F' >= ch))
ret = (ret << 4) + ch - 'A' + 10;
else
return (unsigned int)-1;
}
}
return ret;
}
#ifndef VMS
/* Routine identical to asc_hex2i() but with 8 byte accumulator and return type */
gtm_uint64_t asc_hex2l(uchar_ptr_t p, int len)
{
uchar_ptr_t c;
unsigned char ch;
gtm_uint64_t ret;
ret = 0;
for (c = p + len; c > p; p++)
{
if (('0' <= *p) && ('9' >= *p))
ret = (ret << 4) + (*p - '0');
else
{
ch = lower_to_upper_table[*p];
if (('A' <= ch) && ('F' >= ch))
ret = (ret << 4) + ch - 'A' + 10;
else
return (gtm_uint64_t)-1;
}
}
return ret;
}
#endif

View File

@ -13,7 +13,8 @@
#include "gtm_string.h"
#include "rtnhdr.h"
#include "error.h" /* For DBGEHND() */
#include <rtnhdr.h>
#include "stack_frame.h"
GBLREF unsigned char *stacktop, *stackwarn, *msp;
@ -61,4 +62,5 @@ void base_frame(rhdtyp *base_address)
fp->type = SFT_COUNT;
fp->ret_value = NULL;
fp->dollar_test = -1;
DBGEHND((stderr, "base_frame: New base frame allocated at 0x"lvaddr"\n", fp));
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -67,6 +67,9 @@ GBLREF uint4 dollar_tlevel;
GBLREF uint4 update_array_size, cumul_update_array_size;
GBLREF unsigned int t_tries;
error_def(ERR_DBBADFREEBLKCTR);
error_def(ERR_DBMBMINCFREFIXED);
block_id bm_getfree(block_id orig_hint, boolean_t *blk_used, unsigned int cw_work, cw_set_element *cs, int *cw_depth_ptr)
{
cw_set_element *cs1;
@ -81,18 +84,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;
@ -110,16 +102,12 @@ block_id bm_getfree(block_id orig_hint, boolean_t *blk_used, unsigned int cw_wor
hint = 1;
continue;
}
if (SS_NORMAL != (status = gdsfilext(cs_data->extension_size, total_blks)))
if (SS_NORMAL != (status = GDSFILEXT(cs_data->extension_size, total_blks, TRANS_IN_PROG_TRUE)))
return (status);
if (dba_mm == cs_data->acc_meth)
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 */
/*
@ -214,14 +202,21 @@ block_id bm_getfree(block_id orig_hint, boolean_t *blk_used, unsigned int cw_wor
if (hint_cycled)
hint_cycled = (hint_limit < hint_cycled) ? hint_limit: 0;
}
if ((0 == depth) && (FALSE != cs_addrs->now_crit)) /* if it's from the cw_set, its state is murky */
bit_clear(bml / BLKS_PER_LMAP, MM_ADDR(cs_data)); /* if crit, repair master map error */
if ((0 == depth) && cs_addrs->now_crit) /* if it's from the cw_set, its state is murky */
{
assert(FALSE);
send_msg_csa(CSA_ARG(cs_addrs) VARLSTCNT(3) ERR_DBMBMINCFREFIXED, 1, bml);
bit_clear(bml / BLKS_PER_LMAP, MM_ADDR(cs_data)); /* repair master map error */
}
}
/* If not in the final retry, it is possible that free_bit is >= map_size (e.g. if bitmap block gets recycled). */
if (map_size <= (uint4)free_bit && CDB_STAGNATE <= t_tries)
{ /* bad free bit */
/* If not in the final retry, it is possible that free_bit is >= map_size, e.g., if the buffer holding the bitmap block
* gets recycled with a non-bitmap block in which case the bit that bm_find_blk returns could be greater than map_size.
* But, this should never happen in final retry.
*/
if ((map_size <= (uint4)free_bit) && (CDB_STAGNATE <= t_tries))
{ /* Bad free bit. */
assert((NO_FREE_SPACE == free_bit) && (lcnt > local_maps)); /* All maps full, should have extended */
GTMASSERT;
assertpro(FALSE);
}
if (0 != depth)
{
@ -263,8 +258,6 @@ boolean_t is_free_blks_ctr_ok(void)
sm_uc_ptr_t bmp;
unsigned int local_maps, total_blks, free_blocks;
error_def(ERR_DBBADFREEBLKCTR);
assert(&FILE_INFO(gv_cur_region)->s_addrs == cs_addrs && cs_addrs->hdr == cs_data && cs_addrs->now_crit);
total_blks = (dba_mm == cs_data->acc_meth) ? cs_addrs->total_blks : cs_addrs->ti->total_blks;
local_maps = DIVIDE_ROUND_UP(total_blks, BLKS_PER_LMAP);
@ -296,7 +289,8 @@ boolean_t is_free_blks_ctr_ok(void)
assert(cs_addrs->ti->free_blocks == free_blocks);
if (cs_addrs->ti->free_blocks != free_blocks)
{
send_msg(VARLSTCNT(6) ERR_DBBADFREEBLKCTR, 4, DB_LEN_STR(gv_cur_region), cs_addrs->ti->free_blocks, free_blocks);
send_msg_csa(CSA_ARG(cs_addrs) VARLSTCNT(6) ERR_DBBADFREEBLKCTR, 4, DB_LEN_STR(gv_cur_region),
cs_addrs->ti->free_blocks, free_blocks);
cs_addrs->ti->free_blocks = free_blocks;
return FALSE;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -35,13 +35,13 @@
#include "gvcst_map_build.h"
#include "mm_read.h"
GBLREF gd_region *gv_cur_region;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF char *update_array, *update_array_ptr;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char rdfail_detail;
GBLREF unsigned char *non_tp_jfb_buff_ptr;
GBLREF gd_region *gv_cur_region;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF char *update_array, *update_array_ptr;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char rdfail_detail;
GBLREF jnl_format_buffer *non_tp_jfb_ptr;
void bm_setmap(block_id bml, block_id blk, int4 busy)
{
@ -96,8 +96,8 @@ void bm_setmap(block_id bml, block_id blk, int4 busy)
if (JNL_ENABLED(cs_data))
{
cse = (cw_set_element *)(&cw_set[0]);
cse->new_buff = non_tp_jfb_buff_ptr;
memcpy(non_tp_jfb_buff_ptr, bmp, ((blk_hdr_ptr_t)bmp)->bsiz);
cse->new_buff = (unsigned char *)non_tp_jfb_ptr->buff;
memcpy(cse->new_buff, bmp, ((blk_hdr_ptr_t)bmp)->bsiz);
gvcst_map_build((uint4 *)cse->upd_addr, (uchar_ptr_t)cse->new_buff, cse, cs_addrs->ti->curr_tn);
cse->done = TRUE;
}

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 *
@ -10,6 +10,7 @@
****************************************************************/
#include "mdef.h"
#include "gtm_string.h" /* needed by INCREMENT_EXPR_DEPTH */
#include "compiler.h"
#include "opcode.h"
@ -19,17 +20,15 @@ int bool_expr(boolean_t op, oprtype *addr)
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (!(TREF(expr_depth))++)
TREF(expr_start) = TREF(expr_start_orig) = NULL;
INCREMENT_EXPR_DEPTH;
if (!eval_expr(&x))
{
TREF(expr_depth) = 0;
DECREMENT_EXPR_DEPTH;
return FALSE;
}
assert(TRIP_REF == x.oprclass);
coerce(&x, OCT_BOOL);
bx_tail(x.oprval.tref, op, addr);
if (!(--(TREF(expr_depth))))
TREF(saw_side_effect) = TREF(shift_side_effects) = FALSE;
DECREMENT_EXPR_DEPTH;
return TRUE;
}

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 Sanchez Computer Associates, Inc. *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -16,14 +16,17 @@
#include "gdsbt.h"
#include "gdsfhead.h"
void bt_init(sgmnt_addrs *cs)
void bt_init(sgmnt_addrs *csa)
{
sgmnt_data_ptr_t base;
sgmnt_data_ptr_t csd;
base = cs->hdr;
cs->ti = &base->trans_hist;
cs->bt_header = (bt_rec_ptr_t)((sm_uc_ptr_t) base + cs->nl->bt_header_off);
cs->bt_base = (bt_rec_ptr_t)((sm_uc_ptr_t) base + cs->nl->bt_base_off);
cs->th_base = (th_rec_ptr_t)((sm_uc_ptr_t) base + cs->nl->th_base_off);
csd = csa->hdr;
csa->ti = &csd->trans_hist;
if (dba_mm != csd->acc_meth)
{ /* BT structures are NOT maintained for MM */
csa->bt_header = (bt_rec_ptr_t)((sm_uc_ptr_t) csd + csa->nl->bt_header_off);
csa->bt_base = (bt_rec_ptr_t)((sm_uc_ptr_t) csd + csa->nl->bt_base_off);
csa->th_base = (th_rec_ptr_t)((sm_uc_ptr_t) csd + csa->nl->th_base_off);
}
return;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -35,6 +35,9 @@ 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_WCBLOCKED);
bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
{
bt_rec_ptr_t bt, q0, q1, hdr;
@ -45,10 +48,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 +71,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);
@ -92,8 +91,7 @@ bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
bt->killtn = lcl_tn;
insqt((que_ent_ptr_t)bt, (que_ent_ptr_t)hdr);
th = (th_rec_ptr_t)remqh((que_ent_ptr_t)csa->th_base);
if (EMPTY_QUEUE == (sm_long_t)th)
GTMASSERT;
assertpro(EMPTY_QUEUE != (sm_long_t)th);
break;
}
if (bt->blk == block)
@ -114,8 +112,7 @@ bt_rec_ptr_t bt_put(gd_region *reg, int4 block)
assert(in_wcs_recover || (bt->tn < lcl_tn) || (jgbl.forw_phase_recovery && !JNL_ENABLED(csa)));
q0 = (bt_rec_ptr_t)((sm_uc_ptr_t)bt + bt->tnque.fl);
th = (th_rec_ptr_t)remqt((que_ent_ptr_t)((sm_uc_ptr_t)q0 + SIZEOF(th->tnque)));
if (EMPTY_QUEUE == (sm_long_t)th)
GTMASSERT;
assertpro(EMPTY_QUEUE != (sm_long_t)th);
break;
}
if (0 == bt->blkque.fl)

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -10,6 +10,7 @@
****************************************************************/
#include "mdef.h"
#include "cmd_qlf.h"
#include "compiler.h"
#include "opcode.h"
#include "mdq.h"
@ -19,11 +20,48 @@
LITREF octabstruct oc_tab[];
GBLREF boolean_t run_time;
GBLREF command_qualifier cmd_qlf;
#define STOTEMP_IF_NEEDED(REF0, I, T1, OPND) \
{ /* Input: \
* --- REF0: a boolean triple, which may have either 1 input (OC_COBOOL) or 2 (other opcodes). \
* --- I: whichever operand of REF0 we are STOTEMPing \
* --- T1: STOTEMP triple. NOOPed if not needed \
* --- OPND: operand referring to value we need need to pass as input into boolean operation \
* If OPND refers to a variable (OC_VAR), we need to STOTEMP it to protect it from subsequent side effects. \
* If it refers to a literal, and dynamic literals are enabled, we need to insert an OC_LITC anyway. Doing it \
* here in bx_boolop is convenient and ensures the OC_LITC is not skipped at run time. \
*/ \
assert(TRIP_REF == OPND.oprclass); \
switch (OPND.oprval.tref->opcode) \
{ \
case OC_VAR: \
T1->opcode = OC_STOTEMP; \
T1->operand[0] = OPND; \
REF0->operand[I] = put_tref(T1); \
break; \
case OC_LIT: \
if (!run_time && (cmd_qlf.qlf & CQ_DYNAMIC_LITERALS)) \
{ \
T1->opcode = OC_LITC; \
T1->operand[0] = OPND; \
REF0->operand[I] = put_tref(T1); \
break; \
} \
default: \
T1->opcode = OC_NOOP; \
T1->operand[0].oprclass = NO_REF; \
REF0->operand[I] = put_tref(OPND.oprval.tref); \
} \
}
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;
@ -35,77 +73,93 @@ void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean
*p = put_tjmp(t);
} else
p = addr;
if (GTM_BOOL == TREF(gtm_fullbool) || !TREF(saw_side_effect))
if (!TREF(saw_side_effect) || ((OLD_SE == TREF(side_effect_handling)) && (GTM_BOOL == TREF(gtm_fullbool))))
{ /* nice simple short circuit */
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 = NO_REF;
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? */
STOTEMP_IF_NEEDED(ref0, 0, t1, t1->operand[0]);
} 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->operand[0].oprclass = NOCLASS;
t1->opcode = OC_NOOP; /* wipe out original jump */
t1->opcode = OC_NOOP; /* wipe out original jmp */
t1->operand[0].oprclass = NO_REF;
break;
case OC_CONTAIN:
case OC_EQU:
@ -114,85 +168,117 @@ 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 */
STOTEMP_IF_NEEDED(ref0, 0, t1, t1->operand[0]);
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];
STOTEMP_IF_NEEDED(ref0, 1, t1, ref1->operand[1]);
if (OC_NOOP == ref1->opcode) /* does op[0] need cleanup? */
ref1->operand[0].oprclass = ref1->operand[1].oprclass = NO_REF;
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];
t1->operand[0].oprclass = NOCLASS;
t1->opcode = OC_NOOP; /* wipe out original jump */
/* 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 = NO_REF;
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)
|| (OC_LITC == 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 */
}
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 = NO_REF;
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;
}
t->opcode = OC_NOOP;
t->operand[0].oprclass = t->operand[1].oprclass = NOCLASS;
return;
}

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 *
@ -45,7 +45,7 @@ void bx_tail(triple *t, boolean_t sense, oprtype *addr)
assert((1 & sense) == sense);
assert(oc_tab[t->opcode].octype & OCT_BOOL);
assert(TRIP_REF == t->operand[0].oprclass);
assert((TRIP_REF == t->operand[1].oprclass) || (NOCLASS == t->operand[1].oprclass));
assert((TRIP_REF == t->operand[1].oprclass) || (NO_REF == t->operand[1].oprclass));
switch (t->opcode)
{
case OC_COBOOL:
@ -64,7 +64,7 @@ void bx_tail(triple *t, boolean_t sense, oprtype *addr)
case OC_COM:
bx_tail(t->operand[0].oprval.tref, !sense, addr);
t->opcode = OC_NOOP;
t->operand[0].oprclass = 0;
t->operand[0].oprclass = NO_REF;
return;
case OC_NEQU:
sense = !sense;

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2003, 2012 Fidelity Information Services, Inc *
* Copyright 2003, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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,65 @@ 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 */
CDB_SC_LCHAR_ENTRY(cdb_sc_restarted, FALSE, 'v') /* 'v' return value indicating t_retry has already happened */
CDB_SC_LCHAR_ENTRY(cdb_sc_tqreadnowait, FALSE, 'w') /* 'w' update helper returning from t_qread instead of sleeping */

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -41,6 +41,35 @@
GBLREF uint4 dollar_tlevel;
GBLREF boolean_t dse_running;
GBLREF boolean_t mu_reorg_upgrd_dwngrd_in_prog;
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
@ -54,65 +83,38 @@ GBLREF boolean_t dse_running;
#define TEXT4 ", "
#define MAX_UTIL_LEN 40
#define RTS_ERROR_FUNC(err, buff) \
{ \
if (gtmassert_on_error) \
GTMASSERT; \
rts_error_func(err, buff); \
#define RTS_ERROR_FUNC(CSA, ERR, BUFF) \
{ \
if (gtmassert_on_error) \
GTMASSERT; \
rts_error_csa(CSA_ARG(CSA) VARLSTCNT(4) MAKE_MSG_INFO(ERR), 2, LEN_AND_STR((char_ptr_t)BUFF)); \
}
void rts_error_func(int err, uchar_ptr_t buff);
int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boolean_t gtmassert_on_error)
{
block_id child, prev_child;
rec_hdr_ptr_t rp, r_top;
int num_subscripts;
uint4 bplmap, mask1, offset;
uint4 bplmap, mask1, offset, rec_offset, rec_size;
sm_uint_ptr_t chunk_p; /* Value is unaligned so will be assigned to chunk */
uint4 chunk;
uint4 chunk, blk_size;
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;
int blk_levl;
int blk_size, rec_size, comp_length, rec_offset, key_size;
int comp_length, key_size;
unsigned char util_buff[MAX_UTIL_LEN];
int util_len;
off_chain chain;
sgmnt_addrs *csa;
sgmnt_data_ptr_t csd;
boolean_t is_gvt, is_directory, first_key, full, prev_char_is_delimiter;
DCL_THREADGBL_ACCESS;
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);
SETUP_THREADGBL_ACCESS;
csa = &FILE_INFO(reg)->s_addrs;
csd = csa->hdr;
bplmap = csd->bplmap;
@ -145,18 +147,18 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{
if ((unsigned char)blk_levl != LCL_MAP_LEVL)
{
RTS_ERROR_FUNC(MAKE_MSG_INFO(ERR_DBLVLINC), util_buff);
RTS_ERROR_FUNC(csa, MAKE_MSG_INFO(ERR_DBLVLINC), util_buff);
return FALSE;
}
if (blk_size != BM_SIZE(bplmap))
{
RTS_ERROR_FUNC(ERR_DBBMSIZE, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBMSIZE, util_buff);
return FALSE;
}
mp = (sm_uc_ptr_t)bp + SIZEOF(blk_hdr);
if ((*mp & 1) != 0)
{ /* bitmap doesn't protect itself */
RTS_ERROR_FUNC(ERR_DBBMBARE, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBMBARE, util_buff);
return FALSE;
}
full = TRUE;
@ -180,14 +182,14 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
mask1 &= chunk; /* check against the original contents */
if (mask1 != 0) /* busy and reused should never appear together */
{
RTS_ERROR_FUNC(ERR_DBBMINV, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBMINV, util_buff);
return FALSE;
}
}
if (full == (NO_FREE_SPACE != gtm_ffs(blk / bplmap, MM_ADDR(csd), MASTER_MAP_BITS_PER_LMAP)))
{
RTS_ERROR_FUNC(ERR_DBBMMSTR, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBMMSTR, util_buff);
/* DSE CACHE -VERIFY used to fail occasionally with the DBBMMSTR error because of passing
* an older twin global buffer that contained stale bitmap information. That is now fixed.
* So we dont expect any more such failures. Assert accordingly.
@ -199,52 +201,57 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
}
if (blk_levl > MAX_BT_DEPTH)
{
RTS_ERROR_FUNC(ERR_DBBLEVMX, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBLEVMX, util_buff);
return FALSE;
}
if (blk_levl < 0)
{
RTS_ERROR_FUNC(ERR_DBBLEVMN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBLEVMN, util_buff);
return FALSE;
}
if (blk_levl == 0)
{ /* data block */
if ((DIR_ROOT == blk) || (blk == root))
{ /* headed for where an index block should be */
RTS_ERROR_FUNC(ERR_DBROOTBURN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBROOTBURN, util_buff);
return FALSE;
}
if (blk_size < SIZEOF(blk_hdr))
if (blk_size < (uint4)SIZEOF(blk_hdr))
{
RTS_ERROR_FUNC(ERR_DBBSIZMN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBSIZMN, util_buff);
return FALSE;
}
} else
{ /* index block */
if (blk_size < (SIZEOF(blk_hdr) + SIZEOF(rec_hdr) + SIZEOF(block_id)))
if (blk_size < (uint4)(SIZEOF(blk_hdr) + SIZEOF(rec_hdr) + SIZEOF(block_id)))
{ /* must have at least one record */
RTS_ERROR_FUNC(ERR_DBBSIZMN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBSIZMN, util_buff);
return FALSE;
}
}
if (blk_size > csd->blk_size)
if (blk_size > (uint4)csd->blk_size)
{
RTS_ERROR_FUNC(ERR_DBBSIZMX, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBSIZMX, util_buff);
return FALSE;
}
if (0 == root)
{
is_directory = FALSE;
is_gvt = FALSE;
/* if both "is_directory" and "is_gvt" are FALSE, then we dont know YET if the given block is a directory or gvt */
if (DIR_ROOT == root)
is_directory = TRUE;
if ((0 != root) && (DIR_ROOT != root))
is_gvt = TRUE;
/* MUPIP REORG -TRUNCATE has some special cases */
if (MUSWP_INCR_ROOT_CYCLE == TREF(in_mu_swap_root_state))
{ /* We could be updating either a gvt root block or a directory leaf block. Don't know yet. */
is_directory = FALSE;
is_gvt = FALSE;
/* if both "is_directory" and "is_gvt" are FALSE, then we dont know YET if the given block is a directory or gvt */
} else if (DIR_ROOT == root)
{
} else if (MUSWP_DIRECTORY_SWAP == TREF(in_mu_swap_root_state))
{ /* We know we're updating a directory block, even though root is not DIR_ROOT. root and gv_target correspond
* to the gvt being REORG'ed.
*/
is_directory = TRUE;
is_gvt = FALSE;
} else
{
is_directory = FALSE;
is_gvt = TRUE;
}
blk_top = (sm_uc_ptr_t)bp + blk_size;
first_key = TRUE;
@ -258,7 +265,7 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
for (rp = (rec_hdr_ptr_t)((sm_uc_ptr_t)bp + SIZEOF(blk_hdr)) ; rp < (rec_hdr_ptr_t)blk_top ; rp = r_top)
{
GET_RSIZ(rec_size, rp);
rec_offset = (int)((sm_ulong_t)rp - (sm_ulong_t)bp);
rec_offset = (uint4)((sm_ulong_t)rp - (sm_ulong_t)bp);
/*add util_buff here*/
util_len=0;
@ -274,23 +281,23 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
util_len += SIZEOF(TEXT2) - 1;
util_buff[util_len] = 0;
if (rec_size <= SIZEOF(rec_hdr))
if (rec_size <= (uint4)SIZEOF(rec_hdr))
{
RTS_ERROR_FUNC(ERR_DBRSIZMN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBRSIZMN, util_buff);
return FALSE;
}
if (rec_size > (short)((sm_ulong_t)blk_top - (sm_ulong_t)rp))
if (rec_size > (uint4)((sm_ulong_t)blk_top - (sm_ulong_t)rp))
{
RTS_ERROR_FUNC(ERR_DBRSIZMX, util_buff);
RTS_ERROR_FUNC(csa, 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)
{
RTS_ERROR_FUNC(ERR_DBCMPNZRO, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBCMPNZRO, util_buff);
return FALSE;
}
if (0 == blk_levl)
@ -304,12 +311,12 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{ /* star key */
if (rec_size != SIZEOF(rec_hdr) + SIZEOF(block_id))
{
RTS_ERROR_FUNC(ERR_DBSTARSIZ, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBSTARSIZ, util_buff);
return FALSE;
}
if (rec_cmpc)
{
RTS_ERROR_FUNC(ERR_DBSTARCMP, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBSTARCMP, util_buff);
return FALSE;
}
blk_id_ptr = (sm_uc_ptr_t)rp + SIZEOF(rec_hdr);
@ -323,7 +330,7 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{
if (rec_cmpc >= prior_expkeylen)
{
RTS_ERROR_FUNC(ERR_DBCMPMX, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBCMPMX, util_buff);
return FALSE;
}
for (b_ptr = prior_expkey; b_ptr < (prior_expkey + rec_cmpc); b_ptr++)
@ -354,7 +361,7 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
prev_char_is_delimiter = FALSE;
if (blk_id_ptr >= (sm_uc_ptr_t)r_top)
{
RTS_ERROR_FUNC(ERR_DBKEYMX, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBKEYMX, util_buff);
return FALSE;
}
}
@ -365,7 +372,7 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
if (is_gvt)
{ /* this is a contradiction. a block cannot be a directory and gvt at the same time.
* gvt should contain all keys with the same global name */
RTS_ERROR_FUNC(ERR_DBINVGBL, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBINVGBL, util_buff);
return FALSE;
}
is_directory = TRUE; /* no need to do this if it was already TRUE but we save an if check */
@ -375,19 +382,19 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
if (is_directory)
{ /* this is a contradiction. a block cannot be a directory and gvt at the same time.
* the directory tree should contain only name-level (i.e. unsubscripted) globals */
RTS_ERROR_FUNC(ERR_DBDIRTSUBSC, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBDIRTSUBSC, util_buff);
return FALSE;
}
is_gvt = TRUE; /* no need to do this if it was already TRUE but we save an if check */
}
if (MAX_GVSUBSCRIPTS <= num_subscripts)
{
RTS_ERROR_FUNC(ERR_DBMAXNRSUBS, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBMAXNRSUBS, util_buff);
return FALSE;
}
if (blk_levl && (key_size != (rec_size - SIZEOF(block_id) - SIZEOF(rec_hdr))))
{
RTS_ERROR_FUNC(ERR_DBKEYMN, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBKEYMN, util_buff);
return FALSE;
}
assert(first_key || (rec_cmpc < prior_expkeylen));
@ -395,12 +402,12 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{
if (prior_expkey[rec_cmpc] == key_base[0])
{
RTS_ERROR_FUNC(ERR_DBCMPBAD, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBCMPBAD, util_buff);
return FALSE;
}
if (((unsigned int)prior_expkey[rec_cmpc] >= (unsigned int)key_base[0]))
{
RTS_ERROR_FUNC(ERR_DBKEYORD, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBKEYORD, util_buff);
return FALSE;
}
}
@ -419,22 +426,24 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{
if (child <= 0)
{
RTS_ERROR_FUNC(ERR_DBPTRNOTPOS, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBPTRNOTPOS, util_buff);
return FALSE;
}
if (child > csa->ti->total_blks)
{
RTS_ERROR_FUNC(ERR_DBPTRMX, util_buff);
if ((child > csa->ti->total_blks) && !mu_reorg_upgrd_dwngrd_in_prog)
{ /* REORG -UPGRADE/DOWNGRADE can update recycled blocks, which may contain children beyond
* the total_blks if a truncate happened sometime after the block was killed.
*/
RTS_ERROR_FUNC(csa, ERR_DBPTRMX, util_buff);
return FALSE;
}
if (!(child % bplmap))
{
RTS_ERROR_FUNC(ERR_DBPTRMAP, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBPTRMAP, util_buff);
return FALSE;
}
if (child == prev_child)
{
RTS_ERROR_FUNC(ERR_DBBDBALLOC, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBBDBALLOC, util_buff);
return FALSE;
}
prev_child = child;
@ -442,7 +451,7 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
{
if ((blk_id_ptr != next_tp_child_ptr) && (NULL != next_tp_child_ptr))
{
RTS_ERROR_FUNC(ERR_DBPTRNOTPOS, util_buff);
RTS_ERROR_FUNC(csa, ERR_DBPTRNOTPOS, util_buff);
return FALSE;
}
next_tp_child_ptr = blk_id_ptr + chain.next_off;
@ -453,10 +462,4 @@ int cert_blk (gd_region *reg, block_id blk, blk_hdr_ptr_t bp, block_id root, boo
}
assert(!is_directory || !is_gvt); /* the block cannot be a directory AND gvt at the same time */
return TRUE;
}
void rts_error_func(int err, uchar_ptr_t buff)
{
rts_error(VARLSTCNT(4) MAKE_MSG_INFO(err), 2, LEN_AND_STR((char_ptr_t)buff));
}

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
@ -207,6 +208,10 @@ LITDEF struct
SETUP_THREADGBL_ACCESS;
assert((SIZEOF(cmd_names) / SIZEOF(nametabent)) == cmd_index[26]);
while (TREF(expr_depth))
DECREMENT_EXPR_DEPTH; /* in case of prior errors */
(TREF(side_effect_base))[0] = FALSE;
TREF(temp_subs) = FALSE;
CHKTCHAIN(TREF(curtchain));
TREF(pos_in_chain) = *TREF(curtchain);
if (TREF(window_token) != TK_IDENT)
@ -223,9 +228,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 +242,11 @@ LITDEF struct
}
advancewindow();
if ((TK_COLON != TREF(window_token)) || !cmd_data[x].pcnd_ok)
{
assert((m_zinvcmd != cmd_data[x].fcn));
cr = NULL;
else
shifting = FALSE;
} else
{
advancewindow();
cr = (oprtype *)mcalloc(SIZEOF(oprtype));
@ -244,8 +255,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 +302,5 @@ LITDEF struct
tnxtarg(cr);
}
}
if (!cr && (m_zinvcmd == cmd_data[x].fcn))
return FALSE;
return rval;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,6 +42,7 @@ typedef struct
#define CQ_ALIGN_STRINGS (1 << 11) /* 0x0800 */
#define CQ_UTF8 (1 << 12) /* 0x1000 */
#define CQ_NAMEOFRTN (1 << 13) /* 0x2000 */
#define CQ_DYNAMIC_LITERALS (1 << 14) /* 0x4000 -- Set via environmental variable gtm_dynamic_literals (gtm_logicals.h) */
/* TODO: add CQ_ALIGN_STRINGS to the default list below when alignment is supported */
#define CQ_DEFAULT (CQ_WARNINGS | CQ_OBJECT | CQ_IGNORE | CQ_LOWER_LABELS | CQ_LINE_ENTRY | CQ_INLINE_LITERALS)
@ -49,6 +50,16 @@ typedef struct
#define LISTTAB 10
#define PG_WID 132
#define INIT_CMD_QLF_STRINGS(CMD_QLF, OBJ_FILE, LIST_FILE, CEPREP_FILE, SIZE) \
{ \
CMD_QLF.object_file.str.addr = OBJ_FILE; \
CMD_QLF.object_file.str.len = SIZE; \
CMD_QLF.list_file.str.addr = LIST_FILE; \
CMD_QLF.list_file.str.len = SIZE; \
CMD_QLF.ceprep_file.str.addr = CEPREP_FILE; \
CMD_QLF.ceprep_file.str.len = SIZE; \
}
typedef struct src_line_type
{
struct

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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"
@ -33,8 +33,9 @@ GBLREF char cg_phase;
GBLREF unsigned char *source_buffer;
error_def(ERR_INDEXTRACHARS);
error_def(ERR_INDRCOMPFAIL);
int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, mstr_len_t src_len)
int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, oprtype *dst, mstr_len_t src_len)
{
triple *ref;
DCL_THREADGBL_ACCESS;
@ -44,7 +45,11 @@ int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, mstr_len_
{
while (TK_SPACE == TREF(window_token)) /* Eat up trailing white space */
advancewindow();
if (((src_len + 2) != source_column) && ('\0' != source_buffer[source_column]))
if (TK_ERROR == TREF(window_token))
{
status = EXPR_FAIL;
stx_error(ERR_INDRCOMPFAIL);
} else if ((TK_EOL != TREF(window_token)) || (source_column < src_len))
{
status = EXPR_FAIL;
stx_error(ERR_INDEXTRACHARS);
@ -57,6 +62,8 @@ int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, mstr_len_
ref = newtriple(retcode);
if (retopr)
ref->operand[0] = *retopr;
if (OC_IRETMVAL == retcode)
ref->operand[1] = *dst;
start_fetches(OC_NOOP);
resolve_ref(0); /* cannot fail because there are no MLAB_REF's in indirect code */
alloc_reg();
@ -75,6 +82,12 @@ int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, mstr_len_
ind_code(obj);
indr_stringpool.free = indr_stringpool.base;
}
} else
{ /* If this assert fails, it means a syntax problem could have been caught earlier. Consider placing a more useful
* and specific error message at that location.
*/
assert(FALSE);
stx_error(ERR_INDRCOMPFAIL);
}
if (EXPR_FAIL == status)
{

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -14,14 +14,13 @@
#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"
#include "cache.h"
#include "objlabel.h"
#include "mprof.h"
#include "cacheflush.h"
#include "compiler.h"
#include "obj_file.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 *
@ -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"
@ -35,7 +35,7 @@ GBLREF char cg_phase;
error_def(ERR_INDRMAXLEN);
void comp_init(mstr *src)
void comp_init(mstr *src, oprtype *dst)
{
DCL_THREADGBL_ACCESS;
@ -64,5 +64,12 @@ void comp_init(mstr *src)
curr_fetch_trip = newtriple(OC_FETCH);
curr_fetch_count = 0;
start_fetches(OC_FETCH);
/* op_igetdst fetches the destination (ind_result) onto the M-stack at the start of execution so that if we end up doing
* nested indirection, in which case ind_result could change, op_iretmval can put the result in the correct location.
* op_igetsrc serves a very similar purpose, placing a copy of the source mval (ind_source) on the M-stack at the start
* of execution.
*/
if (dst)
*dst = put_tref(newtriple(OC_IGETDST));
return;
}

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,29 +32,23 @@ int compile_pattern(oprtype *opr, boolean_t is_indirect)
ptstr retstr;
mval retmval;
mstr instr;
triple *oldchain, *ref, tmpchain, *triptr;
triple *oldchain, *ref;
save_se save_state;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (is_indirect)
{
TREF(saw_side_effect) = TREF(shift_side_effects);
if (TREF(shift_side_effects) && (GTM_BOOL == TREF(gtm_fullbool)))
if (SHIFT_SIDE_EFFECTS)
{
dqinit(&tmpchain, exorder);
oldchain = setcurtchain(&tmpchain);
START_GVBIND_CHAIN(&save_state, oldchain);
if (!indirection(opr))
{
setcurtchain(oldchain);
return FALSE;
}
ref = newtriple(OC_INDPAT);
newtriple(OC_GVSAVTARG);
setcurtchain(oldchain);
dqadd(TREF(expr_start), &tmpchain, exorder);
TREF(expr_start) = tmpchain.exorder.bl;
triptr = newtriple(OC_GVRECTARG);
triptr->operand[0] = put_tref(TREF(expr_start));
PLACE_GVBIND_CHAIN(&save_state, oldchain);
} else
{
if (!indirection(opr))

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -88,7 +88,7 @@ typedef struct oprtypestruct
} oprtype;
/* Values for oprclass */
#define NOCLASS 0
#define NO_REF 0
#define TVAR_REF 1
#define TVAL_REF 2
#define TINT_REF 3
@ -170,6 +170,30 @@ typedef struct
unsigned short opr_type;
} toktabtype;
/* These two structures really belong in glvn_pool.h, but gtmpcat doesn't know to include that file. So put them here for now. */
#include "callg.h"
typedef struct
{
opctype sav_opcode;
uint4 mval_top; /* mval just beyond ones used by this entry */
uint4 precursor; /* index of previous FOR slot at same level */
mval *lvname;
gparam_list glvn_info;
} glvn_pool_entry;
typedef struct
{
uint4 capacity; /* total # allocated entries */
uint4 top; /* current available glvn_pool_entry slot */
uint4 for_slot[MAX_FOR_STACK + 1]; /* indices of most recent FOR slots */
uint4 share_slot; /* currently active slot */
opctype share_opcode; /* currently active opcode */
uint4 mval_capacity; /* total # allocated mvals */
uint4 mval_top; /* current available mval in mval_stack */
mval *mval_stack; /* stack of mvals */
glvn_pool_entry slot[1]; /* stack of entries */
} glvn_pool;
#define VMS_OS 01
#define UNIX_OS 02
#define ALL_SYS (VMS_OS | UNIX_OS)
@ -202,12 +226,13 @@ typedef struct
#define CHARMAXARGS 256
#define MAX_FORARGS 127
#define MAX_SRCLINE 8192 /* maximum length of a program source or indirection line */
#define NO_FORMALLIST (-1)
#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 +241,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 +331,146 @@ error_def(ERR_SVNOSET);
} \
}
typedef struct
{
triple *expr_start;
triple *expr_start_orig;
boolean_t shift_side_effects;
boolean_t saw_side_effect;
triple tmpchain;
} save_se;
#define START_GVBIND_CHAIN(SS, OLDCHAIN) \
{ \
(SS)->expr_start = TREF(expr_start); \
(SS)->expr_start_orig = TREF(expr_start_orig); \
(SS)->shift_side_effects = TREF(shift_side_effects); \
(SS)->saw_side_effect = TREF(saw_side_effect); \
TREF(expr_start) = NULL; \
TREF(expr_start_orig) = NULL; \
TREF(shift_side_effects) = FALSE; \
TREF(saw_side_effect) = FALSE; \
dqinit(&(SS)->tmpchain, exorder); \
OLDCHAIN = setcurtchain(&(SS)->tmpchain); \
}
#define PLACE_GVBIND_CHAIN(SS, OLDCHAIN) \
{ \
newtriple(OC_GVSAVTARG); \
TREF(expr_start) = (SS)->expr_start; \
TREF(expr_start_orig) = (SS)->expr_start_orig; \
TREF(shift_side_effects) = (SS)->shift_side_effects; \
TREF(saw_side_effect) = (SS)->saw_side_effect; \
setcurtchain(OLDCHAIN); \
assert(NULL != TREF(expr_start)); \
dqadd(TREF(expr_start), &(SS)->tmpchain, exorder); \
TREF(expr_start) = (SS)->tmpchain.exorder.bl; \
assert(OC_GVSAVTARG == (TREF(expr_start))->opcode); \
newtriple(OC_GVRECTARG)->operand[0] = put_tref(TREF(expr_start)); \
}
/* note assignment below */
#define SHIFT_SIDE_EFFECTS ((TREF(saw_side_effect) = TREF(shift_side_effects)) && (GTM_BOOL == TREF(gtm_fullbool)))
#define INITIAL_SIDE_EFFECT_DEPTH 33 /* initial allocation for expression nesting to track side effects */
/* note side effect for boolean shifting temporaries */
#define ENCOUNTERED_SIDE_EFFECT \
{ /* Needs #include "show_source_line" and #include "fullbool.h" */ \
\
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(TRUE); \
dec_err(VARLSTCNT(1) ERR_BOOLSIDEFFECT); \
} \
} \
}
#define SE_WARN_ON (!run_time && (SE_WARN == TREF(side_effect_handling)))
#define ISSUE_SIDEEFFECTEVAL_WARNING(COLUMN) \
{ \
TREF(last_source_column) = (COLUMN); \
show_source_line(TRUE); \
dec_err(VARLSTCNT(1) ERR_SIDEEFFECTEVAL); \
}
/* maintain array indexed by expr_depth to track side effects - for subscripts, actuallists, binary expressions and functions */
#define INCREMENT_EXPR_DEPTH \
{ \
boolean_t *TMP_BASE; \
\
if (!(TREF(expr_depth))++) \
TREF(expr_start) = TREF(expr_start_orig) = NULL; \
else \
{ /* expansion is unlikely as it's hard to nest expressions deeply, but we don't want a hard limit */ \
assertpro(TREF(expr_depth)); /* expr_depth doesn't handle rollover */ \
assert(TREF(expr_depth) <= TREF(side_effect_depth)); \
if (TREF(expr_depth) == TREF(side_effect_depth)) \
{ \
TMP_BASE = TREF(side_effect_base); \
(TREF(side_effect_depth))++; \
TREF(side_effect_base) = malloc(SIZEOF(boolean_t) * TREF(side_effect_depth)); \
memcpy(TREF(side_effect_base), TMP_BASE, SIZEOF(boolean_t) * TREF(expr_depth)); \
free(TMP_BASE); \
(TREF(side_effect_base))[TREF(expr_depth)] = FALSE; \
} \
} \
assert(FALSE == (TREF(side_effect_base))[TREF(expr_depth)]); \
}
/* complement of the above increment - uses the macro just below for assertpto and to clear the level we're leaving */
#define DECREMENT_EXPR_DEPTH \
{ \
DISABLE_SIDE_EFFECT_AT_DEPTH; \
if (!(--(TREF(expr_depth)))) \
TREF(saw_side_effect) = TREF(shift_side_effects) = FALSE; \
}
/* clear the current expr_depth level and propagate down */
#define DISABLE_SIDE_EFFECT_AT_DEPTH \
{ \
unsigned int DEPTH; \
\
DEPTH = TREF(expr_depth); \
assertpro(DEPTH); /* expr_depth shouldn't underflow */ \
(TREF(side_effect_base))[DEPTH - 1] |= (TREF(side_effect_base))[DEPTH]; /* propagate down */ \
(TREF(side_effect_base))[DEPTH] = FALSE; \
}
/* The following macro transfers subscripts from an array to the triple chain for gvn, lvn and name_glvn
* it requires includes for fullbool.m, mdq.h, and show_source_line.h, and also GBLREF of runtime
*/
#define SUBS_ARRAY_2_TRIPLES(REF1, SB1, SB2, SUBSCRIPTS, XTRA) \
{ \
boolean_t PROTECT_LVN, SE_NOTIFY; \
triple *REF2; \
\
if (PROTECT_LVN = (TREF(side_effect_base))[TREF(expr_depth)]) /* NOTE assignment */ \
SE_NOTIFY = SE_WARN_ON; \
while (SB2 < SB1) \
{ \
if (PROTECT_LVN && (SB2 > (SUBSCRIPTS + XTRA)) && ((SB1 - SB2) > 1) \
&& ((OC_VAR == SB2->oprval.tref->opcode) || (OC_GETINDX == SB2->oprval.tref->opcode))) \
{ /* protect lvns from side effects: skip 1st (unsubscripted name), and last (nothing following) */ \
assert(OLD_SE != TREF(side_effect_handling)); \
REF2 = maketriple(OC_STOTEMP); \
REF2->operand[0] = *SB2; \
dqins(SB2->oprval.tref, exorder, REF2); /* NOTE:this violates information hiding */ \
if (SE_NOTIFY) \
ISSUE_SIDEEFFECTEVAL_WARNING(SB2->oprval.tref->src.column + 1); \
*SB2 = put_tref(REF2); \
} \
REF2 = newtriple(OC_PARAMETER); \
REF1->operand[1] = put_tref(REF2); \
REF1 = REF2; \
REF1->operand[0] = *SB2++; \
} \
}
/* 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) \
{ \
@ -328,37 +494,16 @@ error_def(ERR_SVNOSET);
*/
#define FOR_POP(ALL) \
{ \
unsigned int For_stack_level; \
boolean_t Seen_indx; \
\
assert(TREF(for_stack_ptr) >= (oprtype **)TADR(for_stack)); \
assert(TREF(for_stack_ptr) <= (oprtype **)TADR(for_stack) + MAX_FOR_STACK); \
if (TREF(for_stack_ptr) > (oprtype **)TADR(for_stack)) \
--(TREF(for_stack_ptr)); \
if (ALL) \
{ \
while (TREF(for_stack_ptr) > (oprtype **)TADR(for_stack)) \
(TREF(for_stack_ptr))--; \
(TREF(for_stack_ptr)) = (oprtype **)TADR(for_stack); \
*(TREF(for_stack_ptr)) = NULL; \
} \
if (TREF(for_stack_ptr) == (oprtype **)TADR(for_stack)) \
{ \
for (Seen_indx = FALSE, For_stack_level = MAX_FOR_STACK; --For_stack_level; ) \
{ \
if (!Seen_indx && (TRUE_WITH_INDX == TAREF1(for_temps, For_stack_level))) \
{ \
(void)newtriple(OC_FORFREEINDX); \
Seen_indx = TRUE; \
} \
TAREF1(for_temps, For_stack_level) = FALSE; \
} \
} else \
assert(TREF(for_stack_ptr) > (oprtype **)TADR(for_stack)); \
} else if (TREF(for_stack_ptr) > (oprtype **)TADR(for_stack)) \
--(TREF(for_stack_ptr)); \
}
/* value used to make for_temps entries a little more than boolean */
#define TRUE_WITH_INDX 2
int actuallist(oprtype *opr);
int bool_expr(boolean_t op, oprtype *addr);
void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean_t sense, oprtype *addr);
@ -367,10 +512,11 @@ void bx_tail(triple *t, boolean_t sense, oprtype *addr);
void chktchain(triple *head);
void code_gen(void);
void coerce(oprtype *a, unsigned short new_type);
int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, mstr_len_t src_len);
void comp_init(mstr *src);
int comp_fini(int status, mstr *obj, opctype retcode, oprtype *retopr, oprtype *dst, mstr_len_t src_len);
void comp_init(mstr *src, oprtype *dst);
void comp_indr(mstr *obj);
boolean_t compiler_startup(void);
void create_temporaries(triple *sub, opctype put_oc);
triple *entryref(opctype op1, opctype op2, mint commargcode, boolean_t can_commarg, boolean_t labref, boolean_t textname);
int eval_expr(oprtype *a);
int expratom(oprtype *a);
@ -390,6 +536,7 @@ int f_fnzbitget(oprtype *a, opctype op);
int f_fnzbitset(oprtype *a, opctype op);
int f_fnzbitstr(oprtype *a, opctype op);
int f_get(oprtype *a, opctype op);
int f_get1(oprtype *a, opctype op);
int f_incr(oprtype *a, opctype op);
int f_justify(oprtype *a, opctype op);
int f_length(oprtype *a, opctype op);
@ -423,6 +570,7 @@ int f_zechar(oprtype *a, opctype op);
int f_zgetsyi(oprtype *a, opctype op);
int f_zjobexam(oprtype *a, opctype op);
int f_zparse(oprtype *a, opctype op);
int f_zpeek(oprtype *a, opctype op);
int f_zprevious(oprtype *a, opctype op);
int f_zqgblmod(oprtype *a, opctype op);
int f_zsearch(oprtype *a, opctype op);
@ -433,6 +581,7 @@ int f_zsubstr(oprtype *a, opctype op);
int f_ztrigger(oprtype *a, opctype op);
int f_ztrnlnm(oprtype *a, opctype op);
int f_zwidth(oprtype *a, opctype op);
int f_zwrite(oprtype *a, opctype op);
mlabel *get_mladdr(mident *c);
mvar *get_mvaddr(mident *c);
int glvn(oprtype *a);

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -67,7 +67,14 @@ boolean_t compiler_startup(void)
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
assert(NULL == complits_hashtab || NULL == complits_hashtab->base);
/* Although we have an invocation of compiler cleanups at the end of this module, there exist ways to avoid this
* cleanup by working in direct mode, getting certain types of errors combined with an argumentless ZGOTO that unwinds
* pretty much everything that can bypass that cleanup. So do a quick check if it is needed and if so, git-r-done
* (test is part of the macro invocation). Note this is the easiest place to make this check rather than complicating
* error handling to provide a similar effect.
*/
COMPILE_HASHTAB_CLEANUP;
reinit_externs();
memset(&null_mident, 0, SIZEOF(null_mident));
ESTABLISH_RET(compiler_ch, FALSE);
/* Since the stringpool alignment is solely based on mstr_native_align, we need to initialize it based

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -26,8 +26,8 @@
boolean_t compswap(sm_global_latch_ptr_t lock, int compval, int newval1);
# define COMPSWAP_LOCK(LCK, CMPVAL1, CMPVAL2, NEWVAL1, NEWVAL2) compswap(LCK, CMPVAL1, NEWVAL1)
# define COMPSWAP_UNLOCK(LCK, CMPVAL1, CMPVAL2, NEWVAL1, NEWVAL2) compswap(LCK, CMPVAL1, NEWVAL1)
# elif defined(__HP_cc)
/* Use compiler inline assembly macros for HP-UX/HP C */
# elif (defined(__HP_cc) || (defined(__hpux) && defined(__GNUC__)))
/* Use compiler inline assembly macros for HP-UX/HP C or GCC on HPUX*/
/* This is assuming 32 bit lock storage, which right now seems to be PIDs
* most of the time. PIDs are currently 32 bit values, but that could change
* someday, so beware
@ -46,6 +46,8 @@
_Asm_cmpxchg((_Asm_sz)_SZ_W,(_Asm_sem)_SEM_REL,(uint32_t *)LCK, \
(uint64_t)NEWVAL1, (_Asm_ldhint)_LDHINT_NONE) == (uint64_t)CMPVAL1 ? 1 : 0 \
)
# else
# error Unsupported Platform sr_port/compswap.h
# endif /* __ia64 */
#else
boolean_t compswap(sm_global_latch_ptr_t lock, int compval1, int compval2, int newval1, int newval2);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -13,10 +13,11 @@
#include "gtm_stdio.h"
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "mprof.h"
#include "error.h"
#include "glvn_pool.h"
GBLREF stack_frame *frame_pointer;
GBLREF unsigned char *stackbase ,*stacktop, *msp, *stackwarn;
@ -36,18 +37,21 @@ void copy_stack_frame(void)
if (msp <= stacktop)
{
msp = msp_save;
rts_error(VARLSTCNT(1) ERR_STACKOFLOW);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKOFLOW);
} else
rts_error(VARLSTCNT(1) ERR_STACKCRIT);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKCRIT);
}
assert(msp < stackbase);
assert((frame_pointer < frame_pointer->old_frame_pointer) || (NULL == frame_pointer->old_frame_pointer));
*sf = *frame_pointer;
sf->old_frame_pointer = frame_pointer;
sf->flags = 0; /* Don't propagate special flags */
sf->for_ctrl_stack = NULL;
sf->flags = 0; /* Don't propagate special flags */
sf->type &= SFT_ZINTR_OFF; /* Don't propagate special type - normally can't propagate but if $ZINTERRUPT frame is
* rewritten by ZGOTO to a "regular" frame, this frame type *can* propagate.
*/
SET_GLVN_INDX(sf, GLVN_POOL_UNTOUCHED);
sf->ret_value = NULL;
sf->dollar_test = -1; /* initialize it with -1 for indication of not yet being used */
sf->dollar_test = -1; /* initialize it with -1 for indication of not yet being used */
frame_pointer = sf;
DBGEHND((stderr, "copy_stack_frame: Added stackframe at addr 0x"lvaddr" old-msp: 0x"lvaddr" new-msp: 0x"lvaddr"\n",
sf, msp_save, msp));

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2003, 2012 Fidelity Information Services, Inc *
* Copyright 2003, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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) \
@ -111,39 +112,34 @@ uint4 cre_jnl_file(jnl_create_info *info)
{
mstr filestr;
int org_fn_len, rename_fn_len, fstat;
uint4 ustatus;
char *org_fn, rename_fn[MAX_FN_LEN];
boolean_t no_rename;
assert(0 != jgbl.gbl_jrec_time);
if (!info->no_rename) /* ***MAY*** be rename is required */
{
no_rename = FALSE;
if (SS_NORMAL != (info->status = prepare_unique_name((char *)info->jnl, info->jnl_len, "", "",
rename_fn, &rename_fn_len, &info->status2)))
{ /* prepare_unique_name calls append_time_stamp which needs to open the info->jnl file.
* We are here because append_time_stamp failed to open info->jnl or something else.
* So check if info->jnl is present in the system */
filestr.addr = (char *)info->jnl;
filestr.len = info->jnl_len;
if (FILE_NOT_FOUND != (fstat = gtm_file_stat(&filestr, NULL, NULL, FALSE, &ustatus)))
{
if (FILE_STAT_ERROR == fstat)
{
STATUS_MSG(info); /* for prepare_unique_name call */
info->status = ustatus;
info->status2 = SS_NORMAL;
}
STATUS_MSG(info);
return EXIT_ERR;
}
if (IS_GTM_IMAGE)
send_msg(VARLSTCNT(4) ERR_JNLFNF, 2, filestr.len, filestr.addr);
else
gtm_putmsg(VARLSTCNT(4) ERR_JNLFNF, 2, filestr.len, filestr.addr);
STATUS_MSG(info);
info->status = info->status2 = SS_NORMAL;
info->no_rename = TRUE; /* We wanted to rename, but not required */
info->no_prev_link = TRUE; /* No rename => no prev_link */
rename_fn, &rename_fn_len, jgbl.gbl_jrec_time, &info->status2)))
{
no_rename = TRUE;
} else
{
filestr.addr = (char *)info->jnl;
filestr.len = info->jnl_len;
if (FILE_PRESENT != (fstat = gtm_file_stat(&filestr, NULL, NULL, FALSE, (uint4 *)&info->status)))
{
if (FILE_NOT_FOUND != fstat)
{
STATUS_MSG(info);
return EXIT_ERR;
}
if (IS_GTM_IMAGE)
send_msg(VARLSTCNT(4) ERR_JNLFNF, 2, filestr.len, filestr.addr);
else
gtm_putmsg(VARLSTCNT(4) ERR_JNLFNF, 2, filestr.len, filestr.addr);
no_rename = TRUE;
}
/* Note if info->no_prev_link == TRUE, we do not keep previous link, though rename can happen */
if (JNL_ENABLED(info) && !info->no_prev_link)
{
@ -152,6 +148,13 @@ uint4 cre_jnl_file(jnl_create_info *info)
} else
assert(info->no_prev_link);
}
if (no_rename)
{
STATUS_MSG(info);
info->status = info->status2 = SS_NORMAL;
info->no_rename = TRUE; /* We wanted to rename, but not required anymore */
info->no_prev_link = TRUE; /* No rename => no prev_link */
}
} /* else we know for sure rename is not required */
return (cre_jnl_file_common(info, rename_fn, rename_fn_len));
}
@ -170,13 +173,13 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
fd_type channel;
char *jrecbuf, *jrecbuf_base;
gd_id jnlfile_id;
#if defined(VMS)
# ifdef VMS
struct FAB fab;
struct NAM nam;
char es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN];
uint4 blk, block, zero_size;
io_status_block_disk iosb;
#elif defined(UNIX)
# else
struct stat stat_buf;
int fstat_res;
ZOS_ONLY(int realfiletag;)
@ -185,10 +188,10 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
struct stat sb;
int perm;
struct perm_diag_data pdd;
#endif
# 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;
@ -208,13 +211,13 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
{
create_fn = &fn_buff[0];
if (SS_NORMAL != (info->status = prepare_unique_name((char *)info->jnl, (int)info->jnl_len, "", EXT_NEW,
(char *)create_fn, &create_fn_len, &info->status2)))
(char *)create_fn, &create_fn_len, 0, &info->status2)))
{
STATUS_MSG(info);
return EXIT_ERR;
}
}
#if defined(UNIX)
# ifdef UNIX
OPENFILE3((char *)create_fn, O_CREAT | O_EXCL | O_RDWR, 0600, channel);
if (-1 == channel)
{
@ -222,10 +225,10 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
STATUS_MSG(info);
return EXIT_ERR;
}
#if defined(__MVS__)
# ifdef __MVS__
if (-1 == gtm_zos_set_tag(channel, TAG_BINARY, TAG_NOTTEXT, TAG_FORCE, &realfiletag))
TAG_POLICY_SEND_MSG((char *)create_fn, errno, realfiletag, TAG_BINARY);
#endif
# endif
FSTAT_FILE(channel, &stat_buf, fstat_res);
if (-1 == fstat_res)
{
@ -289,7 +292,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
jrecbuf = (char *)ROUND_UP2((uintszofptr_t)jrecbuf_base, jnl_fs_block_size);
memset(jrecbuf, 0, jnl_fs_block_size);
set_gdid_from_stat(&jnlfile_id, &stat_buf);
#elif defined(VMS)
# else
nam = cc$rms_nam;
nam.nam$l_rsa = name_buffer;
nam.nam$b_rss = SIZEOF(name_buffer);
@ -325,7 +328,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);
}
@ -333,8 +336,8 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
memcpy(jnlfile_id.did, &nam.nam$w_did, SIZEOF(jnlfile_id.did));
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));
# endif
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 +353,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 +364,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 +387,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 +401,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 +427,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 +439,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 +460,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 +474,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 +488,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 +506,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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2003, 2010 Fidelity Information Services, Inc *
* Copyright 2003, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -40,7 +40,7 @@ void cre_jnl_file_intrpt_rename(int fn_len, sm_uc_ptr_t fn)
filestr.addr = (char *)fn;
filestr.len = fn_len;
prepare_unique_name((char *)fn, fn_len, "", EXT_NEW, (char *)ext_new_jnl_fn, &ext_new_jnl_fn_len, &ustatus);
prepare_unique_name((char *)fn, fn_len, "", EXT_NEW, (char *)ext_new_jnl_fn, &ext_new_jnl_fn_len, 0, &ustatus);
assert(SS_NORMAL == ustatus);
status1 = gtm_file_stat(&filestr, NULL, NULL, FALSE, &ustatus);
if (FILE_STAT_ERROR == status1)

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -53,6 +53,7 @@ void db_auto_upgrade(gd_region *reg)
if (0 == csd->mutex_spin_parms.mutex_sleep_spin_count)
csd->mutex_spin_parms.mutex_sleep_spin_count = MUTEX_SLEEP_SPIN_COUNT;
/* zero is a legitimate value for csd->mutex_spin_parms.mutex_spin_sleep_mask; so can't detect if need re-initialization */
INIT_NUM_CRIT_ENTRY_IF_NEEDED(csd);
/* Auto upgrade based on minor database version number. This code currently only does auto upgrade and does not
* do auto downgrade although that certainly is possible to implement if necessary. For now, if the current version
@ -123,8 +124,16 @@ 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;)
case GDSMV60000:
case GDSMV60001:
/* GT.M V60002 introduced mutex_spin_parms.mutex_que_entry_space_size */
NUM_CRIT_ENTRY(csd) = DEFAULT_NUM_CRIT_ENTRY;
break;
case GDSMV60002:
/* 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, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -36,29 +36,18 @@ cache_rec_ptr_t db_csh_get(block_id block) /* block number to look up */
sgmnt_data_ptr_t csd;
cache_rec_ptr_t cr, cr_hash_base;
int blk_hash, lcnt, ocnt, hmax;
bool is_mm;
# ifdef DEBUG
cache_rec_ptr_t cr_low, cr_high;
# endif
csa = cs_addrs;
csd = csa->hdr;
is_mm = (dba_mm == csd->acc_meth);
assert((FALSE == is_mm) || (csa->now_crit)); /* if MM you should be in crit */
VMS_ONLY(assert(FALSE == is_mm);) /* in VMS, MM should never call db_csh_get */
assert(dba_mm != csd->acc_meth);
hmax = csd->bt_buckets;
blk_hash = (block % hmax);
if (!is_mm)
{
DEBUG_ONLY(cr_low = &csa->acc_meth.bg.cache_state->cache_array[0];)
DEBUG_ONLY(cr_high = cr_low + csd->bt_buckets + csd->n_bts;)
cr_hash_base = csa->acc_meth.bg.cache_state->cache_array + blk_hash;
} else
{
DEBUG_ONLY(cr_low = (cache_rec_ptr_t)(csa->acc_meth.mm.mmblk_state->mmblk_array);)
DEBUG_ONLY(cr_high = (cache_rec_ptr_t)(csa->acc_meth.mm.mmblk_state->mmblk_array + csd->bt_buckets + csd->n_bts);)
cr_hash_base = (cache_rec_ptr_t)(csa->acc_meth.mm.mmblk_state->mmblk_array + blk_hash);
}
DEBUG_ONLY(cr_low = &csa->acc_meth.bg.cache_state->cache_array[0];)
DEBUG_ONLY(cr_high = cr_low + csd->bt_buckets + csd->n_bts;)
cr_hash_base = csa->acc_meth.bg.cache_state->cache_array + blk_hash;
ocnt = 0;
do
{
@ -68,8 +57,7 @@ cache_rec_ptr_t db_csh_get(block_id block) /* block number to look up */
do
{
cr = (cache_rec_ptr_t)((sm_uc_ptr_t)cr + cr->blkque.fl);
assert(!CR_NOT_ALIGNED(cr, cr_low) && !CR_NOT_IN_RANGE(cr, cr_low, cr_high)
UNIX_ONLY(|| is_mm));
assert(!CR_NOT_ALIGNED(cr, cr_low) && !CR_NOT_IN_RANGE(cr, cr_low, cr_high));
if (BT_QUEHEAD == cr->blk)
{ /* We have reached the end of the queue, validate we have run the queue
* back around to the same queue header or we'll need to retry because the
@ -84,17 +72,14 @@ cache_rec_ptr_t db_csh_get(block_id block) /* block number to look up */
assert(!csa->now_crit || (0 != cr->blkque.fl) && (0 != cr->blkque.bl));
if (cr->blk == block)
{
if (!is_mm)
{
if (CDB_STAGNATE <= t_tries || mu_reorg_process)
CWS_INSERT(block);
/* setting refer outside of crit may not prevent its replacement, but that's an
* inefficiency, not a tragedy because of concurrency checks in t_end or tp_tend;
* the real problem is to ensure that the cache_rec layout is such that this
* assignment does not damage other fields.
*/
cr->refer = TRUE;
}
if (CDB_STAGNATE <= t_tries || mu_reorg_process)
CWS_INSERT(block);
/* setting refer outside of crit may not prevent its replacement, but that's an
* inefficiency, not a tragedy because of concurrency checks in t_end or tp_tend;
* the real problem is to ensure that the cache_rec layout is such that this
* assignment does not damage other fields.
*/
cr->refer = TRUE;
return cr;
}
lcnt--;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -45,6 +45,7 @@
#include "have_crit.h"
#include "memcoherency.h"
#include "gtm_c_stack_trace.h"
#include "anticipatory_freeze.h"
GBLREF sgmnt_addrs *cs_addrs;
GBLREF gd_region *gv_cur_region;
@ -54,6 +55,10 @@ GBLREF unsigned int t_tries;
GBLREF uint4 dollar_tlevel;
GBLREF sgm_info *sgm_info_ptr;
GBLREF boolean_t mu_reorg_process;
#ifdef UNIX
GBLREF uint4 update_trans;
GBLREF jnlpool_addrs jnlpool;
#endif
#define TRACE_AND_SLEEP(ocnt) \
{ \
@ -80,9 +85,13 @@ cache_rec_ptr_t db_csh_getn(block_id block)
sgmnt_data_ptr_t csd;
srch_blk_status *tp_srch_status;
ht_ent_int4 *tabent;
boolean_t dont_flush_buff;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
csa = cs_addrs;
csd = csa->hdr;
assert(dba_mm != csd->acc_meth);
assert(csa->now_crit);
assert(csa == &FILE_INFO(gv_cur_region)->s_addrs);
max_ent = csd->n_bts;
@ -92,6 +101,9 @@ cache_rec_ptr_t db_csh_getn(block_id block)
pass1 = max_ent; /* skip referred or dirty or read-into cache records */
pass2 = 2 * max_ent; /* skip referred cache records */
pass3 = 3 * max_ent; /* skip nothing */
dont_flush_buff = gv_cur_region->read_only UNIX_ONLY(||
(!(dollar_tlevel ? sgm_info_ptr->update_trans : update_trans) && IS_REPL_INST_FROZEN)
);
INCR_DB_CSH_COUNTER(csa, n_db_csh_getns, 1);
DEFER_INTERRUPTS(INTRPT_IN_DB_CSH_GETN);
for (lcnt = 0; ; lcnt++)
@ -177,7 +189,7 @@ cache_rec_ptr_t db_csh_getn(block_id block)
* In VMS, another process cannot be concurrently resetting cr->dirty to 0 as the resetting routine
* is "wcs_wtfini" which is executed in crit which another process cannot be in as we are in crit now.
*/
if (gv_cur_region->read_only)
if (dont_flush_buff)
continue;
if (lcnt < pass1)
{
@ -189,7 +201,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 2001, 2007 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -17,11 +17,10 @@
#include "gdsfhead.h"
void db_csh_ini(sgmnt_addrs *cs)
void db_csh_ini(sgmnt_addrs *csa)
{
if ((INTPTR_T)cs->hdr & 7)
GTMASSERT;
cs->acc_meth.bg.cache_state = (cache_que_heads_ptr_t)((sm_uc_ptr_t)cs->hdr + cs->nl->cache_off);
assert(cs->acc_meth.bg.cache_state);
assertpro(0 == ((INTPTR_T)csa->hdr & 7));
csa->acc_meth.bg.cache_state = (cache_que_heads_ptr_t)((sm_uc_ptr_t)csa->hdr + csa->nl->cache_off);
assert(csa->acc_meth.bg.cache_state);
return;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -25,7 +25,7 @@
error_def(ERR_WCFAIL);
GBLREF int4 process_id;
GBLREF int4 process_id;
#if defined(UNIX) && defined(DEBUG)
GBLREF jnl_gbls_t jgbl;
#endif
@ -39,49 +39,26 @@ void db_csh_ref(sgmnt_addrs *csa, boolean_t init)
sm_uc_ptr_t bp, bp_top;
cache_rec_ptr_t cr, cr_top, cr1;
int4 buffer_size, rec_size;
boolean_t is_mm;
csd = csa->hdr;
/* Note the cr setups for MM should realistically be under a TARGETED_MSYNC_ONLY macro since the MM
* cache recs are only used in that mode. We don't currently use that mode but since this is one-time
* open-code, we aren't bothering. Note if targeted msyncs ever do come back into fashion, we should
* revisit the INTERLOCK_INIT_MM vs INTERLOCK_INIT usage, here and everywhere else too.
*/
is_mm = (dba_mm == csd->acc_meth);
if (!is_mm)
{
if (init)
{
longset((uchar_ptr_t)csa->acc_meth.bg.cache_state,
SIZEOF(cache_que_heads) + (csd->bt_buckets + csd->n_bts - 1) * SIZEOF(cache_rec),
0); /* -1 since there is a cache_rec in cache_que_heads */
SET_LATCH_GLOBAL(&csa->acc_meth.bg.cache_state->cacheq_active.latch, LOCK_AVAILABLE);
SET_LATCH_GLOBAL(&csa->acc_meth.bg.cache_state->cacheq_wip.latch, LOCK_AVAILABLE);
}
cr = cr1 = csa->acc_meth.bg.cache_state->cache_array;
buffer_size = csd->blk_size;
assert(buffer_size > 0);
assert(0 == buffer_size % DISK_BLOCK_SIZE);
rec_size = SIZEOF(cache_rec);
} else
{
if (init)
{
longset((uchar_ptr_t)csa->acc_meth.mm.mmblk_state,
SIZEOF(mmblk_que_heads) + (csd->bt_buckets + csd->n_bts - 1) * SIZEOF(mmblk_rec),
0); /* -1 since there is a mmblk_rec in mmblk_que_heads */
SET_LATCH_GLOBAL(&csa->acc_meth.mm.mmblk_state->mmblkq_active.latch, LOCK_AVAILABLE);
SET_LATCH_GLOBAL(&csa->acc_meth.mm.mmblk_state->mmblkq_wip.latch, LOCK_AVAILABLE);
}
cr = cr1 = (cache_rec_ptr_t)csa->acc_meth.mm.mmblk_state->mmblk_array;
rec_size = SIZEOF(mmblk_rec);
}
cnl = csa->nl;
if (init)
{
SET_LATCH_GLOBAL(&cnl->wc_var_lock, LOCK_AVAILABLE);
SET_LATCH_GLOBAL(&cnl->db_latch, LOCK_AVAILABLE);
if (dba_mm == csd->acc_meth)
return;
longset((uchar_ptr_t)csa->acc_meth.bg.cache_state,
SIZEOF(cache_que_heads) + (csd->bt_buckets + csd->n_bts - 1) * SIZEOF(cache_rec),
0); /* -1 since there is a cache_rec in cache_que_heads */
SET_LATCH_GLOBAL(&csa->acc_meth.bg.cache_state->cacheq_active.latch, LOCK_AVAILABLE);
SET_LATCH_GLOBAL(&csa->acc_meth.bg.cache_state->cacheq_wip.latch, LOCK_AVAILABLE);
}
cr = cr1 = csa->acc_meth.bg.cache_state->cache_array;
buffer_size = csd->blk_size;
assert(buffer_size > 0);
assert(0 == buffer_size % DISK_BLOCK_SIZE);
rec_size = SIZEOF(cache_rec);
for (cr_top = (cache_rec_ptr_t)((sm_uc_ptr_t)cr + rec_size * csd->bt_buckets);
cr < cr_top; cr = (cache_rec_ptr_t)((sm_uc_ptr_t)cr + rec_size))
cr->blk = BT_QUEHEAD;
@ -91,32 +68,21 @@ void db_csh_ref(sgmnt_addrs *csa, boolean_t init)
cnl->cur_lru_cache_rec_off = GDS_ANY_ABS2REL(csa, cr);
cnl->cache_hits = 0;
}
if (!is_mm)
{
bp = (sm_uc_ptr_t)ROUND_UP((sm_ulong_t)cr_top, OS_PAGE_SIZE);
bp_top = bp + (gtm_uint64_t)csd->n_bts * buffer_size;
GTMCRYPT_ONLY(
if (csd->is_encrypted)
{ /* In case of an encrypted database, bp_top is actually the beginning of the encrypted global buffer
* array (an array maintained parallely with the regular unencrypted global buffer array.
*/
cnl->encrypt_glo_buff_off = (sm_off_t)((sm_uc_ptr_t)bp_top - (sm_uc_ptr_t)bp);
}
)
}
bp = (sm_uc_ptr_t)ROUND_UP((sm_ulong_t)cr_top, OS_PAGE_SIZE);
bp_top = bp + (gtm_uint64_t)csd->n_bts * buffer_size;
GTMCRYPT_ONLY(
if (csd->is_encrypted)
{ /* In case of an encrypted database, bp_top is actually the beginning of the encrypted global buffer
* array (an array maintained parallely with the regular unencrypted global buffer array.
*/
cnl->encrypt_glo_buff_off = (sm_off_t)((sm_uc_ptr_t)bp_top - (sm_uc_ptr_t)bp);
}
)
for (; cr < cr_top; cr = (cache_rec_ptr_t)((sm_uc_ptr_t)cr + rec_size),
cr1 = (cache_rec_ptr_t)((sm_uc_ptr_t)cr1 + rec_size))
{
if (init)
{
if (!is_mm)
{
INTERLOCK_INIT(cr);
} else
{
INTERLOCK_INIT_MM(cr);
}
}
INTERLOCK_INIT(cr);
cr->cycle++; /* increment cycle whenever buffer's blk number changes (for tp_hist) */
cr->blk = CR_BLKEMPTY;
/* Typically db_csh_ref is invoked from db_init (when creating shared memory afresh) in which case cr->bt_index
@ -128,12 +94,9 @@ void db_csh_ref(sgmnt_addrs *csa, boolean_t init)
cr->bt_index = 0;
if (init)
{
if (!is_mm)
{
assert(bp <= bp_top);
cr->buffaddr = GDS_ANY_ABS2REL(csa, bp);
bp += buffer_size;
}
assert(bp <= bp_top);
cr->buffaddr = GDS_ANY_ABS2REL(csa, bp);
bp += buffer_size;
insqt((que_ent_ptr_t)cr, (que_ent_ptr_t)cr1);
}
cr->refer = FALSE;

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, 2013 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;
@ -128,7 +129,7 @@ void dbcertify_certify_phase(void)
if (CLI_PRESENT == cli_present("BLOCKS"))
{
if (!cli_get_hex("BLOCKS", &psa->blocks_to_process))
exit(1); /* Error message already raised */
exit(EXIT_FAILURE); /* Error message already raised */
} else
psa->blocks_to_process = MAXTOTALBLKS_V4;
if (CLI_PRESENT == cli_present("TEMPFILE_DIR"))
@ -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;
@ -473,12 +475,31 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
*/
rts_error(VARLSTCNT(3) ERR_DBCMODBLK2BIG, 1, blk_num);
}
/* Isolate the full key in the first record of the block */
dbc_init_key(psa, &psa->first_rec_key);
dbc_find_key(psa, psa->first_rec_key, blk_p + SIZEOF(v15_blk_hdr), psa->blk_set[0].blk_levl);
if ((0 < psa->blk_set[0].blk_levl) && (0 == psa->first_rec_key->end))
{ /* dbc_find_key found just a star-key in this index block. dbc_find_record/dbc_match_key (invoked later)
* does not know to handle this scenario so we finish this case off right away. No need to do any splits
* anyways since the block is obviously not too full.
*/
DBC_DEBUG(("DBC_DEBUG: Block not processed as it now has sufficient room (index block with only *-key)\n"));
psa->blks_bypassed++;
psa->blks_read++;
if (psa->blk_set[0].found_in_cache)
psa->blks_cached++;
return FALSE; /* No restart needed */
}
psa->first_rec_key->gvn_len = USTRLEN((char_ptr_t)psa->first_rec_key->base); /* The GVN we need to lookup in the DT */
if (UNIX_ONLY(8) VMS_ONLY(9) <= blk_size - blk_len)
{ /* This block has room now - no longer need to split it */
DBC_DEBUG(("DBC_DEBUG: Block not processed as it now has sufficient room\n"));
psa->blks_bypassed++;
psa->blks_read++;
if (psa->blk_set[0].found_in_cache)
psa->blks_cached++;
return FALSE; /* No restart needed */
}
/* Possibilities at this point:
1) We are looking for a DT (directory tree) block.
2) We are looking for a GVT (global variable tree) block.
@ -492,7 +513,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
from there using the level from the original block as a stopping point. One special case here is if our
target block was a gvtroot block, we don't need to traverse the GVT tree to find it. We get it from the
directory tree and stop our search there.
*/
*/
switch(blk_type)
{
case gdsblk_dtindex:
@ -524,7 +545,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
@ -633,10 +654,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
psa->block_depth = save_block_depth;
blk_index = 0; /* reset to start *our* work in the very first block */
}
/* Now we have done the gvtroot check if we were going to. If this particular block has sufficient room in it
we don't need to split it of course.
*/
* we don't need to split it of course.
*/
if (UNIX_ONLY(8) VMS_ONLY(9) <= blk_size - blk_len)
{ /* This block has room now - no longer need to split it */
DBC_DEBUG(("DBC_DEBUG: Block not processed as it now has sufficient room\n"));
@ -682,7 +702,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 +773,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 +819,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 +837,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 +906,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 +960,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 +1021,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 +1110,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 +1169,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 +1182,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 +1210,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 +1220,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, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -9,7 +9,7 @@
* *
****************************************************************/
#define _POSIX_EXIT /* Needed for VMS system() call */
#define _POSIX_EXIT /* Needed for VMS system() call */ /* BYPASSOK: system() used insode the comment, no SYSTEM() needed */
#include "mdef.h"
#ifdef VMS
@ -93,11 +93,12 @@ void dbc_open_command_file(phase_static_area *psa)
dont_sendmsg_on_log2long);
#ifdef UNIX
if (SS_LOG2LONG == status)
rts_error(VARLSTCNT(5) ERR_LOGTOOLONG, 3, gtm_dist_m.len, gtm_dist_m.addr, SIZEOF(gtm_dist_path_buff) - 1);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_LOGTOOLONG, 3,
gtm_dist_m.len, gtm_dist_m.addr, SIZEOF(gtm_dist_path_buff) - 1);
else
#endif
if (SS_NORMAL != status)
rts_error(VARLSTCNT(1) ERR_GTMDISTUNDEF);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_GTMDISTUNDEF);
assert(0 < gtm_dist_path.len);
VMS_ONLY(dbc_remove_command_file(psa)); /* If we don't do this, the command files versions pile up fast */
psa->tcfp = Fopen((char_ptr_t)psa->tmpcmdfile, "w");
@ -105,7 +106,7 @@ void dbc_open_command_file(phase_static_area *psa)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(8) ERR_DEVOPENFAIL, 2, psa->tmpcmdfile_len, psa->tmpcmdfile,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DEVOPENFAIL, 2, psa->tmpcmdfile_len, psa->tmpcmdfile,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
UNIX_ONLY(dbc_write_command_file(psa, SHELL_START));
@ -128,7 +129,7 @@ void dbc_write_command_file(phase_static_area *psa, char_ptr_t cmd)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(11) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fprintf()"), CALLFROM, /* BYPASSOK */
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(11) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fprintf()"), CALLFROM, /* BYPASSOK */
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
rc = CHMOD((char_ptr_t)psa->tmpcmdfile, S_IRUSR + S_IWUSR + S_IXUSR + S_IRGRP + S_IROTH); /* Change to 744 */
@ -136,7 +137,7 @@ void dbc_write_command_file(phase_static_area *psa, char_ptr_t cmd)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("chmod()"), CALLFROM,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("chmod()"), CALLFROM,
ERR_TEXT, 2, psa->tmpcmdfile_len, psa->tmpcmdfile,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
@ -179,7 +180,7 @@ void dbc_run_command_file(phase_static_area *psa, char_ptr_t cmdname, char_ptr_t
*cp = '\0';
dbc_syscmd((char_ptr_t)cmdbuf2);
}
rts_error(VARLSTCNT(13) ERR_DBCCMDFAIL, 7, rc, cmd_len, cmdbuf1, RTS_ERROR_TEXT(cmdname),
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(13) ERR_DBCCMDFAIL, 7, rc, cmd_len, cmdbuf1, RTS_ERROR_TEXT(cmdname),
RTS_ERROR_TEXT(cmdargs), ERR_TEXT, 2,
RTS_ERROR_LITERAL("Note that the "UNIX_ONLY("environment variable $")VMS_ONLY("logical ")GTM_DIST
" must point to the current GT.M V4 installation"));
@ -200,7 +201,7 @@ void dbc_remove_command_file(phase_static_area *psa)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("remove()"), CALLFROM,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("remove()"), CALLFROM,
ERR_TEXT, 2, psa->tmpcmdfile_len, psa->tmpcmdfile,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
@ -219,7 +220,7 @@ void dbc_open_result_file(phase_static_area *psa)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(8) ERR_DEVOPENFAIL, 2, psa->tmprsltfile_len, psa->tmprsltfile,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DEVOPENFAIL, 2, psa->tmprsltfile_len, psa->tmprsltfile,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
}
@ -240,22 +241,22 @@ uchar_ptr_t dbc_read_result_file(phase_static_area *psa, int rderrmsg, uchar_ptr
{ /* Non-EOF message */
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(11) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fgets()"), CALLFROM,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(11) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fgets()"), CALLFROM,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
} else
{ /* We have EOF */
if (0 != rderrmsg)
rts_error(VARLSTCNT(4) rderrmsg, 2, RTS_ERROR_TEXT((char_ptr_t)arg));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) rderrmsg, 2, RTS_ERROR_TEXT((char_ptr_t)arg));
else
{
strcpy(emsg, "Temporary results file (");
strcat(emsg, (char_ptr_t)psa->tmprsltfile);
strcat(emsg, " had unexpected values");
rts_error(VARLSTCNT(6) ERR_PREMATEOF, 0, ERR_TEXT, 2,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_PREMATEOF, 0, ERR_TEXT, 2,
RTS_ERROR_TEXT(emsg));
}
}
exit(1); /* We shouldn't come here but in case... */
exit(EXIT_FAILURE); /* We shouldn't come here but in case... */
}
return (uchar_ptr_t)fgs;
}
@ -282,7 +283,7 @@ void dbc_remove_result_file(phase_static_area *psa)
{
save_errno = errno;
errmsg = STRERROR(save_errno);
rts_error(VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("remove()"), CALLFROM,
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(15) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("remove()"), CALLFROM,
ERR_TEXT, 2, psa->tmprsltfile_len, psa->tmprsltfile,
ERR_TEXT, 2, RTS_ERROR_TEXT(errmsg));
}
@ -378,7 +379,7 @@ int dbc_syscmd(char_ptr_t cmdparm)
#endif
#ifdef VMS
/* Verify system() is supported */
/* Verify system() is supported */ /* BYPASSOK: system() used insode the comment, no SYSTEM() needed */
if (0 == SYSTEM(NULL))
GTMASSERT;
#endif
@ -632,10 +633,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 +696,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 +773,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);
}
@ -796,7 +799,7 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
if (!fail_ok)
{
assert(FALSE);
rts_error(VARLSTCNT(8) ERR_DBCINTEGERR, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn),
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DBCINTEGERR, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn),
ERR_TEXT, 2, RTS_ERROR_TEXT("Unable to find index record for an existing global"));
}
return -1;
@ -893,9 +896,9 @@ void dbc_init_db(phase_static_area *psa)
if (0 != ACCESS((char_ptr_t)psa->dbc_gv_cur_region->dyn.addr->fname, (R_OK | W_OK)))
{
if (EACCES == errno)
rts_error(VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(psa->dbc_gv_cur_region));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(psa->dbc_gv_cur_region));
else
rts_error(VARLSTCNT(5) ERR_DBOPNERR, 2, DB_LEN_STR(psa->dbc_gv_cur_region), errno);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBOPNERR, 2, DB_LEN_STR(psa->dbc_gv_cur_region), errno);
}
/* Open the database which on VMS gives standalone access (for phase 2) */
psa->fc->op = FC_OPEN;
@ -906,7 +909,7 @@ void dbc_init_db(phase_static_area *psa)
{ /* Verify the fileid has not changed */
if (!is_gdid_gdid_identical(&psa->ofhdr.unique_id.uid,
&FILE_INFO(psa->dbc_gv_cur_region)->UNIX_ONLY(fileid)VMS_ONLY(file_id)))
rts_error(VARLSTCNT(1) ERR_DBCNOTSAMEDB);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DBCNOTSAMEDB);
}
/* Read in database file header */
@ -920,9 +923,9 @@ void dbc_init_db(phase_static_area *psa)
if (0 != memcmp(psa->dbc_cs_data->label, V15_GDS_LABEL, GDS_LABEL_SZ - 1))
{
if (memcmp(psa->dbc_cs_data->label, V15_GDS_LABEL, GDS_LABEL_SZ - 3))
rts_error(VARLSTCNT(4) ERR_DBNOTGDS, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBNOTGDS, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn));
else
rts_error(VARLSTCNT(4) ERR_BADDBVER, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.regname));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_BADDBVER, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.regname));
}
if (!psa->phase_one)
@ -943,12 +946,15 @@ void dbc_init_db(phase_static_area *psa)
#endif
/* Verify reserved_bytes and max_rec_len again and verify kill_in_prog is not set */
if (VMS_ONLY(9) UNIX_ONLY(8) > psa->dbc_cs_data->reserved_bytes)
rts_error(VARLSTCNT(4) ERR_DBMINRESBYTES, 2, VMS_ONLY(9) UNIX_ONLY(8), psa->dbc_cs_data->reserved_bytes);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBMINRESBYTES, 2,
VMS_ONLY(9) UNIX_ONLY(8), psa->dbc_cs_data->reserved_bytes);
if (SIZEOF(blk_hdr) > (psa->dbc_cs_data->blk_size - psa->dbc_cs_data->max_rec_size))
rts_error(VARLSTCNT(5) ERR_DBMAXREC2BIG, 3, psa->dbc_cs_data->max_rec_size, psa->dbc_cs_data->blk_size,
(psa->dbc_cs_data->blk_size - SIZEOF(blk_hdr)));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBMAXREC2BIG, 3,
psa->dbc_cs_data->max_rec_size, psa->dbc_cs_data->blk_size,
(psa->dbc_cs_data->blk_size - SIZEOF(blk_hdr)));
if (0 != psa->dbc_cs_data->kill_in_prog)
rts_error(VARLSTCNT(4) ERR_DBCKILLIP, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn));
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBCKILLIP, 2,
RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn));
/* Turn off replication and/or journaling for our trip here */
if (jnl_open == psa->dbc_cs_data->jnl_state)
{

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, 2013 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*"}
@ -66,6 +67,7 @@ LITDEF nametabent dev_param_names[] =
,{2,"EB*"} ,{4,"EBCD"}
,{2,"EC*"}
,{2,"ED*"} ,{4,"EDIT"}
,{4,"EMPT*"} ,{7,"EMPTERM"}
,{6,"ERASEL*"}
,{6,"ERASET*"}
,{2,"ES*"}
@ -80,7 +82,8 @@ LITDEF nametabent dev_param_names[] =
,{3,"FIX*"} ,{5,"FIXED"}
,{3,"FLA*"}
,{3,"FLU*"}
,{2,"FO*"}
,{2,"FO"} ,{3,"FOR*"}
,{3,"FOL*"} ,{6,"FOLLOW"}
,{1,"G"} ,{2,"GR*"}
@ -114,15 +117,18 @@ 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"}
,{4,"NOED*"} ,{6,"NOEDIT"}
,{6,"NOEMPT*"} ,{9,"NOEMPTERM"}
,{4,"NOES*"} ,{6,"NOESCA"}
,{5,"NOEXT*"}
,{5,"NOFIL*"}
,{5,"NOFIX*"}
,{5,"NOFLA*"}
,{5,"NOFOL*"} ,{8,"NOFOLLOW"}
,{4,"NOHE*"}
,{5,"NOHOL*"}
,{5,"NOHOS*"} ,{6,"NOHOST"}
@ -256,27 +262,35 @@ LITDEF nametabent dev_param_names[] =
,{4,"ZWRA*"}
};
/* Offset of letter in dev_param_names */
/* Following array has reached the maximum value limit(255) for its entry. Hence adddition of the next deviceparameter needs
* to change this array to short or int. This will lead to change the interface to namelook() and the type of the first argument
* passed to it. Once that is implemented, remove this comment.
*/
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, 49, 64, 66, 70, 76, 76, 76, 84, 87,
/* 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
153, 158, 177, 178, 191, 209, 218, 224, 225, 240, 241, 242, 255
};
/* 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 EMPTERM EXCE EXTE FIELD */
{2,0}, {2,1}, {9,2}, {12,2}, {16,2}, {1,3}, {3,3}, {1,4}, {4,4}, {6,4}, {11,4}, {13,4}, {2,5},
/* FIL FIXED FOLLOW */
{5,5}, {8,5}, {14,5},
/* HOST ICHSET INDEPENDENT INSE LAB */
{3,7}, {0,8}, {2,8}, {4,8}, {1,11},
/* LENG NOCENE NODEST NOECHO NOEDIT NOEMPTERM NOESCA NOFOLLOW NOHOST NOINSE */
{3,11}, {7,13}, {10,13}, {15,13}, {17,13}, {19,13}, {21,13}, {27,13}, {31,13}, {33,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},
/* 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}
{39,13}, {44,13}, {55,13}, {57,13}, {63,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 */
{2,17}, {4,17}, {5,17}, {5,18}, {7,18}, {15,18}, {1,19}, {6,19}, {8,19}, {1,20}, {2,22}, {4,22},
/* WIDTH WRITE */
{6,22}, {10,22}
};
int deviceparameters(oprtype *c, char who_calls)
@ -321,6 +335,7 @@ int deviceparameters(oprtype *c, char who_calls)
,iop_delete ,iop_delete
,iop_delimiter
,iop_destroy ,iop_destroy
,iop_detach
,iop_doublespace
,iop_downscroll
@ -328,6 +343,7 @@ int deviceparameters(oprtype *c, char who_calls)
,iop_ebcdic ,iop_ebcdic
,iop_echo
,iop_editing ,iop_editing
,iop_empterm ,iop_empterm
,iop_eraseline
,iop_erasetape
,iop_escape
@ -342,7 +358,8 @@ int deviceparameters(oprtype *c, char who_calls)
,iop_fixed ,iop_fixed
,iop_flag
,iop_flush
,iop_form
,iop_form ,iop_form
,iop_follow ,iop_follow
,iop_g_protection, iop_g_protection
@ -376,15 +393,18 @@ 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
,iop_noediting ,iop_noediting
,iop_noempterm ,iop_noempterm
,iop_noescape ,iop_noescape
,iop_inhextgap
,iop_nofilter
,iop_nofixed
,iop_noflag
,iop_nofollow ,iop_nofollow
,iop_noheader
,iop_nohold
,iop_nohostsync ,iop_nohostsync
@ -519,8 +539,14 @@ int deviceparameters(oprtype *c, char who_calls)
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
assert((SIZEOF(dev_param_names) / SIZEOF(nametabent) == dev_param_index[26]));
assert((SIZEOF(dev_param_data) / SIZEOF(unsigned char)) == dev_param_index[26]);
/* The value of dev_param_index[26] should be 256 but is 255 since that is all that can fit in a unsigned char. That is why
* following asserts has (dev_param_index[26] + 1). Once the type of dev_param_index is changed, the "+ 1" in following
* assert should be removed.
*/
assert((SIZEOF(dev_param_names) / SIZEOF(nametabent) == dev_param_index[26] + 1));
assert((SIZEOF(dev_param_data) / SIZEOF(unsigned char)) == dev_param_index[26] + 1);
assert(dev_param_index[26] == 255);
assert(SIZEOF(dev_param_index[26] == SIZEOF(char)));
is_parm_list = (TK_LPAREN == TREF(window_token));
if (is_parm_list)
advancewindow();

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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 \
@ -100,7 +104,7 @@ enum dse_fmt
{ \
if(!cli_get_str("CONFIRMATION",(X),&(Y))) \
{ \
rts_error(VARLSTCNT(1) ERR_DSEWCINITCON); \
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DSEWCINITCON); \
return; \
} \
}
@ -115,22 +119,18 @@ enum dse_fmt
GET_CONFIRM(confirm, len); \
if (confirm[0] != 'Y' && confirm[0] != 'y') \
{ \
rts_error(VARLSTCNT(1) ERR_DSEWCINITCON); \
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DSEWCINITCON); \
return; \
} \
}
#define DSE_WCREINIT(CS_ADDRS) \
{ \
assert(CS_ADDRS->now_crit); \
bt_init(CS_ADDRS); \
if (CS_ADDRS->hdr->acc_meth == dba_bg) \
{ \
bt_refresh(CS_ADDRS, TRUE); \
db_csh_ini(CS_ADDRS); \
db_csh_ref(CS_ADDRS, TRUE); \
send_msg(VARLSTCNT(4) ERR_DSEWCREINIT, 2, DB_LEN_STR(gv_cur_region)); \
} \
#define DSE_WCREINIT(CS_ADDRS) \
{ \
assert(CS_ADDRS->now_crit); \
if (CS_ADDRS->hdr->acc_meth == dba_bg) \
bt_refresh(CS_ADDRS, TRUE); \
db_csh_ref(CS_ADDRS, TRUE); \
send_msg_csa(CSA_ARG(CS_ADDRS) VARLSTCNT(4) ERR_DSEWCREINIT, 2, DB_LEN_STR(gv_cur_region)); \
}
void dse_ctrlc_setup(void);
@ -138,6 +138,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);

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 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,16 +46,15 @@ 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;
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 +180,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 +202,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 +216,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);
@ -246,7 +245,7 @@ void dse_adrec(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
free(lbp);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -46,7 +46,6 @@ GBLREF srch_hist dummy_hist;
GBLREF gd_addr *gd_header;
GBLREF block_id patch_curr_blk;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
void dse_adstar(void)
{
@ -55,6 +54,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 +112,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));
@ -126,7 +126,7 @@ void dse_adstar(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
free(lbp);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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 */
@ -170,11 +168,10 @@ void dse_all(void)
GTMASSERT;
}
patch_curr_blk = get_dir_root();
if (crit)
{
UNIX_ONLY(gtm_mutex_init(gv_cur_region, NUM_CRIT_ENTRY, TRUE);)
VMS_ONLY(mutex_init(cs_addrs->critical, NUM_CRIT_ENTRY, TRUE);)
UNIX_ONLY(gtm_mutex_init(gv_cur_region, NUM_CRIT_ENTRY(cs_addrs->hdr), TRUE));
VMS_ONLY(mutex_init(cs_addrs->critical, NUM_CRIT_ENTRY(cs_addrs->hdr), TRUE));
cs_addrs->nl->in_crit = 0;
cs_addrs->hold_onto_crit = FALSE; /* reset this just before cs_addrs->now_crit is reset */
cs_addrs->now_crit = FALSE;

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2003, 2012 Fidelity Information Services, Inc *
* Copyright 2003, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -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,12 @@ 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"));
@ -78,7 +82,7 @@ void dse_cache(void)
if (!cli_get_int("SIZE", &size))
return;
if (!((SIZEOF(char) == size) || (SIZEOF(short) == size) || (SIZEOF(int4) == size)))
rts_error(VARLSTCNT(1) ERR_SIZENOTVALID4);
rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_SIZENOTVALID4);
}
if (value_present && !cli_get_hex("VALUE", &value))
return;
@ -98,23 +102,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 */
@ -212,14 +226,6 @@ void dse_cache(void)
TRUE, REG_LEN_STR(reg), csa->nl->sec_size VMS_ONLY(* OS_PAGELET_SIZE));
} else
{
util_out_print("Region !AD : mmblk_state = 0x!XJ",
TRUE, REG_LEN_STR(reg), DB_ABS2REL(csa->acc_meth.mm.mmblk_state));
mr_que_lo = &csa->acc_meth.mm.mmblk_state->mmblk_array[0];
util_out_print("Region !AD : mmblk_que_header = 0x!XJ : Numelems = 0x!XL : Elemsize = 0x!XL",
TRUE, REG_LEN_STR(reg), DB_ABS2REL(mr_que_lo), csa->hdr->bt_buckets, SIZEOF(mmblk_rec));
util_out_print("Region !AD : mm_cache_record = 0x!XJ : Numelems = 0x!XL : Elemsize = 0x!XL",
TRUE, REG_LEN_STR(reg), DB_ABS2REL(mr_que_lo + csa->hdr->bt_buckets), csa->hdr->n_bts,
SIZEOF(mmblk_rec));
util_out_print("Region !AD : shared_memory_size = 0x!XL",
TRUE, REG_LEN_STR(reg), csa->nl->sec_size VMS_ONLY(* OS_PAGELET_SIZE));
util_out_print("Region !AD : db_file_header = 0x!XJ", TRUE, REG_LEN_STR(reg), csa->hdr);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,6 +42,9 @@
#include "util.h"
#include "t_abort.h"
#include "gvcst_blk_build.h" /* for the BUILD_AIMG_IF_JNL_ENABLED macro */
#ifdef GTM_CRYPT
#include "gtmcrypt.h"
#endif
GBLREF char *update_array, *update_array_ptr;
GBLREF uint4 update_array_size;
@ -53,7 +56,6 @@ GBLREF gd_region *gv_cur_region;
GBLREF gd_addr *gd_header;
GBLREF cache_rec *cr_array[((MAX_BT_DEPTH * 2) - 1) * 2]; /* Maximum number of blocks that can be in transaction */
GBLREF boolean_t unhandled_stale_timer_pop;
GBLREF unsigned char *non_tp_jfb_buff_ptr;
GBLREF cw_set_element cw_set[];
error_def(ERR_DSEBLKRDFAIL);
@ -79,8 +81,9 @@ void dse_chng_bhead(void)
sgmnt_data_ptr_t csd;
# ifdef GTM_CRYPT
int req_enc_blk_size;
int crypt_status;
int gtmcrypt_errno;
blk_hdr_ptr_t bp, save_bp, save_old_block;
gd_segment *seg;
# endif
if (gv_cur_region->read_only)
@ -172,7 +175,7 @@ void dse_chng_bhead(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, new_hdr.levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(csd, non_tp_jfb_buff_ptr, csa->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(csd, csa->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
}
if (cli_present("TN") == CLI_PRESENT)
@ -199,7 +202,7 @@ void dse_chng_bhead(void)
t_write(&blkhist, (unsigned char *)bs1, 0, 0,
((blk_hdr_ptr_t)blkhist.buffaddr)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
/* Pass the desired tn as argument to bg_update/mm_update below */
BUILD_AIMG_IF_JNL_ENABLED(csd, non_tp_jfb_buff_ptr, tn);
BUILD_AIMG_IF_JNL_ENABLED(csd, tn);
was_hold_onto_crit = csa->hold_onto_crit;
csa->hold_onto_crit = TRUE; /* need this so t_end doesn't release crit (see below comment for why) */
t_end(&dummy_hist, NULL, tn);
@ -237,10 +240,13 @@ void dse_chng_bhead(void)
{
ASSERT_ENCRYPTION_INITIALIZED;
memcpy(save_bp, bp, SIZEOF(blk_hdr));
GTMCRYPT_ENCODE_FAST(csa->encr_key_handle, (char *)(bp + 1), req_enc_blk_size,
(char *)(save_bp + 1), crypt_status);
if (0 != crypt_status)
GC_GTM_PUTMSG(crypt_status, gv_cur_region->dyn.addr->fname);
GTMCRYPT_ENCRYPT(csa, csa->encr_key_handle, (char *)(bp + 1), req_enc_blk_size,
(char *)(save_bp + 1), gtmcrypt_errno);
if (0 != gtmcrypt_errno)
{
seg = gv_cur_region->dyn.addr;
GTMCRYPT_REPORT_ERROR(gtmcrypt_errno, gtm_putmsg, seg->fname_len, seg->fname);
}
} else
memcpy(save_bp, bp, bp->bsiz);
}

View File

@ -51,6 +51,7 @@
GBLREF VSIG_ATOMIC_T util_interrupt;
GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data *cs_data;
GBLREF gd_region *gv_cur_region;
GBLREF uint4 process_id;
GBLREF uint4 image_count;
@ -64,9 +65,9 @@ error_def(ERR_FREEZECTRL);
void dse_chng_fhead(void)
{
int4 x, index_x, save_x;
int4 x, index_x, save_x, fname_len;
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;
@ -75,34 +76,40 @@ void dse_chng_fhead(void)
gtm_uint64_t value, old_value;
seq_num seq_no;
trans_num tn, prev_tn, max_tn_old, max_tn_warn_old, curr_tn_old, max_tn_new, max_tn_warn_new, curr_tn_new;
char temp_str[256], temp_str1[256], buf[MAX_LINE];
char temp_str[256], temp_str1[256], buf[MAX_LINE], *fname_ptr;
int gethostname_res;
sm_uc_ptr_t chng_ptr;
const char *freeze_msg[] = { "UNFROZEN", "FROZEN" } ;
GTMCRYPT_ONLY(
char hash_buff[GTMCRYPT_HASH_LEN];
int crypt_status;
)
# ifdef GTM_CRYPT
char hash_buff[GTMCRYPT_HASH_LEN];
int gtmcrypt_errno;
# endif
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
if (cs_addrs->hdr->freeze && (cs_addrs->hdr->freeze != process_id ||
cs_addrs->hdr->image_count != image_count) && !override)
#endif
#ifdef UNIX
if (cs_addrs->hdr->freeze && (cs_addrs->hdr->image_count != process_id)
# ifdef VMS
if (cs_data->freeze && (cs_data->freeze != process_id ||
cs_data->image_count != image_count) && !override)
# endif
# ifdef UNIX
if (cs_data->freeze && (cs_data->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.",
@ -196,7 +203,7 @@ void dse_chng_fhead(void)
TRUE, location, location, size, size);
else
{
chng_ptr = (sm_uc_ptr_t)cs_addrs->hdr + location;
chng_ptr = (sm_uc_ptr_t)cs_data + location;
if (SIZEOF(char) == size)
{
SPRINTF(temp_str, "!UB [0x!XB]");
@ -246,21 +253,23 @@ void dse_chng_fhead(void)
if ((CLI_PRESENT == cli_present("BLK_SIZE")) && (cli_get_int("BLK_SIZE", &x)))
{
if (!(x % DISK_BLOCK_SIZE) && (0 != x))
cs_addrs->hdr->blk_size = x;
cs_data->blk_size = x;
else
{
cs_addrs->hdr->blk_size = ((x/DISK_BLOCK_SIZE) + 1) * DISK_BLOCK_SIZE;
gtm_putmsg(VARLSTCNT(4) ERR_BLKSIZ512, 2, x, cs_addrs->hdr->blk_size);
cs_data->blk_size = ((x/DISK_BLOCK_SIZE) + 1) * DISK_BLOCK_SIZE;
gtm_putmsg(VARLSTCNT(4) ERR_BLKSIZ512, 2, x, cs_data->blk_size);
}
}
if ((CLI_PRESENT == cli_present("RECORD_MAX_SIZE")) && (cli_get_int("RECORD_MAX_SIZE", &x)))
{
cs_addrs->hdr->max_rec_size = x;
cs_data->max_rec_size = x;
gv_cur_region->max_rec_size = x;
}
if ((CLI_PRESENT == cli_present("KEY_MAX_SIZE")) && (cli_get_int("KEY_MAX_SIZE", &x)))
{
cs_addrs->hdr->max_key_size = x;
if (cs_data->max_key_size > x)
cs_data->maxkeysz_assured = FALSE;
cs_data->max_key_size = x;
gv_cur_region->max_key_size = x;
}
if ((CLI_PRESENT == cli_present("INHIBIT_KILLS")) && (cli_get_int("INHIBIT_KILLS", &x)))
@ -271,21 +280,21 @@ void dse_chng_fhead(void)
{
x = cli_t_f_n("INTERRUPTED_RECOV");
if (1 == x)
cs_addrs->hdr->recov_interrupted = TRUE;
cs_data->recov_interrupted = TRUE;
else if (0 == x)
cs_addrs->hdr->recov_interrupted = FALSE;
cs_data->recov_interrupted = FALSE;
}
if ((CLI_PRESENT == cli_present("REFERENCE_COUNT")) && (cli_get_int("REFERENCE_COUNT", &x)))
cs_addrs->nl->ref_cnt = x;
if ((CLI_PRESENT == cli_present("RESERVED_BYTES")) && (cli_get_int("RESERVED_BYTES", &x)))
cs_addrs->hdr->reserved_bytes = x;
cs_data->reserved_bytes = x;
if ((CLI_PRESENT == cli_present("DEF_COLLATION")) && (cli_get_int("DEF_COLLATION", &x)))
cs_addrs->hdr->def_coll = x;
cs_data->def_coll = x;
if (CLI_PRESENT == cli_present("NULL_SUBSCRIPTS"))
{
x = cli_n_a_e("NULL_SUBSCRIPTS");
if (-1 != x)
gv_cur_region->null_subs = cs_addrs->hdr->null_subs = (unsigned char)x;
gv_cur_region->null_subs = cs_data->null_subs = (unsigned char)x;
}
if (CLI_PRESENT == cli_present("CERT_DB_VER"))
{
@ -296,7 +305,7 @@ void dse_chng_fhead(void)
for (index_x=0; index_x < GDSVLAST ; index_x++)
if (0 == STRCMP(buf, gtm_dbversion_table[index_x]))
{
cs_addrs->hdr->certified_for_upgrade_to = (enum db_ver)index_x;
cs_data->certified_for_upgrade_to = (enum db_ver)index_x;
break;
}
if (GDSVLAST <= index_x)
@ -312,8 +321,8 @@ void dse_chng_fhead(void)
for (index_x=0; index_x < GDSVLAST ; index_x++)
if (0 == STRCMP(buf, gtm_dbversion_table[index_x]))
{
cs_addrs->hdr->desired_db_format = (enum db_ver)index_x;
cs_addrs->hdr->fully_upgraded = FALSE;
cs_data->desired_db_format = (enum db_ver)index_x;
cs_data->fully_upgraded = FALSE;
break;
}
if (GDSVLAST <= index_x)
@ -321,7 +330,7 @@ void dse_chng_fhead(void)
}
}
/* ---------- Begin ------ CURRENT_TN/MAX_TN/WARN_MAX_TN processing -------- */
max_tn_old = cs_addrs->hdr->max_tn;
max_tn_old = cs_data->max_tn;
if ((CLI_PRESENT == cli_present("MAX_TN")) && (cli_get_hex64("MAX_TN", &max_tn_new)))
max_tn_present = TRUE;
else
@ -329,7 +338,7 @@ void dse_chng_fhead(void)
max_tn_present = FALSE;
max_tn_new = max_tn_old;
}
max_tn_warn_old = cs_addrs->hdr->max_tn_warn;
max_tn_warn_old = cs_data->max_tn_warn;
if ((CLI_PRESENT == cli_present("WARN_MAX_TN")) && (cli_get_hex64("WARN_MAX_TN", &max_tn_warn_new)))
max_tn_warn_present = TRUE;
else
@ -378,13 +387,13 @@ void dse_chng_fhead(void)
if (change_tn)
{
if (max_tn_present)
cs_addrs->hdr->max_tn = max_tn_new;
cs_data->max_tn = max_tn_new;
if (max_tn_warn_present)
cs_addrs->hdr->max_tn_warn = max_tn_warn_new;
cs_data->max_tn_warn = max_tn_warn_new;
if (curr_tn_present)
cs_addrs->ti->curr_tn = cs_addrs->ti->early_tn = curr_tn_new;
assert(max_tn_new == cs_addrs->hdr->max_tn);
assert(max_tn_warn_new == cs_addrs->hdr->max_tn_warn);
assert(max_tn_new == cs_data->max_tn);
assert(max_tn_warn_new == cs_data->max_tn_warn);
assert(curr_tn_new == cs_addrs->ti->curr_tn);
assert(max_tn_new >= max_tn_warn_new);
assert(max_tn_warn_new >= curr_tn_new);
@ -397,13 +406,13 @@ void dse_chng_fhead(void)
if (curr_tn_present)
util_out_print("CURRENT_TN value not changed", TRUE);
*/
assert(max_tn_old == cs_addrs->hdr->max_tn);
assert(max_tn_warn_old == cs_addrs->hdr->max_tn_warn);
assert(max_tn_old == cs_data->max_tn);
assert(max_tn_warn_old == cs_data->max_tn_warn);
assert(curr_tn_old == cs_addrs->ti->curr_tn);
}
/* ---------- End ------ CURRENT_TN/MAX_TN/WARN_MAX_TN processing -------- */
if (CLI_PRESENT == cli_present("REG_SEQNO") && cli_get_hex64("REG_SEQNO", (gtm_uint64_t *)&seq_no))
cs_addrs->hdr->reg_seqno = seq_no;
cs_data->reg_seqno = seq_no;
UNIX_ONLY(
if (CLI_PRESENT == cli_present("STRM_NUM"))
{
@ -411,64 +420,64 @@ void dse_chng_fhead(void)
if (cli_get_int("STRM_NUM", &x) && (0 <= x) && (MAX_SUPPL_STRMS > x)
&& (CLI_PRESENT == cli_present("STRM_REG_SEQNO"))
&& cli_get_hex64("STRM_REG_SEQNO", (gtm_uint64_t *)&seq_no))
cs_addrs->hdr->strm_reg_seqno[x] = seq_no;
cs_data->strm_reg_seqno[x] = seq_no;
}
)
VMS_ONLY(
if (CLI_PRESENT == cli_present("RESYNC_SEQNO") && cli_get_hex64("RESYNC_SEQNO", (gtm_uint64_t *)&seq_no))
cs_addrs->hdr->resync_seqno = seq_no;
cs_data->resync_seqno = seq_no;
if (CLI_PRESENT == cli_present("RESYNC_TN") && cli_get_hex64("RESYNC_TN", &tn))
cs_addrs->hdr->resync_tn = tn;
cs_data->resync_tn = tn;
)
UNIX_ONLY(
if (CLI_PRESENT == cli_present("ZQGBLMOD_SEQNO") && cli_get_hex64("ZQGBLMOD_SEQNO", (gtm_uint64_t *)&seq_no))
cs_addrs->hdr->zqgblmod_seqno = seq_no;
cs_data->zqgblmod_seqno = seq_no;
if (CLI_PRESENT == cli_present("ZQGBLMOD_TN") && cli_get_hex64("ZQGBLMOD_TN", &tn))
cs_addrs->hdr->zqgblmod_tn = tn;
cs_data->zqgblmod_tn = tn;
)
if (CLI_PRESENT == cli_present("STDNULLCOLL"))
{
if ( -1 != (x = cli_t_f_n("STDNULLCOLL")))
gv_cur_region->std_null_coll = cs_addrs->hdr->std_null_coll = x;
gv_cur_region->std_null_coll = cs_data->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)
cs_addrs->hdr->file_corrupt = TRUE;
cs_data->file_corrupt = TRUE;
else if (0 == x)
cs_addrs->hdr->file_corrupt = FALSE;
cs_data->file_corrupt = FALSE;
}
if ((CLI_PRESENT == cli_present("TIMERS_PENDING")) && (cli_get_int("TIMERS_PENDING", &x)))
cs_addrs->nl->wcs_timers = x - 1;
change_fhead_timer("FLUSH_TIME", cs_addrs->hdr->flush_time,
(dba_bg == cs_addrs->hdr->acc_meth ? TIM_FLU_MOD_BG : TIM_FLU_MOD_MM), FALSE);
change_fhead_timer("FLUSH_TIME", cs_data->flush_time,
(dba_bg == cs_data->acc_meth ? TIM_FLU_MOD_BG : TIM_FLU_MOD_MM), FALSE);
if ((CLI_PRESENT == cli_present("WRITES_PER_FLUSH")) && (cli_get_int("WRITES_PER_FLUSH", &x)))
cs_addrs->hdr->n_wrt_per_flu = x;
cs_data->n_wrt_per_flu = x;
if ((CLI_PRESENT == cli_present("TRIGGER_FLUSH")) && (cli_get_int("TRIGGER_FLUSH", &x)))
cs_addrs->hdr->flush_trigger = x;
cs_data->flush_trigger = x;
if ((CLI_PRESENT == cli_present("GOT2V5ONCE")) && (cli_get_int("GOT2V5ONCE", &x)))
cs_addrs->hdr->db_got_to_v5_once = (boolean_t)x;
change_fhead_timer("STALENESS_TIMER", cs_addrs->hdr->staleness, 5000, TRUE);
change_fhead_timer("TICK_INTERVAL", cs_addrs->hdr->ccp_tick_interval, 100, TRUE);
change_fhead_timer("QUANTUM_INTERVAL", cs_addrs->hdr->ccp_quantum_interval, 1000, FALSE);
change_fhead_timer("RESPONSE_INTERVAL", cs_addrs->hdr->ccp_response_interval, 60000, FALSE);
cs_data->db_got_to_v5_once = (boolean_t)x;
change_fhead_timer("STALENESS_TIMER", cs_data->staleness, 5000, TRUE);
change_fhead_timer("TICK_INTERVAL", cs_data->ccp_tick_interval, 100, TRUE);
change_fhead_timer("QUANTUM_INTERVAL", cs_data->ccp_quantum_interval, 1000, FALSE);
change_fhead_timer("RESPONSE_INTERVAL", cs_data->ccp_response_interval, 60000, FALSE);
if ((CLI_PRESENT == cli_present("B_BYTESTREAM")) && (cli_get_hex64("B_BYTESTREAM", &tn)))
cs_addrs->hdr->last_inc_backup = tn;
cs_data->last_inc_backup = tn;
if ((CLI_PRESENT == cli_present("B_COMPREHENSIVE")) && (cli_get_hex64("B_COMPREHENSIVE", &tn)))
cs_addrs->hdr->last_com_backup = tn;
cs_data->last_com_backup = tn;
if ((CLI_PRESENT == cli_present("B_DATABASE")) && (cli_get_hex64("B_DATABASE", &tn)))
cs_addrs->hdr->last_com_backup = tn;
cs_data->last_com_backup = tn;
if ((CLI_PRESENT == cli_present("B_INCREMENTAL")) && (cli_get_hex64("B_INCREMENTAL", &tn)))
cs_addrs->hdr->last_inc_backup = tn;
cs_data->last_inc_backup = tn;
if ((CLI_PRESENT == cli_present("WAIT_DISK")) && (cli_get_int("WAIT_DISK", &x)))
cs_addrs->hdr->wait_disk_space = (x >= 0 ? x : 0);
cs_data->wait_disk_space = (x >= 0 ? x : 0);
if (((CLI_PRESENT == cli_present("HARD_SPIN_COUNT")) && cli_get_int("HARD_SPIN_COUNT", &x))
UNIX_ONLY( || ((CLI_PRESENT == cli_present("MUTEX_HARD_SPIN_COUNT")) && cli_get_int("MUTEX_HARD_SPIN_COUNT", &x)))
) /* Unix should be backward compatible, accept MUTEX_ prefix qualifiers as well */
{
if (0 < x)
cs_addrs->hdr->mutex_spin_parms.mutex_hard_spin_count = x;
cs_data->mutex_spin_parms.mutex_hard_spin_count = x;
else
util_out_print("Error: HARD SPIN COUNT should be a non zero positive number", TRUE);
}
@ -477,7 +486,7 @@ void dse_chng_fhead(void)
) /* Unix should be backward compatible, accept MUTEX_ prefix qualifiers as well */
{
if (0 < x)
cs_addrs->hdr->mutex_spin_parms.mutex_sleep_spin_count = x;
cs_data->mutex_spin_parms.mutex_sleep_spin_count = x;
else
util_out_print("Error: SLEEP SPIN COUNT should be a non zero positive number", TRUE);
}
@ -500,38 +509,38 @@ void dse_chng_fhead(void)
if (x > 999999)
util_out_print("Error: SPIN SLEEP TIME should be less than one million micro seconds", TRUE);
else
cs_addrs->hdr->mutex_spin_parms.mutex_spin_sleep_mask = x;
cs_data->mutex_spin_parms.mutex_spin_sleep_mask = x;
}
}
UNIX_ONLY(
if ((CLI_PRESENT == cli_present("COMMITWAIT_SPIN_COUNT")) && cli_get_int("COMMITWAIT_SPIN_COUNT", &x))
{
if (0 <= x)
cs_addrs->hdr->wcs_phase2_commit_wait_spincnt = x;
cs_data->wcs_phase2_commit_wait_spincnt = x;
else
util_out_print("Error: COMMITWAIT SPIN COUNT should be a positive number", TRUE);
}
)
if ((CLI_PRESENT == cli_present("B_RECORD")) && (cli_get_hex64("B_RECORD", &tn)))
cs_addrs->hdr->last_rec_backup = tn;
cs_data->last_rec_backup = tn;
if ((CLI_PRESENT == cli_present("BLKS_TO_UPGRADE")) && (cli_get_hex("BLKS_TO_UPGRADE", (uint4 *)&x)))
{
cs_addrs->hdr->blks_to_upgrd = x;
cs_addrs->hdr->fully_upgraded = FALSE;
cs_data->blks_to_upgrd = x;
cs_data->fully_upgraded = FALSE;
}
if ((CLI_PRESENT == cli_present("MBM_SIZE")) && (cli_get_int("MBM_SIZE", &x)))
cs_addrs->hdr->master_map_len = x * DISK_BLOCK_SIZE;
if (cs_addrs->hdr->clustered)
cs_data->master_map_len = x * DISK_BLOCK_SIZE;
if (cs_data->clustered)
{
if (cs_addrs->ti->curr_tn == prev_tn)
{
CHECK_TN(cs_addrs, cs_addrs->hdr, cs_addrs->ti->curr_tn);/* can issue rts_error TNTOOLARGE */
CHECK_TN(cs_addrs, cs_data, cs_addrs->ti->curr_tn);/* can issue rts_error TNTOOLARGE */
cs_addrs->ti->early_tn++;
INCREMENT_CURR_TN(cs_addrs->hdr);
INCREMENT_CURR_TN(cs_data);
}
}
if ((CLI_PRESENT == cli_present("RC_SRV_COUNT")) && (cli_get_int("RC_SRV_COUNT", &x)))
cs_addrs->hdr->rc_srv_cnt = x;
cs_data->rc_srv_cnt = x;
if (CLI_PRESENT == cli_present("FREEZE"))
{
x = cli_t_f_n("FREEZE");
@ -556,15 +565,15 @@ void dse_chng_fhead(void)
}
}
if (x != !(cs_addrs->hdr->freeze))
if (x != !(cs_data->freeze))
util_out_print("Region !AD is now !AD", TRUE, REG_LEN_STR(gv_cur_region), LEN_AND_STR(freeze_msg[x]));
cs_addrs->persistent_freeze = x; /* secshr_db_clnup() shouldn't clear the freeze up */
}
if (CLI_PRESENT == cli_present("FULLY_UPGRADED") && cli_get_int("FULLY_UPGRADED", &x))
{
cs_addrs->hdr->fully_upgraded = (boolean_t)x;
cs_data->fully_upgraded = (boolean_t)x;
if (x)
cs_addrs->hdr->db_got_to_v5_once = TRUE;
cs_data->db_got_to_v5_once = TRUE;
}
if (CLI_PRESENT == cli_present("GVSTATSRESET"))
{
@ -607,7 +616,7 @@ void dse_chng_fhead(void)
{
lower_to_upper((uchar_ptr_t)buf, (uchar_ptr_t)buf, buf_len);
if (0 == STRCMP(buf, "NONE"))
cs_addrs->hdr->abandoned_kills = 0;
cs_data->abandoned_kills = 0;
else
{
if (('0' == buf[0]) && ('\0' == buf[1]))
@ -621,7 +630,7 @@ void dse_chng_fhead(void)
if (0 > x)
util_out_print("Invalid value for abandoned_kills qualifier", TRUE);
else
cs_addrs->hdr->abandoned_kills = x;
cs_data->abandoned_kills = x;
}
}
}
@ -632,7 +641,7 @@ void dse_chng_fhead(void)
{
lower_to_upper((uchar_ptr_t)buf, (uchar_ptr_t)buf, buf_len);
if (0 == STRCMP(buf, "NONE"))
cs_addrs->hdr->kill_in_prog = 0;
cs_data->kill_in_prog = 0;
else
{
if (('0' == buf[0]) && ('\0' == buf[1]))
@ -646,7 +655,7 @@ void dse_chng_fhead(void)
if (0 > x)
util_out_print("Invalid value for kill_in_prog qualifier", TRUE);
else
cs_addrs->hdr->kill_in_prog = x;
cs_data->kill_in_prog = x;
}
}
}
@ -658,11 +667,11 @@ void dse_chng_fhead(void)
lower_to_upper((uchar_ptr_t)buf, (uchar_ptr_t)buf, buf_len);
if (0 == STRCMP(buf, "CURRENT"))
{
memset(cs_addrs->hdr->machine_name, 0, MAX_MCNAMELEN);
GETHOSTNAME(cs_addrs->hdr->machine_name, MAX_MCNAMELEN, gethostname_res);
memset(cs_data->machine_name, 0, MAX_MCNAMELEN);
GETHOSTNAME(cs_data->machine_name, MAX_MCNAMELEN, gethostname_res);
}
else if (0 == STRCMP(buf, "CLEAR"))
memset(cs_addrs->hdr->machine_name, 0, MAX_MCNAMELEN);
memset(cs_data->machine_name, 0, MAX_MCNAMELEN);
else
util_out_print("Invalid value for the machine_name qualifier", TRUE);
} else
@ -672,42 +681,28 @@ void dse_chng_fhead(void)
# ifdef GTM_CRYPT
if (CLI_PRESENT == cli_present("ENCRYPTION_HASH"))
{
/* It could be possible that when the user is trying to change the encryption hash in the file header,
* more than one process is accessing the database. In such a case, changing the hash might affect the
* running processes. So warn the user about the potential consequence and return. */
if (1 < cs_addrs->nl->ref_cnt)
{
util_out_print("Cannot reset encryption hash in file header while !XL other processes are \
accessing the database.",
util_out_print("Cannot reset encryption hash in file header while !XL other processes are "
"accessing the database.",
TRUE,
cs_addrs->nl->ref_cnt - 1);
return;
}
ASSERT_ENCRYPTION_INITIALIZED; /* assert that encryption is already initialized in db_init */
/* It is possible that the encryption hash in the database file header is corrupted and we are trying to
* reset it here. But for that to happen, GTMCRYPT_HASH_GEN should not worry about the error happened in
* db_init (unless the encryption library failed due to dlopen error as this would mean that the function
* pointers for the encryption APIs would not be initialized to a proper value and we would end up not
* reporting error). So, the below macro resets the error only if it was not caused due to a dlopen error. */
GTMCRYPT_RESET_HASH_MISMATCH_ERR;
fname_ptr = (char *)gv_cur_region->dyn.addr->fname;
fname_len = gv_cur_region->dyn.addr->fname_len;
ASSERT_ENCRYPTION_INITIALIZED;
/* Now generate the new hash to be placed in the database file header. */
GTMCRYPT_HASH_GEN((char *)gv_cur_region->dyn.addr->fname,
gv_cur_region->dyn.addr->fname_len,
hash_buff,
crypt_status);
if (0 != crypt_status)
GC_GTM_PUTMSG(crypt_status, gv_cur_region->dyn.addr->fname);
memcpy(cs_addrs->hdr->encryption_hash, hash_buff, GTMCRYPT_HASH_LEN);
DEBUG_ONLY(
GTMCRYPT_HASH_CHK(cs_addrs->hdr->encryption_hash, crypt_status);
assert(0 == crypt_status);
)
GTMCRYPT_HASH_GEN(cs_addrs, fname_ptr, fname_len, hash_buff, gtmcrypt_errno);
if (0 != gtmcrypt_errno)
GTMCRYPT_REPORT_ERROR(gtmcrypt_errno, gtm_putmsg, fname_len, fname_ptr);
memcpy(cs_data->encryption_hash, hash_buff, GTMCRYPT_HASH_LEN);
DEBUG_ONLY(GTMCRYPT_HASH_CHK(cs_addrs, cs_data->encryption_hash, gtmcrypt_errno));
assert(0 == gtmcrypt_errno);
}
# endif
#ifdef UNIX
# ifdef UNIX
if (CLI_PRESENT == cli_present("JNL_YIELD_LIMIT") && cli_get_int("JNL_YIELD_LIMIT", &x))
{
if (0 > x)
@ -715,44 +710,56 @@ void dse_chng_fhead(void)
else if (MAX_YIELD_LIMIT < x)
util_out_print("YIELD_LIMIT cannot be greater than !UL", TRUE, MAX_YIELD_LIMIT);
else
cs_addrs->hdr->yield_lmt = x;
cs_data->yield_lmt = x;
}
#endif
if (CLI_PRESENT == cli_present("QDBRUNDOWN"))
{
cs_data->mumps_can_bypass = TRUE;
util_out_print("Database file !AD now has quick database rundown flag set to TRUE", TRUE,
DB_LEN_STR(gv_cur_region));
}
else if (CLI_NEGATED == cli_present("QDBRUNDOWN"))
{
cs_data->mumps_can_bypass = FALSE;
util_out_print("Database file !AD now has quick database rundown flag set to FALSE", TRUE,
DB_LEN_STR(gv_cur_region));
}
# endif
if (CLI_PRESENT == cli_present(UNIX_ONLY("JNL_SYNCIO") VMS_ONLY("JNL_CACHE")))
{
x = cli_t_f_n(UNIX_ONLY("JNL_SYNCIO") VMS_ONLY("JNL_CACHE"));
if (1 == x)
cs_addrs->hdr->jnl_sync_io = UNIX_ONLY(TRUE) VMS_ONLY(FALSE);
cs_data->jnl_sync_io = UNIX_ONLY(TRUE) VMS_ONLY(FALSE);
else if (0 == x)
cs_addrs->hdr->jnl_sync_io = UNIX_ONLY(FALSE) VMS_ONLY(TRUE);
cs_data->jnl_sync_io = UNIX_ONLY(FALSE) VMS_ONLY(TRUE);
}
if ((CLI_PRESENT == cli_present("AVG_BLKS_READ")) && (cli_get_int("AVG_BLKS_READ", &x)))
{
if (x <= 0)
util_out_print("Invalid value for AVG_BLKS_READ qualifier", TRUE);
else
cs_addrs->hdr->avg_blks_per_100gbl = x;
cs_data->avg_blks_per_100gbl = x;
}
if ((CLI_PRESENT == cli_present("PRE_READ_TRIGGER_FACTOR")) && (cli_get_int("PRE_READ_TRIGGER_FACTOR", &x)))
{
if ((x < 0) || (x > 100))
util_out_print("Invalid value for PRE_READ_TRIGGER_FACTOR qualifier", TRUE);
else
cs_addrs->hdr->pre_read_trigger_factor = x;
cs_data->pre_read_trigger_factor = x;
}
if ((CLI_PRESENT == cli_present("UPD_RESERVED_AREA")) && (cli_get_int("UPD_RESERVED_AREA", &x)))
{
if ((x < 0) || (x > 100))
util_out_print("Invalid value for UPD_RESERVED_AREA qualifier", TRUE);
else
cs_addrs->hdr->reserved_for_upd = x;
cs_data->reserved_for_upd = x;
}
if ((CLI_PRESENT == cli_present("UPD_WRITER_TRIGGER_FACTOR")) && (cli_get_int("UPD_WRITER_TRIGGER_FACTOR", &x)))
{
if ((x < 0) || (x > 100))
util_out_print("Invalid value for UPD_WRITER_TRIGGER_FACTOR qualifier", TRUE);
else
cs_addrs->hdr->writer_trigger_factor = x;
cs_data->writer_trigger_factor = x;
}
DSE_REL_CRIT_AS_APPROPRIATE(was_crit, was_hold_onto_crit, nocrit_present, cs_addrs, gv_cur_region);
return;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -42,12 +42,11 @@ 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;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
void dse_chng_rhead(void)
{
@ -58,6 +57,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 +102,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 +110,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 +118,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)
@ -157,7 +157,7 @@ void dse_chng_rhead(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)bp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
}
return;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -94,8 +94,8 @@ void dse_crit(void)
if (gv_cur_region->read_only)
rts_error(VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(gv_cur_region));
cs_addrs->hdr->image_count = 0;
UNIX_ONLY(gtm_mutex_init(gv_cur_region, NUM_CRIT_ENTRY, crash);)
VMS_ONLY(mutex_init(cs_addrs->critical, NUM_CRIT_ENTRY, crash);)
UNIX_ONLY(gtm_mutex_init(gv_cur_region, NUM_CRIT_ENTRY(cs_addrs->hdr), crash));
VMS_ONLY(mutex_init(cs_addrs->critical, NUM_CRIT_ENTRY(cs_addrs->hdr), crash));
cs_addrs->nl->in_crit = 0;
cs_addrs->now_crit = FALSE;
util_out_print("!/Reinitialized critical section.!/", TRUE);

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -230,9 +230,7 @@ void dse_dmp_fhead (void)
/* Mutex Stuff */
util_out_print(" Mutex Hard Spin Count !19UL", FALSE, csd->mutex_spin_parms.mutex_hard_spin_count);
util_out_print(" Mutex Sleep Spin Count!12UL", TRUE, csd->mutex_spin_parms.mutex_sleep_spin_count);
util_out_print(" Mutex Spin Sleep Time !19UL", FALSE,
(csd->mutex_spin_parms.mutex_spin_sleep_mask == 0) ?
0 : (csd->mutex_spin_parms.mutex_spin_sleep_mask + 1));
util_out_print(" Mutex Queue Slots !19UL", FALSE, NUM_CRIT_ENTRY(csd));
util_out_print(" KILLs in progress !12UL", TRUE, (csd->kill_in_prog + csd->abandoned_kills));
util_out_print(" Replication State !AD", FALSE, 13,
(csd->repl_state == repl_closed ? " OFF"
@ -250,7 +248,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 +279,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, 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 *
@ -33,6 +33,8 @@ GBLREF sgmnt_addrs *cs_addrs;
GBLREF short crash_count;
GBLREF mval dollar_zgbldir;
GBLREF gd_addr *original_header;
GBLREF gv_namehead *gv_target;
GBLREF gv_key *gv_currkey;
void dse_f_reg(void)
{
@ -62,19 +64,19 @@ void dse_f_reg(void)
gd_header = temp_gdaddr;
return;
}
assert (rn[0]);
found = FALSE;
for (i=0, ptr = gd_header->regions; i < gd_header->n_regions ;i++, ptr++)
if (found = !memcmp(&ptr->rname[0],&rn[0],MAX_RN_LEN))
break;
if (!found)
{
util_out_print("Error: region not found.",TRUE);
gd_header = temp_gdaddr;
return;
}
assert(rn[0]);
found = FALSE;
for (i=0, ptr = gd_header->regions; i < gd_header->n_regions ;i++, ptr++)
{
if (found = !memcmp(&ptr->rname[0],&rn[0],MAX_RN_LEN))
break;
}
if (!found)
{
util_out_print("Error: region not found.",TRUE);
gd_header = temp_gdaddr;
return;
}
if (ptr == gv_cur_region)
{
util_out_print("Error: already in region: !AD",TRUE,REG_LEN_STR(gv_cur_region));
@ -99,12 +101,17 @@ void dse_f_reg(void)
gd_header = temp_gdaddr;
return;
}
if (cs_addrs->now_crit == TRUE)
if (TRUE == cs_addrs->now_crit)
{
util_out_print("Warning: now leaving region in critical section: !AD",TRUE, gv_cur_region->rname_len,
gv_cur_region->rname);
}
gv_cur_region = ptr;
gv_target = NULL; /* to prevent out-of-sync situations between gv_target and cs_addrs */
gv_currkey->base[0] = '\0'; /* prevent fast-path from op_gvname from being taken as region has been switched
* and gv_target has been reset to NULL.
*/
gv_currkey->end = 0; /* clear end so it is in sync with base[0] */
switch (gv_cur_region->dyn.addr->acc_meth)
{
case dba_mm:
@ -115,13 +122,10 @@ void dse_f_reg(void)
default:
GTMASSERT;
}
if (cs_addrs && cs_addrs->critical)
{ crash_count = cs_addrs->critical->crashcnt;
}
crash_count = cs_addrs->critical->crashcnt;
util_out_print("!/File !_!AD",TRUE, DB_LEN_STR(gv_cur_region));
util_out_print("Region!_!AD!/",TRUE, REG_LEN_STR(gv_cur_region));
patch_curr_blk = get_dir_root();
gv_init_reg(gv_cur_region);
GET_SAVED_GDADDR(gd_header, temp_gdaddr, map, gv_cur_region);

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, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -59,7 +59,11 @@ GBLREF gd_region *gv_cur_region;
GBLREF short crash_count;
GBLREF boolean_t unhandled_stale_timer_pop;
GBLREF srch_hist dummy_hist;
GBLREF unsigned char *non_tp_jfb_buff_ptr;
error_def(ERR_DBRDONLY);
error_def(ERR_DSEBLKRDFAIL);
error_def(ERR_DSEFAIL);
void dse_maps(void)
{
@ -84,10 +88,6 @@ void dse_maps(void)
sgmnt_addrs *csa;
sgmnt_data_ptr_t csd;
error_def(ERR_DSEBLKRDFAIL);
error_def(ERR_DBRDONLY);
error_def(ERR_DSEFAIL);
if (CLI_PRESENT == cli_present("BUSY") || CLI_PRESENT == cli_present("FREE") ||
CLI_PRESENT == cli_present("MASTER") || CLI_PRESENT == cli_present("RESTORE_ALL"))
{
@ -159,7 +159,7 @@ void dse_maps(void)
grab_crit(gv_cur_region);
bml_blk = blk / bplmap * bplmap;
if (dba_mm == csd->acc_meth)
bp = (sm_uc_ptr_t)csa->acc_meth.mm.base_addr + (off_t)bml_blk * blk_size;
bp = MM_BASE_ADDR(csa) + (off_t)bml_blk * blk_size;
else
{
assert(dba_bg == csd->acc_meth);
@ -220,7 +220,7 @@ void dse_maps(void)
BLK_SEG(bs_ptr, blk_ptr + SIZEOF(blk_hdr), bml_size - SIZEOF(blk_hdr));
BLK_FINI(bs_ptr, bs1);
t_write(&blkhist, (unsigned char *)bs1, 0, 0, LCL_MAP_LEVL, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(csd, non_tp_jfb_buff_ptr, csa->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(csd, csa->ti->curr_tn);
t_end(&dummy_hist, NULL, csa->ti->curr_tn);
}
/* Fill in master map */

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

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -56,7 +56,6 @@ GBLREF gtm_chset_t dse_over_chset;
GBLREF iconv_t dse_over_cvtcd;
#endif
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
GBLREF UConverter *chset_desc[];
LITREF mstr chset_names[];
GBLREF spdesc stringpool;
@ -219,7 +218,7 @@ void dse_over(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
return;
}

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, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -50,7 +50,6 @@ GBLREF sgmnt_addrs *cs_addrs;
GBLREF sgmnt_data_ptr_t cs_data;
GBLREF gd_addr *original_header;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
void dse_rest(void)
{
@ -180,7 +179,7 @@ void dse_rest(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
return;
}

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -48,9 +48,8 @@ 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;
error_def(ERR_DBRDONLY);
error_def(ERR_DSEBLKRDFAIL);
@ -64,7 +63,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;
@ -144,7 +144,7 @@ void dse_rmrec(void)
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0,
((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
free(lbp);
return;
@ -159,10 +159,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 +178,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);
@ -194,7 +194,7 @@ void dse_rmrec(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)lbp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
free(lbp);
return;

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* Copyright 2001, 2013 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -46,7 +46,6 @@ GBLREF sgmnt_data_ptr_t cs_data;
GBLREF gd_addr *gd_header;
GBLREF block_id patch_curr_blk;
GBLREF cw_set_element cw_set[];
GBLREF unsigned char *non_tp_jfb_buff_ptr;
void dse_shift(void)
{
@ -161,7 +160,7 @@ void dse_shift(void)
return;
}
t_write(&blkhist, (unsigned char *)bs1, 0, 0, ((blk_hdr_ptr_t)bp)->levl, TRUE, FALSE, GDS_WRITE_KILLTN);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, non_tp_jfb_buff_ptr, cs_addrs->ti->curr_tn);
BUILD_AIMG_IF_JNL_ENABLED(cs_data, cs_addrs->ti->curr_tn);
t_end(&dummy_hist, NULL, TN_NOT_SPECIFIED);
return;
}

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"

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