8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Merge branch 'master' into read_consistency

This commit is contained in:
hvlad 2018-02-20 13:50:04 +02:00
commit fdecfd1319
171 changed files with 3634 additions and 2186 deletions

3
.gitignore vendored
View File

@ -15,6 +15,7 @@ libtool
*.log
*.bak
*.tmp
*.d
src/dsql/parse.cpp
.vscode/.browse.VC.db
extern/decNumber/libdecFloat.a
extern/decNumber/libdecFloat*.a

View File

@ -51,8 +51,12 @@
# Per-database configuration is done in file databases.conf (former aliases.conf).
# Per-connection configuration is primarily client tool and done using
# isc_dpb_config parameter in DPB (isc_spb_config for services).
# Notice that per-database entries also may be tuned using DPB in case of
# embedded engine when attaching to database first time.
# Configuration data, added to parameters block, has same format as this file.
# Pay attention that since firebird3 there is no hard limit of 255 bytes per entry
# provided you are using isc_dpb_version2 format of DPB. The simplest way to create
# DPB/SPB is to use IXpbBuilder - when needed you will have >255 bytes entries in
# parameters block. Notice that per-database entries also may be tuned using DPB
# in case of embedded engine when attaching to database first time.
#
# Macro substitution
# ------------------
@ -375,6 +379,8 @@
# Although it can be increased, the value applies to each client
# connection/server instance and thus consumes a lot of memory.
#
# Per-database configurable.
#
# Type: integer
#
#TempCacheLimit = 64M

View File

@ -228,6 +228,8 @@ checkLibraries() {
then
checkLibrary tomcrypt
fi
checkLibrary icudata
}

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2013-12-25.23; # UTC
scriptversion=2016-01-11.22; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -496,6 +496,6 @@ done
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@ -35,12 +35,18 @@
ROOT=$(shell cd ..; pwd)
ifeq ($(CROSS_OUT), Y)
export CROSS:=CrossBuild
endif
include make.defaults
ifeq ($(CROSS_OUT), Y)
include make.crossPlatform
else
include make.platform
endif
include make.rules
include make.shared.variables
@ -185,7 +191,11 @@ $(TOMMATH_LIB): $(TOM_Objs)
.PHONY: tomcrypt
TOMCRYPT_LIB=$(LIB)/libtomcrypt.a
TOM_Objs=$(addprefix ../extern/libtomcrypt/,$(call doObjects,$(call dirFiles,../extern/libtomcrypt)))
TOM_Src:=hashes/md5.c hashes/sha1.c hashes/sha2/sha256.c hashes/sha2/sha512.c misc/crypt/crypt_argchk.c
TOM_Src:=$(addprefix ../extern/libtomcrypt/src/, $(TOM_Src))
TOM_Objs=$(call doObjects,$(TOM_Src))
tomcrypt: $(TOMCRYPT_LIB)
@ -264,6 +274,8 @@ cross2:
$(MAKE) prerequisites
$(MAKE) tommath
$(MAKE) tomcrypt
$(MAKE) -C $(ROOT)/extern/decNumber
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
$(MAKE) yvalve
$(MAKE) engine
$(MAKE) fbintl
@ -535,7 +547,7 @@ udf_compat: $(UDF_BACKWARD_COMPATIBILITY) $(COMPAT_SQL)
$(UDF_BACKWARD_COMPATIBILITY): $(COMPAT_Objects)
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(UDF_BACKWARD_COMPATIBILITY_BASENAME)) \
$(LINK_UDR_PLUGIN_SYMBOLS) $(LIB_PATH_OPTS) $(UNDEF_FLAGS) -o $@ $^ $(THR_LIBS)
$(LINK_UDR_PLUGIN_SYMBOLS) $(LIB_PATH_OPTS) $(UNDEF_FLAGS) -o $@ $^ $(THR_LIBS) $(UDR_SUPPORT_LIBS)
$(COMPAT_SQL): $(SRC_COMPAT_SQL)
cp $^ $@

View File

@ -20,7 +20,10 @@ HOST_TAG64:=linux-x86
endif
NDK_TOOLCHAIN_VERSION:=$(shell echo $(TOOLCHAIN_DIR) | awk -F - '{print $$NF;}')
CROSS_PLATFORM:=$(NDK)/platforms/android-24/arch-arm
CROSS_PLATFORM:=$(NDK)/platforms
ALEVEL:=$(shell for i in `seq 256`; do [ -d $(CROSS_PLATFORM)/android-$${i} ] && adir=$${i}; done; echo $${adir})
CROSS_PLATFORM:=$(CROSS_PLATFORM)/android-$(ALEVEL)/arch-arm
CROSS_PREFIX:=$(NDK)/toolchains/$(TOOLCHAIN_DIR)/prebuilt/$(HOST_TAG64)/bin/arm-linux-androideabi-
CXX:=$(CROSS_PREFIX)g++
@ -34,12 +37,20 @@ OBJDUMP:=$(CROSS_PREFIX)objdump
RANLIB:=$(CROSS_PREFIX)ranlib
STRIP:=$(CROSS_PREFIX)strip
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM -pipe -MMD -fPIC -fmessage-length=0 \
-I$(ROOT)/extern/libtommath --sysroot=$(CROSS_PLATFORM) \
-I$(CROSS_PLATFORM)/usr/include -I$(ROOT)/gen/cross \
-I$(NDK)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include \
-I$(NDK)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi/include
export CXX
export CC
export AR
CROSS_FLAGS=--sysroot=$(CROSS_PLATFORM) \
-I$(CROSS_PLATFORM)/usr/include -I$(ROOT)/gen/cross \
-I$(NDK)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include \
-I$(NDK)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi/include
export CROSS_FLAGS
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM -pipe -MMD -fPIC -fmessage-length=0 \
-I$(ROOT)/extern/libtommath -I$(ROOT)/extern/libtomcrypt/src/headers \
$(CROSS_FLAGS)
OPTIMIZE_FLAGS=-fno-omit-frame-pointer
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
@ -53,7 +64,8 @@ CROSS_CONFIG=android.arme
LDFLAGS += --sysroot=$(CROSS_PLATFORM) -L$(NDK)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/armeabi \
-L$(NDK)/sources/cxx-stl/gnu-libstdc++/libs/armeabi
DroidLibs := -lm -ldl -lsupc++
DroidLibs := -lm -ldl -lsupc++ $(DECLIB)
UDR_SUPPORT_LIBS := -lgnustl_shared
LINK_LIBS = $(DroidLibs)
SO_LINK_LIBS = $(DroidLibs)

View File

@ -133,7 +133,7 @@ CAS_OPTIONS=@CAS_OPTIONS@
# multiple-precision integer library
MATHLIB=@MATHLIB@
DECLIB=-ldecFloat
DECLIB=-ldecFloat$(CROSS)
# crypt library
CRYPTLIB=@CRYPTLIB@
@ -291,6 +291,7 @@ LINK_UDR_PLUGIN_SYMBOLS = $(call LIB_LINK_MAPFILE,$(UDR_PLUGIN_VERS))
LINK_EMPTY_SYMBOLS = $(call LIB_LINK_MAPFILE,$(EMPTY_VERS))
LINK_PLUGIN_SYMBOLS = $(call LIB_LINK_MAPFILE,$(PLUGIN_VERS))
LINK_EXEC_EXPORT=-rdynamic
UDR_SUPPORT_LIBS=
LIB_PLATFORM_RPATH = -Wl,-rpath,$(1)

View File

@ -74,7 +74,7 @@ WCXXFLAGS = $(WFLAGS) $(THR_FLAGS) $(RTTI_FLAG) $(CXXFLAGS) $(GLOB_OPTIONS)
GPRE_FLAGS= -m -z -n
JRD_GPRE_FLAGS = -n -z -gds_cxx -ids
ISQL_GPRE_FLAGS = -m -z -n -ocxx
OBJECT_GPRE_FLAGS = -m -z -n -ocxx
.SUFFIXES: .c .e .epp .cpp
@ -87,7 +87,10 @@ $(OBJ)/jrd/%.cpp: $(SRC_ROOT)/jrd/%.epp
$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $(firstword $<) $@
$(OBJ)/isql/%.cpp: $(SRC_ROOT)/isql/%.epp
$(GPRE_CURRENT) $(ISQL_GPRE_FLAGS) $< $@
$(GPRE_CURRENT) $(OBJECT_GPRE_FLAGS) $< $@
$(OBJ)/burp/%.cpp: $(SRC_ROOT)/burp/%.epp
$(GPRE_CURRENT) $(OBJECT_GPRE_FLAGS) $< $@
$(OBJ)/%.cpp: $(SRC_ROOT)/%.epp
$(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@

View File

@ -20,10 +20,9 @@
#LD=@CXX@
#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DLINUX -pipe -MMD -fPIC
#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch
COMMON_FLAGS=-DLINUX -DARM -pipe -MMD -fPIC -fsigned-char -fmessage-length=0 -DFB_SEND_FLAGS=MSG_NOSIGNAL
PROD_FLAGS=-O3 -DLINUX -DARM -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
DEV_FLAGS=-ggdb -DLINUX -DARM -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor
PROD_FLAGS=$(COMMON_FLAGS) -O3
DEV_FLAGS=$(COMMON_FLAGS) -p -ggdb -Wall -Wno-non-virtual-dtor
CXXFLAGS := $(CXXFLAGS) -std=c++11

View File

@ -22,8 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbserver", "fbserver.vcxpro
{F8798A49-9D20-451E-A7BD-FEB5237103B5} = {F8798A49-9D20-451E-A7BD-FEB5237103B5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbudf", "fbudf.vcxproj", "{9DC67B05-AC3E-49A3-B0CC-83B25D757445}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gbak", "gbak.vcxproj", "{B732F5D2-B5D9-417F-B156-D790F466CB8E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gfix", "gfix.vcxproj", "{44A9E4AD-B932-4620-B319-431A153BB341}"
@ -39,8 +37,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsplit", "gsplit.vcxproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gstat", "gstat.vcxproj", "{7E862973-37C4-4202-80E7-490ED4DEDA14}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ib_udf", "ib_udf.vcxproj", "{0D4A2D8E-6461-479E-9399-F7929174E050}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ib_util", "ib_util.vcxproj", "{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instreg", "instreg.vcxproj", "{19470DE6-1975-4F9B-B1BE-E87A83240B15}"
@ -81,6 +77,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srp", "srp.vcxproj", "{BD00
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "legacy_auth", "legacy_auth.vcxproj", "{062BD3C7-2D01-44F6-8D79-070F688C559F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udf_compat", "udf_compat.vcxproj", "{6794EB8C-6425-422D-A3B0-14EED54C0E98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -145,14 +143,6 @@ Global
{23EC8DAA-6718-4EF3-979F-89F611C7D504}.Release|Win32.Build.0 = Release|Win32
{23EC8DAA-6718-4EF3-979F-89F611C7D504}.Release|x64.ActiveCfg = Release|x64
{23EC8DAA-6718-4EF3-979F-89F611C7D504}.Release|x64.Build.0 = Release|x64
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Debug|Win32.ActiveCfg = Debug|Win32
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Debug|Win32.Build.0 = Debug|Win32
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Debug|x64.ActiveCfg = Debug|x64
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Debug|x64.Build.0 = Debug|x64
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Release|Win32.ActiveCfg = Release|Win32
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Release|Win32.Build.0 = Release|Win32
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Release|x64.ActiveCfg = Release|x64
{9DC67B05-AC3E-49A3-B0CC-83B25D757445}.Release|x64.Build.0 = Release|x64
{B732F5D2-B5D9-417F-B156-D790F466CB8E}.Debug|Win32.ActiveCfg = Debug|Win32
{B732F5D2-B5D9-417F-B156-D790F466CB8E}.Debug|Win32.Build.0 = Debug|Win32
{B732F5D2-B5D9-417F-B156-D790F466CB8E}.Debug|x64.ActiveCfg = Debug|x64
@ -201,14 +191,6 @@ Global
{7E862973-37C4-4202-80E7-490ED4DEDA14}.Release|Win32.Build.0 = Release|Win32
{7E862973-37C4-4202-80E7-490ED4DEDA14}.Release|x64.ActiveCfg = Release|x64
{7E862973-37C4-4202-80E7-490ED4DEDA14}.Release|x64.Build.0 = Release|x64
{0D4A2D8E-6461-479E-9399-F7929174E050}.Debug|Win32.ActiveCfg = Debug|Win32
{0D4A2D8E-6461-479E-9399-F7929174E050}.Debug|Win32.Build.0 = Debug|Win32
{0D4A2D8E-6461-479E-9399-F7929174E050}.Debug|x64.ActiveCfg = Debug|x64
{0D4A2D8E-6461-479E-9399-F7929174E050}.Debug|x64.Build.0 = Debug|x64
{0D4A2D8E-6461-479E-9399-F7929174E050}.Release|Win32.ActiveCfg = Release|Win32
{0D4A2D8E-6461-479E-9399-F7929174E050}.Release|Win32.Build.0 = Release|Win32
{0D4A2D8E-6461-479E-9399-F7929174E050}.Release|x64.ActiveCfg = Release|x64
{0D4A2D8E-6461-479E-9399-F7929174E050}.Release|x64.Build.0 = Release|x64
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}.Debug|Win32.ActiveCfg = Debug|Win32
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}.Debug|Win32.Build.0 = Debug|Win32
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}.Debug|x64.ActiveCfg = Debug|x64
@ -282,13 +264,9 @@ Global
{C6A31374-178C-4680-A404-76BE24D0229B}.Release|x64.ActiveCfg = Release|x64
{C6A31374-178C-4680-A404-76BE24D0229B}.Release|x64.Build.0 = Release|x64
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Debug|Win32.ActiveCfg = Debug|Win32
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Debug|Win32.Build.0 = Debug|Win32
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Debug|x64.ActiveCfg = Debug|x64
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Debug|x64.Build.0 = Debug|x64
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Release|Win32.ActiveCfg = Release|Win32
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Release|Win32.Build.0 = Release|Win32
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Release|x64.ActiveCfg = Release|x64
{1AE02D41-7E24-43CC-9BCB-E4CEB6037D16}.Release|x64.Build.0 = Release|x64
{FAF9AD25-8238-49E9-9AC9-8C56E190440A}.Debug|Win32.ActiveCfg = Debug|Win32
{FAF9AD25-8238-49E9-9AC9-8C56E190440A}.Debug|Win32.Build.0 = Debug|Win32
{FAF9AD25-8238-49E9-9AC9-8C56E190440A}.Debug|x64.ActiveCfg = Debug|Win32
@ -367,6 +345,14 @@ Global
{062BD3C7-2D01-44F6-8D79-070F688C559F}.Release|Win32.Build.0 = Release|Win32
{062BD3C7-2D01-44F6-8D79-070F688C559F}.Release|x64.ActiveCfg = Release|x64
{062BD3C7-2D01-44F6-8D79-070F688C559F}.Release|x64.Build.0 = Release|x64
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Debug|Win32.ActiveCfg = Debug|Win32
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Debug|Win32.Build.0 = Debug|Win32
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Debug|x64.ActiveCfg = Debug|x64
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Debug|x64.Build.0 = Debug|x64
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Release|Win32.ActiveCfg = Release|Win32
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Release|Win32.Build.0 = Release|Win32
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Release|x64.ActiveCfg = Release|x64
{6794EB8C-6425-422D-A3B0-14EED54C0E98}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -10,7 +10,7 @@
<ClCompile>
<AdditionalOptions>/EHsc- %(AdditionalOptions)</AdditionalOptions>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>../../../src/include;../../../src/include/gen;../../../extern/libtommath;../../../extern/icu/include;../../../extern/zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../../src/include;../../../src/include/gen;../../../extern/libtomcrypt/src/headers;../../../extern/libtommath;../../../extern/icu/include;../../../extern/zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>

View File

@ -25,6 +25,7 @@
<ClCompile Include="..\..\..\src\common\CharSet.cpp" />
<ClCompile Include="..\..\..\src\common\classes\alloc.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BaseStream.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlrWriter.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletReader.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletWriter.cpp" />
@ -56,10 +57,10 @@
<IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IntrinsicFunctions>
<IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IntrinsicFunctions>
<IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IntrinsicFunctions>
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ProgramDatabase</DebugInformationFormat>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<ClCompile Include="..\..\..\src\common\cvt.cpp" />
<ClCompile Include="..\..\..\src\common\db_alias.cpp" />
@ -93,11 +94,6 @@
<ClCompile Include="..\..\..\src\common\ThreadData.cpp" />
<ClCompile Include="..\..\..\src\common\ThreadStart.cpp" />
<ClCompile Include="..\..\..\src\common\Tokens.cpp" />
<ClCompile Include="..\..\..\src\common\tomcrypt\crypt_argchk.c" />
<ClCompile Include="..\..\..\src\common\tomcrypt\md5.c" />
<ClCompile Include="..\..\..\src\common\tomcrypt\sha1.c" />
<ClCompile Include="..\..\..\src\common\tomcrypt\sha256.c" />
<ClCompile Include="..\..\..\src\common\tomcrypt\sha512.c" />
<ClCompile Include="..\..\..\src\common\unicode_util.cpp" />
<ClCompile Include="..\..\..\src\common\utils.cpp" />
<ClCompile Include="..\..\..\src\common\UtilSvc.cpp" />
@ -115,6 +111,7 @@
<ClInclude Include="..\..\..\src\common\classes\auto.h" />
<ClInclude Include="..\..\..\src\common\classes\BaseStream.h" />
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h" />
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrReader.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrWriter.h" />
<ClInclude Include="..\..\..\src\common\classes\ByteChunk.h" />
@ -205,19 +202,6 @@
<ClInclude Include="..\..\..\src\common\ThreadData.h" />
<ClInclude Include="..\..\..\src\common\ThreadStart.h" />
<ClInclude Include="..\..\..\src\common\Tokens.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_argchk.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_cfg.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_cipher.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_custom.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_hash.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_mac.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_macros.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_math.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_misc.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_pk.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_pkcs.h" />
<ClInclude Include="..\..\..\src\common\tomcrypt\tomcrypt_prng.h" />
<ClInclude Include="..\..\..\src\common\unicode_util.h" />
<ClInclude Include="..\..\..\src\common\UtilSvc.h" />
<ClInclude Include="..\..\..\src\common\utils_proto.h" />
@ -305,7 +289,7 @@
<Culture>0x041d</Culture>
</ResourceCompile>
<Lib>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -321,7 +305,7 @@
<Culture>0x041d</Culture>
</ResourceCompile>
<Lib>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -340,7 +324,7 @@
<Culture>0x041d</Culture>
</ResourceCompile>
<Lib>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -358,7 +342,7 @@
<Culture>0x041d</Culture>
</ResourceCompile>
<Lib>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;../../../extern/libtommath/lib/$(PlatformName)\$(Configuration)\tommath.lib;../../../extern/libtomcrypt/lib/$(PlatformName)\$(Configuration)\tomcrypt.lib;../../../extern/decNumber/lib/$(PlatformName)\$(Configuration)\decnumber.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -13,9 +13,6 @@
<Filter Include="headers">
<UniqueIdentifier>{03f83331-723e-4ba5-9ebb-348f0554a088}</UniqueIdentifier>
</Filter>
<Filter Include="tomcrypt">
<UniqueIdentifier>{dd0bb92e-0a1e-4406-96ff-5265e8d28258}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\common\xdr.cpp">
@ -225,6 +222,9 @@
<ClCompile Include="..\..\..\src\common\classes\TomCryptHash.cpp">
<Filter>classes</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp">
<Filter>classes</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\common\xdr_proto.h">
@ -545,5 +545,8 @@
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h">
<Filter>headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -269,9 +269,9 @@
<ClInclude Include="..\..\..\src\jrd\license.h" />
<ClInclude Include="..\..\..\src\jrd\lls.h" />
<ClInclude Include="..\..\..\src\jrd\Mapping.h" />
<ClInclude Include="..\..\..\src\jrd\Monitoring.h" />
<ClInclude Include="..\..\..\src\jrd\met.h" />
<ClInclude Include="..\..\..\src\jrd\met_proto.h" />
<ClInclude Include="..\..\..\src\jrd\Monitoring.h" />
<ClInclude Include="..\..\..\src\jrd\mov_proto.h" />
<ClInclude Include="..\..\..\src\jrd\msg.h" />
<ClInclude Include="..\..\..\src\jrd\msg_encode.h" />
@ -485,6 +485,7 @@
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/release/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -504,6 +505,7 @@
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/release/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -524,6 +526,7 @@
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -548,6 +551,7 @@
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../../../extern/icu/$(Platform)/$(Configuration)/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -983,10 +983,10 @@
<ClInclude Include="..\..\..\src\jrd\Mapping.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\dsql\DsqlCursor.h">
<ClInclude Include="..\..\..\src\jrd\Monitoring.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\jrd\Monitoring.h">
<ClInclude Include="..\..\..\src\dsql\DsqlCursor.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\jrd\extds\ValidatePassword.h">

View File

@ -106,6 +106,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -125,6 +126,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -143,6 +145,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -166,6 +169,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{338702b2-c4d3-4740-90fb-39ab24cb52c6}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{2d40ef80-0cc1-4de9-929b-ea0f3bc1e258}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{6bb99ef2-2ed0-40fe-aa79-1f484f9de430}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\fbudf\fbudf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\extlib\fbudf\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\extlib\fbudf\fbudf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\jrd\ibase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\extlib\fbudf\stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\src\extlib\fbudf\fbudf.sql" />
<None Include="..\..\..\src\extlib\fbudf\fbudf.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -1,227 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0D4A2D8E-6461-479E-9399-F7929174E050}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="FirebirdCommon.props" />
<Import Project="FirebirdRelease.props" />
<Import Project="DllNoEmbedManifest.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="FirebirdCommon.props" />
<Import Project="FirebirdDebug.props" />
<Import Project="DllNoEmbedManifest.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="FirebirdCommon.props" />
<Import Project="FirebirdRelease.props" />
<Import Project="DllNoEmbedManifest.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="FirebirdCommon.props" />
<Import Project="FirebirdDebug.props" />
<Import Project="DllNoEmbedManifest.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\..\temp\$(Platform)\$(Configuration)\firebird\udf\$(ProjectName).dll</OutputFile>
<ModuleDefinitionFile>..\defs\ib_udf.def</ModuleDefinitionFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\..\temp\$(Platform)\$(Configuration)\firebird\udf\$(ProjectName).dll</OutputFile>
<ModuleDefinitionFile>..\defs\ib_udf.def</ModuleDefinitionFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\..\temp\$(Platform)\$(Configuration)\firebird\udf\$(ProjectName).dll</OutputFile>
<ModuleDefinitionFile>..\defs\ib_udf.def</ModuleDefinitionFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\..\temp\$(Platform)\$(Configuration)\firebird\udf\$(ProjectName).dll</OutputFile>
<ModuleDefinitionFile>..\defs\ib_udf.def</ModuleDefinitionFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\ib_udf.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\extlib\ib_udf.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\src\jrd</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\defs\ib_udf.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="ib_util.vcxproj">
<Project>{eaba0ff3-1c4d-4fab-8418-31c9061f3f0d}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="EXTLIB files">
<UniqueIdentifier>{71fb8e61-eec7-4d0c-8bcf-131fccc9d5db}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Header files">
<UniqueIdentifier>{3b800df6-cf93-47b3-82f4-031e7731cc4f}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource files">
<UniqueIdentifier>{23757d96-0a7d-4aa4-96af-8c0114d25877}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\ib_udf.cpp">
<Filter>EXTLIB files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\extlib\ib_udf.h">
<Filter>Header files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
<Filter>Resource files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\defs\ib_udf.def" />
</ItemGroup>
</Project>

View File

@ -120,6 +120,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -146,6 +147,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -169,6 +171,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -192,6 +195,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -126,6 +126,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -154,6 +155,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -179,6 +181,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -204,6 +207,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -104,6 +104,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -122,6 +123,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -139,6 +141,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -161,6 +164,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>

View File

@ -104,6 +104,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -122,6 +123,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -139,6 +141,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@ -161,6 +164,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>

View File

@ -106,6 +106,7 @@
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -124,6 +125,7 @@
</DataExecutionPrevention>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -141,6 +143,7 @@
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -163,6 +166,7 @@
<TargetMachine>MachineX64</TargetMachine>
<ModuleDefinitionFile>..\defs\plugin.def</ModuleDefinitionFile>
<AdditionalDependencies>mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9DC67B05-AC3E-49A3-B0CC-83B25D757445}</ProjectGuid>
<ProjectGuid>{6794EB8C-6425-422D-A3B0-14EED54C0E98}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -88,10 +88,10 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\udf\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\udr\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\udr\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\udr\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\plugins\udr\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -115,6 +115,8 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>..\defs\udr_plugin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -139,6 +141,8 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>..\defs\udr_plugin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -160,6 +164,8 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>..\defs\udr_plugin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -181,33 +187,19 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>..\defs\udr_plugin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\fbudf\fbudf.cpp" />
<ClCompile Include="..\..\..\src\extlib\fbudf\stdafx.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\extlib\fbudf\fbudf.h" />
<ClInclude Include="..\..\..\src\jrd\ibase.h" />
<ClInclude Include="..\..\..\src\extlib\fbudf\stdafx.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\src\extlib\fbudf\fbudf.sql" />
<None Include="..\..\..\src\extlib\fbudf\fbudf.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="common.vcxproj">
<Project>{15605f44-bffd-444f-ad4c-55dc9d704465}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="yvalve.vcxproj">
<Project>{4fe03933-98cd-4879-a135-fd9430087a6b}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\UdfBackwardCompatibility.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\defs\udr_plugin.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{b8e84500-8d51-41a9-879a-665157ad8cba}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{e1d0ec8b-34eb-49f1-88ee-e63ecfea0db1}</UniqueIdentifier>
</Filter>
<Filter Include="Resource files">
<UniqueIdentifier>{1995e0f6-f169-4a72-bcc9-21990c0db77a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
<Filter>Resource files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\extlib\UdfBackwardCompatibility.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\defs\udr_plugin.def" />
</ItemGroup>
</Project>

View File

@ -119,6 +119,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -143,6 +144,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -169,6 +171,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -196,6 +199,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -241,4 +241,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -36,4 +36,4 @@
<ItemGroup>
<None Include="..\defs\udr_plugin.def" />
</ItemGroup>
</Project>
</Project>

View File

@ -177,6 +177,7 @@
<Link>
<ModuleDefinitionFile>..\defs\firebird.def</ModuleDefinitionFile>
<AdditionalDependencies>ws2_32.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -194,6 +195,7 @@
<Link>
<ModuleDefinitionFile>..\defs\firebird.def</ModuleDefinitionFile>
<AdditionalDependencies>ws2_32.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -214,6 +216,7 @@
<Link>
<ModuleDefinitionFile>..\defs\firebird.def</ModuleDefinitionFile>
<AdditionalDependencies>ws2_32.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -233,6 +236,7 @@
<Link>
<ModuleDefinitionFile>..\defs\firebird.def</ModuleDefinitionFile>
<AdditionalDependencies>ws2_32.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -25,6 +25,7 @@
<ClCompile Include="..\..\..\src\common\CharSet.cpp" />
<ClCompile Include="..\..\..\src\common\classes\alloc.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BaseStream.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlrWriter.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletReader.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletWriter.cpp" />
@ -106,6 +107,7 @@
<ClInclude Include="..\..\..\src\common\classes\auto.h" />
<ClInclude Include="..\..\..\src\common\classes\BaseStream.h" />
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h" />
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrReader.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrWriter.h" />
<ClInclude Include="..\..\..\src\common\classes\ByteChunk.h" />

View File

@ -222,6 +222,9 @@
<ClCompile Include="..\..\..\src\common\classes\TomCryptHash.cpp">
<Filter>classes</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp">
<Filter>classes</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\common\xdr_proto.h">
@ -542,5 +545,8 @@
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h">
<Filter>headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -25,6 +25,7 @@
<ClCompile Include="..\..\..\src\common\CharSet.cpp" />
<ClCompile Include="..\..\..\src\common\classes\alloc.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BaseStream.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp" />
<ClCompile Include="..\..\..\src\common\classes\BlrWriter.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletReader.cpp" />
<ClCompile Include="..\..\..\src\common\classes\ClumpletWriter.cpp" />
@ -106,6 +107,7 @@
<ClInclude Include="..\..\..\src\common\classes\auto.h" />
<ClInclude Include="..\..\..\src\common\classes\BaseStream.h" />
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h" />
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrReader.h" />
<ClInclude Include="..\..\..\src\common\classes\BlrWriter.h" />
<ClInclude Include="..\..\..\src\common\classes\ByteChunk.h" />

View File

@ -222,6 +222,9 @@
<ClCompile Include="..\..\..\src\common\classes\TomCryptHash.cpp">
<Filter>classes</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\common\classes\BlobWrapper.cpp">
<Filter>classes</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\src\common\xdr_proto.h">
@ -542,5 +545,8 @@
<ClInclude Include="..\..\..\src\common\classes\BatchCompletionState.h">
<Filter>headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\common\classes\BlobWrapper.h">
<Filter>headers</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -55,10 +55,7 @@ goto :EOF
:BOOT_PROCESS
@echo.
@set GPRE=%FB_BIN_DIR%\gpre_boot -lang_internal
@for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
@for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
@for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i -ocxx
@for %%i in (dba) do @call :PREPROCESS utilities/gstat %%i
@ -76,7 +73,7 @@ goto :EOF
@set GPRE=%FB_BIN_DIR%\gpre
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (LegacyManagement) do @call :PREPROCESS auth/SecurityDatabase %%i
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i
@for %%i in (backup, restore, OdsDetection) do @call :PREPROCESS burp %%i -ocxx -m
@for %%i in (array, blob) do @call :PREPROCESS yvalve %%i
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx

View File

@ -1211,7 +1211,6 @@ dnl ### GEN ### directories for databases and misc
dnl # output
mkdir -p gen/\$fb_tgt/include
mkdir -p gen/\$fb_tgt/intl
mkdir -p gen/\$fb_tgt/firebird/UDF
mkdir -p gen/\$fb_tgt/firebird/bin
mkdir -p gen/\$fb_tgt/firebird/plugins
mkdir -p gen/\$fb_tgt/firebird/examples/api
@ -1238,11 +1237,6 @@ dnl ### TEMP ### directories for generated .cpp, .o and .d by module name
done
src/misc/writeBuildNum.sh createMakeVersion gen/Make.Version
dnl # sql files for UDF declarations
for sql_file in ib_udf.sql fbudf/fbudf.sql ib_udf2.sql; do
cp src/extlib/\$sql_file gen/\$fb_tgt/firebird/UDF
done
done
dnl # rebuild version header if needed

View File

@ -45,6 +45,8 @@ fb_shut_preproviders - callback function will be called before shutting down eng
fb_shut_postproviders - callback function will be called after shutting down engine
fb_shut_finish - final step, callback function may wait for some activity to be terminated
or ORed combination of them (to make same function be called in required cases).
Non-zero mask passed to callback will be ORed with mask used in previous call (if any). Mask also
may have special value 0 - in that case previous mask is reset and callback will never be called.
Callback function has 3 parameters - reason of shutdown, actual value of mask with which it was
called and argument passed by user to fb_shutdown_callback(). There are 2 specially interesting

View File

@ -18,7 +18,7 @@ Deprecating UDF
fixed in FB 1.5. But even after it incorrectly declared (using SQL statement
DECLARE EXTERNAL FUNCTION) UDF can easily cause various security issues like
server crash or execution of arbitrary code. Therefore UDFs are deprecated
in v.4. That means that UDFs can't be used with default configuration
in v4. That means that UDFs can't be used with default configuration
(parameter "UdfAccess" set to "None") and all sample UDF libraries (ib_udf,
fbudf) are not distributed any more. Most of functions in that libraries
were replaced with builtin analogs in previous versions and therefore
@ -29,4 +29,3 @@ Deprecating UDF
path-list is just UDF and resulting line in firebird.conf should be:
UdfAccess = Restrict UDF
Recommended long-term solution is replacing of UDF with UDR.

View File

@ -3787,12 +3787,12 @@ interface is main interface of database crypt key holder plugin.</font></p>
<li/>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt">FB_BOOLEAN
useOnlyOwnKeys(StatusType* status) informs firebird engine
whether a key, provided by another key holder, be used or not. Makes
sense only for SuperServer only it can share database crypt keys
whether a key, provided by key holder, can be used in other attachments.
Makes sense only for SuperServer only it can share database crypt keys
between attachments. Returning FB_TRUE from this method enforces
firebird to make sure that this particular key holder (and therefore
in turn attachment related to it) provides correct crypt key before
letting it to work with database.</font></p>
in turn attachment related to it) provides correct crypt key for
any other attachment to this database.</font></p>
<li/>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt">ICryptKeyCallback*
chainHandle(StatusType* status) support of a chain of key

View File

@ -166,7 +166,7 @@ DECFLOAT (FB 4.0)
SET DECFLOAT TRAPS TO <comma-separated traps list - may be empty> - controls which
exceptional conditions cause a trap. Valid traps are: Division_by_zero, Inexact,
Invalid_operation, Overflow and Underflow. By default traps are set to:
Division_by_zero, Invalid_operation, Overflow, Underflow.
Division_by_zero, Invalid_operation, Overflow.
SET DECFLOAT BIND <bind-type> - controls how are DECFLOAT values represented in outer
world (i.e. in messages or in XSQLDA). Valid binding types are: NATIVE (use IEEE754

View File

@ -1,11 +1,11 @@
LIBRARY=libdecFloat.a
LIBRARY=libdecFloat$(CROSS).a
$(LIBRARY): $(wildcard *.c) $(wildcard *.h) Makefile
$(RM) -f *.o
$(CC) -c -O3 -fPIC $(subst decCommon.c,,$(subst decBasic.c,,$(wildcard *.c)))
$(CC) $(CROSS_FLAGS) -c -O3 -fPIC $(subst decCommon.c,,$(subst decBasic.c,,$(wildcard *.c)))
$(AR) crs $(LIBRARY) *.o
$(RM) -f *.o
.PHONY: clean
clean:
$(RM) -f *.o $(LIBRARY)
$(RM) -f *.o *.a

View File

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decNumber", "decNumber_MSVC10.vcxproj", "{BE4D2DDC-59A0-4CD7-848E-231E13785335}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Debug|Win32.ActiveCfg = Debug|Win32
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Debug|Win32.Build.0 = Debug|Win32
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Debug|x64.ActiveCfg = Debug|x64
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Debug|x64.Build.0 = Debug|x64
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Release|Win32.ActiveCfg = Release|Win32
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Release|Win32.Build.0 = Release|Win32
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Release|x64.ActiveCfg = Release|x64
{BE4D2DDC-59A0-4CD7-848E-231E13785335}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\decBasic.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\decCommon.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\decContext.c" />
<ClCompile Include="..\decDouble.c" />
<ClCompile Include="..\decimal128.c" />
<ClCompile Include="..\decimal32.c" />
<ClCompile Include="..\decimal64.c" />
<ClCompile Include="..\decNumber.c" />
<ClCompile Include="..\decPacked.c" />
<ClCompile Include="..\decQuad.c" />
<ClCompile Include="..\decSingle.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\decContext.h" />
<ClInclude Include="..\decDouble.h" />
<ClInclude Include="..\decDPD.h" />
<ClInclude Include="..\decimal128.h" />
<ClInclude Include="..\decimal32.h" />
<ClInclude Include="..\decimal64.h" />
<ClInclude Include="..\decNumber.h" />
<ClInclude Include="..\decNumberLocal.h" />
<ClInclude Include="..\decPacked.h" />
<ClInclude Include="..\decQuad.h" />
<ClInclude Include="..\decSingle.h" />
</ItemGroup>
<ItemGroup>
<Text Include="..\readme.txt" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>decNumber</ProjectName>
<ProjectGuid>{BE4D2DDC-59A0-4CD7-848E-231E13785335}</ProjectGuid>
<RootNamespace>decNumber</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\lib\$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\temp\$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\temp\$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\lib\$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\temp\$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\temp\$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">decnumber</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">decnumber</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">decnumber</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">decnumber</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\$(TargetFileName)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug/libtommath.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\$(TargetFileName)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug/libtommath.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\$(TargetFileName)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libtommath.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\$(TargetFileName)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/libtommath.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\decBasic.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decCommon.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decContext.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decDouble.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decimal32.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decimal64.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decimal128.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decNumber.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decPacked.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decSingle.c">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="..\decQuad.c">
<Filter>Source files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\decContext.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decDouble.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decDPD.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decimal32.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decimal64.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decimal128.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decNumber.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decNumberLocal.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decPacked.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decQuad.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="..\decSingle.h">
<Filter>Header files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="..\readme.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Source files">
<UniqueIdentifier>{638ba91b-1def-4094-a692-752b2ce6f461}</UniqueIdentifier>
</Filter>
<Filter Include="Header files">
<UniqueIdentifier>{ffbb5d93-e379-40ba-ab58-c62e9e20c810}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtomcrypt", "libtomcrypt_MSVC10.vcxproj", "{489B8EBF-E95A-4A1C-8041-082FA1C2F953}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Debug|Win32.ActiveCfg = Debug|Win32
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Debug|Win32.Build.0 = Debug|Win32
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Debug|x64.ActiveCfg = Debug|x64
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Debug|x64.Build.0 = Debug|x64
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Release|Win32.ActiveCfg = Release|Win32
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Release|Win32.Build.0 = Release|Win32
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Release|x64.ActiveCfg = Release|x64
{489B8EBF-E95A-4A1C-8041-082FA1C2F953}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>libtomcrypt</ProjectName>
<ProjectGuid>{489B8EBF-E95A-4A1C-8041-082FA1C2F953}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>temp\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>tomcrypt</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>temp\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>tomcrypt</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>temp\$(Platform)\$(Configuration)\</IntDir>
<TargetName>tomcrypt</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>lib\$(Platform)\$(Configuration)\</OutDir>
<IntDir>temp\$(Platform)\$(Configuration)\</IntDir>
<TargetName>tomcrypt</TargetName>
<TargetExt>.lib</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<StringPooling>
</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>src\headers;..\libtommath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LTM_DESC;WIN32;_LIB;LTC_SOURCE;USE_LTM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release\libtomcrypt.bsc</OutputFile>
</Bscmake>
<Lib>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<Optimization>Disabled</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<MinimalRebuild>true</MinimalRebuild>
<AdditionalIncludeDirectories>src\headers;..\libtommath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;LTM_DESC;WIN32;_LIB;LTC_SOURCE;USE_LTM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug\libtomcrypt.bsc</OutputFile>
</Bscmake>
<Lib>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>src\headers;..\libtommath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;LTM_DESC;WIN32;_LIB;LTC_SOURCE;USE_LTM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>src\headers;..\libtommath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;LTM_DESC;WIN32;_LIB;LTC_SOURCE;USE_LTM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>
</StringPooling>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\hashes\md5.c" />
<ClCompile Include="src\hashes\sha1.c" />
<ClCompile Include="src\hashes\sha2\sha256.c" />
<ClCompile Include="src\hashes\sha2\sha512.c" />
<ClCompile Include="src\misc\crypt\crypt_argchk.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\headers\tomcrypt.h" />
<ClInclude Include="src\headers\tomcrypt_argchk.h" />
<ClInclude Include="src\headers\tomcrypt_cfg.h" />
<ClInclude Include="src\headers\tomcrypt_cipher.h" />
<ClInclude Include="src\headers\tomcrypt_custom.h" />
<ClInclude Include="src\headers\tomcrypt_hash.h" />
<ClInclude Include="src\headers\tomcrypt_macros.h" />
<ClInclude Include="src\headers\tomcrypt_misc.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,5 +1,6 @@
lib/
temp/
*.o
*.d
*.l*
.libs/

View File

@ -1818,6 +1818,8 @@ C --
PARAMETER (GDS__hdr_overflow = 335545202)
INTEGER*4 GDS__vld_plugins
PARAMETER (GDS__vld_plugins = 335545203)
INTEGER*4 GDS__db_crypt_key
PARAMETER (GDS__db_crypt_key = 335545204)
INTEGER*4 GDS__gfix_db_name
PARAMETER (GDS__gfix_db_name = 335740929)
INTEGER*4 GDS__gfix_invalid_sw

View File

@ -1813,6 +1813,8 @@ const
gds_hdr_overflow = 335545202;
isc_vld_plugins = 335545203;
gds_vld_plugins = 335545203;
isc_db_crypt_key = 335545204;
gds_db_crypt_key = 335545204;
isc_gfix_db_name = 335740929;
gds_gfix_db_name = 335740929;
isc_gfix_invalid_sw = 335740930;

View File

@ -64,8 +64,11 @@ namespace
DATABASE DB = STATIC FILENAME "yachts.lnk";
#define DB tdgbl->db_handle
#define fbTrans tdgbl->tr_handle
#define gds_trans tdgbl->tr_handle
#define isc_status tdgbl->status_vector
#define fbStatus (&tdgbl->status_vector)
#define isc_status (&tdgbl->status_vector)
#define gds_status (&tdgbl->status_vector)
void detectRuntimeODS()
@ -91,7 +94,7 @@ void detectRuntimeODS()
// and rdb$field_name = 'RDB$SYSTEM_FLAG';
int count = 0;
isc_req_handle req_handle = 0;
Firebird::IRequest* req_handle = nullptr;
FOR (REQUEST_HANDLE req_handle)
RFR IN RDB$RELATION_FIELDS
WITH (RFR.RDB$RELATION_NAME = 'RDB$RELATIONS' OR RFR.RDB$RELATION_NAME = 'RDB$RELATION_FIELDS')
@ -106,7 +109,7 @@ void detectRuntimeODS()
if (count != 2)
return;
isc_req_handle req_handle2 = 0;
Firebird::IRequest* req_handle2 = nullptr;
for (const rel_field_t* rel = relations; rel->relation; ++rel)
{
FOR (REQUEST_HANDLE req_handle2)
@ -125,7 +128,7 @@ void detectRuntimeODS()
if (tdgbl->runtimeODS < DB_VERSION_DDL8)
return;
isc_req_handle req_handle3 = 0;
Firebird::IRequest* req_handle3 = nullptr;
for (const rel_field_t* rf = rel_fields; rf->relation; ++rf)
{
FOR (REQUEST_HANDLE req_handle3)

View File

@ -57,11 +57,12 @@
#include "../common/prett_proto.h"
#endif
#include "../common/classes/UserBlob.h"
#include "../common/classes/BlobWrapper.h"
#include "../common/classes/MsgPrint.h"
#include "../burp/OdsDetection.h"
using MsgFormat::SafeArg;
using Firebird::FbLocalStatus;
// For service APIs the follow DB handle is a value stored
@ -72,8 +73,11 @@ using MsgFormat::SafeArg;
DATABASE DB = STATIC FILENAME "yachts.lnk" RUNTIME * dbb_file;
#define DB tdgbl->db_handle
#define fbTrans tdgbl->tr_handle
#define gds_trans tdgbl->tr_handle
#define isc_status tdgbl->status_vector
#define fbStatus (&tdgbl->status_vector)
#define isc_status (&tdgbl->status_vector)
#define gds_status (&tdgbl->status_vector)
namespace // unnamed, private
{
@ -173,7 +177,7 @@ const UCHAR source_items[] =
isc_info_blob_total_length,
isc_info_blob_num_segments
};
const SCHAR db_info_items[] =
const UCHAR db_info_items[] =
{
isc_info_db_sql_dialect,
isc_info_page_size,
@ -184,12 +188,12 @@ const SCHAR db_info_items[] =
isc_info_db_read_only,
isc_info_end
};
const SCHAR limbo_tpb[] =
const UCHAR limbo_tpb[] =
{
isc_tpb_version1,
isc_tpb_ignore_limbo
};
const SCHAR limbo_nau_tpb[] =
const UCHAR limbo_nau_tpb[] =
{
isc_tpb_version1,
isc_tpb_ignore_limbo,
@ -211,7 +215,7 @@ int BACKUP_backup(const TEXT* dbb_file, const TEXT* file_name)
* Backup a database.
*
**************************************/
ISC_STATUS_ARRAY status_vector;
FbLocalStatus status_vector;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -229,23 +233,23 @@ int BACKUP_backup(const TEXT* dbb_file, const TEXT* file_name)
if (tdgbl->gbl_sw_ignore_limbo)
{
if (isc_start_transaction(status_vector, &gds_trans, 1, &DB,
sizeof(limbo_nau_tpb), limbo_nau_tpb))
gds_trans = DB->startTransaction(&status_vector, sizeof(limbo_nau_tpb), limbo_nau_tpb);
if (status_vector->getState() & Firebird::IStatus::STATE_ERRORS)
{
isc_start_transaction(status_vector, &gds_trans, 1, &DB, sizeof(limbo_tpb), limbo_tpb);
gds_trans = DB->startTransaction(&status_vector, sizeof(limbo_tpb), limbo_tpb);
}
}
else
{
EXEC SQL SET TRANSACTION NO_AUTO_UNDO;
if (isc_status[1])
if (isc_status->getState() & Firebird::IStatus::STATE_ERRORS)
EXEC SQL SET TRANSACTION;
}
if (!gds_trans)
{
EXEC SQL SET TRANSACTION NAME gds_trans NO_AUTO_UNDO;
if (isc_status[1])
if (isc_status->getState() & Firebird::IStatus::STATE_ERRORS)
EXEC SQL SET TRANSACTION NAME gds_trans;
}
@ -465,7 +469,7 @@ void compress(const UCHAR* data, ULONG length)
{
for (q = p + 2; q < end && (q[-2] != q[-1] || q[-1] != q[0]); q++)
;
USHORT run = (q < end) ? q - p - 2 : end - p;
ULONG run = (q < end) ? q - p - 2 : end - p;
if (run)
{
for (; run > 127; run -= 127)
@ -827,125 +831,34 @@ SINT64 get_gen_id( const TEXT* name, SSHORT name_len)
* Read id for a generator;
*
**************************************/
UCHAR blr_buffer[100]; // enough to fit blr
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
FB_API_HANDLE gen_id_reqh = 0;
UCHAR* blr = blr_buffer;
// If this is ODS 10 (IB version 6.0) or greater, build BLR to retrieve
// the 64-bit value of the generator. If not, build BLR to retrieve the
// 32-bit value, which we will cast to the expected INT64 format.
if (tdgbl->runtimeODS >= DB_VERSION_DDL10)
try
{
// build the blr with the right relation name and 64-bit results.
add_byte(blr, blr_version5);
add_byte(blr, blr_begin);
add_byte(blr, blr_message);
add_byte(blr, 0);
add_word(blr, 1);
add_byte(blr, blr_int64);
add_byte(blr, 0);
add_byte(blr, blr_send);
add_byte(blr, 0);
add_byte(blr, blr_assignment);
add_byte(blr, blr_gen_id);
add_byte(blr, name_len);
while (name_len--)
{
const UCHAR c = *name++;
add_byte(blr, c);
}
add_byte(blr, blr_literal);
add_byte(blr, blr_long);
add_byte(blr, 0);
add_word(blr, 0);
add_word(blr, 0);
add_byte(blr, blr_parameter);
add_byte(blr, 0);
add_word(blr, 0);
add_byte(blr, blr_end);
add_byte(blr, blr_eoc);
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
Firebird::string nm, sql;
nm.assign(name, name_len);
BURP_makeSymbol(tdgbl, nm);
sql = "select first(1) gen_id(" + nm + ", 0) from rdb$database";
BurpSql getGenerator(tdgbl, sql.c_str());
FB_MESSAGE(GetGen, Firebird::ThrowStatusWrapper, (FB_BIGINT, id));
GetGen getGen(&tdgbl->throwStatus, Firebird::MasterInterfacePtr());
getGenerator.singleSelect(tdgbl->tr_handle, &getGen);
return getGen->id;
}
else
catch (const Firebird::FbException& ex)
{
// build the blr with the right relation name and 32-bit results
add_byte(blr, blr_version4);
add_byte(blr, blr_begin);
add_byte(blr, blr_message);
add_byte(blr, 0);
add_word(blr, 1);
add_byte(blr, blr_long);
add_byte(blr, 0);
add_byte(blr, blr_send);
add_byte(blr, 0);
add_byte(blr, blr_assignment);
add_byte(blr, blr_gen_id);
add_byte(blr, name_len);
while (name_len--)
{
const UCHAR c = *name++;
add_byte(blr, c);
}
add_byte(blr, blr_literal);
add_byte(blr, blr_long);
add_byte(blr, 0);
add_word(blr, 0);
add_word(blr, 0);
add_byte(blr, blr_parameter);
add_byte(blr, 0);
add_word(blr, 0);
add_byte(blr, blr_end);
add_byte(blr, blr_eoc);
}
Firebird::IStatus* st = ex.getStatus();
const SSHORT blr_length = blr - blr_buffer;
#ifdef DEBUG
if (debug_on)
fb_print_blr(blr_buffer, blr_length, NULL, NULL, 0);
#endif
ISC_STATUS_ARRAY status_vector;
if (isc_compile_request(status_vector, &DB, &gen_id_reqh, blr_length, (const char*) blr_buffer))
{
// if there's no gen_id, never mind ...
return 0;
}
if (st->getErrors()[1] == isc_dsql_error)
return 0;
// use the same gds_trans generated by gpre
if (isc_start_request(status_vector, &gen_id_reqh, &gds_trans, 0))
{
BURP_error_redirect(status_vector, 25);
BURP_error_redirect(st, 25);
// msg 25 Failed in put_blr_gen_id
}
SINT64 read_msg1;
if (tdgbl->runtimeODS >= DB_VERSION_DDL10)
{
if (isc_receive(status_vector, &gen_id_reqh, 0, sizeof(read_msg1), &read_msg1, 0))
{
BURP_error_redirect(status_vector, 25);
// msg 25 Failed in put_blr_gen_id
}
}
else
{
SLONG read_msg0;
if (isc_receive(status_vector, &gen_id_reqh, 0, sizeof(read_msg0), &read_msg0, 0))
{
BURP_error_redirect(status_vector, 25);
// msg 25 Failed in put_blr_gen_id
}
read_msg1 = (SINT64) read_msg0;
}
isc_release_request(status_vector, &gen_id_reqh);
return read_msg1;
return 0; // warning silencer
}
@ -1107,16 +1020,16 @@ void put_array( burp_fld* field, burp_rel* relation, ISC_QUAD* blob_id)
xdr_buffer.lstr_allocated = xdr_buffer.lstr_length;
}
ISC_STATUS_ARRAY status_vector;
ULONG return_length = 0;
if (isc_get_slice(status_vector, &DB, &gds_trans, blob_id, blr_length, (const char*) blr_buffer,
0, // param length for subset of an array handling
NULL, // param for subset of an array handling
slice_length, slice, (SLONG*) &return_length))
FbLocalStatus status_vector;
unsigned return_length = DB->getSlice(&status_vector, gds_trans, blob_id, blr_length, blr_buffer,
0, nullptr, // parameters for subset of an array handling
slice_length, slice);
if (!status_vector.isSuccess())
{
BURP_print(false, 81, field->fld_name);
// msg 81 error accessing blob field %s -- continuing
BURP_print_status(false, status_vector);
BURP_print_status(false, &status_vector);
#ifdef DEBUG
PRETTY_print_sdl(blr_buffer, NULL, NULL, 0);
#endif
@ -1179,7 +1092,7 @@ void put_array( burp_fld* field, burp_rel* relation, ISC_QUAD* blob_id)
lstring xdr_slice;
xdr_slice.lstr_allocated = xdr_slice.lstr_length = return_length;
xdr_slice.lstr_address = slice;
return_length = CAN_slice(&xdr_buffer, &xdr_slice, TRUE, /*blr_length,*/ blr_buffer);
return_length = CAN_slice(&xdr_buffer, &xdr_slice, true, blr_buffer);
put(tdgbl, att_xdr_array);
put(tdgbl, (UCHAR) (return_length));
put(tdgbl, (UCHAR) (return_length >> 8));
@ -1244,31 +1157,31 @@ void put_blob( burp_fld* field, ISC_QUAD& blob_id)
* This is for user data blobs.
*
**************************************/
ISC_STATUS_ARRAY status_vector;
FbLocalStatus status_vector;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
// If the blob is null, don't store it. It will be restored as null.
if (UserBlob::blobIsNull(blob_id))
if (BlobWrapper::blobIsNull(blob_id))
return;
// Open the blob and get it's vital statistics
UserBlob blob(status_vector);
BlobWrapper blob(&status_vector);
if (!blob.open(DB, gds_trans, blob_id))
{
BURP_print(false, 81, field->fld_name);
// msg 81 error accessing blob field %s -- continuing
BURP_print_status(false, status_vector);
BURP_print_status(false, &status_vector);
return;
}
UCHAR blob_info[32];
if (!blob.getInfo(sizeof(blob_items), blob_items, sizeof(blob_info), blob_info))
{
BURP_error_redirect(status_vector, 20);
BURP_error_redirect(&status_vector, 20);
// msg 20 isc_blob_info failed
}
@ -1342,13 +1255,9 @@ void put_blob( burp_fld* field, ISC_QUAD& blob_id)
while (segments > 0)
{
FB_SIZE_T segment_length;
blob.getSegment(max_segment, buffer, segment_length);
const ISC_STATUS status = blob.getCode();
// Handle the errors. For stream blob isc_segment is not error here.
if (status && (status != isc_segment || blob_type == 0))
if (!blob.getSegment(max_segment, buffer, segment_length))
{
BURP_error_redirect(status_vector, 22);
BURP_error_redirect(&status_vector, 22);
// msg 22 isc_get_segment failed
}
@ -1362,7 +1271,7 @@ void put_blob( burp_fld* field, ISC_QUAD& blob_id)
}
if (!blob.close())
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
if (buffer != static_buffer)
@ -1383,28 +1292,28 @@ bool put_blr_blob( att_type attribute, ISC_QUAD& blob_id)
* Return true if the blob was present, false otherwise.
*
**************************************/
ISC_STATUS_ARRAY status_vector;
FbLocalStatus status_vector;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
// If the blob is null, don't store it. It will be restored as null.
if (UserBlob::blobIsNull(blob_id))
if (BlobWrapper::blobIsNull(blob_id))
return false;
// Open the blob and get it's vital statistics
UserBlob blob(status_vector);
BlobWrapper blob(&status_vector);
if (!blob.open(DB, gds_trans, blob_id))
{
BURP_error_redirect(status_vector, 24);
BURP_error_redirect(&status_vector, 24);
// msg 24 isc_open_blob failed
}
UCHAR blob_info[32];
if (!blob.getInfo(sizeof(blr_items), blr_items, sizeof(blob_info), blob_info))
{
BURP_error_redirect(status_vector, 20);
BURP_error_redirect(&status_vector, 20);
// msg 20 isc_blob_info failed
}
@ -1433,7 +1342,7 @@ bool put_blr_blob( att_type attribute, ISC_QUAD& blob_id)
BURP_print(true, 79, SafeArg() << int(item));
// msg 79 don't understand blob info item %ld
if (!blob.close())
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
return false;
}
@ -1442,7 +1351,7 @@ bool put_blr_blob( att_type attribute, ISC_QUAD& blob_id)
if (!length)
{
if (!blob.close())
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
return false;
}
@ -1475,7 +1384,7 @@ bool put_blr_blob( att_type attribute, ISC_QUAD& blob_id)
if (!blob.close())
{
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
}
@ -1498,17 +1407,9 @@ void put_data(burp_rel* relation)
* Write relation meta-data and data.
*
**************************************/
burp_fld* field;
ISC_STATUS_ARRAY status_vector;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
// CVC: A signed short isn't enough if the engine allows near 32K fields,
// each being char(1) ASCII in the worst case. Looking at BLR generation
// below, it's clear an extreme case won't compile => blr_length >= 32K.
// However, SSHORT is the limit for request_length in isc_compile_request.
SSHORT field_count = 1;
USHORT field_count = 1; // eof field
burp_fld* field;
for (field = relation->rel_fields; field; field = field->fld_next)
{
if (!(field->fld_flags & FLD_computed))
@ -1529,7 +1430,7 @@ void put_data(burp_rel* relation)
add_word(blr, field_count); // Number of fields, counting eof
RCRD_OFFSET offset = 0;
SSHORT count = 0; // This is param count.
USHORT count = 0; // This is param count.
for (field = relation->rel_fields; field; field = field->fld_next)
{
@ -1665,7 +1566,7 @@ void put_data(burp_rel* relation)
RCRD_OFFSET record_length = offset;
RCRD_OFFSET eof_offset = FB_ALIGN(offset, sizeof(SSHORT));
// To be used later for the buffer size to receive data
const FLD_LENGTH length = (USHORT) (eof_offset + sizeof(SSHORT));
const RCRD_LENGTH length = (RCRD_LENGTH) (eof_offset + sizeof(SSHORT));
// Build FOR loop, body, and eof handler
@ -1719,7 +1620,7 @@ void put_data(burp_rel* relation)
add_byte(blr, blr_end);
add_byte(blr, blr_eoc);
SSHORT blr_length = blr - blr_buffer;
unsigned blr_length = blr - blr_buffer;
#ifdef DEBUG
if (debug_on)
@ -1728,10 +1629,11 @@ void put_data(burp_rel* relation)
// Compile request
FB_API_HANDLE request = 0;
if (isc_compile_request(status_vector, &DB, &request, blr_length, (const SCHAR*) blr_buffer))
FbLocalStatus status_vector;
Firebird::IRequest* request = DB->compileRequest(&status_vector, blr_length, blr_buffer);
if (!status_vector.isSuccess())
{
BURP_error_redirect(status_vector, 27);
BURP_error_redirect(&status_vector, 27);
// msg 27 isc_compile_request failed
fb_print_blr(blr_buffer, blr_length, NULL, NULL, 0);
}
@ -1741,9 +1643,10 @@ void put_data(burp_rel* relation)
BURP_verbose(142, relation->rel_name);
// msg 142 writing data for relation %s
if (isc_start_request(status_vector, &request, &gds_trans, 0))
request->start(&status_vector, gds_trans, 0);
if (!status_vector.isSuccess())
{
BURP_error_redirect(status_vector, 28);
BURP_error_redirect(&status_vector, 28);
// msg 28 isc_start_request failed
}
@ -1766,9 +1669,10 @@ void put_data(burp_rel* relation)
ULONG records = 0;
while (true)
{
if (isc_receive(status_vector, &request, 0, length, buffer, 0))
request->receive(&status_vector, 0, 0, length, buffer);
if (!status_vector.isSuccess())
{
BURP_error_redirect(status_vector, 29);
BURP_error_redirect(&status_vector, 29);
// msg 29 isc_receive failed
}
if (!*eof)
@ -1783,7 +1687,7 @@ void put_data(burp_rel* relation)
const UCHAR* p;
if (tdgbl->gbl_sw_transportable)
{
record_length = CAN_encode_decode(relation, &xdr_buffer, buffer, TRUE);
record_length = CAN_encode_decode(relation, &xdr_buffer, buffer, true);
put_int32(att_xdr_length, record_length);
p = xdr_buffer.lstr_address;
}
@ -1825,8 +1729,9 @@ void put_data(burp_rel* relation)
BURP_verbose(108, SafeArg() << records);
// msg 108 %ld records written
if (isc_release_request(status_vector, &request))
BURP_error_redirect(status_vector, 30);
request->free(&status_vector);
if (!status_vector.isSuccess())
BURP_error_redirect(&status_vector, 30);
// msg 30 isc_release_request failed
}
@ -2255,12 +2160,12 @@ bool put_source_blob(att_type attribute, att_type old_attribute, ISC_QUAD& blob_
* Include the NULL character to separate each segment.
*
**************************************/
ISC_STATUS_ARRAY status_vector;
FbLocalStatus status_vector;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
// If the blob is null, don't store it. It will be restored as null.
if (UserBlob::blobIsNull(blob_id))
if (BlobWrapper::blobIsNull(blob_id))
return false;
if (tdgbl->gbl_sw_old_descriptions && attribute != att_field_query_header)
@ -2268,18 +2173,18 @@ bool put_source_blob(att_type attribute, att_type old_attribute, ISC_QUAD& blob_
// Open the blob and get it's vital statistics
UserBlob blob(status_vector);
BlobWrapper blob(&status_vector);
if (!blob.open(DB, gds_trans, blob_id))
{
BURP_error_redirect(status_vector, 24);
BURP_error_redirect(&status_vector, 24);
// msg 24 isc_open_blob failed
}
UCHAR blob_info[48];
if (!blob.getInfo(sizeof(source_items), source_items, sizeof(blob_info), blob_info))
{
BURP_error_redirect(status_vector, 20);
BURP_error_redirect(&status_vector, 20);
// msg 20 isc_blob_info failed
}
@ -2314,7 +2219,7 @@ bool put_source_blob(att_type attribute, att_type old_attribute, ISC_QUAD& blob_
// msg 79 don't understand blob info item %ld
if (!blob.close())
{
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
}
return false;
@ -2325,7 +2230,7 @@ bool put_source_blob(att_type attribute, att_type old_attribute, ISC_QUAD& blob_
{
if (!blob.close())
{
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
}
return false;
@ -2360,7 +2265,7 @@ bool put_source_blob(att_type attribute, att_type old_attribute, ISC_QUAD& blob_
}
if (!blob.close())
BURP_error_redirect(status_vector, 23);
BURP_error_redirect(&status_vector, 23);
// msg 23 isc_close_blob failed
if (buffer != static_buffer)
@ -2420,7 +2325,7 @@ void write_character_sets()
* each user defined character set.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2518,7 +2423,7 @@ void write_check_constraints()
* each check constraint.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2552,7 +2457,7 @@ void write_collations()
* each user defined collation
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2652,28 +2557,29 @@ void write_database( const TEXT* dbb_file)
* the database itself.
*
**************************************/
ISC_STATUS_ARRAY status_vector;
SCHAR buffer[256];
isc_req_handle req_handle1 = 0;
FbLocalStatus status_vector;
UCHAR buffer[256];
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
put(tdgbl, (UCHAR) rec_physical_db);
if (isc_database_info(status_vector, &DB, sizeof(db_info_items), db_info_items,
sizeof(buffer), buffer))
DB->getInfo(&status_vector, sizeof(db_info_items), db_info_items,
sizeof(buffer), buffer);
if (!status_vector.isSuccess())
{
BURP_error_redirect(status_vector, 31);
BURP_error_redirect(&status_vector, 31);
// msg 31 isc_database_info failed
}
USHORT page_size = 0, forced_writes, no_reserve, SQL_dialect, db_read_only;
ULONG sweep_interval, page_buffers;
USHORT length = 0;
for (const SCHAR* d = buffer; *d != isc_info_end; d += length)
for (const UCHAR* d = buffer; *d != isc_info_end; d += length)
{
const UCHAR item = *d++;
length = (USHORT) isc_vax_integer(d, 2);
length = (USHORT) gds__vax_integer(d, 2);
d += 2;
switch (item)
{
@ -2681,27 +2587,27 @@ void write_database( const TEXT* dbb_file)
break;
case isc_info_page_size:
page_size = (USHORT) isc_vax_integer(d, length);
page_size = (USHORT) gds__vax_integer(d, length);
put_int32(att_page_size, page_size);
break;
case isc_info_sweep_interval:
sweep_interval = isc_vax_integer(d, length);
sweep_interval = gds__vax_integer(d, length);
put_int32(att_sweep_interval, sweep_interval);
break;
case isc_info_forced_writes:
forced_writes = (USHORT) isc_vax_integer(d, length);
forced_writes = (USHORT) gds__vax_integer(d, length);
put_int32(att_forced_writes, forced_writes);
break;
case isc_info_no_reserve:
if (no_reserve = (USHORT) isc_vax_integer(d, length))
if (no_reserve = (USHORT) gds__vax_integer(d, length))
put_int32(att_no_reserve, no_reserve);
break;
case isc_info_set_page_buffers:
if (page_buffers = isc_vax_integer(d, length))
if (page_buffers = gds__vax_integer(d, length))
put_int32(att_page_buffers, page_buffers);
break;
@ -2709,17 +2615,17 @@ void write_database( const TEXT* dbb_file)
break; // parameter and returns isc_info_error. skip it
case isc_info_db_sql_dialect:
SQL_dialect = (USHORT) isc_vax_integer(d, length);
SQL_dialect = (USHORT) gds__vax_integer(d, length);
put_int32(att_SQL_dialect, SQL_dialect);
break;
case isc_info_db_read_only:
if (db_read_only = (USHORT) isc_vax_integer(d, length))
if (db_read_only = (USHORT) gds__vax_integer(d, length))
put_int32(att_db_read_only, db_read_only);
break;
default:
BURP_error_redirect(status_vector, 31);
BURP_error_redirect(&status_vector, 31);
// msg 31 isc_database_info failed
break;
}
@ -2787,7 +2693,7 @@ void write_exceptions()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2851,7 +2757,7 @@ void write_field_dimensions()
* each array field dimension.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2886,7 +2792,7 @@ void write_filters()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -2928,7 +2834,7 @@ void write_functions()
**************************************/
GDS_NAME func;
TEXT temp[GDS_NAME_LEN * 2];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3182,7 +3088,7 @@ void write_generators()
* Write any defined generators.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
TEXT temp[GDS_NAME_LEN];
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3291,7 +3197,7 @@ void write_global_fields()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3522,7 +3428,7 @@ void write_packages()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3589,7 +3495,7 @@ void write_procedures()
**************************************/
GDS_NAME proc;
TEXT temp[GDS_NAME_LEN * 2];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3779,7 +3685,7 @@ void write_ref_constraints()
* each referential constraint.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3815,7 +3721,7 @@ void write_rel_constraints()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3859,7 +3765,7 @@ void write_relations()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3989,7 +3895,7 @@ void write_relations()
void write_secclasses()
{
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4025,7 +3931,7 @@ void write_shadow_files()
*
**************************************/
BASED ON RDB$FILES.RDB$FILE_NAME temp;
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4066,7 +3972,7 @@ void write_sql_roles()
* each SQL roles.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
TEXT temp[GDS_NAME_LEN];
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4135,7 +4041,7 @@ void write_mapping()
* each names mapping.
*
**************************************/
isc_req_handle req_handle = 0;
Firebird::IRequest* req_handle = nullptr;
TEXT temp[GDS_NAME_LEN];
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4218,7 +4124,7 @@ void write_triggers()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4335,7 +4241,7 @@ void write_trigger_messages()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4374,7 +4280,7 @@ void write_types()
* each type.
*
**************************************/
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -4414,7 +4320,7 @@ void write_user_privileges()
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
Firebird::IRequest* req_handle1 = nullptr;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();

View File

@ -65,6 +65,7 @@
#include <ctype.h>
#endif
#include "../common/utils_proto.h"
#include "../common/status.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -82,6 +83,7 @@
#endif
using MsgFormat::SafeArg;
using Firebird::FbLocalStatus;
const char* fopen_write_type = "w";
const char* fopen_read_type = "r";
@ -102,7 +104,7 @@ enum gbak_action
//FDESC = 3 // CVC: Unused
};
static void close_out_transaction(gbak_action, isc_tr_handle*);
static void close_out_transaction(gbak_action, Firebird::ITransaction**);
//static void enable_signals();
//static void excp_handler();
static SLONG get_number(const SCHAR*);
@ -272,8 +274,8 @@ static int svc_api_gbak(Firebird::UtilSvc* uSvc, const Switches& switches)
const Firebird::string* dbName = flag_restore ? &files[1] : &files[0];
ISC_STATUS_ARRAY status;
FB_API_HANDLE svc_handle = 0;
FbLocalStatus status;
Firebird::IService* svc_handle = nullptr;
try
{
@ -317,21 +319,22 @@ static int svc_api_gbak(Firebird::UtilSvc* uSvc, const Switches& switches)
spb.insertString(isc_spb_command_line, options);
if (isc_service_attach(status, 0, service.c_str(), &svc_handle,
spb.getBufferLength(), reinterpret_cast<const char*>(spb.getBuffer())))
svc_handle = Firebird::DispatcherPtr()->attachServiceManager(&status, service.c_str(),
spb.getBufferLength(), spb.getBuffer());
if (!status.isSuccess())
{
BURP_print_status(true, status);
BURP_print_status(true, &status);
BURP_print(true, 83);
// msg 83 Exiting before completion due to errors
return FINI_ERROR;
}
char thd[10];
UCHAR thd[10];
// 'isc_action_svc_restore/isc_action_svc_backup'
// 'isc_spb_verbose'
// 'isc_spb_verbint'
char* thd_ptr = thd;
UCHAR* thd_ptr = thd;
if (flag_restore)
*thd_ptr++ = isc_action_svc_restore;
else
@ -344,41 +347,43 @@ static int svc_api_gbak(Firebird::UtilSvc* uSvc, const Switches& switches)
{
*thd_ptr++ = isc_spb_verbint;
//stream verbint_val into a SPB
put_vax_long(reinterpret_cast<UCHAR*>(thd_ptr), verbint_val);
put_vax_long(thd_ptr, verbint_val);
thd_ptr += sizeof(SLONG);
}
const USHORT thdlen = thd_ptr - thd;
fb_assert(thdlen <= sizeof(thd));
if (isc_service_start(status, &svc_handle, NULL, thdlen, thd))
svc_handle->start(&status, thdlen, thd);
if (!status.isSuccess())
{
BURP_print_status(true, status);
isc_service_detach(status, &svc_handle);
BURP_print_status(true, &status);
svc_handle->release();
BURP_print(true, 83); // msg 83 Exiting before completion due to errors
return FINI_ERROR;
}
const char sendbuf[] = { isc_info_svc_line };
char respbuf[1024];
const char* sl;
const UCHAR sendbuf[] = { isc_info_svc_line };
UCHAR respbuf[1024];
const UCHAR* sl;
do {
if (isc_service_query(status, &svc_handle, NULL, 0, NULL,
sizeof(sendbuf), sendbuf,
sizeof(respbuf), respbuf))
svc_handle->query(&status, 0, NULL,
sizeof(sendbuf), sendbuf,
sizeof(respbuf), respbuf);
if (!status.isSuccess())
{
BURP_print_status(true, status);
isc_service_detach(status, &svc_handle);
BURP_print_status(true, &status);
svc_handle->release();
BURP_print(true, 83); // msg 83 Exiting before completion due to errors
return FINI_ERROR;
}
char* p = respbuf;
UCHAR* p = respbuf;
sl = p;
if (*p++ == isc_info_svc_line)
{
const ISC_USHORT len = (ISC_USHORT) isc_vax_integer(p, sizeof(ISC_USHORT));
const ISC_USHORT len = (ISC_USHORT) gds__vax_integer(p, sizeof(ISC_USHORT));
p += sizeof(ISC_USHORT);
if (!len)
{
@ -395,18 +400,16 @@ static int svc_api_gbak(Firebird::UtilSvc* uSvc, const Switches& switches)
}
} while (*sl == isc_info_svc_line);
isc_service_detach(status, &svc_handle);
svc_handle->release();
return FINI_OK;
}
catch (const Firebird::Exception& e)
{
Firebird::StaticStatusVector s;
e.stuffException(s);
BURP_print_status(true, s.begin());
FbLocalStatus s;
e.stuffException(&s);
BURP_print_status(true, &s);
if (svc_handle)
{
isc_service_detach(status, &svc_handle);
}
svc_handle->release();
BURP_print(true, 83); // msg 83 Exiting before completion due to errors
return FINI_ERROR;
}
@ -1285,10 +1288,8 @@ int gbak(Firebird::UtilSvc* uSvc)
{
// Non-burp exception was caught
tdgbl->burp_throw = false;
Firebird::StaticStatusVector s;
e.stuffException(s);
fb_utils::copyStatus(tdgbl->status_vector, ISC_STATUS_LENGTH, s.begin(), s.getCount());
BURP_print_status(true, tdgbl->status_vector);
e.stuffException(&tdgbl->status_vector);
BURP_print_status(true, &tdgbl->status_vector);
if (! tdgbl->uSvc->isService())
{
BURP_print(true, 83); // msg 83 Exiting before completion due to errors
@ -1319,9 +1320,10 @@ int gbak(Firebird::UtilSvc* uSvc)
{
close_out_transaction(action, &tdgbl->tr_handle);
close_out_transaction(action, &tdgbl->global_trans);
if (isc_detach_database(tdgbl->status_vector, &tdgbl->db_handle))
tdgbl->db_handle->detach(&tdgbl->status_vector);
if (tdgbl->status_vector->getState() & Firebird::IStatus::STATE_ERRORS)
{
BURP_print_status(true, tdgbl->status_vector);
BURP_print_status(true, &tdgbl->status_vector);
}
}
@ -1428,7 +1430,7 @@ void BURP_error(USHORT errcode, bool abort, const char* str)
}
void BURP_error_redirect(const ISC_STATUS* status_vector, USHORT errcode, const SafeArg& arg)
void BURP_error_redirect(Firebird::IStatus* status_vector, USHORT errcode, const SafeArg& arg)
{
/**************************************
*
@ -1516,26 +1518,24 @@ void BURP_msg_get(USHORT number, TEXT* output_msg, const SafeArg& arg)
strcpy(output_msg, buffer);
}
void BURP_output_version(void* arg1, const TEXT* arg2)
void OutputVersion::callback(Firebird::CheckStatusWrapper* status, const char* text)
{
/**************************************
*
* B U R P _ o u t p u t _ v e r s i o n
* O u t p u t V e r s i o n :: c a l l b a c k
*
**************************************
*
* Functional description
* Callback routine for access method
* printing (specifically show version);
* printing (specifically show version)
* will accept.
*
**************************************/
burp_output(false, static_cast<const char*>(arg1), arg2);
burp_output(false, format, text);
}
void BURP_print(bool err, USHORT number, const SafeArg& arg)
{
/**************************************
@ -1577,7 +1577,7 @@ void BURP_print(bool err, USHORT number, const char* str)
}
void BURP_print_status(bool err, const ISC_STATUS* status_vector)
void BURP_print_status(bool err, Firebird::IStatus* status_vector)
{
/**************************************
*
@ -1592,7 +1592,7 @@ void BURP_print_status(bool err, const ISC_STATUS* status_vector)
**************************************/
if (status_vector)
{
const ISC_STATUS* vector = status_vector;
const ISC_STATUS* vector = status_vector->getErrors();
if (err)
{
@ -1622,7 +1622,7 @@ void BURP_print_status(bool err, const ISC_STATUS* status_vector)
}
void BURP_print_warning(const ISC_STATUS* status_vector)
void BURP_print_warning(Firebird::IStatus* status)
{
/**************************************
*
@ -1635,14 +1635,10 @@ void BURP_print_warning(const ISC_STATUS* status_vector)
* to allow redirecting output.
*
**************************************/
if (status_vector)
if (status && (status->getState() & Firebird::IStatus::STATE_WARNINGS))
{
// skip the error, assert that one does not exist
fb_assert(status_vector[0] == isc_arg_gds);
fb_assert(status_vector[1] == 0);
// print the warning message
const ISC_STATUS* vector = &status_vector[2];
const ISC_STATUS* vector = status->getWarnings();
SCHAR s[1024];
if (fb_interpret(s, sizeof(s), &vector))
@ -1716,7 +1712,7 @@ void BURP_verbose(USHORT number, const char* str)
}
static void close_out_transaction(gbak_action action, isc_tr_handle* handle)
static void close_out_transaction(gbak_action action, Firebird::ITransaction** tPtr)
{
/**************************************
*
@ -1731,31 +1727,38 @@ static void close_out_transaction(gbak_action action, isc_tr_handle* handle)
* returned to the system.
*
**************************************/
if (*handle != 0)
if (*tPtr)
{
ISC_STATUS_ARRAY status_vector;
FbLocalStatus status_vector;
if (action == RESTORE)
{
// Even if the restore failed, commit the transaction so that
// a partial database is at least recovered.
isc_commit_transaction(status_vector, handle);
if (status_vector[1])
(*tPtr)->commit(&status_vector);
if (!status_vector.isSuccess())
{
// If we can't commit - have to roll it back, as
// we need to close all outstanding transactions before
// we can detach from the database.
isc_rollback_transaction(status_vector, handle);
if (status_vector[1])
BURP_print_status(false, status_vector);
(*tPtr)->rollback(&status_vector);
if (!status_vector.isSuccess())
BURP_print_status(false, &status_vector);
else
*tPtr = nullptr;
}
else
*tPtr = nullptr;
}
else
{
// A backup shouldn't touch any data - we ensure that
// by never writing data during a backup, but let's double
// ensure it by doing a rollback
if (isc_rollback_transaction(status_vector, handle))
BURP_print_status(false, status_vector);
(*tPtr)->rollback(&status_vector);
if (!status_vector.isSuccess())
BURP_print_status(false, &status_vector);
else
*tPtr = nullptr;
}
}
}
@ -1810,38 +1813,37 @@ static gbak_action open_files(const TEXT* file1,
*
**************************************/
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
ISC_STATUS_ARRAY temp_status;
ISC_STATUS* status_vector = temp_status;
FbLocalStatus temp_status;
Firebird::CheckStatusWrapper* status_vector = &temp_status;
// try to attach the database using the first file_name
if (sw_replace != IN_SW_BURP_C && sw_replace != IN_SW_BURP_R)
{
if (!isc_attach_database(status_vector,
(SSHORT) 0, file1,
&tdgbl->db_handle,
dpb.getBufferLength(),
reinterpret_cast<const char*>(dpb.getBuffer())))
tdgbl->db_handle = Firebird::DispatcherPtr()->attachDatabase(status_vector, file1,
dpb.getBufferLength(), dpb.getBuffer());
if (!status_vector->hasData())
{
if (sw_replace != IN_SW_BURP_B)
{
// msg 13 REPLACE specified, but the first file %s is a database
BURP_error(13, true, file1);
if (isc_detach_database(status_vector, &tdgbl->db_handle)) {
tdgbl->db_handle->detach(status_vector);
if (status_vector->hasData())
BURP_print_status(true, status_vector);
}
return QUIT;
}
if (tdgbl->gbl_sw_version)
{
// msg 139 Version(s) for database "%s"
BURP_print(false, 139, file1);
isc_version(&tdgbl->db_handle, BURP_output_version, (void*) "\t%s\n");
OutputVersion outputVersion("\t%s\n");
Firebird::UtilInterfacePtr()->getFbVersion(status_vector, tdgbl->db_handle, &outputVersion);
}
BURP_verbose(166, file1); // msg 166: readied database %s for backup
}
else if (sw_replace == IN_SW_BURP_B ||
(status_vector[1] != isc_io_error && status_vector[1] != isc_bad_db_format))
(status_vector->getErrors()[1] != isc_io_error && status_vector->getErrors()[1] != isc_bad_db_format))
{
BURP_print_status(true, status_vector);
return QUIT;
@ -1965,10 +1967,9 @@ static gbak_action open_files(const TEXT* file1,
}
else
{
if (isc_detach_database(status_vector, &tdgbl->db_handle))
{
BURP_print_status(false, status_vector);
}
tdgbl->db_handle->detach(status_vector);
if (status_vector->hasData())
BURP_print_status(true, status_vector);
}
return flag;
@ -2139,49 +2140,45 @@ static gbak_action open_files(const TEXT* file1,
BURP_error(262, true, *file2);
// msg 262 size specification either missing or incorrect for file %s
if ((sw_replace == IN_SW_BURP_C || sw_replace == IN_SW_BURP_R) &&
!isc_attach_database(status_vector,
(SSHORT) 0, *file2,
&tdgbl->db_handle,
dpb.getBufferLength(),
reinterpret_cast<const char*>(dpb.getBuffer())))
if (sw_replace == IN_SW_BURP_C || sw_replace == IN_SW_BURP_R)
{
if (sw_replace == IN_SW_BURP_C)
tdgbl->db_handle = Firebird::DispatcherPtr()->attachDatabase(status_vector, *file2,
dpb.getBufferLength(), dpb.getBuffer());
if (status_vector->isEmpty())
{
if (isc_detach_database(status_vector, &tdgbl->db_handle)) {
BURP_print_status(true, status_vector);
}
BURP_error(14, true, *file2);
// msg 14 database %s already exists. To replace it, use the -R switch
}
else
{
isc_drop_database(status_vector, &tdgbl->db_handle);
if (tdgbl->db_handle)
if (sw_replace == IN_SW_BURP_C)
{
ISC_STATUS_ARRAY status_vector2;
if (isc_detach_database(status_vector2, &tdgbl->db_handle)) {
BURP_print_status(false, status_vector2);
}
tdgbl->db_handle->detach(status_vector);
if (status_vector->hasData())
BURP_print_status(true, status_vector);
BURP_error(14, true, *file2);
// msg 14 database %s already exists. To replace it, use the -R switch
}
else
{
tdgbl->db_handle->dropDatabase(status_vector);
if (status_vector->hasData())
{
Firebird::FbLocalStatus status2;
tdgbl->db_handle->detach(&status2);
if (!status2.isSuccess())
BURP_print_status(true, &status2);
// Complain only if the drop database entrypoint is available.
// If it isn't, the database will simply be overwritten.
if (status_vector[1] != isc_unavailable)
BURP_error(233, true, *file2);
// msg 233 Cannot drop database %s, might be in use
// msg 233 Cannot drop database %s, might be in use
}
}
}
}
if (sw_replace == IN_SW_BURP_R && status_vector[1] == isc_adm_task_denied)
{
// if we got an error from attach database and we have replace switch set
// then look for error from attach returned due to not owner, if we are
// not owner then return the error status back up
else if (sw_replace == IN_SW_BURP_R && status_vector->getErrors()[1] == isc_adm_task_denied)
{
// if we got an error from attach database and we have replace switch set
// then look for error from attach returned due to not owner, if we are
// not owner then return the error status back up
BURP_error(274, true);
// msg # 274 : Cannot restore over current database, must be sysdba
// or owner of the existing database.
BURP_error(274, true);
// msg # 274 : Cannot restore over current database, must be sysdba
// or owner of the existing database.
}
}
// check the file size specification
@ -2458,18 +2455,18 @@ void BurpGlobals::read_stats(SINT64* stats)
if (!db_handle)
return;
const char info[] =
const UCHAR info[] =
{
isc_info_reads,
isc_info_writes
};
ISC_STATUS_ARRAY status = {0};
char buffer[sizeof(info) * (1 + 2 + 8) + 2];
FbLocalStatus status;
UCHAR buffer[sizeof(info) * (1 + 2 + 8) + 2];
isc_database_info(status, &db_handle, sizeof(info), info, sizeof(buffer), buffer);
db_handle->getInfo(&status, sizeof(info), info, sizeof(buffer), buffer);
char* p = buffer, *const e = buffer + sizeof(buffer);
UCHAR* p = buffer, *const e = buffer + sizeof(buffer);
while (p < e)
{
int flag = -1;
@ -2490,7 +2487,7 @@ void BurpGlobals::read_stats(SINT64* stats)
if (flag != -1)
{
const int len = isc_vax_integer(p + 1, 2);
const int len = gds__vax_integer(p + 1, 2);
stats[flag] = isc_portable_integer((ISC_UCHAR*) p + 1 + 2, len);
p += len + 3;
}
@ -2603,3 +2600,21 @@ UnicodeCollationHolder::~UnicodeCollationHolder()
// cs should be deleted by texttype_fn_destroy call above
delete tt;
}
void BURP_makeSymbol(BurpGlobals* tdgbl, Firebird::string& name) // add double quotes to string
{
if (tdgbl->gbl_dialect < SQL_DIALECT_V6)
return;
const char dq = '"';
for (unsigned p = 0; p < name.length(); ++p)
{
if (name[p] == dq)
{
name.insert(p, 1, dq);
++p;
}
}
name.insert(0u, 1, dq);
name += dq;
}

View File

@ -31,6 +31,8 @@
#include <stdio.h>
#include "../jrd/ibase.h"
#include "firebird/Interface.h"
#include "firebird/Message.h"
#include "../common/dsc.h"
#include "../burp/misc_proto.h"
#include "../yvalve/gds_proto.h"
@ -40,6 +42,8 @@
#include "../common/classes/fb_pair.h"
#include "../common/classes/MetaName.h"
#include "../../jrd/SimilarToMatcher.h"
#include "../common/status.h"
#include "../common/classes/ImplementHelper.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -660,12 +664,14 @@ struct burp_fld
SSHORT fld_type;
SSHORT fld_sub_type;
FLD_LENGTH fld_length;
FLD_LENGTH fld_total_len; // including additional 2 bytes for VARYING CHAR
SSHORT fld_scale;
SSHORT fld_position;
SSHORT fld_parameter;
SSHORT fld_missing_parameter;
SSHORT fld_id;
RCRD_OFFSET fld_offset;
RCRD_OFFSET fld_missing_offset;
RCRD_OFFSET fld_old_offset;
SSHORT fld_number;
SSHORT fld_system_flag;
@ -694,6 +700,8 @@ struct burp_fld
ISC_QUAD fld_default_source;
SSHORT fld_character_set_id;
SSHORT fld_collation_id;
RCRD_OFFSET fld_sql;
RCRD_OFFSET fld_null;
};
enum fld_flags_vals {
@ -928,7 +936,6 @@ public:
// this is VERY dirty hack to keep current behaviour
memset (&gbl_database_file_name, 0,
&veryEnd - reinterpret_cast<char*>(&gbl_database_file_name));
memset(status_vector, 0, sizeof(status_vector));
gbl_stat_flags = 0;
gbl_stat_header = false;
@ -955,6 +962,7 @@ public:
bool gbl_sw_deactivate_indexes;
bool gbl_sw_kill;
USHORT gbl_sw_blk_factor;
USHORT gbl_dialect;
const SCHAR* gbl_sw_fix_fss_data;
USHORT gbl_sw_fix_fss_data_id;
const SCHAR* gbl_sw_fix_fss_metadata;
@ -973,6 +981,7 @@ public:
burp_fil* gbl_sw_files;
burp_fil* gbl_sw_backup_files;
gfld* gbl_global_fields;
unsigned gbl_network_protocol;
burp_act* action;
ULONG io_buffer_size;
redirect_vals sw_redirect;
@ -1001,11 +1010,10 @@ public:
SCHAR mvol_old_file [MAX_FILE_NAME_SIZE];
int mvol_volume_count;
bool mvol_empty_file;
isc_db_handle db_handle;
isc_tr_handle tr_handle;
isc_tr_handle global_trans;
Firebird::IAttachment* db_handle;
Firebird::ITransaction* tr_handle;
Firebird::ITransaction* global_trans;
DESC file_desc;
ISC_STATUS_ARRAY status_vector;
int exit_code;
UCHAR* head_of_mem_list;
FILE* output_file;
@ -1015,59 +1023,61 @@ public:
// burp_fld* v3_cvt_fld_list;
// The handles_get... are for restore.
isc_req_handle handles_get_character_sets_req_handle1;
isc_req_handle handles_get_chk_constraint_req_handle1;
isc_req_handle handles_get_collation_req_handle1;
isc_req_handle handles_get_exception_req_handle1;
isc_req_handle handles_get_field_dimensions_req_handle1;
isc_req_handle handles_get_field_req_handle1;
isc_req_handle handles_get_fields_req_handle1;
isc_req_handle handles_get_fields_req_handle2;
isc_req_handle handles_get_fields_req_handle3;
isc_req_handle handles_get_fields_req_handle4;
isc_req_handle handles_get_fields_req_handle5;
isc_req_handle handles_get_fields_req_handle6;
isc_req_handle handles_get_files_req_handle1;
isc_req_handle handles_get_filter_req_handle1;
isc_req_handle handles_get_function_arg_req_handle1;
isc_req_handle handles_get_function_req_handle1;
isc_req_handle handles_get_global_field_req_handle1;
isc_req_handle handles_get_index_req_handle1;
isc_req_handle handles_get_index_req_handle2;
isc_req_handle handles_get_index_req_handle3;
isc_req_handle handles_get_index_req_handle4;
isc_req_handle handles_get_package_req_handle1;
isc_req_handle handles_get_procedure_prm_req_handle1;
isc_req_handle handles_get_procedure_req_handle1;
isc_req_handle handles_get_ranges_req_handle1;
isc_req_handle handles_get_ref_constraint_req_handle1;
isc_req_handle handles_get_rel_constraint_req_handle1;
isc_req_handle handles_get_relation_req_handle1;
isc_req_handle handles_get_security_class_req_handle1;
isc_req_handle handles_get_sql_roles_req_handle1;
isc_req_handle handles_get_mapping_req_handle1;
isc_req_handle handles_get_trigger_message_req_handle1;
isc_req_handle handles_get_trigger_message_req_handle2;
isc_req_handle handles_get_trigger_old_req_handle1;
isc_req_handle handles_get_trigger_req_handle1;
isc_req_handle handles_get_type_req_handle1;
isc_req_handle handles_get_user_privilege_req_handle1;
isc_req_handle handles_get_view_req_handle1;
Firebird::IRequest* handles_get_character_sets_req_handle1;
Firebird::IRequest* handles_get_chk_constraint_req_handle1;
Firebird::IRequest* handles_get_collation_req_handle1;
Firebird::IRequest* handles_get_exception_req_handle1;
Firebird::IRequest* handles_get_field_dimensions_req_handle1;
Firebird::IRequest* handles_get_field_req_handle1;
Firebird::IRequest* handles_get_fields_req_handle1;
Firebird::IRequest* handles_get_fields_req_handle2;
Firebird::IRequest* handles_get_fields_req_handle3;
Firebird::IRequest* handles_get_fields_req_handle4;
Firebird::IRequest* handles_get_fields_req_handle5;
Firebird::IRequest* handles_get_fields_req_handle6;
Firebird::IRequest* handles_get_files_req_handle1;
Firebird::IRequest* handles_get_filter_req_handle1;
Firebird::IRequest* handles_get_function_arg_req_handle1;
Firebird::IRequest* handles_get_function_req_handle1;
Firebird::IRequest* handles_get_global_field_req_handle1;
Firebird::IRequest* handles_get_index_req_handle1;
Firebird::IRequest* handles_get_index_req_handle2;
Firebird::IRequest* handles_get_index_req_handle3;
Firebird::IRequest* handles_get_index_req_handle4;
Firebird::IRequest* handles_get_package_req_handle1;
Firebird::IRequest* handles_get_procedure_prm_req_handle1;
Firebird::IRequest* handles_get_procedure_req_handle1;
Firebird::IRequest* handles_get_ranges_req_handle1;
Firebird::IRequest* handles_get_ref_constraint_req_handle1;
Firebird::IRequest* handles_get_rel_constraint_req_handle1;
Firebird::IRequest* handles_get_relation_req_handle1;
Firebird::IRequest* handles_get_security_class_req_handle1;
Firebird::IRequest* handles_get_sql_roles_req_handle1;
Firebird::IRequest* handles_get_mapping_req_handle1;
Firebird::IRequest* handles_get_trigger_message_req_handle1;
Firebird::IRequest* handles_get_trigger_message_req_handle2;
Firebird::IRequest* handles_get_trigger_old_req_handle1;
Firebird::IRequest* handles_get_trigger_req_handle1;
Firebird::IRequest* handles_get_type_req_handle1;
Firebird::IRequest* handles_get_user_privilege_req_handle1;
Firebird::IRequest* handles_get_view_req_handle1;
// The handles_put.. are for backup.
isc_req_handle handles_put_index_req_handle1;
isc_req_handle handles_put_index_req_handle2;
isc_req_handle handles_put_index_req_handle3;
isc_req_handle handles_put_index_req_handle4;
isc_req_handle handles_put_index_req_handle5;
isc_req_handle handles_put_index_req_handle6;
isc_req_handle handles_put_index_req_handle7;
isc_req_handle handles_put_relation_req_handle1;
isc_req_handle handles_put_relation_req_handle2;
isc_req_handle handles_store_blr_gen_id_req_handle1;
isc_req_handle handles_write_function_args_req_handle1;
isc_req_handle handles_write_function_args_req_handle2;
isc_req_handle handles_write_procedure_prms_req_handle1;
isc_req_handle handles_fix_security_class_name_req_handle1;
Firebird::IRequest* handles_put_index_req_handle1;
Firebird::IRequest* handles_put_index_req_handle2;
Firebird::IRequest* handles_put_index_req_handle3;
Firebird::IRequest* handles_put_index_req_handle4;
Firebird::IRequest* handles_put_index_req_handle5;
Firebird::IRequest* handles_put_index_req_handle6;
Firebird::IRequest* handles_put_index_req_handle7;
Firebird::IRequest* handles_put_relation_req_handle1;
Firebird::IRequest* handles_put_relation_req_handle2;
Firebird::IRequest* handles_store_blr_gen_id_req_handle1;
Firebird::IRequest* handles_write_function_args_req_handle1;
Firebird::IRequest* handles_write_function_args_req_handle2;
Firebird::IRequest* handles_write_procedure_prms_req_handle1;
Firebird::IRequest* handles_fix_security_class_name_req_handle1;
bool hdr_forced_writes;
TEXT database_security_class[GDS_NAME_LEN]; // To save database security class for deferred update
@ -1089,6 +1099,9 @@ public:
char veryEnd;
//starting after this members must be initialized in constructor explicitly
Firebird::FbLocalStatus status_vector;
Firebird::ThrowLocalStatus throwStatus;
Firebird::Array<Firebird::Pair<Firebird::NonPooled<Firebird::MetaName, Firebird::MetaName> > >
defaultCollations;
Firebird::UtilSvc* uSvc;
@ -1162,4 +1175,49 @@ enum burp_messages_vals {
// BLOB buffer
typedef Firebird::HalfStaticArray<UCHAR, 1024> BlobBuffer;
class BurpSql : public Firebird::AutoStorage
{
public:
BurpSql(BurpGlobals* g, const char* sql)
: Firebird::AutoStorage(),
tdgbl(g), stmt(nullptr)
{
stmt = tdgbl->db_handle->prepare(&tdgbl->throwStatus, tdgbl->tr_handle, 0, sql, 3, 0);
}
template <typename M>
void singleSelect(Firebird::ITransaction* trans, M* msg)
{
stmt->execute(&tdgbl->throwStatus, tdgbl->tr_handle, nullptr, nullptr, msg->getMetadata(), msg->getData());
}
template <typename M>
void execute(Firebird::ITransaction* trans, M* msg)
{
stmt->execute(&tdgbl->throwStatus, tdgbl->tr_handle, msg->getMetadata(), msg->getData(), nullptr, nullptr);
}
void execute(Firebird::ITransaction* trans)
{
stmt->execute(&tdgbl->throwStatus, tdgbl->tr_handle, nullptr, nullptr, nullptr, nullptr);
}
private:
BurpGlobals* tdgbl;
Firebird::IStatement* stmt;
};
class OutputVersion : public Firebird::IVersionCallbackImpl<OutputVersion, Firebird::CheckStatusWrapper>
{
public:
OutputVersion(const char* printFormat)
: format(printFormat)
{ }
void callback(Firebird::CheckStatusWrapper* status, const char* text);
private:
const char* format;
};
#endif // BURP_BURP_H

View File

@ -26,15 +26,19 @@
#include "../common/ThreadData.h"
#include "../common/classes/MsgPrint.h"
#include "../common/classes/fb_string.h"
#include "../common/UtilSvc.h"
class BurpGlobals;
int BURP_main(Firebird::UtilSvc*);
int gbak(Firebird::UtilSvc*);
void BURP_abort();
void BURP_error(USHORT, bool, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_error(USHORT, bool, const char* str);
void BURP_error_redirect(const ISC_STATUS*, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_error_redirect(Firebird::IStatus*, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_makeSymbol(BurpGlobals*, Firebird::string&);
void BURP_msg_partial(bool, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_msg_put(bool, USHORT, const MsgFormat::SafeArg& arg);
const int BURP_MSG_GET_SIZE = 128; // Use it for buffers passed to this function.
@ -42,8 +46,8 @@ void BURP_msg_get(USHORT, TEXT*, const MsgFormat::SafeArg& arg = MsgFormat::Safe
void BURP_output_version(void*, const TEXT*);
void BURP_print(bool err, USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_print(bool err, USHORT, const char* str);
void BURP_print_status(bool err, const ISC_STATUS* status);
void BURP_print_warning(const ISC_STATUS*);
void BURP_print_status(bool err, Firebird::IStatus* status);
void BURP_print_warning(Firebird::IStatus* status);
void BURP_verbose(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
void BURP_verbose(USHORT, const char* str);

View File

@ -24,8 +24,8 @@
#ifndef BURP_CANON_PROTO_H
#define BURP_CANON_PROTO_H
ULONG CAN_encode_decode (burp_rel*, lstring*, UCHAR*, int);
ULONG CAN_slice (lstring*, lstring*, int, /*USHORT,*/ UCHAR*);
ULONG CAN_encode_decode (burp_rel* relation, lstring* buffer, UCHAR* data, bool direction, bool useMissingOffset = false);
ULONG CAN_slice (lstring* buffer, lstring* slice, bool direction, UCHAR* sdl);
#endif // BURP_CANON_PROTO_H

View File

@ -63,7 +63,7 @@ static xdr_t::xdr_ops burp_ops =
const int increment = 1024;
ULONG CAN_encode_decode(burp_rel* relation, lstring* buffer, UCHAR* data, bool_t direction)
ULONG CAN_encode_decode(burp_rel* relation, lstring* buffer, UCHAR* data, bool direction, bool useMissingOffset)
{
/**************************************
*
@ -203,17 +203,21 @@ ULONG CAN_encode_decode(burp_rel* relation, lstring* buffer, UCHAR* data, bool_t
{
if (field->fld_flags & FLD_computed)
continue;
offset = FB_ALIGN(offset, sizeof(SSHORT));
UCHAR* p = data + offset;
UCHAR* p = data + field->fld_missing_offset;
if (!useMissingOffset)
{
offset = FB_ALIGN(offset, sizeof(SSHORT));
p = data + offset;
offset += sizeof(SSHORT);
}
if (!xdr_short(xdrs, (SSHORT*) p))
return FALSE;
offset += sizeof(SSHORT);
}
return (xdrs->x_private - xdrs->x_base);
}
ULONG CAN_slice(lstring* buffer, lstring* slice, bool_t direction, /*USHORT sdl_length,*/ UCHAR* sdl)
ULONG CAN_slice(lstring* buffer, lstring* slice, bool direction, UCHAR* sdl)
{
/**************************************
*

View File

@ -119,12 +119,12 @@ void MISC_free_burp( void *free)
// in a function visible to all gbak components.
// Given a request, if it's non-zero (compiled), deallocate it but
// without caring about a possible error.
void MISC_release_request_silent(isc_req_handle& req_handle)
void MISC_release_request_silent(Firebird::IRequest*& req_handle)
{
if (req_handle)
{
ISC_STATUS_ARRAY req_status;
isc_release_request(req_status, &req_handle);
req_handle->release();
req_handle = nullptr;
}
}

View File

@ -26,7 +26,7 @@
UCHAR* MISC_alloc_burp(ULONG);
void MISC_free_burp(void*);
void MISC_release_request_silent(isc_req_handle& req_handle);
void MISC_release_request_silent(Firebird::IRequest*& req_handle);
int MISC_symbol_length(const TEXT*, ULONG);
void MISC_terminate(const TEXT*, TEXT*, ULONG, ULONG);

File diff suppressed because it is too large Load Diff

View File

@ -33,21 +33,23 @@
#include "CsConvert.h"
#include "IntlUtil.h"
namespace Firebird {
template <>
inline void SimpleDelete<charset>::clear(charset* cs)
{
Firebird::IntlUtil::finiCharset(cs);
delete cs;
}
}
namespace Jrd {
class CharSet
{
public:
class Delete
{
public:
static void clear(charset* cs)
{
Firebird::IntlUtil::finiCharset(cs);
delete cs;
}
};
static CharSet* createInstance(Firebird::MemoryPool& pool, USHORT id, charset* cs);
protected:

View File

@ -44,6 +44,11 @@ extern "C"
namespace Firebird {
static const USHORT FB_DEC_Errors =
DEC_IEEE_754_Division_by_zero |
DEC_IEEE_754_Invalid_operation |
DEC_IEEE_754_Overflow;
struct DecimalStatus
{
DecimalStatus(USHORT exc)

View File

@ -0,0 +1,271 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Claudio Valderrama on 16-Mar-2007
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2007 Claudio Valderrama
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* Alex Peshkoff, 2017
*
*/
#include "firebird.h"
#include "BlobWrapper.h"
#include "../jrd/ibase.h"
#include "firebird/Interface.h"
static const USHORT SEGMENT_LIMIT = 65535;
using namespace Firebird;
bool BlobWrapper::open(IAttachment* db, ITransaction* trans, ISC_QUAD& blobid,
USHORT bpb_len, const UCHAR* bpb)
{
if (m_direction != dir_none)
return false;
if (bpb_len > 0 && !bpb || blobIsNull(blobid))
return false;
m_blob = db->openBlob(m_status, trans, &blobid, bpb_len, bpb);
if (m_status->isEmpty())
{
m_direction = dir_read;
return true;
}
return false;
}
bool BlobWrapper::create(IAttachment* db, ITransaction* trans, ISC_QUAD& blobid,
USHORT bpb_len, const UCHAR* bpb)
{
if (m_direction != dir_none)
return false;
if (bpb_len > 0 && !bpb)
return false;
blobid.gds_quad_high = blobid.gds_quad_low = 0;
m_blob = db->createBlob(m_status, trans, &blobid, bpb_len, bpb);
if (m_status->isEmpty())
{
m_direction = dir_write;
return true;
}
return false;
}
bool BlobWrapper::close(bool force_internal_SV)
{
bool rc = false;
if (m_blob)
{
m_blob->close(force_internal_SV ? &m_default_status : m_status);
rc = (force_internal_SV ? &m_default_status : m_status)->isEmpty();
if (rc)
m_blob = nullptr;
m_direction = dir_none;
}
return rc;
}
bool BlobWrapper::getSegment(FB_SIZE_T len, void* buffer, FB_SIZE_T& real_len)
{
real_len = 0;
if (!m_blob || m_direction != dir_read)
return false;
if (len && !buffer)
return false;
unsigned ilen = len > SEGMENT_LIMIT ? SEGMENT_LIMIT : static_cast<unsigned>(len);
unsigned olen = 0;
bool eof = m_blob->getSegment(m_status, ilen, buffer, &olen) == Firebird::IStatus::RESULT_NO_DATA;
if (m_status->isEmpty() && !eof)
{
real_len = olen;
return true;
}
return false;
}
bool BlobWrapper::getData(FB_SIZE_T len, void* buffer, FB_SIZE_T& real_len,
bool use_sep, const UCHAR separator)
{
#ifdef DEV_BUILD
if (!m_blob || m_direction != dir_read)
return false;
if (!len || !buffer)
return false;
#endif
bool rc = false;
real_len = 0;
char* buf2 = static_cast<char*>(buffer);
while (len)
{
unsigned olen = 0;
bool eof = m_blob->getSegment(m_status, len, buf2, &olen) == Firebird::IStatus::RESULT_NO_DATA;
if (m_status->isEmpty() && !eof)
{
len -= olen;
buf2 += olen;
real_len += olen;
if (len && use_sep) // Append the segment separator.
{
--len;
*buf2++ = separator;
++real_len;
}
rc = true;
}
else
break;
}
return rc;
}
bool BlobWrapper::putSegment(FB_SIZE_T len, const void* buffer)
{
#ifdef DEV_BUILD
if (!m_blob || m_direction != dir_write)
return false;
if (len > 0 && !buffer)
return false;
#endif
unsigned ilen = len > SEGMENT_LIMIT ? SEGMENT_LIMIT : static_cast<unsigned>(len);
m_blob->putSegment(m_status, ilen, buffer);
return m_status->isEmpty();
}
bool BlobWrapper::putSegment(FB_SIZE_T len, const void* buffer, FB_SIZE_T& real_len)
{
#ifdef DEV_BUILD
if (!m_blob || m_direction == dir_read)
return false;
if (len > 0 && !buffer)
return false;
#endif
real_len = 0;
unsigned ilen = len > SEGMENT_LIMIT ? SEGMENT_LIMIT : static_cast<unsigned>(len);
m_blob->putSegment(m_status, ilen, buffer);
if (!m_status->isEmpty())
return false;
real_len = ilen;
return true;
}
bool BlobWrapper::putData(FB_SIZE_T len, const void* buffer, FB_SIZE_T& real_len)
{
if (!m_blob || m_direction == dir_read)
return false;
if (len > 0 && !buffer)
return false;
real_len = 0;
m_blob->putSegment(m_status, len, buffer);
if (!m_status->isEmpty())
return false;
real_len = len;
return true;
}
bool BlobWrapper::getInfo(FB_SIZE_T items_size, const UCHAR* items,
FB_SIZE_T info_size, UCHAR* blob_info) const
{
if (!m_blob || m_direction != dir_read)
return false;
m_blob->getInfo(m_status, items_size, items, info_size, blob_info);
return m_status->isEmpty();
}
bool BlobWrapper::getSize(SLONG* size, SLONG* seg_count, SLONG* max_seg) const
{
/**************************************
*
* g e t B l o b S i z e
*
**************************************
*
* Functional description
* Get the size, number of segments, and max
* segment length of a blob. Return true
* if it happens to succeed.
* This is a clone of gds__blob_size.
*
**************************************/
static const UCHAR blob_items[] =
{
isc_info_blob_max_segment,
isc_info_blob_num_segments,
isc_info_blob_total_length
};
UCHAR buffer[64];
if (!getInfo(sizeof(blob_items), blob_items, sizeof(buffer), buffer))
return false;
const UCHAR* p = buffer;
const UCHAR* const end = buffer + sizeof(buffer);
for (UCHAR item = *p++; item != isc_info_end && p < end; item = *p++)
{
const USHORT l = gds__vax_integer(p, 2);
p += 2;
const SLONG n = gds__vax_integer(p, l);
p += l;
switch (item)
{
case isc_info_blob_max_segment:
if (max_seg)
*max_seg = n;
break;
case isc_info_blob_num_segments:
if (seg_count)
*seg_count = n;
break;
case isc_info_blob_total_length:
if (size)
*size = n;
break;
default:
return false;
}
}
return true;
}

View File

@ -0,0 +1,95 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Claudio Valderrama on 16-Mar-2007
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2007 Claudio Valderrama
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* Alex Peshkoff, 2017
*
*/
#ifndef FB_USER_BLOB_H
#define FB_USER_BLOB_H
#include "firebird/Interface.h"
#include <memory.h>
#include "../common/status.h"
class BlobWrapper
{
public:
explicit BlobWrapper(Firebird::CheckStatusWrapper* status)
: m_status(status ? status : &m_default_status), m_blob(nullptr), m_direction(dir_none)
{ }
~BlobWrapper()
{
close(true);
}
bool open(Firebird::IAttachment* db, Firebird::ITransaction* trans, ISC_QUAD& blobid,
USHORT bpb_len = 0, const UCHAR* bpb = nullptr);
bool create(Firebird::IAttachment* db, Firebird::ITransaction* trans, ISC_QUAD& blobid,
USHORT bpb_len = 0, const UCHAR* bpb = nullptr);
bool close(bool force_internal_SV = false);
bool getSegment(FB_SIZE_T len, void* buffer, FB_SIZE_T& real_len);
bool getData(FB_SIZE_T len, void* buffer, FB_SIZE_T& real_len, bool use_sep = false, const UCHAR separator = '\0');
bool putSegment(FB_SIZE_T len, const void* buffer);
bool putSegment(FB_SIZE_T len, const void* buffer, FB_SIZE_T& real_len);
bool putData(FB_SIZE_T len, const void* buffer, FB_SIZE_T& real_len);
bool putData(FB_SIZE_T len, const void* buffer)
{
FB_SIZE_T dummy;
return putData(len, buffer, dummy);
}
bool isOpen() const
{
return m_blob != 0 && m_direction != dir_none;
}
ISC_STATUS getCode() const
{
return m_status->getErrors()[1];
}
bool getInfo(FB_SIZE_T items_size, const UCHAR* items, FB_SIZE_T info_size, UCHAR* blob_info) const;
bool getSize(SLONG* size, SLONG* seg_count, SLONG* max_seg) const;
static bool blobIsNull(const ISC_QUAD& blobid)
{
return blobid.gds_quad_high == 0 && blobid.gds_quad_low == 0;
}
private:
enum b_direction
{
dir_none,
dir_read,
dir_write
};
Firebird::FbLocalStatus m_default_status;
Firebird::CheckStatusWrapper* const m_status;
Firebird::IBlob* m_blob;
b_direction m_direction;
};
#endif // FB_USER_BLOB_H

View File

@ -717,7 +717,8 @@ SINT64 ClumpletReader::fromVaxInteger(const UCHAR* ptr, FB_SIZE_T length)
value += ((SINT64) *ptr++) << shift;
shift += 8;
}
value += ((SINT64)(SCHAR)*ptr) << shift;
value += ((SINT64)(SCHAR) *ptr) << shift;
return value;
}

View File

@ -222,14 +222,6 @@ inline bool isinf(double x)
{
return (!_finite (x) && !isnan(x));
}
#else
#ifndef isinf
template <typename F>
inline bool isinf(F x)
{
return !isnan(x) && isnan(x - x);
}
#endif // isinf
#endif // WIN_NT
namespace Firebird {

View File

@ -224,12 +224,6 @@ public:
// previously set group and added to new
void setStatsGroup(MemoryStats& stats) FB_NOTHROW;
// Just a helper for AutoPtr.
static void clear(MemoryPool* pool)
{
deletePool(pool);
}
// Initialize and finalize global memory pool
static void init();
static void cleanup();
@ -451,7 +445,14 @@ namespace Firebird
explicit AutoStorage(MemoryPool& p) : PermanentStorage(p) { }
};
typedef AutoPtr<MemoryPool, MemoryPool> AutoMemoryPool;
template <>
inline void SimpleDelete<MemoryPool>::clear(MemoryPool* pool)
{
if (pool)
MemoryPool::deletePool(pool);
}
typedef AutoPtr<MemoryPool> AutoMemoryPool;
} // namespace Firebird

View File

@ -46,6 +46,15 @@ public:
}
};
template <>
inline void SimpleDelete<FILE>::clear(FILE* f)
{
if (f) {
fclose(f);
}
}
template <typename What>
class ArrayDelete
{
@ -56,6 +65,7 @@ public:
}
};
template <typename T>
class SimpleRelease
{
@ -84,24 +94,24 @@ public:
};
template <typename Where, typename Clear = SimpleDelete<Where> >
template <typename Where, template <typename W> class Clear = SimpleDelete >
class AutoPtr
{
private:
Where* ptr;
public:
AutoPtr<Where, Clear>(Where* v = NULL)
AutoPtr(Where* v = NULL)
: ptr(v)
{}
~AutoPtr()
{
Clear::clear(ptr);
Clear<Where>::clear(ptr);
}
AutoPtr<Where, Clear>& operator= (Where* v)
AutoPtr& operator= (Where* v)
{
Clear::clear(ptr);
Clear<Where>::clear(ptr);
ptr = v;
return *this;
}
@ -157,14 +167,24 @@ public:
{
if (v != ptr)
{
Clear::clear(ptr);
Clear<Where>::clear(ptr);
ptr = v;
}
}
private:
AutoPtr<Where, Clear>(AutoPtr<Where, Clear>&);
void operator=(AutoPtr<Where, Clear>&);
AutoPtr(AutoPtr&);
void operator=(AutoPtr&);
};
template <typename ID>
class AutoDispose : public AutoPtr<ID, SimpleDispose>
{
public:
AutoDispose(ID* v = nullptr)
: AutoPtr<ID, SimpleDispose>(v)
{ }
};
@ -259,19 +279,6 @@ private:
};
// One more typical class for AutoPtr cleanup
class FileClose
{
public:
static void clear(FILE *f)
{
if (f) {
fclose(f);
}
}
};
} //namespace Firebird
#endif // CLASSES_AUTO_PTR_H

View File

@ -93,7 +93,7 @@ namespace
return;
#ifdef DEBUG_GDS_ALLOC
Firebird::AutoPtr<FILE, Firebird::FileClose> file;
Firebird::AutoPtr<FILE> file;
{ // scope
Firebird::PathName name = "memdebug.log";

View File

@ -220,10 +220,10 @@ public:
};
// Templates to allow to iterate thru array\vector of values and process items
// Templates to allow to iterate thru array\vector of values and process items
// in some way. Processed items are marked and skipped at next iteration circle.
// Idea is to not remove processed items from array and avoid costly memory
// moving. Also, iterator is able to move upper and lower bounds of array if
// Idea is to not remove processed items from array and avoid costly memory
// moving. Also, iterator is able to move upper and lower bounds of array if
// last (or first) items are marked, making next iterations more efficient.
template <typename T>
@ -243,12 +243,12 @@ public:
static void mark(T* const item)
{
*item = MarkValue::getMarkValue();
};
}
static bool isMarked(const T* const item)
{
return *item == MarkValue::getMarkValue();
};
}
};
template <typename T, typename Marker = DefaultMarker<T> >
@ -315,8 +315,6 @@ public:
if (!Marker::isMarked(m_curr))
m_last = m_curr;
return;
}
// Show if current position is valid
@ -328,7 +326,7 @@ public:
// Show if not processed items still exists
bool isEmpty() const
{
return (m_begin >= m_end);
return m_begin >= m_end;
}
private:

View File

@ -441,9 +441,9 @@ int Config::getTempBlockSize()
return (int) getDefaultConfig()->values[KEY_TEMP_BLOCK_SIZE];
}
FB_UINT64 Config::getTempCacheLimit()
FB_UINT64 Config::getTempCacheLimit() const
{
SINT64 v = (SINT64) getDefaultConfig()->values[KEY_TEMP_CACHE_LIMIT];
SINT64 v = get<SINT64>(KEY_TEMP_CACHE_LIMIT);
if (v < 0)
{
v = getServerMode() != MODE_SUPER ? 8388608 : 67108864; // bytes

View File

@ -231,7 +231,7 @@ public:
static int getTempBlockSize();
// Caching limit for the temporary data
static FB_UINT64 getTempCacheLimit();
FB_UINT64 getTempCacheLimit() const;
// Whether remote (NFS) files can be opened
static bool getRemoteFileOpenAbility();

View File

@ -109,7 +109,7 @@ public:
}
private:
AutoPtr<FILE, FileClose> file;
AutoPtr<FILE> file;
Firebird::PathName fileName;
unsigned int l;
};

View File

@ -259,6 +259,14 @@ typedef struct dsc
memset(this, 0, sizeof(*this));
}
void clearFlags()
{
if (isBlob() && dsc_sub_type == isc_blob_text)
dsc_flags &= 0xFF00;
else
dsc_flags = 0;
}
void makeBlob(SSHORT subType, USHORT ttype, ISC_QUAD* address = NULL)
{
clear();

116
src/common/status.h Normal file
View File

@ -0,0 +1,116 @@
/*
* PROGRAM: Firebird exceptions classes
* MODULE: status.h
* DESCRIPTION: Status vector filling and parsing.
*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Mike Nordell
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2001 Mike Nordell <tamlin at algonet.se>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*
*/
#ifndef COMMON_STATUS_H
#define COMMON_STATUS_H
#include "../common/StatusHolder.h"
#include "../common/utils_proto.h"
const int MAX_ERRMSG_LEN = 128;
const int MAX_ERRSTR_LEN = 1024;
namespace Firebird
{
template <class SW>
class LocalStatusWrapper
{
public:
LocalStatusWrapper()
: localStatusVector(&localStatus)
{ }
explicit LocalStatusWrapper(Firebird::MemoryPool& p)
: localStatus(p), localStatusVector(&localStatus)
{ }
SW* operator->()
{
return &localStatusVector;
}
SW* operator&()
{
return &localStatusVector;
}
ISC_STATUS operator[](unsigned n) const
{
fb_assert(n < fb_utils::statusLength(localStatusVector.getErrors()));
return localStatusVector.getErrors()[n];
}
const SW* operator->() const
{
return &localStatusVector;
}
const SW* operator&() const
{
return &localStatusVector;
}
void check() const
{
if (localStatusVector.isDirty())
{
if (localStatus.getState() & Firebird::IStatus::STATE_ERRORS)
raise();
}
}
void copyTo(SW* to) const
{
fb_utils::copyStatus(to, &localStatusVector);
}
void raise() const
{
Firebird::status_exception::raise(&localStatus);
}
bool isEmpty() const
{
return localStatusVector.isEmpty();
}
bool isSuccess() const
{
return localStatusVector.isEmpty();
}
private:
Firebird::LocalStatus localStatus;
SW localStatusVector;
};
typedef LocalStatusWrapper<CheckStatusWrapper> FbLocalStatus;
typedef LocalStatusWrapper<ThrowStatusWrapper> ThrowLocalStatus;
}
#endif // COMMON_STATUS_H

View File

@ -196,8 +196,8 @@ namespace fb_utils
bool inline isNetworkError(ISC_STATUS code)
{
return code == isc_network_error ||
code == isc_net_write_err ||
return code == isc_network_error ||
code == isc_net_write_err ||
code == isc_net_read_err ||
code == isc_lost_db_connection;
}

View File

@ -48,6 +48,7 @@
#include "../jrd/exe_proto.h"
#include "../jrd/intl_proto.h"
#include "../common/isc_f_proto.h"
#include "../jrd/lck_proto.h"
#include "../jrd/met_proto.h"
#include "../jrd/scl_proto.h"
#include "../jrd/vio_proto.h"
@ -3484,6 +3485,26 @@ DdlNode* CreateAlterTriggerNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
bool CreateAlterTriggerNode::checkPermission(thread_db* tdbb, jrd_tra* transaction)
{
if (!create)
{
AutoRequest requestHandle;
FOR (REQUEST_HANDLE requestHandle TRANSACTION_HANDLE transaction)
TRG IN RDB$TRIGGERS
WITH TRG.RDB$TRIGGER_NAME EQ name.c_str()
{
if (!type.specified && !TRG.RDB$TRIGGER_TYPE.NULL)
type = TRG.RDB$TRIGGER_TYPE;
if (relationName.isEmpty() && !TRG.RDB$RELATION_NAME.NULL)
relationName = TRG.RDB$RELATION_NAME;
}
END_FOR
if (!type.specified)
status_exception::raise(Arg::Gds(isc_dyn_trig_not_found) << Arg::Str(name));
}
if (relationName.hasData())
{
dsc dscName;
@ -3508,26 +3529,6 @@ void CreateAlterTriggerNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlS
// run all statements under savepoint control
AutoSavePoint savePoint(tdbb, transaction);
if (!create)
{
AutoRequest requestHandle;
FOR (REQUEST_HANDLE requestHandle TRANSACTION_HANDLE transaction)
TRG IN RDB$TRIGGERS
WITH TRG.RDB$TRIGGER_NAME EQ name.c_str()
{
if (!type.specified && !TRG.RDB$TRIGGER_TYPE.NULL)
type = TRG.RDB$TRIGGER_TYPE;
if (relationName.isEmpty() && !TRG.RDB$RELATION_NAME.NULL)
relationName = TRG.RDB$RELATION_NAME;
}
END_FOR
if (!type.specified)
status_exception::raise(Arg::Gds(isc_dyn_trig_not_found) << Arg::Str(name));
}
compile(tdbb, dsqlScratch);
blrData = dsqlScratch->getBlrData();
@ -11280,12 +11281,22 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("system privileges"));
break;
case obj_udf:
ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("functions"));
break;
case obj_package_header:
ERRD_post(Arg::Gds(isc_dsql_cant_grant_option) << Arg::Str("packages"));
break;
default:
break;
}
}
if (grantor && !tdbb->getAttachment()->locksmith(tdbb, USE_GRANTED_BY_CLAUSE))
const Attachment* attachment = tdbb->getAttachment();
if (grantor && !attachment->locksmith(tdbb, USE_GRANTED_BY_CLAUSE))
{
const Firebird::MetaName& owner(tdbb->getDatabase()->dbb_owner);
@ -11295,7 +11306,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
(Arg::PrivateDyn(295) << DBA_USER_NAME << owner).raise();
}
MetaName currentUser(tdbb->getAttachment()->att_user->getUserName());
MetaName currentUser(attachment->att_user->getUserName());
MetaName grantorRevoker(grantor ? *grantor : currentUser);
if (!isGrant && !privs) // REVOKE ALL ON ALL
@ -11311,7 +11322,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
PRIV.RDB$USER_TYPE = userType AND
PRIV.RDB$GRANTOR NOT MISSING
{
if (tdbb->getAttachment()->att_user->locksmith(tdbb, GRANT_REVOKE_ON_ANY_OBJECT) ||
if (attachment->att_user->locksmith(tdbb, GRANT_REVOKE_ON_ANY_OBJECT) ||
grantorRevoker == PRIV.RDB$GRANTOR)
{
ERASE PRIV;
@ -11433,17 +11444,32 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
// As long as only locksmith can use GRANTED BY, no need specially checking
// for privileges of current user. AP-2008
if (objType == 0)
switch (objType)
{
// Relation or view because we cannot distinguish at this point.
checkGrantorCanGrant(tdbb, transaction,
tdbb->getAttachment()->att_user->getUserName().c_str(), priv, objName,
field, true);
}
else if (objType >= obj_database)
{
checkGrantorCanGrantDdl(tdbb, transaction,
tdbb->getAttachment()->att_user->getUserName().c_str(), priv, objName);
case obj_relation:
{
// Relation or view because we cannot distinguish at this point.
checkGrantorCanGrantRelation(tdbb, transaction, currentUser.c_str(), priv, objName,
field, true);
break;
}
case obj_exception:
case obj_generator:
{
checkGrantorCanGrantObject(tdbb, transaction, currentUser.c_str(), priv, objName, objType);
break;
}
default:
if (objType >= obj_database)
{
checkGrantorCanGrantDdl(tdbb, transaction, currentUser.c_str(), priv, objName);
}
// Prevent silent eating checks. In this case we can remove RDB$TRIGGER_9 (trigger1)
// but add every object type above in switch
// else
// fb_assert(false);
}
}
@ -11506,7 +11532,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
((objType == obj_sql_role) && (PRIV.RDB$PRIVILEGE[0] == 'M') && // This is ROLE to USER grant
(currentUser != user) && // And current user does not revoke his own grant
((isItSqlRole(tdbb, transaction, objName, owner) && // Pick up role owner name
(tdbb->getAttachment()->locksmith(tdbb, GRANT_REVOKE_ON_ANY_OBJECT) || // God-like check
(attachment->locksmith(tdbb, GRANT_REVOKE_ON_ANY_OBJECT) || // God-like check
(owner == currentUser))) || // Current user is role owner
(getGrantorOption(tdbb, transaction, currentUser, obj_user, objName) == 2)))) // or has ADMIN option
{
@ -11559,7 +11585,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
}
// Check if the grantor has grant privilege on the relation/field.
void GrantRevokeNode::checkGrantorCanGrant(thread_db* tdbb, jrd_tra* transaction,
void GrantRevokeNode::checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* transaction,
const char* grantor, const char* privilege, const MetaName& relationName,
const MetaName& fieldName, bool topLevel)
{
@ -11743,13 +11769,13 @@ void GrantRevokeNode::checkGrantorCanGrant(thread_db* tdbb, jrd_tra* transaction
{
if (fieldName == G_FLD.RDB$FIELD_NAME)
{
checkGrantorCanGrant(tdbb, transaction, grantor, privilege,
checkGrantorCanGrantRelation(tdbb, transaction, grantor, privilege,
G_VIEW.RDB$RELATION_NAME, G_FLD.RDB$BASE_FIELD, false);
}
}
else
{
checkGrantorCanGrant(tdbb, transaction, grantor, privilege,
checkGrantorCanGrantRelation(tdbb, transaction, grantor, privilege,
G_VIEW.RDB$RELATION_NAME, G_FLD.RDB$BASE_FIELD, false);
}
}
@ -11837,7 +11863,9 @@ void GrantRevokeNode::checkGrantorCanGrantRole(thread_db* tdbb, jrd_tra* transac
void GrantRevokeNode::checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transaction,
const MetaName& grantor, const char* privilege, const MetaName& objName)
{
if (tdbb->getAttachment()->locksmith(tdbb, GRANT_REVOKE_ANY_DDL_RIGHT))
const Attachment* attachment = tdbb->getAttachment();
if (attachment->locksmith(tdbb, GRANT_REVOKE_ANY_DDL_RIGHT))
return;
AutoCacheRequest request(tdbb, drq_l_grant_option, DYN_REQUESTS);
@ -11845,23 +11873,62 @@ void GrantRevokeNode::checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transact
FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction)
PRV IN RDB$USER_PRIVILEGES
WITH PRV.RDB$USER = UPPERCASE(grantor.c_str()) AND
PRV.RDB$USER_TYPE = obj_user AND
WITH ((PRV.RDB$USER = UPPERCASE(grantor.c_str()) AND
PRV.RDB$USER_TYPE = obj_user) OR (PRV.RDB$USER_TYPE = obj_sql_role)) AND
PRV.RDB$RELATION_NAME EQ objName.c_str() AND
PRV.RDB$OBJECT_TYPE >= obj_database AND
PRV.RDB$PRIVILEGE EQ privilege
{
grantable = PRV.RDB$GRANT_OPTION == WITH_GRANT_OPTION;
if ( (PRV.RDB$USER_TYPE == obj_sql_role) && !attachment->att_user->roleInUse(tdbb, PRV.RDB$USER))
continue;
if (PRV.RDB$GRANT_OPTION == WITH_GRANT_OPTION)
grantable = true;
}
END_FOR
if (!grantable)
{
// no .. privilege with grant option on DDL ..
status_exception::raise(Arg::PrivateDyn(174) << privilege << objName.c_str());
// no @1 privilege with grant option on DDL @2
status_exception::raise(Arg::PrivateDyn(299) << privilege << objName.c_str());
}
}
// Check if the grantor has grant option on generator privilege
void GrantRevokeNode::checkGrantorCanGrantObject(thread_db* tdbb, jrd_tra* transaction, const char* grantor,
const char* privilege, const Firebird::MetaName& objName, SSHORT objType)
{
const Attachment* attachment = tdbb->getAttachment();
if (attachment->locksmith(tdbb, GRANT_REVOKE_ON_ANY_OBJECT))
return;
AutoCacheRequest request(tdbb, drq_l_grant_object, DYN_REQUESTS);
bool grantable = false;
FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction)
PRV IN RDB$USER_PRIVILEGES
WITH ((PRV.RDB$USER = UPPERCASE(grantor) AND
PRV.RDB$USER_TYPE = obj_user) OR (PRV.RDB$USER_TYPE = obj_sql_role)) AND
PRV.RDB$RELATION_NAME EQ objName.c_str() AND
PRV.RDB$OBJECT_TYPE = objType AND
PRV.RDB$PRIVILEGE EQ privilege
{
if ( (PRV.RDB$USER_TYPE == obj_sql_role) && !attachment->att_user->roleInUse(tdbb, PRV.RDB$USER))
continue;
if (PRV.RDB$GRANT_OPTION == WITH_GRANT_OPTION)
grantable = true;
}
END_FOR
if (!grantable)
{
// no @1 privilege with grant option on object @2
status_exception::raise(Arg::PrivateDyn(300) << privilege << objName.c_str());
}
}
void GrantRevokeNode::storePrivilege(thread_db* tdbb, jrd_tra* transaction, const MetaName& object,
const MetaName& user, const MetaName& field, const TEXT* privilege, SSHORT userType,
SSHORT objType, int option, const MetaName& grantor)
@ -11956,37 +12023,92 @@ bool AlterDatabaseNode::checkPermission(thread_db* tdbb, jrd_tra* transaction)
return true;
}
void AlterDatabaseNode::checkClauses(thread_db* tdbb)
{
if (clauses & CLAUSE_END_BACKUP)
{
// msg 298: Incompatible ALTER DATABASE clauses: '@1' and '@2'
if (clauses & CLAUSE_BEGIN_BACKUP)
(Arg::PrivateDyn(298) << Arg::Str("BEGIN BACKUP") << Arg::Str("END BACKUP")).raise();
if (differenceFile.hasData())
(Arg::PrivateDyn(298) << Arg::Str("END BACKUP") << Arg::Str("ADD DIFFERENCE FILE")).raise();
if (clauses & CLAUSE_DROP_DIFFERENCE)
(Arg::PrivateDyn(298) << Arg::Str("END BACKUP") << Arg::Str("DROP DIFFERENCE FILE")).raise();
}
if ((clauses & CLAUSE_DROP_DIFFERENCE) && differenceFile.hasData())
{
// msg 298: Incompatible ALTER DATABASE clauses: '@1' and '@2'
(Arg::PrivateDyn(298) << Arg::Str("ADD DIFFERENCE FILE") << Arg::Str("DROP DIFFERENCE FILE")).raise();
}
}
void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch,
jrd_tra* transaction)
{
checkClauses(tdbb);
// Take a LCK_alter_database lock to prevent altering of the database from
// parallel transactions
if (!transaction->tra_alter_db_lock)
{
Lock* lock = FB_NEW_RPT(*transaction->tra_pool, 0) Lock(tdbb, 0, LCK_alter_database);
lock->lck_data = transaction->tra_number;
if (LCK_lock(tdbb, lock, LCK_write, transaction->getLockWait()))
transaction->tra_alter_db_lock = lock;
else
{
const TraNumber conflict_trans = LCK_read_data(tdbb, lock);
delete lock;
// msg 297: Concurrent ALTER DATABASE is not supported
Arg::PrivateDyn status(297);
if (conflict_trans)
status << Arg::Gds(isc_concurrent_transaction) << Arg::Num(conflict_trans);
status_exception::raise(status);
}
}
// run all statements under savepoint control
AutoSavePoint savePoint(tdbb, transaction);
Attachment* const attachment = transaction->tra_attachment;
dsql_dbb* dbb = transaction->getDsqlAttachment();
if (clauses & CLAUSE_DROP_DIFFERENCE)
changeBackupMode(tdbb, transaction, CLAUSE_DROP_DIFFERENCE);
SLONG dbAlloc = PageSpace::maxAlloc(tdbb->getDatabase());
SLONG start = create ? createLength + 1 : 0;
AutoCacheRequest request(tdbb, drq_m_database, DYN_REQUESTS);
FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction)
DBB IN RDB$DATABASE
for (NestConst<DbFileClause>* i = files.begin(); i != files.end(); ++i)
{
MODIFY DBB USING
if (clauses & CLAUSE_DROP_DIFFERENCE)
changeBackupMode(tdbb, transaction, CLAUSE_DROP_DIFFERENCE);
DbFileClause* file = *i;
for (NestConst<DbFileClause>* i = files.begin(); i != files.end(); ++i)
{
DbFileClause* file = *i;
start = MAX(start, file->start);
defineFile(tdbb, transaction, 0, false, false, dbAlloc,
file->name.c_str(), start, file->length);
start += file->length;
}
start = MAX(start, file->start);
defineFile(tdbb, transaction, 0, false, false, dbAlloc,
file->name.c_str(), start, file->length);
start += file->length;
}
if (differenceFile.hasData())
defineDifference(tdbb, transaction, differenceFile.c_str());
if (differenceFile.hasData())
defineDifference(tdbb, transaction, differenceFile.c_str());
if (clauses & CLAUSE_BEGIN_BACKUP)
changeBackupMode(tdbb, transaction, CLAUSE_BEGIN_BACKUP);
if (clauses & CLAUSE_END_BACKUP)
changeBackupMode(tdbb, transaction, CLAUSE_END_BACKUP);
if (setDefaultCharSet.hasData() || setDefaultCollation.hasData() || linger >= 0 ||
ssDefiner.specified)
{
AutoCacheRequest request(tdbb, drq_m_database, DYN_REQUESTS);
FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction)
DBB IN RDB$DATABASE
{
MODIFY DBB USING
if (setDefaultCharSet.hasData())
{
@ -12000,6 +12122,7 @@ void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc
DBB.RDB$CHARACTER_SET_NAME.NULL = FALSE;
strcpy(DBB.RDB$CHARACTER_SET_NAME, setDefaultCharSet.c_str());
dsql_dbb* dbb = transaction->getDsqlAttachment();
dbb->dbb_dfl_charset = ""; // reset in the cache
}
@ -12021,17 +12144,12 @@ void AlterDatabaseNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratc
DBB.RDB$SQL_SECURITY = ssDefiner.value ? FB_TRUE : FB_FALSE;
}
if (clauses & CLAUSE_BEGIN_BACKUP)
changeBackupMode(tdbb, transaction, CLAUSE_BEGIN_BACKUP);
if (clauses & CLAUSE_END_BACKUP)
changeBackupMode(tdbb, transaction, CLAUSE_END_BACKUP);
END_MODIFY
END_MODIFY
}
END_FOR
}
END_FOR
// Allow update above to work as a lock, preventing altering of the database from parallel transactions
// Moreover, it should load crypt plugin if it (by a miracle) wasn't already loaded yet
// Load crypt plugin if it (by a miracle) wasn't already loaded yet
if (clauses & CLAUSE_CRYPT)
{
Database* const db = tdbb->getDatabase();

View File

@ -2210,13 +2210,15 @@ private:
void modifyPrivileges(thread_db* tdbb, jrd_tra* transaction, SSHORT option, const GranteeClause* user);
void grantRevoke(thread_db* tdbb, jrd_tra* transaction, const GranteeClause* object,
const GranteeClause* userNod, const char* privs, Firebird::MetaName field, int options);
static void checkGrantorCanGrant(thread_db* tdbb, jrd_tra* transaction, const char* grantor,
static void checkGrantorCanGrantRelation(thread_db* tdbb, jrd_tra* transaction, const char* grantor,
const char* privilege, const Firebird::MetaName& relationName,
const Firebird::MetaName& fieldName, bool topLevel);
static void checkGrantorCanGrantRole(thread_db* tdbb, jrd_tra* transaction,
const Firebird::MetaName& grantor, const Firebird::MetaName& roleName);
static void checkGrantorCanGrantDdl(thread_db* tdbb, jrd_tra* transaction,
const Firebird::MetaName& grantor, const char* privilege, const Firebird::MetaName& objName);
static void checkGrantorCanGrantObject(thread_db* tdbb, jrd_tra* transaction, const char* grantor,
const char* privilege, const Firebird::MetaName& objName, SSHORT objType);
static void storePrivilege(thread_db* tdbb, jrd_tra* transaction,
const Firebird::MetaName& object, const Firebird::MetaName& user,
const Firebird::MetaName& field, const TEXT* privilege, SSHORT userType,
@ -2322,6 +2324,7 @@ protected:
private:
static void changeBackupMode(thread_db* tdbb, jrd_tra* transaction, unsigned clause);
static void defineDifference(thread_db* tdbb, jrd_tra* transaction, const Firebird::PathName& file);
void checkClauses(thread_db* tdbb);
public:
bool create; // Is the node created with a CREATE DATABASE command?

View File

@ -87,12 +87,6 @@ DsqlBatch::DsqlBatch(dsql_req* req, const dsql_msg* /*message*/, IMessageMetadat
m_alignment = m_meta->getAlignment(&st);
check(&st);
if (m_messageSize > RAM_BATCH) // hops - message does not fit in our buffer
{
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
Arg::Gds(isc_batch_msg_long) << Arg::Num(m_messageSize) << Arg::Num(RAM_BATCH));
}
for (pb.rewind(); !pb.isEof(); pb.moveNext())
{
UCHAR t = pb.getClumpTag();
@ -146,7 +140,6 @@ DsqlBatch::DsqlBatch(dsql_req* req, const dsql_msg* /*message*/, IMessageMetadat
switch (t)
{
case SQL_BLOB:
case SQL_ARRAY:
{
BlobMeta bm;
bm.offset = m_meta->getOffset(&st, i);
@ -160,9 +153,9 @@ DsqlBatch::DsqlBatch(dsql_req* req, const dsql_msg* /*message*/, IMessageMetadat
}
// allocate data buffers
m_messages.setBuf(m_bufferSize);
m_messages.setBuf(m_bufferSize, MAX(m_alignedMessage * 2, RAM_BATCH));
if (m_blobMeta.hasData())
m_blobs.setBuf(m_bufferSize);
m_blobs.setBuf(m_bufferSize, RAM_BATCH);
// assign initial default BPB
setDefBpb(FB_NELEM(initBlobParameters), initBlobParameters);
@ -270,6 +263,7 @@ void DsqlBatch::add(thread_db* tdbb, ULONG count, const void* inBuffer)
return;
m_messages.align(m_alignment);
m_messages.put(inBuffer, (count - 1) * m_alignedMessage + m_messageSize);
DEB_BATCH(fprintf(stderr, "Put to batch %d messages\n", count));
}
void DsqlBatch::blobCheckMeta()
@ -419,6 +413,7 @@ void DsqlBatch::addBlobStream(thread_db* tdbb, unsigned length, const void* inBu
m_lastBlob = MAX_ULONG;
// store stream for further processing
DEB_BATCH(fprintf(stderr, "Store stream %d\n", length));
fb_assert(m_blobs.getSize() % BLOB_STREAM_ALIGN == 0);
m_blobs.put(inBuffer, length);
}
@ -539,13 +534,13 @@ private:
// parse blob header
fb_assert(intptr_t(flow.data) % BLOB_STREAM_ALIGN == 0);
ISC_QUAD* batchBlobId = reinterpret_cast<ISC_QUAD*>(flow.data);
ISC_QUAD batchBlobId = *reinterpret_cast<ISC_QUAD*>(flow.data);
ULONG* blobSize = reinterpret_cast<ULONG*>(flow.data + sizeof(ISC_QUAD));
ULONG* bpbSize = reinterpret_cast<ULONG*>(flow.data + sizeof(ISC_QUAD) + sizeof(ULONG));
flow.newHdr(*blobSize);
ULONG currentBpbSize = *bpbSize;
if (batchBlobId->gds_quad_high == 0 && batchBlobId->gds_quad_low == 0)
if (batchBlobId.gds_quad_high == 0 && batchBlobId.gds_quad_low == 0)
{
// Sanity check
if (*bpbSize)
@ -591,7 +586,9 @@ private:
bid engineBlobId;
blob = blb::create2(tdbb, transaction, &engineBlobId, bpb->getCount(),
bpb->begin(), true);
registerBlob(reinterpret_cast<ISC_QUAD*>(&engineBlobId), batchBlobId);
//DEB_BATCH(fprintf(stderr, "B-ID: (%x,%x)\n", batchBlobId.gds_quad_high, batchBlobId.gds_quad_low));
registerBlob(reinterpret_cast<ISC_QUAD*>(&engineBlobId), &batchBlobId);
}
}
@ -657,7 +654,7 @@ private:
fb_assert(req);
// prepare completion interface
AutoPtr<BatchCompletionState, SimpleDispose<BatchCompletionState> > completionState
AutoPtr<BatchCompletionState, SimpleDispose> completionState
(FB_NEW BatchCompletionState(m_flags & (1 << IBatch::TAG_RECORD_COUNTS), m_detailed));
AutoSetRestore<bool> batchFlag(&req->req_batch, true);
const dsql_msg* message = m_request->getStatement()->getSendMsg();
@ -702,6 +699,9 @@ private:
continue;
ISC_QUAD* id = reinterpret_cast<ISC_QUAD*>(&data[m_blobMeta[i].offset]);
if (id->gds_quad_high == 0 && id->gds_quad_low == 0)
continue;
ISC_QUAD newId;
if (!m_blobMap.get(*id, newId))
{
@ -719,9 +719,9 @@ private:
remains -= m_messageSize;
UCHAR* msgBuffer = m_request->req_msg_buffers[message->msg_buffer_number];
DEB_BATCH(fprintf(stderr, "\n\n+++ Send\n\n"));
try
{
// runsend data to request and collect stats
ULONG before = req->req_records_inserted + req->req_records_updated +
req->req_records_deleted;
EXE_send(tdbb, req, message->msg_number, message->msg_length, msgBuffer);
@ -753,6 +753,15 @@ private:
m_messages.remained(remains, alignedData - data);
}
DEB_BATCH(fprintf(stderr, "Sent %d messages\n", completionState->getSize(tdbb->tdbb_status_vector)));
// make sure all blobs were used in messages
if (m_blobMap.count())
{
DEB_BATCH(fprintf(stderr, "BLOBs %d were not used in messages\n", m_blobMap.count()));
ERR_post_warning(Arg::Warning(isc_random) << "m_blobMap.count() BLOBs were not used in messages"); // !!!!!!! new warning
}
// reset to initial state
cancel(tdbb);
@ -762,14 +771,11 @@ private:
void DsqlBatch::cancel(thread_db* tdbb)
{
m_messages.clear();
if (m_blobMeta.hasData())
{
m_blobs.clear();
m_setBlobSize = false;
m_lastBlob = MAX_ULONG;
memset(&m_genId, 0, sizeof(m_genId));
m_blobMap.clear();
}
m_blobs.clear();
m_setBlobSize = false;
m_lastBlob = MAX_ULONG;
memset(&m_genId, 0, sizeof(m_genId));
m_blobMap.clear();
}
void DsqlBatch::genBlobId(ISC_QUAD* blobId)
@ -779,13 +785,13 @@ void DsqlBatch::genBlobId(ISC_QUAD* blobId)
memcpy(blobId, &m_genId, sizeof(m_genId));
}
void DsqlBatch::DataCache::setBuf(ULONG size)
void DsqlBatch::DataCache::setBuf(ULONG size, ULONG cacheCapacity)
{
m_limit = size;
// create ram cache
fb_assert(!m_cache);
m_cache = FB_NEW_POOL(getPool()) Cache;
fb_assert(m_cacheCapacity == 0);
fb_assert(cacheCapacity >= RAM_BATCH);
m_cacheCapacity = cacheCapacity;
}
void DsqlBatch::DataCache::put3(const void* data, ULONG dataSize, ULONG offset)
@ -797,9 +803,9 @@ void DsqlBatch::DataCache::put3(const void* data, ULONG dataSize, ULONG offset)
if (offset >= m_used)
{
// data in cache
UCHAR* to = m_cache->begin();
UCHAR* to = m_cache.begin();
to += (offset - m_used);
fb_assert(to < m_cache->end());
fb_assert(to < m_cache.end());
memcpy(to, data, dataSize);
}
else
@ -811,7 +817,7 @@ void DsqlBatch::DataCache::put3(const void* data, ULONG dataSize, ULONG offset)
void DsqlBatch::DataCache::put(const void* d, ULONG dataSize)
{
if (m_used + (m_cache ? m_cache->getCount() : 0) + dataSize > m_limit)
if (m_limit && (m_used + m_cache.getCount() + dataSize > m_limit))
{
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
Arg::Gds(isc_batch_too_big));
@ -823,17 +829,17 @@ void DsqlBatch::DataCache::put(const void* d, ULONG dataSize)
const ULONG K = 4;
// ensure ram cache presence
fb_assert(m_cache);
fb_assert(m_cacheCapacity);
// swap to secondary cache if needed
if (m_cache->getCount() + dataSize > m_cache->getCapacity())
if (m_cache.getCount() + dataSize > m_cacheCapacity)
{
// store data in the end of ram cache if needed
// avoid copy in case of huge buffer passed
ULONG delta = m_cache->getCapacity() - m_cache->getCount();
if (dataSize - delta < m_cache->getCapacity() / K)
ULONG delta = m_cacheCapacity - m_cache.getCount();
if (dataSize - delta < m_cacheCapacity / K)
{
m_cache->append(data, delta);
m_cache.append(data, delta);
data += delta;
dataSize -= delta;
}
@ -842,13 +848,13 @@ void DsqlBatch::DataCache::put(const void* d, ULONG dataSize)
if (!m_space)
m_space = FB_NEW_POOL(getPool()) TempSpace(getPool(), TEMP_NAME);
const FB_UINT64 writtenBytes = m_space->write(m_used, m_cache->begin(), m_cache->getCount());
fb_assert(writtenBytes == m_cache->getCount());
m_used += m_cache->getCount();
m_cache->clear();
const FB_UINT64 writtenBytes = m_space->write(m_used, m_cache.begin(), m_cache.getCount());
fb_assert(writtenBytes == m_cache.getCount());
m_used += m_cache.getCount();
m_cache.clear();
// in a case of huge buffer write directly to tempspace
if (dataSize > m_cache->getCapacity() / K)
if (dataSize > m_cacheCapacity / K)
{
const FB_UINT64 writtenBytes = m_space->write(m_used, data, dataSize);
fb_assert(writtenBytes == dataSize);
@ -857,7 +863,7 @@ void DsqlBatch::DataCache::put(const void* d, ULONG dataSize)
}
}
m_cache->append(data, dataSize);
m_cache.append(data, dataSize);
}
void DsqlBatch::DataCache::align(ULONG alignment)
@ -873,16 +879,14 @@ void DsqlBatch::DataCache::align(ULONG alignment)
void DsqlBatch::DataCache::done()
{
fb_assert(m_cache);
if (m_cache->getCount() && m_used)
if (m_cache.getCount() && m_used)
{
fb_assert(m_space);
const FB_UINT64 writtenBytes = m_space->write(m_used, m_cache->begin(), m_cache->getCount());
fb_assert(writtenBytes == m_cache->getCount());
m_used += m_cache->getCount();
m_cache->clear();
const FB_UINT64 writtenBytes = m_space->write(m_used, m_cache.begin(), m_cache.getCount());
fb_assert(writtenBytes == m_cache.getCount());
m_used += m_cache.getCount();
m_cache.clear();
}
}
@ -891,26 +895,26 @@ ULONG DsqlBatch::DataCache::get(UCHAR** buffer)
if (m_used > m_got)
{
// get data from tempspace
ULONG dlen = m_cache->getCount();
ULONG delta = m_cache->getCapacity() - dlen;
ULONG dlen = m_cache.getCount();
ULONG delta = m_cacheCapacity - dlen;
if (delta > m_used - m_got)
delta = m_used - m_got;
UCHAR* buf = m_cache->getBuffer(dlen + delta);
UCHAR* buf = m_cache.getBuffer(dlen + delta);
buf += dlen;
const FB_UINT64 readBytes = m_space->read(m_got, buf, delta);
fb_assert(readBytes == delta);
m_got += delta;
}
if (m_cache->getCount())
if (m_cache.getCount())
{
if (m_shift)
m_cache->removeCount(0, m_shift);
m_cache.removeCount(0, m_shift);
// return buffer full of data
*buffer = m_cache->begin();
*buffer = m_cache.begin();
fb_assert(intptr_t(*buffer) % FB_ALIGNMENT == 0);
return m_cache->getCount();
return m_cache.getCount();
}
// no more data
@ -926,9 +930,9 @@ ULONG DsqlBatch::DataCache::reget(ULONG remains, UCHAR** buffer, ULONG alignment
a = alignment - a;
remains += a;
}
fb_assert(remains < m_cache->getCount());
fb_assert(remains < m_cache.getCount());
m_cache->removeCount(0, m_cache->getCount() - remains);
m_cache.removeCount(0, m_cache.getCount() - remains);
ULONG size = get(buffer);
size -= a;
*buffer += a;
@ -949,25 +953,25 @@ void DsqlBatch::DataCache::remained(ULONG size, ULONG alignment)
}
if (!size)
m_cache->clear();
m_cache.clear();
else
m_cache->removeCount(0, m_cache->getCount() - size);
m_cache.removeCount(0, m_cache.getCount() - size);
m_shift = alignment;
}
ULONG DsqlBatch::DataCache::getSize() const
{
if(!m_cache)
if (!m_cacheCapacity)
return 0;
fb_assert((MAX_ULONG - 1) - m_used > m_cache->getCount());
return m_used + m_cache->getCount();
fb_assert((MAX_ULONG - 1) - m_used > m_cache.getCount());
return m_used + m_cache.getCount();
}
void DsqlBatch::DataCache::clear()
{
m_cache->clear();
m_cache.clear();
if (m_space && m_used)
m_space->releaseSpace(0, m_used);
m_used = m_got = m_shift = 0;

View File

@ -107,11 +107,11 @@ private:
{
public:
DataCache(MemoryPool& p)
: PermanentStorage(p),
m_used(0), m_got(0), m_limit(0), m_shift(0)
: PermanentStorage(p), m_cache(getPool()),
m_used(0), m_got(0), m_limit(0), m_shift(0), m_cacheCapacity(0)
{ }
void setBuf(ULONG size);
void setBuf(ULONG size, ULONG cacheCapacity);
void put(const void* data, ULONG dataSize);
void put3(const void* data, ULONG dataSize, ULONG offset);
@ -124,10 +124,10 @@ private:
void clear();
private:
typedef Firebird::Vector<UCHAR, DsqlBatch::RAM_BATCH, SINT64> Cache;
Firebird::AutoPtr<Cache> m_cache;
typedef Firebird::Array<UCHAR> Cache;
Cache m_cache;
Firebird::AutoPtr<TempSpace> m_space;
ULONG m_used, m_got, m_limit, m_shift;
ULONG m_used, m_got, m_limit, m_shift, m_cacheCapacity;
};
struct BlobMeta

View File

@ -603,15 +603,16 @@ void DsqlCompilerScratch::clearCTEs()
cteAliases.clear();
}
// Look for unused CTEs and issue a warning about its presence. Also, make DSQL
// pass of every found unused CTE to check all references and initialize input
// parameters. Note, when passing some unused CTE which refers to another unused
// (by the main query) CTE, "unused" flag of the second one is cleared. Therefore
// Look for unused CTEs and issue a warning about its presence. Also, make DSQL
// pass of every found unused CTE to check all references and initialize input
// parameters. Note, when passing some unused CTE which refers to another unused
// (by the main query) CTE, "unused" flag of the second one is cleared. Therefore
// names is collected in separate step.
void DsqlCompilerScratch::checkUnusedCTEs()
{
bool sqlWarn = false;
FB_SIZE_T i;
for (i = 0; i < ctes.getCount(); ++i)
{
SelectExprNode* cte = ctes[i];
@ -623,6 +624,7 @@ void DsqlCompilerScratch::checkUnusedCTEs()
ERRD_post_warning(Arg::Warning(isc_sqlwarn) << Arg::Num(-104));
sqlWarn = true;
}
ERRD_post_warning(Arg::Warning(isc_dsql_cte_not_used) << cte->alias);
}
}

View File

@ -6371,6 +6371,7 @@ dsc* FieldNode::execute(thread_db* tdbb, jrd_req* request) const
if (format &&
record->getFormat()->fmt_version != format->fmt_version &&
fieldId < format->fmt_desc.getCount() &&
!format->fmt_desc[fieldId].isUnknown() &&
!DSC_EQUIV(&impure->vlu_desc, &format->fmt_desc[fieldId], true))
{
dsc desc = impure->vlu_desc;
@ -7341,7 +7342,15 @@ bool LiteralNode::sameAs(CompilerScratch* csb, const ExprNode* other, bool ignor
fb_assert(otherNode);
thread_db* tdbb = JRD_get_thread_data();
return !MOV_compare(tdbb, &litDesc, &otherNode->litDesc);
try
{
return MOV_compare(tdbb, &litDesc, &otherNode->litDesc) == 0;
}
catch (const status_exception&)
{
fb_utils::init_status(tdbb->tdbb_status_vector);
return false;
}
}
ValueExprNode* LiteralNode::pass2(thread_db* tdbb, CompilerScratch* csb)
@ -7722,6 +7731,7 @@ void DerivedFieldNode::setParameterName(dsql_par* parameter) const
const RecordKeyNode* dbKeyNode = NULL;
const DerivedFieldNode* drvField = nodeAs<DerivedFieldNode>(value);
while (drvField)
{
if (fieldNode = nodeAs<FieldNode>(drvField->value))
@ -7731,7 +7741,7 @@ void DerivedFieldNode::setParameterName(dsql_par* parameter) const
break;
drvField = nodeAs<DerivedFieldNode>(drvField->value);
};
}
if (fieldNode || (fieldNode = nodeAs<FieldNode>(value)))
{
@ -12289,37 +12299,74 @@ DmlNode* ValueIfNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
MissingBoolNode* missing = nodeAs<MissingBoolNode>(node->condition);
if (missing)
{
StmtExprNode* missingCond = nodeAs<StmtExprNode>(missing->arg);
if (!missingCond)
StmtExprNode* stmtExpr = nodeAs<StmtExprNode>(missing->arg);
if (!stmtExpr)
return node;
CompoundStmtNode* stmt = nodeAs<CompoundStmtNode>(missingCond->stmt);
DeclareVariableNode* declStmt = NULL;
bool firstAssign = true;
AssignmentNode* assignStmt;
Array<USHORT> nullVariables;
if (stmt)
do
{
if (stmt->statements.getCount() != 2 ||
!(declStmt = nodeAs<DeclareVariableNode>(stmt->statements[0])) ||
!(assignStmt = nodeAs<AssignmentNode>(stmt->statements[1])))
CompoundStmtNode* stmt = nodeAs<CompoundStmtNode>(stmtExpr->stmt);
VariableNode* var = NULL;
if (stmt)
{
DeclareVariableNode* declStmt;
if (stmt->statements.getCount() != 2 ||
!(declStmt = nodeAs<DeclareVariableNode>(stmt->statements[0])) ||
!(assignStmt = nodeAs<AssignmentNode>(stmt->statements[1])) ||
!(var = nodeAs<VariableNode>(assignStmt->asgnTo)) ||
var->varId != declStmt->varId)
{
return node;
}
}
else if (!(assignStmt = nodeAs<AssignmentNode>(stmtExpr->stmt)) ||
!(var = nodeAs<VariableNode>(assignStmt->asgnTo)))
{
return node;
}
}
else if (!(assignStmt = nodeAs<AssignmentNode>(missingCond->stmt)))
return node;
VariableNode* var = nodeAs<VariableNode>(node->falseValue);
VariableNode* var2 = nodeAs<VariableNode>(assignStmt->asgnTo);
nullVariables.add(var->varId);
if (!var || !var2 || var->varId != var2->varId || (declStmt && declStmt->varId != var->varId))
return node;
if (firstAssign)
{
firstAssign = false;
VariableNode* var2 = nodeAs<VariableNode>(node->falseValue);
if (!var2 || var->varId != var2->varId)
return node;
}
stmtExpr = nodeAs<StmtExprNode>(assignStmt->asgnFrom);
} while (stmtExpr);
CoalesceNode* coalesceNode = FB_NEW_POOL(pool) CoalesceNode(pool);
coalesceNode->args = FB_NEW_POOL(pool) ValueListNode(pool, 2);
coalesceNode->args->items[0] = assignStmt->asgnFrom;
coalesceNode->args->items[1] = node->trueValue;
// Variables known to be NULL may be removed from the coalesce. This is not only an optimization!
// If not removed, error will happen as they correspondents declare nodes were removed.
if (CoalesceNode* subCoalesceNode = nodeAs<CoalesceNode>(node->trueValue))
{
NestValueArray& childItems = subCoalesceNode->args->items;
for (int i = childItems.getCount() - 1; i >= 0; --i)
{
if (VariableNode* childVar = nodeAs<VariableNode>(childItems[i]))
{
if (nullVariables.exist(childVar->varId))
childItems.remove(i);
}
}
}
return coalesceNode;
}

View File

@ -271,7 +271,7 @@ private:
clause = value;
}
template <typename T, typename Delete>
template <typename T, template <typename C> class Delete>
void setClause(Firebird::AutoPtr<T, Delete>& clause, const char* duplicateMsg, T* value)
{
checkDuplicateClause(clause, duplicateMsg);

View File

@ -2136,7 +2136,7 @@ const StmtNode* DeclareVariableNode::execute(thread_db* tdbb, jrd_req* request,
{
impure_value* variable = request->getImpure<impure_value>(impureOffset);
variable->vlu_desc = varDesc;
variable->vlu_desc.dsc_flags = 0;
variable->vlu_desc.clearFlags();
if (variable->vlu_desc.dsc_dtype <= dtype_varying)
{
@ -3384,7 +3384,7 @@ void ExecStatementNode::genBlr(DsqlCompilerScratch* dsqlScratch)
}
// If no new features of EXECUTE STATEMENT are used, lets generate old BLR.
if (!dataSource && !userName && !password && !role && !useCallerPrivs && !inputs &&
if (!dataSource && !userName && !password && !role && !useCallerPrivs && !inputs &&
traScope == EDS::traNotSet)
{
if (outputs)

View File

@ -5491,7 +5491,7 @@ with_list
$$ = newNode<WithClause>();
$$->add($1);
}
| with_list ',' with_item
| with_list ',' with_item
{
$$ = $1;
$$->add($3);

View File

@ -2741,7 +2741,7 @@ static void pass1_union_auto_cast(DsqlCompilerScratch* dsqlScratch, ExprNode* in
// When a cast is created we're losing our fieldname, thus
// create an alias to keep it.
const ValueExprNode* name_node = select_item;
ValueExprNode* name_node = select_item;
const DsqlMapNode* mapNode;
while ((mapNode = nodeAs<DsqlMapNode>(name_node)))
@ -2759,6 +2759,13 @@ static void pass1_union_auto_cast(DsqlCompilerScratch* dsqlScratch, ExprNode* in
*tdbb->getDefaultPool(), fieldNode->dsqlField->fld_name, NULL);
// The alias value will be assigned a bit later.
}
else if ((derivedField = nodeAs<DerivedFieldNode>(name_node)))
{
// Create new node for alias and copy fieldname.
newAliasNode = FB_NEW_POOL(*tdbb->getDefaultPool()) DsqlAliasNode(
*tdbb->getDefaultPool(), derivedField->name, NULL);
// The alias value will be assigned a bit later.
}
}
dsql_fld* field = castNode->dsqlField;

View File

@ -340,6 +340,7 @@ FB_UDR_BEGIN_FUNCTION(UC_isLeapYear)
out->resultNull = true;
return;
}
const int ly = in->val.date.getYear(master->getUtilInterface());
out->result = ((ly % 4 == 0 && ly % 100 != 0) || ly % 400 == 0) ? FB_TRUE : FB_FALSE;
out->resultNull = false;

View File

@ -14,13 +14,13 @@ create function frac (
create function dow (
val timestamp
) returns varchar(14) collate none
) returns varchar(14) character set ascii
external name 'udf_compat!UC_dow'
engine udr;
create function sdow (
val timestamp
) returns varchar(4) collate none
) returns varchar(4) character set ascii
external name 'udf_compat!UC_sdow'
engine udr;

View File

@ -1075,10 +1075,9 @@ static void gen_blob_open( const act* action, USHORT column)
endp(column);
if (gpreGlob.sw_auto)
column -= INDENT;
set_sqlcode(action, column);
if (action->act_type == ACT_blob_create)
{
printa(column, "if (!SQLCODE)");
printa(column, "if (!(%s->getErrors() & Firebird::IStatus::STATE_ERRORS))", global_status_name);
align(column + INDENT);
fprintf(gpreGlob.out_file, "%s = %s;", reference->ref_value, s);
}
@ -2235,6 +2234,8 @@ static void gen_finish( const act* action, int column)
db = ready->rdy_database;
printa(column, "%s->detach(%s);",
db->dbb_name->sym_string, status_vector(action));
success(column, true, status_vector(action));
printa(column + INDENT, "%s = 0;", db->dbb_name->sym_string);
}
// no hanbdles, so we finish all known databases
@ -2250,6 +2251,8 @@ static void gen_finish( const act* action, int column)
printa(column, "if (%s)", db->dbb_name->sym_string);
printa(column + INDENT, "%s->detach(%s);",
db->dbb_name->sym_string, status_vector(action));
success(column, true, status_vector(action));
printa(column + INDENT, "%s = 0;", db->dbb_name->sym_string);
}
}
@ -3357,8 +3360,6 @@ static void gen_t_start( const act* action, int column)
printa(column, "}\t\t// end fbComponents scope\n");
}
set_sqlcode(action, column);
}
@ -3435,9 +3436,10 @@ static void gen_trans( const act* action, int column)
(action->act_type == ACT_commit) ?
"commit" : (action->act_type == ACT_rollback) ? "rollback" : "prepare",
status_vector(action));
success(column, true, status_vector(action));
printa(column + INDENT, "%s = 0;", tranText);
break;
}
set_sqlcode(action, column);
}

View File

@ -348,7 +348,7 @@
#define isc_info_svc_capabilities 57 /* Retrieves a bitmask representing the server's capabilities */
#define isc_info_svc_user_dbpath 58 /* Retrieves the path to the security database in use by the server */
#define isc_info_svc_get_env 59 /* Retrieves the setting of $FIREBIRD */
#define isc_info_svc_get_env_lock 60 /* Retrieves the setting of $FIREBIRD_LCK */
#define isc_info_svc_get_env_lock 60 /* Retrieves the setting of $FIREBIRD_LOCK */
#define isc_info_svc_get_env_msg 61 /* Retrieves the setting of $FIREBIRD_MSG */
#define isc_info_svc_line 62 /* Retrieves 1 line of service output per call */
#define isc_info_svc_to_eof 63 /* Retrieves as much of the server output as will fit in the supplied buffer */

View File

@ -206,6 +206,9 @@
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1

View File

@ -212,6 +212,9 @@
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1

View File

@ -206,6 +206,9 @@
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1

View File

@ -206,6 +206,9 @@
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1

View File

@ -152,18 +152,9 @@ public:
}
private:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnew-returns-null"
#endif
// These operators are off-limits
void* operator new(size_t) { return 0; }
void* operator new[](size_t) { return 0; }
#ifdef __clang__
#pragma clang diagnostic pop
#endif
void* operator new(size_t);
void* operator new[](size_t);
};
template<typename RPT, BlockType BLOCK_TYPE = type_unknown>
@ -191,32 +182,14 @@ public:
}
private:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnew-returns-null"
#endif
// These operations are not supported on static repeat-base objects
void* operator new[](size_t /*s*/, MemoryPool& /*p*/)
{
return 0;
}
void operator delete[](void* /*mem*/, MemoryPool& /*p*/)
{
}
void operator delete[](void* /*mem*/)
{
}
void* operator new[](size_t /*s*/, MemoryPool& /*p*/);
void operator delete[](void* /*mem*/, MemoryPool& /*p*/);
void operator delete[](void* /*mem*/);
// These operators are off-limits
void* operator new(size_t) { return 0; }
void* operator new[](size_t) { return 0; }
#ifdef __clang__
#pragma clang diagnostic pop
#endif
void* operator new(size_t);
void* operator new[](size_t);
};
#endif // INCLUDE_FB_BLK

View File

@ -125,6 +125,7 @@ typedef void (*ErrorFunction) (const Firebird::Arg::StatusVector& v);
typedef void (*FPTR_ERROR) (ISC_STATUS, ...);
typedef ULONG RCRD_OFFSET;
typedef ULONG RCRD_LENGTH;
typedef USHORT FLD_LENGTH;
/* CVC: internal usage. I suspect the only reason to return int is that
vmslock.cpp:LOCK_convert() calls VMS' sys$enq that may require this signature,

View File

@ -514,15 +514,15 @@ interface Pipe : ReferenceCounted
interface Request : ReferenceCounted
{
void receive(Status status, int level, uint msgType,
uint length, uchar* message);
uint length, void* message);
void send(Status status, int level, uint msgType,
uint length, const uchar* message);
uint length, const void* message);
void getInfo(Status status, int level,
uint itemsLength, const uchar* items,
uint bufferLength, uchar* buffer);
void start(Status status, Transaction tra, int level);
void startAndSend(Status status, Transaction tra, int level, uint msgType,
uint length, const uchar* message);
uint length, const void* message);
void unwind(Status status, int level);
void free(Status status);
}
@ -599,6 +599,7 @@ version: // 3.0 => 4.0
// Batch API
Batch createBatch(Status status, Transaction transaction, uint stmtLength, const string sqlStmt,
uint dialect, MessageMetadata inMetadata, uint parLength, const uchar* par);
/*
Pipe createPipe(Status status, uint stmtLength, const string sqlStmt, uint dialect,
Transaction transaction, MessageMetadata inMetadata, void* inBuffer,

View File

@ -1931,11 +1931,11 @@ namespace Firebird
public:
struct VTable : public IReferenceCounted::VTable
{
void (CLOOP_CARG *receive)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, unsigned char* message) throw();
void (CLOOP_CARG *send)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const unsigned char* message) throw();
void (CLOOP_CARG *receive)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) throw();
void (CLOOP_CARG *send)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) throw();
void (CLOOP_CARG *getInfo)(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw();
void (CLOOP_CARG *start)(IRequest* self, IStatus* status, ITransaction* tra, int level) throw();
void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) throw();
void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) throw();
void (CLOOP_CARG *unwind)(IRequest* self, IStatus* status, int level) throw();
void (CLOOP_CARG *free)(IRequest* self, IStatus* status) throw();
};
@ -1953,14 +1953,14 @@ namespace Firebird
public:
static const unsigned VERSION = 3;
template <typename StatusType> void receive(StatusType* status, int level, unsigned msgType, unsigned length, unsigned char* message)
template <typename StatusType> void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->receive(this, status, level, msgType, length, message);
StatusType::checkException(status);
}
template <typename StatusType> void send(StatusType* status, int level, unsigned msgType, unsigned length, const unsigned char* message)
template <typename StatusType> void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->send(this, status, level, msgType, length, message);
@ -1981,7 +1981,7 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message)
template <typename StatusType> void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->startAndSend(this, status, tra, level, msgType, length, message);
@ -9402,7 +9402,7 @@ namespace Firebird
this->cloopVTable = &vTable;
}
static void CLOOP_CARG cloopreceiveDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, unsigned char* message) throw()
static void CLOOP_CARG cloopreceiveDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) throw()
{
StatusType status2(status);
@ -9416,7 +9416,7 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopsendDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const unsigned char* message) throw()
static void CLOOP_CARG cloopsendDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) throw()
{
StatusType status2(status);
@ -9458,7 +9458,7 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopstartAndSendDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) throw()
static void CLOOP_CARG cloopstartAndSendDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) throw()
{
StatusType status2(status);
@ -9539,11 +9539,11 @@ namespace Firebird
{
}
virtual void receive(StatusType* status, int level, unsigned msgType, unsigned length, unsigned char* message) = 0;
virtual void send(StatusType* status, int level, unsigned msgType, unsigned length, const unsigned char* message) = 0;
virtual void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message) = 0;
virtual void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message) = 0;
virtual void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0;
virtual void start(StatusType* status, ITransaction* tra, int level) = 0;
virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) = 0;
virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) = 0;
virtual void unwind(StatusType* status, int level) = 0;
virtual void free(StatusType* status) = 0;
};

View File

@ -905,6 +905,7 @@ static const struct {
{"map_overflow", 335545201},
{"hdr_overflow", 335545202},
{"vld_plugins", 335545203},
{"db_crypt_key", 335545204},
{"gfix_db_name", 335740929},
{"gfix_invalid_sw", 335740930},
{"gfix_incmp_sw", 335740932},

View File

@ -939,6 +939,7 @@ const ISC_STATUS isc_map_event = 335545200L;
const ISC_STATUS isc_map_overflow = 335545201L;
const ISC_STATUS isc_hdr_overflow = 335545202L;
const ISC_STATUS isc_vld_plugins = 335545203L;
const ISC_STATUS isc_db_crypt_key = 335545204L;
const ISC_STATUS isc_gfix_db_name = 335740929L;
const ISC_STATUS isc_gfix_invalid_sw = 335740930L;
const ISC_STATUS isc_gfix_incmp_sw = 335740932L;
@ -1413,7 +1414,7 @@ const ISC_STATUS isc_trace_switch_user_only = 337182757L;
const ISC_STATUS isc_trace_switch_param_miss = 337182758L;
const ISC_STATUS isc_trace_param_act_notcompat = 337182759L;
const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L;
const ISC_STATUS isc_err_max = 1357;
const ISC_STATUS isc_err_max = 1358;
#else /* c definitions */
@ -2322,6 +2323,7 @@ const ISC_STATUS isc_err_max = 1357;
#define isc_map_overflow 335545201L
#define isc_hdr_overflow 335545202L
#define isc_vld_plugins 335545203L
#define isc_db_crypt_key 335545204L
#define isc_gfix_db_name 335740929L
#define isc_gfix_invalid_sw 335740930L
#define isc_gfix_incmp_sw 335740932L
@ -2796,7 +2798,7 @@ const ISC_STATUS isc_err_max = 1357;
#define isc_trace_switch_param_miss 337182758L
#define isc_trace_param_act_notcompat 337182759L
#define isc_trace_mandatory_switch_miss 337182760L
#define isc_err_max 1357
#define isc_err_max 1358
#endif

View File

@ -908,6 +908,7 @@ Data source : @4"}, /* eds_statement */
{335545201, "Global mapping memory overflow"}, /* map_overflow */
{335545202, "Header page overflow - too many clumplets on it"}, /* hdr_overflow */
{335545203, "No matching client/server authentication plugins configured for execute statement in embedded datasource"}, /* vld_plugins */
{335545204, "Missing database encryption key for your attachment"}, /* db_crypt_key */
{335740929, "data base file name (@1) already given"}, /* gfix_db_name */
{335740930, "invalid switch @1"}, /* gfix_invalid_sw */
{335740932, "incompatible switch combination"}, /* gfix_incmp_sw */

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