mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Merge remote-tracking branch 'origin/master' into fix_trusted_ddl
This commit is contained in:
commit
c9ac330a96
37
.github/workflows/tzdata-update.yml
vendored
Normal file
37
.github/workflows/tzdata-update.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: tzdata-update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 11 * * *'
|
||||
|
||||
jobs:
|
||||
tzdata-update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout ICU
|
||||
run: git clone --depth 1 https://github.com/unicode-org/icu-data.git -b master /tmp/icu-checkout
|
||||
|
||||
- name: Check and update
|
||||
run: |
|
||||
VERSION=`ls /tmp/icu-checkout/tzdata/icunew/ -r1a |head -1`
|
||||
echo Last version: $VERSION
|
||||
|
||||
if [ "$VERSION" == "`cat extern/icu/tzdata/version.txt`" ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo $VERSION > extern/icu/tzdata/version.txt
|
||||
extern/icu/tzdata/update.sh
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Updata tzdata.
|
||||
title: Updata tzdata.
|
||||
assignees: asfernandes
|
||||
branch: work/tzdata-update
|
@ -18,7 +18,7 @@ d none @prefix@ 0751 firebird firebird
|
||||
|
||||
v CONFIG.prsv @prefix@/security2.fdb=$SRCDIR/security2.fdb 0660 firebird firebird
|
||||
v CONFIG.prsv @prefix@/firebird.conf=$SRCDIR/misc/firebird.conf 0444 firebird firebird
|
||||
v CONFIG.prsv @prefix@/databases.conf=$SRCDIR/../../builds/install/misc/databases.conf.in 0444 firebird firebird
|
||||
v CONFIG.prsv @prefix@/databases.conf=$SRCDIR/../../builds/install/misc/databases.conf 0444 firebird firebird
|
||||
v CONFIG.prsv @prefix@/intl/fbintl.conf=$SRCDIR/misc/fbintl.conf 0644 firebird firebird
|
||||
f none @prefix@/CHANGELOG.md=$SRCDIR/../../CHANGELOG.md 0644 firebird firebird
|
||||
f none @prefix@/README.md=$SRCDIR/../../README.md 0644 firebird firebird
|
||||
|
@ -18,7 +18,7 @@ d none @prefix@ 0755 firebird firebird
|
||||
|
||||
v CONFIG.prsv @prefix@/security2.fdb=$SRCDIR/security2.fdb 0660 firebird firebird
|
||||
v CONFIG.prsv @prefix@/firebird.conf=$SRCDIR/misc/firebird.conf 0644 firebird firebird
|
||||
v CONFIG.prsv @prefix@/databases.conf=$SRCDIR/../../builds/install/misc/databases.conf.in 0544 firebird firebird
|
||||
v CONFIG.prsv @prefix@/databases.conf=$SRCDIR/../../builds/install/misc/databases.conf 0544 firebird firebird
|
||||
v CONFIG.prsv @prefix@/intl/fbintl.conf=$SRCDIR/misc/fbintl.conf 0644 firebird firebird
|
||||
f none @prefix@/CHANGELOG.md=$SRCDIR/../../CHANGELOG.md 0644 firebird firebird
|
||||
f none @prefix@/README.md=$SRCDIR/../../README.md 0644 firebird firebird
|
||||
|
@ -1,2 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=http://www.firebirdsql.org/afterinstall/$MAJOR$MINOR$RELEASE
|
||||
URL=http://www.firebirdsql.org/afterinstall/{#FB_MAJOR_VER}{#FB_MINOR_VER}{#FB_REV_NO}
|
||||
|
@ -22,6 +22,8 @@
|
||||
::============================================================================
|
||||
|
||||
:SET_PARAMS
|
||||
::=========
|
||||
|
||||
@echo off
|
||||
:: reset ERRLEV to clear error from last run in same cmd shell
|
||||
set ERRLEV=0
|
||||
@ -35,21 +37,6 @@ set FBBUILD_ISX_PACK=0
|
||||
|
||||
if not defined FB2_SNAPSHOT (set FB2_SNAPSHOT=0)
|
||||
|
||||
:: Set our package number at 0 and increment every
|
||||
:: time we rebuild in a single session
|
||||
if not defined FBBUILD_PACKAGE_NUMBER (
|
||||
set FBBUILD_PACKAGE_NUMBER=0
|
||||
) else (
|
||||
set /A FBBUILD_PACKAGE_NUMBER+=1
|
||||
)
|
||||
@echo Setting FBBUILD_PACKAGE_NUMBER to %FBBUILD_PACKAGE_NUMBER%
|
||||
|
||||
::If a suffix is defined (usually for an RC) ensure it is prefixed correctly.
|
||||
if defined FBBUILD_FILENAME_SUFFIX (
|
||||
if not "%FBBUILD_FILENAME_SUFFIX:~0,1%"=="_" (
|
||||
(set FBBUILD_FILENAME_SUFFIX=_%FBBUILD_FILENAME_SUFFIX%)
|
||||
)
|
||||
)
|
||||
|
||||
:: See what we have on the command line
|
||||
|
||||
@ -61,39 +48,12 @@ for %%v in ( %* ) do (
|
||||
( if /I "%%v"=="ALL" ( (set FBBUILD_ZIP_PACK=1) & (set FBBUILD_ISX_PACK=1) ) )
|
||||
)
|
||||
|
||||
:: Now check whether we are debugging the InnoSetup script
|
||||
|
||||
@if %FB2_ISS_DEBUG% equ 0 (@set ISS_BUILD_TYPE=iss_release) else (@set ISS_BUILD_TYPE=iss_debug)
|
||||
@if %FB2_ISS_DEBUG% equ 0 (@set ISS_COMPRESS=compression) else (@set ISS_COMPRESS=nocompression)
|
||||
|
||||
(@set ISS_EXAMPLES=examples)
|
||||
@if %FB2_ISS_DEBUG% equ 1 (
|
||||
@if %FB2_EXAMPLES% equ 0 (@set ISS_EXAMPLES=noexamples)
|
||||
)
|
||||
|
||||
::Are we doing a snapshot build? If so we always do less work.
|
||||
if "%FB2_SNAPSHOT%"=="1" (
|
||||
(set FB_ISS_EXAMPLES=noexamples)
|
||||
(set FBBUILD_ISX_PACK=0)
|
||||
)
|
||||
|
||||
|
||||
:: Set up our final destination
|
||||
set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
|
||||
if not exist %FBBUILD_INSTALL_IMAGES% (mkdir %FBBUILD_INSTALL_IMAGES%)
|
||||
|
||||
|
||||
|
||||
:: Determine Product Status
|
||||
set FBBUILD_PROD_STATUS=
|
||||
@type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I UNSTABLE > nul && (
|
||||
set FBBUILD_PROD_STATUS=DEV) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I ALPHA > nul && (
|
||||
set FBBUILD_PROD_STATUS=DEV) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I BETA > nul && (
|
||||
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I "Release Candidate" > nul && (
|
||||
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr "RC" > nul && (
|
||||
set FBBUILD_PROD_STATUS=PROD) || type %FB_ROOT_PATH%\src\jrd\build_no.h | findstr /I "Final" > nul && (
|
||||
set FBBUILD_PROD_STATUS=PROD)
|
||||
|
||||
::End of SET_PARAMS
|
||||
::-----------------
|
||||
@goto :EOF
|
||||
@ -110,6 +70,19 @@ set FBBUILD_PROD_STATUS=PROD)
|
||||
@echo o Checking for unix2dos...
|
||||
(cmd /c "unix2dos.exe --version 2>&1 | findstr version > nul" ) || ( call :ERROR Could not locate unix2dos && @goto :EOF )
|
||||
|
||||
@for /f "usebackq tokens=*" %%c in (`where /f touch 2^>nul`) do set TOUCH_COMMAND=%%c
|
||||
if defined TOUCH_COMMAND (
|
||||
@%TOUCH_COMMAND% --version <nul >nul 2>nul
|
||||
if not errorlevel 1 (
|
||||
@echo o POSIX touch utility found at %TOUCH_COMMAND%
|
||||
) else ( @set TOUCH_COMMAND= )
|
||||
)
|
||||
|
||||
@for /f "usebackq tokens=*" %%c in (`where /f md5sum 2^>nul`) do set MD5_COMMAND=%%c
|
||||
if defined MD5_COMMAND (
|
||||
@echo o POSIX md5sum utility found at %MD5_COMMAND%
|
||||
)
|
||||
|
||||
if %FBBUILD_ZIP_PACK% EQU 1 (
|
||||
if not defined SEVENZIP (
|
||||
call :ERROR SEVENZIP environment variable is not defined.
|
||||
@ -117,33 +90,40 @@ if %FBBUILD_ZIP_PACK% EQU 1 (
|
||||
) else (@echo o Compression utility found.)
|
||||
)
|
||||
|
||||
if %FBBUILD_ISX_PACK% NEQ 1 goto :SKIP_INNO
|
||||
|
||||
if %FBBUILD_ISX_PACK% EQU 1 (
|
||||
if NOT DEFINED INNO5_SETUP_PATH (
|
||||
call :ERROR INNO5_SETUP_PATH variable not defined
|
||||
@goto :EOF
|
||||
) else (
|
||||
@echo o Inno Setup found at %INNO5_SETUP_PATH%.
|
||||
)
|
||||
if defined INNO5_SETUP_PATH (
|
||||
set ISCC_COMMAND=%INNO5_SETUP_PATH%\iscc.exe
|
||||
)
|
||||
:: If the environment variable is not set let's search in PATH
|
||||
if not defined ISCC_COMMAND (
|
||||
@for /f "usebackq tokens=*" %%c in (`where /f iscc 2^>nul`) do set ISCC_COMMAND=%%c
|
||||
)
|
||||
if not defined ISCC_COMMAND (
|
||||
@echo Required Inno Setup compiler not found
|
||||
@exit /b 1
|
||||
)
|
||||
@echo o Inno Setup found as %ISCC_COMMAND%.
|
||||
|
||||
:SKIP_INNO
|
||||
|
||||
if not defined WIX (
|
||||
call :ERROR WIX not defined. WiX is needed to build the MSI kits of the CRT runtimes.
|
||||
@goto :EOF
|
||||
@echo.
|
||||
@echo The WIX environment var not defined.
|
||||
@echo WiX is needed to build the MSI kits of the CRT runtimes.
|
||||
@echo.
|
||||
) else (
|
||||
@echo o WiX found at "%WIX%".
|
||||
)
|
||||
|
||||
if not DEFINED FB_EXTERNAL_DOCS (
|
||||
if not defined FB_EXTERNAL_DOCS (
|
||||
@echo.
|
||||
@echo The FB_EXTERNAL_DOCS environment var is not defined
|
||||
@echo It should point to the directory containing the relevant release notes
|
||||
@echo in adobe pdf format.
|
||||
@echo.
|
||||
@echo Subsequent script execution will be cancelled.
|
||||
@echo.
|
||||
cancel_script > nul 2>&1
|
||||
goto :EOF
|
||||
) else (
|
||||
@echo o Package will include documentation from "%FB_EXTERNAL_DOCS%".
|
||||
)
|
||||
|
||||
|
||||
@ -152,94 +132,69 @@ if not DEFINED FB_EXTERNAL_DOCS (
|
||||
@goto :EOF
|
||||
|
||||
|
||||
:SED_MAGIC
|
||||
:: Do some sed magic to make sure that the final product
|
||||
:: includes the version string in the filename.
|
||||
:: If the Firebird Unix tools for Win32 aren't on
|
||||
:: the path this will fail! Use of the cygwin tools has not
|
||||
:: been tested and may produce unexpected results.
|
||||
::========================================================
|
||||
find "#define PRODUCT_VER_STRING" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
|
||||
sed -n -e s/\"//g -e s/"#define PRODUCT_VER_STRING "//w%temp%.\b$2.txt %temp%.\b$1.txt
|
||||
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FBBUILD_PRODUCT_VER_STRING=%%a
|
||||
:SET_VERSION
|
||||
::==========
|
||||
|
||||
find "#define FB_MAJOR_VER" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
|
||||
sed -n -e s/\"//g -e s/"#define FB_MAJOR_VER "//w%temp%.\b$2.txt %temp%.\b$1.txt
|
||||
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_MAJOR_VER=%%a
|
||||
:: Cut off everything that is not #define to let Inno Setup use it
|
||||
findstr /B /L "#define" "%FB_ROOT_PATH%\src\jrd\build_no.h" >"%FB_ROOT_PATH%\gen\jrd\build_no.h"
|
||||
:: Read version parameters from build_no.h
|
||||
for /F "tokens=2*" %%a in (%FB_ROOT_PATH%\gen\jrd\build_no.h) do (
|
||||
@echo Setting %%a to %%~b
|
||||
SET %%a=%%~b
|
||||
)
|
||||
|
||||
find "#define FB_MINOR_VER" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
|
||||
sed -n -e s/\"//g -e s/"#define FB_MINOR_VER "//w%temp%.\b$2.txt %temp%.\b$1.txt
|
||||
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_MINOR_VER=%%a
|
||||
:: Set our package number at 0 and increment every
|
||||
:: time we rebuild in a single session
|
||||
if not defined FBBUILD_PACKAGE_NUMBER (
|
||||
set FBBUILD_PACKAGE_NUMBER=0
|
||||
) else (
|
||||
set /A FBBUILD_PACKAGE_NUMBER+=1
|
||||
)
|
||||
@echo Setting FBBUILD_PACKAGE_NUMBER to %FBBUILD_PACKAGE_NUMBER%
|
||||
|
||||
find "#define FB_REV_NO" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
|
||||
sed -n -e s/\"//g -e s/"#define FB_REV_NO "//w%temp%.\b$2.txt %temp%.\b$1.txt
|
||||
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_REV_NO=%%a
|
||||
:: If a suffix is defined (usually for an RC) ensure it is prefixed correctly.
|
||||
if defined FBBUILD_FILENAME_SUFFIX (
|
||||
if not "%FBBUILD_FILENAME_SUFFIX:~0,1%"=="_" (
|
||||
(set FBBUILD_FILENAME_SUFFIX=_%FBBUILD_FILENAME_SUFFIX%)
|
||||
)
|
||||
)
|
||||
|
||||
find "#define FB_BUILD_NO" %FB_ROOT_PATH%\src\jrd\build_no.h > %temp%.\b$1.txt
|
||||
sed -n -e s/\"//g -e s/"#define FB_BUILD_NO "//w%temp%.\b$2.txt %temp%.\b$1.txt
|
||||
for /f "tokens=*" %%a in ('type %temp%.\b$2.txt') do set FB_BUILD_NO=%%a
|
||||
:: Set up our final destination
|
||||
set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
|
||||
if not exist "%FBBUILD_INSTALL_IMAGES%" (mkdir "%FBBUILD_INSTALL_IMAGES%")
|
||||
|
||||
set FBBUILD_FILE_ID=%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%_%FB_TARGET_PLATFORM%
|
||||
:: Determine Product Status
|
||||
if %FB_BUILD_TYPE%==V (
|
||||
set FBBUILD_PROD_STATUS=PROD
|
||||
) else (
|
||||
set FBBUILD_PROD_STATUS=DEV
|
||||
)
|
||||
|
||||
::@echo s/-2.0.0-/-%FBBUILD_PRODUCT_VER_STRING%-/ > %temp%.\b$3.txt
|
||||
@echo s/define release/define %FBBUILD_BUILDTYPE%/ > %temp%.\b$3.txt
|
||||
@echo s/define no_pdb/define %FBBUILD_SHIP_PDB%/ >> %temp%.\b$3.txt
|
||||
::@echo s/define package_number=\"0\"/define package_number=\"%FBBUILD_PACKAGE_NUMBER%\"/ >> %temp%.\b$3.txt
|
||||
@echo s/define iss_release/define %ISS_BUILD_TYPE%/ >> %temp%.\b$3.txt
|
||||
@echo s/define examples/define %ISS_EXAMPLES%/ >> %temp%.\b$3.txt
|
||||
@echo s/define compression/define %ISS_COMPRESS%/ >> %temp%.\b$3.txt
|
||||
@echo s/FBBUILD_PRODUCT_VER_STRING/%FBBUILD_PRODUCT_VER_STRING%/ >> %temp%.\b$3.txt
|
||||
set FBBUILD_FILE_ID=%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%_%FB_TARGET_PLATFORM%
|
||||
|
||||
sed -f %temp%.\b$3.txt FirebirdInstall.iss > FirebirdInstall_%FBBUILD_FILE_ID%.iss
|
||||
|
||||
:: This is a better way of achieving what is done in make_all.bat, but we don't
|
||||
:: test for sed in that script.
|
||||
@sed /@UDF_COMMENT@/s/@UDF_COMMENT@/#/ < %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_OUTPUT_DIR%\firebird.conf
|
||||
|
||||
set FBBUILD_FB40_CUR_VER=%FB_MAJOR_VER%.%FB_MINOR_VER%.%FB_REV_NO%
|
||||
set FBBUILD_FB_CUR_VER=%FBBUILD_FB40_CUR_VER%
|
||||
set FBBUILD_FB_LAST_VER=%FBBUILD_FB30_CUR_VER%
|
||||
|
||||
:: Now set some version strings of our legacy releases.
|
||||
:: This helps us copy the correct documentation,
|
||||
:: as well as set up the correct shortcuts
|
||||
set FBBUILD_FB15_CUR_VER=1.5.6
|
||||
set FBBUILD_FB20_CUR_VER=2.0.7
|
||||
set FBBUILD_FB21_CUR_VER=2.1.7
|
||||
set FBBUILD_FB25_CUR_VER=2.5.8
|
||||
set FBBUILD_FB30_CUR_VER=3.0.4
|
||||
|
||||
:: Now fix up the major.minor version strings in the readme files.
|
||||
:: We place output in %FB_GEN_DIR%\readmes
|
||||
@setlocal
|
||||
@echo.
|
||||
@if not exist %FB_GEN_DIR%\readmes (@mkdir %FB_GEN_DIR%\readmes)
|
||||
@for %%d in (ba cz de es fr hu it pl pt ru si ) do (
|
||||
@if not exist %FB_GEN_DIR%\readmes\%%d (
|
||||
@mkdir %FB_GEN_DIR%\readmes\%%d
|
||||
)
|
||||
)
|
||||
|
||||
@echo s/\$MAJOR/%FB_MAJOR_VER%/g > %temp%.\b$4.txt
|
||||
@echo s/\$MINOR/%FB_MINOR_VER%/g >> %temp%.\b$4.txt
|
||||
@echo s/\$RELEASE/%FB_REV_NO%/g >> %temp%.\b$4.txt
|
||||
@echo %FBBUILD_PROD_STATUS% release. Copying Readme_%FBBUILD_PROD_STATUS%.txt Readme.txt
|
||||
@copy Readme_%FBBUILD_PROD_STATUS%.txt Readme.txt
|
||||
@for %%f in (Readme.txt installation_readme.txt After_Installation.url) do (
|
||||
set SED_COMMAND=sed -e s/\$MAJOR/%FB_MAJOR_VER%/g ^
|
||||
-e s/\$MINOR/%FB_MINOR_VER%/g ^
|
||||
-e s/\$RELEASE/%FB_REV_NO%/g
|
||||
@echo Processing version strings in Readme_%FBBUILD_PROD_STATUS%.txt
|
||||
@%SED_COMMAND% Readme_%FBBUILD_PROD_STATUS%.txt > %FB_GEN_DIR%\readmes\Readme.txt
|
||||
@for %%f in (installation_readme.txt) do (
|
||||
@echo Processing version strings in %%f
|
||||
@sed -f %temp%.\b$4.txt %%f > %FB_GEN_DIR%\readmes\%%f
|
||||
@%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
|
||||
)
|
||||
@for %%d in (ba cz de es fr hu it pl pt ru si ) do (
|
||||
@pushd %%d
|
||||
@for /F %%f in ( '@dir /B /A-D *.txt' ) do (
|
||||
@echo Processing version strings in %%d\%%f
|
||||
@sed -f %temp%.\b$4.txt %%f > %FB_GEN_DIR%\readmes\%%d\%%f
|
||||
@if not exist %FB_GEN_DIR%\readmes\%%d (@mkdir %FB_GEN_DIR%\readmes\%%d)
|
||||
@for %%f in ( %%d\*.txt ) do (
|
||||
@echo Processing version strings in %%f
|
||||
@%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
|
||||
)
|
||||
@popd
|
||||
)
|
||||
|
||||
del %temp%.\b$?.txt
|
||||
@endlocal
|
||||
|
||||
|
||||
::End of SED_MAGIC
|
||||
::End of SET_VERSION
|
||||
::----------------
|
||||
@goto :EOF
|
||||
|
||||
@ -268,14 +223,14 @@ if %MSVC_VERSION% EQU 15 (
|
||||
)
|
||||
for %%f in ( msvcp%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll vcruntime%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_0%.dll ) do (
|
||||
echo Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f"
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" %FB_OUTPUT_DIR%\
|
||||
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" %FB_OUTPUT_DIR%\ >nul
|
||||
if %ERRORLEVEL% GEQ 1 (
|
||||
call :ERROR Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION_1%.CRT\%%f" failed with error %ERRORLEVEL% ) && (goto :EOF)
|
||||
)
|
||||
)
|
||||
|
||||
@implib.exe | findstr "Borland" > nul
|
||||
@if errorlevel 0 (
|
||||
@where /Q implib.exe
|
||||
@if not errorlevel 1 (
|
||||
if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
|
||||
@echo Generating fbclient_bor.lib
|
||||
@implib %FB_OUTPUT_DIR%\lib\fbclient_bor.lib %FB_OUTPUT_DIR%\fbclient.dll > nul
|
||||
@ -325,13 +280,8 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
|
||||
@echo Copying other documentation...
|
||||
@copy %FB_GEN_DIR%\readmes\installation_readme.txt %FB_OUTPUT_DIR%\doc\installation_readme.txt > nul
|
||||
:: WhatsNew doesn't exist at the moment (Alpha1) - perhaps it will turn up later in the release cycle.
|
||||
:: In any case, if it is not an error if it doesn't exist
|
||||
@ren %FB_OUTPUT_DIR%\doc\WhatsNew %FB_OUTPUT_DIR%\doc\WhatsNew.txt
|
||||
|
||||
|
||||
:: FIX ME - we now have some .md files and ChangeLog is no longer a monster.
|
||||
:: Maybe we can just do nothing here.
|
||||
@ -342,7 +292,6 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
|
||||
:: @copy %FB_ROOT_PATH%\ChangeLog %FB_OUTPUT_DIR%\doc\ChangeLog.txt > nul
|
||||
::)
|
||||
|
||||
|
||||
@mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
|
||||
@if %ERRORLEVEL% GEQ 2 ( (call :ERROR MKDIR for doc\sql.extensions dir failed) & (@goto :EOF))
|
||||
@copy %FB_ROOT_PATH%\doc\sql.extensions\*.* %FB_OUTPUT_DIR%\doc\sql.extensions\ > nul
|
||||
@ -353,7 +302,7 @@ mkdir %FB_OUTPUT_DIR%\misc\upgrade\security 2>nul
|
||||
:: if the docs are available then we can include them.
|
||||
if defined FB_EXTERNAL_DOCS (
|
||||
@echo Copying pdf docs...
|
||||
@for %%v in ( Firebird-%FB_MAJOR_VER%.%FB_MINOR_VER%-QuickStart.pdf Firebird_v%FBBUILD_FB_CUR_VER%.ReleaseNotes.pdf ) do (
|
||||
@for %%v in ( Firebird-%FB_MAJOR_VER%.%FB_MINOR_VER%-QuickStart.pdf Firebird_v%FB_MAJOR_VER%.%FB_MINOR_VER%.%FB_REV_NO%.ReleaseNotes.pdf ) do (
|
||||
@echo ... %%v
|
||||
(@copy /Y %FB_EXTERNAL_DOCS%\%%v %FB_OUTPUT_DIR%\doc\%%v > nul) || (call :WARNING Copying %FB_EXTERNAL_DOCS%\%%v failed.)
|
||||
)
|
||||
@ -361,42 +310,46 @@ if defined FB_EXTERNAL_DOCS (
|
||||
@echo.
|
||||
)
|
||||
|
||||
@echo Cleaning irrelevant files...
|
||||
:: Clean out text notes that are either not relevant to Windows or
|
||||
:: are only of use to engine developers.
|
||||
@for %%v in ( README.makefiles README.user.embedded README.user.troubleshooting README.build.mingw.html README.build.msvc.html fb2-todo.txt cleaning-todo.txt install_win32.txt README.coding.style emacros-cross_ref.html firebird_conf.txt *.*~) do (
|
||||
@del %FB_OUTPUT_DIR%\doc\%%v 2>nul
|
||||
)
|
||||
|
||||
@echo Copy license...
|
||||
:: Add license
|
||||
for %%v in (IPLicense.txt IDPLicense.txt ) do (
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\%%v %FB_OUTPUT_DIR%\%%v > nul
|
||||
)
|
||||
|
||||
:: And readme
|
||||
@copy %FB_GEN_DIR%\readmes\readme.txt %FB_OUTPUT_DIR%\ > nul
|
||||
@copy %FB_GEN_DIR%\readmes\Readme.txt %FB_OUTPUT_DIR%\ > nul
|
||||
|
||||
:: Walk through all docs and transform any that are not .txt, .pdf or .html to .txt
|
||||
@echo Setting .txt filetype to ascii docs.
|
||||
for /R %FB_OUTPUT_DIR%\doc %%v in (.) do (
|
||||
pushd %%v
|
||||
for /F %%W in ( 'dir /B /A-D' ) do (
|
||||
if /I "%%~xW" NEQ ".txt" (
|
||||
if /I "%%~xW" NEQ ".pdf" (
|
||||
if /I "%%~xW" NEQ ".htm" (
|
||||
if /I "%%~xW" NEQ ".html" (
|
||||
ren %%W %%W.txt
|
||||
for /R %FB_OUTPUT_DIR%\doc %%v in ( * ) do (
|
||||
if /I not "%%~xv" == ".md" (
|
||||
if /I not "%%~xv" == ".txt" (
|
||||
if /I not "%%~xv" == ".pdf" (
|
||||
if /I not "%%~xv" == ".htm" (
|
||||
if /I not "%%~xv" == ".html" (
|
||||
ren %%v %%~nxv.txt
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
popd
|
||||
)
|
||||
|
||||
:: Throw away any errorlevel left hanging around
|
||||
@set | findstr win > nul
|
||||
if %FB2_SNAPSHOT% EQU 1 (
|
||||
@copy %FB_ROOT_PATH%\builds\install\arch-specific\win32\readme_snapshot.txt %FB_OUTPUT_DIR%\readme_snapshot.txt > nul
|
||||
)
|
||||
|
||||
@echo Completed copying docs.
|
||||
|
||||
:: Examples were already copied by make_examples
|
||||
|
||||
::End of COPY_XTRA
|
||||
::----------------
|
||||
@goto :EOF
|
||||
@ -426,6 +379,7 @@ if %MSVC_VERSION% EQU 15 (
|
||||
|
||||
|
||||
:INCLUDE_DIR
|
||||
::==========
|
||||
:: Prepare other files needed for deployment to /include dir
|
||||
setlocal
|
||||
:: grab some missing bits'n'pieces from different parts of the source tree
|
||||
@ -437,8 +391,8 @@ setlocal
|
||||
@echo Copying other include files required for development...
|
||||
set OUTPATH=%FB_OUTPUT_DIR%\include
|
||||
@copy %FB_ROOT_PATH%\src\yvalve\perf.h %OUTPATH%\ > nul
|
||||
@copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ && @goto :EOF )
|
||||
@xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\impl %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing @xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\* %OUTPATH%\firebird\ && @goto :EOF )
|
||||
@copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ )
|
||||
@xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\impl %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing @xcopy /e /i /y %FB_ROOT_PATH%\src\include\firebird\* %OUTPATH%\firebird\ )
|
||||
@if %ERRLEV% GEQ 1 goto :END
|
||||
|
||||
endlocal
|
||||
@ -452,7 +406,7 @@ endlocal
|
||||
:: Generate sample databases file
|
||||
::===============================
|
||||
@echo Creating sample databases.conf
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databases.conf > nul
|
||||
copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf > nul
|
||||
|
||||
::End of DB_CONF
|
||||
::-----------------
|
||||
@ -494,85 +448,40 @@ copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databa
|
||||
:: Get a list of all files in the tree make sure
|
||||
:: that and they all have windows EOL
|
||||
::===============================================
|
||||
for /F %%W in ( 'dir %FB_OUTPUT_DIR% /b /a-d /s' ) do (
|
||||
for %%X in ( txt conf sql c cpp hpp h bat pas e def rc md ) do (
|
||||
if /I "%%~xW" EQU ".%%X" ( unix2dos --u2d --safe %%W 2>nul >nul )
|
||||
)
|
||||
for /R %FB_OUTPUT_DIR% %%W in ( *.txt *.conf *.sql *.c *.cpp *.hpp *.h *.bat *.pas *.e *.def *.rc *.md *.html ) do (
|
||||
unix2dos -q --safe %%W || exit /b 1
|
||||
)
|
||||
|
||||
::End of SET_CRLF
|
||||
::-------------
|
||||
@goto :EOF
|
||||
|
||||
|
||||
:GEN_ZIP
|
||||
::======
|
||||
if %FBBUILD_ZIP_PACK% EQU 0 goto :EOF
|
||||
@echo - Generate the directory tree to be zipped
|
||||
set FBBUILD_ZIP_PACK_ROOT=%FB_ROOT_PATH%\builds\zip_pack_%FB_TARGET_PLATFORM%
|
||||
if not exist %FBBUILD_ZIP_PACK_ROOT% @mkdir %FBBUILD_ZIP_PACK_ROOT% 2>nul
|
||||
@del /s /q %FBBUILD_ZIP_PACK_ROOT%\ > nul
|
||||
::@copy /Y %FB_OUTPUT_DIR% %FBBUILD_ZIP_PACK_ROOT% > nul
|
||||
::for %%v in (doc doc\sql.extensions help include intl lib udf misc misc\upgrade\security plugins system32 ) do (
|
||||
:: @mkdir %FBBUILD_ZIP_PACK_ROOT%\%%v 2>nul
|
||||
:: @dir /b /a-d /s %FB_OUTPUT_DIR%\%%v\*.* >nul 2>nul
|
||||
:: if not ERRORLEVEL 1 @copy /Y %FB_OUTPUT_DIR%\%%v\*.* %FBBUILD_ZIP_PACK_ROOT%\%%v\ > nul
|
||||
::)
|
||||
@xcopy /Y /E /S %FB_OUTPUT_DIR% %FBBUILD_ZIP_PACK_ROOT% > nul
|
||||
|
||||
@echo - Add examples to zip tree
|
||||
@xcopy /Y /E /S %FB_OUTPUT_DIR%\examples\*.* %FBBUILD_ZIP_PACK_ROOT%\examples > nul
|
||||
::@if %FB2_EXAMPLES% equ 1 for %%v in (examples examples\api examples\build_win32 examples\dbcrypt examples\empbuild examples\include examples\interfaces examples\package examples\stat examples\udf examples\udr ) do (
|
||||
:: @mkdir %FBBUILD_ZIP_PACK_ROOT%\%%v 2>nul
|
||||
:: dir %FB_OUTPUT_DIR%\%%v\*.* > nul 2>nul
|
||||
:: if not ERRORLEVEL 1 @copy /Y %FB_OUTPUT_DIR%\%%v\*.* %FBBUILD_ZIP_PACK_ROOT%\%%v\ > nul
|
||||
::)
|
||||
|
||||
|
||||
@echo - Now remove stuff from zip tree that is not needed...
|
||||
setlocal
|
||||
set FB_RM_FILE_LIST=doc\installation_readme.txt system32\vccrt%MSVC_VERSION%_%FB_TARGET_PLATFORM%.wixpdb icudt52l_empty.dat
|
||||
for %%v in ( %FB_RM_FILE_LIST% ) do (
|
||||
@del %FBBUILD_ZIP_PACK_ROOT%\%%v > nul 2>&1
|
||||
)
|
||||
endlocal
|
||||
|
||||
if %FB2_SNAPSHOT% EQU 1 (
|
||||
@copy %FB_ROOT_PATH%\builds\install\arch-specific\win32\readme_snapshot.txt %FBBUILD_ZIP_PACK_ROOT%\readme_snapshot.txt > nul
|
||||
)
|
||||
|
||||
if not "%FBBUILD_SHIP_PDB%"=="ship_pdb" (
|
||||
@del /q %FBBUILD_ZIP_PACK_ROOT%\*.pdb > nul 2>&1
|
||||
)
|
||||
|
||||
rmdir /s /q %FBBUILD_ZIP_PACK_ROOT%\examples\build_unix
|
||||
|
||||
:: Don't grab old install notes for zip pack - document needs a complete re-write.
|
||||
::@copy %FB_ROOT_PATH%\doc\install_win32.txt %FBBUILD_ZIP_PACK_ROOT%\doc\README_installation.txt > nul
|
||||
|
||||
::End of GEN_ZIP
|
||||
::--------------
|
||||
goto :EOF
|
||||
|
||||
|
||||
:ZIP_PACK
|
||||
::=======
|
||||
if %FBBUILD_ZIP_PACK% EQU 0 goto :EOF
|
||||
if "%FBBUILD_SHIP_PDB%" == "ship_pdb" (
|
||||
if exist %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip (
|
||||
@del %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
|
||||
)
|
||||
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
|
||||
:: Forcefully disable delayed expansion because of exclamation marks in 7z switches
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
set SKIP_FILES=-x!installation_readme.txt
|
||||
|
||||
if "%FBBUILD_SHIP_PDB%" == "ship_pdb" (
|
||||
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%_pdb%FBBUILD_FILENAME_SUFFIX%.zip
|
||||
) else (
|
||||
if exist %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip (
|
||||
@del %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip
|
||||
)
|
||||
set FBBUILD_ZIPFILE=%FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_FILE_ID%%FBBUILD_FILENAME_SUFFIX%.zip
|
||||
set SKIP_FILES=%SKIP_FILES% -x!*.pdb
|
||||
)
|
||||
|
||||
@%SEVENZIP%\7z.exe a -r -tzip -mx9 %FBBUILD_ZIPFILE% %FBBUILD_ZIP_PACK_ROOT%\*.*
|
||||
@echo End of ZIP_PACK
|
||||
@echo.
|
||||
if "%FB2_EXAMPLES%" == "0" set SKIP_FILES=%SKIP_FILES% -xr-!examples
|
||||
|
||||
if exist %FBBUILD_ZIPFILE% (
|
||||
@del %FBBUILD_ZIPFILE%
|
||||
)
|
||||
|
||||
%SEVENZIP%\7z.exe a -r -tzip -mx9 %SKIP_FILES% %FBBUILD_ZIPFILE% %FB_OUTPUT_DIR%\*.*
|
||||
|
||||
endlocal
|
||||
|
||||
::End of ZIP_PACK
|
||||
::----------------
|
||||
@goto :EOF
|
||||
|
||||
@ -583,12 +492,23 @@ if "%FBBUILD_SHIP_PDB%" == "ship_pdb" (
|
||||
::While building and testing this feature might be annoying, so we don't do it.
|
||||
::==========================================================
|
||||
setlocal
|
||||
set TIMESTRING=0%PRODUCT_VER_STRING:~0,1%:0%PRODUCT_VER_STRING:~2,1%:0%PRODUCT_VER_STRING:~4,1%
|
||||
@if /I "%BUILDTYPE%"=="release" (
|
||||
(@echo Touching release build files with %TIMESTRING% timestamp) & (touch -s -D -t%TIMESTRING% %FB_OUTPUT_DIR%\*.*)
|
||||
(if %FBBUILD_ZIP_PACK% EQU 1 (@echo Touching release build files with %TIMESTRING% timestamp) & (touch -s -D -t%TIMESTRING% %FB_ROOT_PATH%\zip_pack\*.*) )
|
||||
|
||||
if /I not "%FBBUILD_BUILDTYPE%"=="release" goto :EOF
|
||||
if not defined TOUCH_COMMAND echo POSIX touch utility not found && exit /b 1
|
||||
|
||||
set TIMESTRING=0%FB_MAJOR_VER%:0%FB_MINOR_VER%:0%FB_REV_NO%
|
||||
|
||||
:: Perhaps here we should touch directories as well
|
||||
:: Here and there XXX_COMMAND is "call"-ed in case if it is a batch file
|
||||
|
||||
@echo Touching release build files with %TIMESTRING% timestamp
|
||||
|
||||
@for /R %FB_OUTPUT_DIR% %%F in ( * ) do (
|
||||
call %TOUCH_COMMAND% -c -d %TIMESTRING% %%F || exit /b 1
|
||||
)
|
||||
|
||||
endlocal
|
||||
|
||||
::End of TOUCH_ALL
|
||||
::----------------
|
||||
@goto :EOF
|
||||
@ -602,14 +522,11 @@ endlocal
|
||||
:: eg set INNO5_SETUP_PATH="C:\Program Files\Inno Setup 5"
|
||||
::
|
||||
::=================================================
|
||||
if %FBBUILD_ISX_PACK% NEQ 1 goto :EOF
|
||||
@echo Now let's compile the InnoSetup scripts
|
||||
@echo.
|
||||
%INNO5_SETUP_PATH%\iscc %FB_ROOT_PATH%\builds\install\arch-specific\win32\FirebirdInstall_%FBBUILD_FILE_ID%.iss
|
||||
call %ISCC_COMMAND% %FB_ROOT_PATH%\builds\install\arch-specific\win32\FirebirdInstall.iss
|
||||
@echo.
|
||||
|
||||
@echo End of ISX_PACK
|
||||
@echo.
|
||||
::End of ISX_PACK
|
||||
::---------------
|
||||
@goto :EOF
|
||||
|
||||
@ -618,15 +535,25 @@ if %FBBUILD_ISX_PACK% NEQ 1 goto :EOF
|
||||
::=========
|
||||
:: Generate the md5sum checksum file
|
||||
::==================================
|
||||
if NOT DEFINED GNU_TOOLCHAIN (
|
||||
call :WARNING GNU_TOOLCHAIN variable not defined. Cannot generate md5 sums.
|
||||
if not defined MD5_COMMAND (
|
||||
call :WARNING md5sum utility not found. Cannot generate md5 sums.
|
||||
@goto :EOF
|
||||
)
|
||||
@echo Generating md5sums for Firebird-%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%
|
||||
@echo Generating md5sums for Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%
|
||||
|
||||
%GNU_TOOLCHAIN%\md5sum.exe %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_PRODUCT_VER_STRING%?%FBBUILD_PACKAGE_NUMBER%*.* > %FBBUILD_INSTALL_IMAGES%\Firebird-%FBBUILD_PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum
|
||||
:: write sums into temporary file to avoid including it into the process
|
||||
pushd %FBBUILD_INSTALL_IMAGES%
|
||||
call %MD5_COMMAND% Firebird-%PRODUCT_VER_STRING%?%FBBUILD_PACKAGE_NUMBER%*.* >md5sum.tmp
|
||||
|
||||
::---------------
|
||||
:: then rename it to the proper name
|
||||
if not errorlevel 1 (
|
||||
del Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum >nul 2>nul
|
||||
ren md5sum.tmp Firebird-%PRODUCT_VER_STRING%-%FBBUILD_PACKAGE_NUMBER%.md5sum
|
||||
)
|
||||
popd
|
||||
|
||||
::End of DO_MD5SUMS
|
||||
::-----------------
|
||||
@goto :EOF
|
||||
|
||||
|
||||
@ -654,7 +581,7 @@ if NOT DEFINED GNU_TOOLCHAIN (
|
||||
@echo.
|
||||
@echo HELP This help screen.
|
||||
@echo.
|
||||
@echo In addition, the following environment variables are checked:
|
||||
@echo In addition, the following environment variables are checked by ISS script:
|
||||
@echo.
|
||||
@echo FB2_ISS_DEBUG=1 - Prepare an InnoSetup script that is
|
||||
@echo easier to debug
|
||||
@ -729,7 +656,6 @@ popd
|
||||
@if errorlevel 1 (goto :END)
|
||||
|
||||
@if not defined FB2_ISS_DEBUG (set FB2_ISS_DEBUG=0)
|
||||
@if not defined FB2_EXAMPLES (set FB2_EXAMPLES=1)
|
||||
|
||||
@echo.
|
||||
@echo Reading command-line parameters...
|
||||
@ -742,7 +668,7 @@ popd
|
||||
@echo.
|
||||
|
||||
@echo Setting version number...
|
||||
@(@call :SED_MAGIC ) || (@echo Error calling SED_MAGIC && @goto :END)
|
||||
@(@call :SET_VERSION ) || (@echo Error calling SET_VERSION && @goto :END)
|
||||
@echo.
|
||||
|
||||
@echo Copying additional files needed for installation, documentation etc.
|
||||
@ -776,13 +702,6 @@ if defined WIX (
|
||||
@(@call :SET_CRLF ) || (@echo Error calling SET_CRLF && @goto :EOF)
|
||||
@echo.
|
||||
|
||||
|
||||
if %FBBUILD_ZIP_PACK% EQU 1 (
|
||||
@echo Generating image of zipped install
|
||||
@(@call :GEN_ZIP ) || (@echo Error calling GEN_ZIP && @goto :END)
|
||||
@echo.
|
||||
)
|
||||
|
||||
::@echo Creating .local files for libraries
|
||||
::@(@call :TOUCH_LOCAL ) || (@echo Error calling TOUCH_LOCAL & @goto :END)
|
||||
::@echo.
|
||||
@ -797,6 +716,7 @@ if %FBBUILD_ZIP_PACK% EQU 1 (
|
||||
)
|
||||
|
||||
if %FBBUILD_ISX_PACK% EQU 1 (
|
||||
@echo Now let's compile the InnoSetup scripts
|
||||
@(@call :ISX_PACK ) || (@echo Error calling ISX_PACK && @goto :END)
|
||||
@echo.
|
||||
)
|
||||
@ -815,7 +735,7 @@ if %FBBUILD_ISX_PACK% EQU 1 (
|
||||
|
||||
|
||||
:END
|
||||
popd
|
||||
|
||||
exit /b
|
||||
|
||||
|
||||
|
@ -49,30 +49,46 @@
|
||||
#define FirebirdURL MyAppURL
|
||||
#define UninstallBinary "{app}\firebird.exe"
|
||||
|
||||
#define Root GetEnv("FB_ROOT_PATH")
|
||||
#if Root == ""
|
||||
;We are not run from batch file, let's set some sane defaults
|
||||
#define Root = "..\..\..\.."
|
||||
;Assume iss debug as well
|
||||
#define iss_debug
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
#if GetEnv("FB2_ISS_DEBUG") == "1"
|
||||
#define iss_debug
|
||||
#endif
|
||||
|
||||
#if GetEnv("FBBUILD_SHIP_PDB") == "ship_pdb"
|
||||
#define ship_pdb
|
||||
#endif
|
||||
|
||||
;Get version information from build_no.h
|
||||
#include Root + "\gen\jrd\build_no.h"
|
||||
|
||||
;Hard code some defaults to aid debugging and running script standalone.
|
||||
;In practice, these values are set in the environment and we use the env vars.
|
||||
#define MajorVer "4"
|
||||
#define MinorVer "0"
|
||||
#define PointRelease "0"
|
||||
#define BuildNumber "0"
|
||||
#define PackageNumber GetEnv("FBBUILD_PACKAGE_NUMBER")
|
||||
#if PackageNumber == ""
|
||||
#define PackageNumber "0"
|
||||
#define FilenameSuffix ""
|
||||
|
||||
#endif
|
||||
#define FilenameSuffix GetEnv("FBBUILD_FILENAME_SUFFIX")
|
||||
#if FilenameSuffix != "" && pos('_',FilenameSuffix) == 0
|
||||
#define FilenameSuffix "_" + FilenameSuffix
|
||||
#endif
|
||||
|
||||
;-------Start of Innosetup script debug flags section
|
||||
|
||||
; if iss_release is undefined then iss_debug is set
|
||||
; if iss_debug is undefined then iss_release is set
|
||||
; Setting iss_release implies that the defines for files,
|
||||
; examples and compression are set. If debug is set then this
|
||||
; section controls the settings of files, examples
|
||||
; and compression.
|
||||
|
||||
; A dynamically generated sed script sets the appropriate define
|
||||
; See BuildExecutableInstall.bat for more details.
|
||||
|
||||
|
||||
;#define iss_debug
|
||||
|
||||
#ifndef iss_debug
|
||||
#define iss_release
|
||||
#endif
|
||||
@ -80,10 +96,11 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
#ifdef iss_release
|
||||
#define files
|
||||
#if GetEnv("FB2_EXAMPLES") != "0"
|
||||
#define examples
|
||||
#endif
|
||||
#define compression
|
||||
#else
|
||||
#define iss_debug
|
||||
#define i18n
|
||||
#endif
|
||||
;--------------------
|
||||
|
||||
@ -107,72 +124,8 @@
|
||||
|
||||
;-------end of Innosetup script debug flags section
|
||||
|
||||
|
||||
;-------Start of Innosetup script
|
||||
|
||||
|
||||
;---- These three defines need a bit of tidying up in the near future,
|
||||
; but for now they must stay, as the BuildExecutableInstall.bat
|
||||
; uses them.
|
||||
#define release
|
||||
#define no_pdb
|
||||
#define i18n
|
||||
|
||||
|
||||
;------If necessary we can turn off i18n by uncommenting this undefine
|
||||
;------In general this is a good idea for alpha and beta releases.
|
||||
#undef i18n
|
||||
|
||||
;----- If we are debugging the script (and not executed from command prompt)
|
||||
;----- there is no guarantee that the environment variable exists. However an
|
||||
;----- expression such as #define FB_MAJOR_VER GetEnv("FB_MAJOR_VER") will
|
||||
;----- 'define' the macro anyway so we need to test for a valid env var before
|
||||
;----- we define our macro.
|
||||
#if Len(GetEnv("FB_MAJOR_VER")) > 0
|
||||
#define FB_MAJOR_VER GetEnv("FB_MAJOR_VER")
|
||||
#endif
|
||||
#ifdef FB_MAJOR_VER
|
||||
#define MajorVer FB_MAJOR_VER
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("FB_MINOR_VER")) > 0
|
||||
#define FB_MINOR_VER GetEnv("FB_MINOR_VER")
|
||||
#endif
|
||||
#ifdef FB_MINOR_VER
|
||||
#define MinorVer FB_MINOR_VER
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("FB_REV_NO")) > 0
|
||||
#define FB_REV_NO GetEnv("FB_REV_NO")
|
||||
#endif
|
||||
#ifdef FB_REV_NO
|
||||
#define PointRelease FB_REV_NO
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("FB_BUILD_NO")) > 0
|
||||
#define FB_BUILD_NO GetEnv("FB_BUILD_NO")
|
||||
#endif
|
||||
#ifdef FB_BUILD_NO
|
||||
#define BuildNumber FB_BUILD_NO
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("FBBUILD_PACKAGE_NUMBER")) > 0
|
||||
#define FBBUILD_PACKAGE_NUMBER GetEnv("FBBUILD_PACKAGE_NUMBER")
|
||||
#endif
|
||||
#ifdef FBBUILD_PACKAGE_NUMBER
|
||||
#define PackageNumber FBBUILD_PACKAGE_NUMBER
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("FBBUILD_FILENAME_SUFFIX")) > 0
|
||||
#define FBBUILD_FILENAME_SUFFIX GetEnv("FBBUILD_FILENAME_SUFFIX")
|
||||
#endif
|
||||
#ifdef FBBUILD_FILENAME_SUFFIX
|
||||
#define FilenameSuffix FBBUILD_FILENAME_SUFFIX
|
||||
#if pos('_',FilenameSuffix) == 0
|
||||
#define FilenameSuffix "_" + FilenameSuffix
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if Len(GetEnv("MSVC_VERSION")) > 0
|
||||
#define msvc_version GetEnv("MSVC_VERSION")
|
||||
#else
|
||||
@ -212,10 +165,10 @@
|
||||
#define msvcr_filename = "vcruntime"
|
||||
#endif
|
||||
|
||||
#if BuildNumber == "0"
|
||||
#define MyAppVerString MajorVer + "." + MinorVer + "." + PointRelease
|
||||
#if FB_BUILD_NO == "0"
|
||||
#define MyAppVerString FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO
|
||||
#else
|
||||
#define MyAppVerString MajorVer + "." + MinorVer + "." + PointRelease + "." + BuildNumber
|
||||
#define MyAppVerString FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO + "." + FB_BUILD_NO
|
||||
#endif
|
||||
#define MyAppVerName MyAppName + " " + MyAppVerString
|
||||
|
||||
@ -224,11 +177,16 @@
|
||||
#define PlatformTarget GetEnv("FB_TARGET_PLATFORM")
|
||||
#endif
|
||||
#if PlatformTarget == ""
|
||||
;Assume native platform
|
||||
#if IsWin64
|
||||
#define PlatformTarget "x64"
|
||||
#else
|
||||
#define PlatformTarget "win32"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if FB_BUILD_TYPE == "T"
|
||||
;If we are still under development we can ignore some missing files.
|
||||
#if GetEnv("FBBUILD_PROD_STATUS") == "DEV"
|
||||
#define SkipFileIfDevStatus " skipifsourcedoesntexist "
|
||||
#else
|
||||
#define SkipFileIfDevStatus " "
|
||||
@ -240,21 +198,12 @@
|
||||
#define WOW64Dir="output_win32"
|
||||
#endif
|
||||
|
||||
;BaseVer should be used for all MajorVer.MinorVer installs.
|
||||
;This allows us to upgrade silently from MajorVer.MinorVer.m to MajorVer.MinorVer.n
|
||||
#define BaseVer MajorVer + "_" + MinorVer
|
||||
#define AppVer MajorVer + "_" + MinorVer
|
||||
#define GroupnameVer MajorVer + "." + MinorVer
|
||||
|
||||
;These variables are set in BuildExecutableInstall
|
||||
#define FB15_cur_ver GetEnv("FBBUILD_FB15_CUR_VER")
|
||||
#define FB20_cur_ver GetEnv("FBBUILD_FB20_CUR_VER")
|
||||
#define FB21_cur_ver GetEnv("FBBUILD_FB21_CUR_VER")
|
||||
#define FB25_cur_ver GetEnv("FBBUILD_FB25_CUR_VER")
|
||||
#define FB30_cur_ver GetEnv("FBBUILD_FB30_CUR_VER")
|
||||
#define FB40_cur_ver GetEnv("FBBUILD_FB40_CUR_VER")
|
||||
#define FB_cur_ver FB40_cur_ver
|
||||
#define FB_last_ver FB30_cur_ver
|
||||
;BaseVer should be used for all FB_MAJOR_VER.FB_MINOR_VER installs.
|
||||
;This allows us to upgrade silently from FB_MAJOR_VER.FB_MINOR_VER.m to FB_MAJOR_VER.FB_MINOR_VER.n
|
||||
#define BaseVer FB_MAJOR_VER + "_" + FB_MINOR_VER
|
||||
#define AppVer FB_MAJOR_VER + "_" + FB_MINOR_VER
|
||||
#define GroupnameVer FB_MAJOR_VER + "." + FB_MINOR_VER
|
||||
#define FB_cur_ver FB_MAJOR_VER + "." + FB_MINOR_VER + "." + FB_REV_NO
|
||||
|
||||
; We can save space by shipping a pdb package that just includes
|
||||
; the pdb files. It would then upgrade an existing installation,
|
||||
@ -276,7 +225,7 @@
|
||||
#else
|
||||
#define pdb_str=""
|
||||
#endif
|
||||
#ifdef debug
|
||||
#if GetEnv("FBBUILD_BUILDTYPE") == "debug"
|
||||
#define debug_str="_debug"
|
||||
#else
|
||||
#define debug_str=""
|
||||
@ -300,7 +249,7 @@ AppUpdatesURL={#MyAppURL}
|
||||
AppVersion={#MyAppVerString}
|
||||
VersionInfoVersion={#MyAppVerString}
|
||||
|
||||
SourceDir=..\..\..\..\
|
||||
SourceDir={#Root}
|
||||
OutputBaseFilename={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix}
|
||||
;OutputManifestFile={#MyAppName}-{#MyAppVerString}_{#PackageNumber}_{#PlatformTarget}{#debug_str}{#pdb_str}{#FilenameSuffix}_Setup-Manifest.txt
|
||||
OutputDir=builds\install_images
|
||||
@ -342,7 +291,7 @@ SetupLogging=yes
|
||||
#endif
|
||||
|
||||
[Languages]
|
||||
Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: {#GenDir}\installation_readme.txt; InfoAfterFile: {#GenDir}\readme.txt;
|
||||
Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: {#GenDir}\installation_readme.txt; InfoAfterFile: {#GenDir}\Readme.txt;
|
||||
#ifdef i18n
|
||||
Name: ba; MessagesFile: compiler:Languages\Bosnian.isl; InfoBeforeFile: {#GenDir}\ba\Instalacija_ProcitajMe.txt; InfoAfterFile: {#GenDir}\ba\ProcitajMe.txt;
|
||||
Name: cz; MessagesFile: compiler:Languages\Czech.isl; InfoBeforeFile: {#GenDir}\cz\instalace_ctime.txt; InfoAfterFile: {#GenDir}\cz\ctime.txt;
|
||||
@ -389,21 +338,6 @@ Name: ru; MessagesFile: compiler:Languages\Russian.isl; InfoBeforeFile: {#GenDir
|
||||
;#include "si\custom_messages_si.inc"
|
||||
#endif
|
||||
|
||||
#ifdef iss_debug
|
||||
; *** Note - this comment section needs revision or deletion.
|
||||
; It is only applicable to the ansi installer, which is no longer
|
||||
; supported for Firebird 3
|
||||
; By default, the languages available at runtime depend on the user's
|
||||
; code page. A user with the Western European code page set will not
|
||||
; even see that we support installation with the czech language
|
||||
; for example.
|
||||
; It can be useful when debugging to force the display of all available
|
||||
; languages by setting LanguageCodePage to 0. Of course, if the langauge
|
||||
; is not supported by the user's current code page it will be unusable.
|
||||
[LangOptions]
|
||||
LanguageCodePage=0
|
||||
#endif
|
||||
|
||||
[Types]
|
||||
Name: ServerInstall; Description: {cm:ServerInstall}
|
||||
Name: DeveloperInstall; Description: {cm:DeveloperInstall}
|
||||
@ -478,7 +412,7 @@ Name: {group}\Firebird Server; Filename: {app}\firebird.exe; Parameters: {code:S
|
||||
Name: {group}\Firebird Guardian; Filename: {app}\fbguard.exe; Parameters: {code:StartAppParams}; Flags: runminimized; MinVersion: 4.0,4.0; Check: InstallGuardianIcon; IconIndex: 1; Components: ServerComponent; Comment: Run Firebird Server (with guardian);
|
||||
Name: {group}\Firebird ISQL Tool; Filename: {app}\isql.exe; Parameters: -z; WorkingDir: {app}; MinVersion: 4.0,4.0; Comment: {cm:RunISQL}
|
||||
Name: {group}\Firebird {#FB_cur_ver} Release Notes; Filename: {app}\doc\Firebird_v{#FB_cur_ver}.ReleaseNotes.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {cm:ReleaseNotes}
|
||||
;Name: {group}\Firebird {#GroupnameVer} Quick Start Guide; Filename: {app}\doc\Firebird-{#MajorVer}-QuickStart.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {#FB_cur_ver}
|
||||
;Name: {group}\Firebird {#GroupnameVer} Quick Start Guide; Filename: {app}\doc\Firebird-{#FB_MAJOR_VER}-QuickStart.pdf; MinVersion: 4.0,4.0; Comment: {#MyAppName} {#FB_cur_ver}
|
||||
Name: "{group}\After Installation"; Filename: "{app}\doc\After_Installation.url"; Comment: "New User? Here's a quick guide to what you should do next."
|
||||
Name: "{group}\Firebird Web-site"; Filename: "{app}\doc\firebirdsql.org.url"
|
||||
;Always install the original english version
|
||||
@ -493,7 +427,7 @@ Name: {group}\{cm:Uninstall,{#FB_cur_ver}}; Filename: {uninstallexe}; Comment: U
|
||||
#ifdef files
|
||||
Source: {#LicensesDir}\IPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion;
|
||||
Source: {#LicensesDir}\IDPLicense.txt; DestDir: {app}; Components: ClientComponent; Flags: sharedfile ignoreversion
|
||||
Source: {#ScriptsDir}\After_Installation.url; DestDir: {app}\doc; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion
|
||||
Source: {#file "After_Installation.url"}; DestDir: {app}\doc; DestName: "After_Installation.url"; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion
|
||||
Source: {#ScriptsDir}\firebirdsql.org.url; DestDir: {app}\doc; Components: ServerComponent DevAdminComponent; Flags: sharedfile ignoreversion
|
||||
;Always install the original english version
|
||||
Source: {#GenDir}\readme.txt; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion;
|
||||
@ -543,8 +477,8 @@ Source: {#FilesDir}\fbsvcmgr.exe; DestDir: {app}; Components: DevAdminComponent;
|
||||
Source: {#FilesDir}\fbtracemgr.exe; DestDir: {app}; Components: DevAdminComponent; Flags: ignoreversion
|
||||
Source: {#FilesDir}\fbclient.dll; DestDir: {app}; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder
|
||||
#if PlatformTarget == "x64"
|
||||
Source: {#WOW64Dir}\fbclient.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder
|
||||
Source: {#WOW64Dir}\instclient.exe; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion
|
||||
Source: {#WOW64Dir}\fbclient.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: overwritereadonly sharedfile promptifolder {#SkipFileIfDevStatus}
|
||||
Source: {#WOW64Dir}\instclient.exe; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile ignoreversion {#SkipFileIfDevStatus}
|
||||
#endif
|
||||
Source: {#FilesDir}\icuuc??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion
|
||||
Source: {#FilesDir}\icuin??.dll; DestDir: {app}; Components: ServerComponent; Flags: sharedfile ignoreversion
|
||||
@ -563,8 +497,8 @@ Source: {#FilesDir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime
|
||||
Source: {#FilesDir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
|
||||
#if PlatformTarget == "x64"
|
||||
;If we are installing on x64 we need some 32-bit libraries for compatibility with 32-bit applications
|
||||
Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
|
||||
Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
|
||||
Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile {#SkipFileIfDevStatus};
|
||||
Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_version_0}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile {#SkipFileIfDevStatus};
|
||||
#endif
|
||||
#endif /* #if Int(msvc_runtime_major_version,14) >= 10 */
|
||||
|
||||
@ -572,10 +506,10 @@ Source: {#WOW64Dir}\msvcp{#msvc_runtime_major_version}{#msvc_runtime_minor_versi
|
||||
#if PlatformTarget == "x64"
|
||||
;MinVersion 0,5.0 means no version of Win9x and at least Win2k if NT O/S
|
||||
;In addition, O/S must have Windows Installer 3.0.
|
||||
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_x64.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent;
|
||||
Source: {#WOW64Dir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent;
|
||||
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_x64.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
|
||||
Source: {#WOW64Dir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
|
||||
#else
|
||||
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent;
|
||||
Source: {#FilesDir}\system32\vccrt{#msvc_runtime_major_version}{#msvc_runtime_minor_version_1}_Win32.msi; DestDir: {tmp}; Check: HasWI30; MinVersion: 0,5.0; Components: ClientComponent; Flags: {#SkipFileIfDevStatus}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -592,7 +526,7 @@ Source: {#FilesDir}\intl\fbintl.dll; DestDir: {app}\intl; Components: ServerComp
|
||||
Source: {#FilesDir}\intl\fbintl.conf; DestDir: {app}\intl; Components: ServerComponent; Flags: onlyifdoesntexist
|
||||
Source: {#FilesDir}\lib\*.*; DestDir: {app}\lib; Components: DevAdminComponent; Flags: ignoreversion;
|
||||
#if PlatformTarget == "x64"
|
||||
Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion
|
||||
Source: {#WOW64Dir}\lib\*.lib; DestDir: {app}\WOW64\lib; Components: DevAdminComponent; Flags: ignoreversion {#SkipFileIfDevStatus}
|
||||
#endif
|
||||
|
||||
;deprecated in FB4.0
|
||||
@ -832,7 +766,7 @@ begin
|
||||
InstallRootDir := Default; // but the user has changed the default
|
||||
|
||||
if (( InstallRootDir = '') and
|
||||
( FirebirdVer[0] = {#MajorVer} ) and ( FirebirdVer[1] = {#MinorVer} ) ) then // Firebird 2.n is installed
|
||||
( FirebirdVer[0] = {#FB_MAJOR_VER} ) and ( FirebirdVer[1] = {#FB_MINOR_VER} ) ) then // Firebird 2.n is installed
|
||||
InstallRootDir := FirebirdRootDir; // but the user has changed the default
|
||||
|
||||
// if we haven't found anything then try the FIREBIRD env var
|
||||
|
@ -28,6 +28,8 @@ considered ready for use in production.
|
||||
|
||||
o Please make sure you read the installation
|
||||
readme and the release notes.
|
||||
|
||||
|
||||
Reporting Bugs
|
||||
==============
|
||||
|
||||
|
@ -9,7 +9,7 @@ documentatation i18n should be available separately. I18n is a
|
||||
good thing, but bloating the installer with large amounts of translated
|
||||
documentation is not desirable.
|
||||
|
||||
The current version of InnoSetup used by Firebird $MAJOR.$MINOR - 5.5.8 - provides
|
||||
The current version of InnoSetup used by Firebird - 5.5.8 - provides
|
||||
generic support for the following languages:
|
||||
|
||||
BrazilianPortuguese, Catalan, Corsican, Czech, Danish, Dutch, Finnish, French,
|
||||
|
@ -180,7 +180,7 @@
|
||||
# the same restrictions as in previous FB versions. To specify access
|
||||
# to specific trees, enum all required paths (for Windows this may be
|
||||
# something like 'C:\ExternalFunctions', for unix - '/db/udf;/mnt/udf').
|
||||
@UDF_COMMENT@
|
||||
#
|
||||
# NOTE: THE EXTERNAL FUNCTION ENGINE FEATURE COULD BE USED TO COMPROMISE
|
||||
# THE SERVER/HOST AS WELL AS DATABASE SECURITY!!
|
||||
#
|
||||
@ -446,8 +446,8 @@
|
||||
#AuthClient = Srp256, Srp, Legacy_Auth #Non Windows clients
|
||||
#AuthClient = Srp256, Srp, Win_Sspi, Legacy_Auth #Windows clients
|
||||
#
|
||||
# If you need to use server plugins that do not provide encryption key (both Legacy_Auth
|
||||
# & Win_Sspi) you should also turn off required encryption on the wire with WireCrypt
|
||||
# If you need to use server plugins that do not provide encryption key (Legacy_Auth is the
|
||||
# only such std plugin) you should also turn off required encryption on the wire with WireCrypt
|
||||
# configuration parameter except when working with the XNET protocol which is never encrypted.
|
||||
#
|
||||
|
||||
@ -466,12 +466,14 @@
|
||||
#TracePlugin = fbtrace
|
||||
|
||||
# Wire crypt plugins are used to crypt data transferred over the wire.
|
||||
# In default case wire is encrypted using Alleged RC4
|
||||
# (key must be generated by auth plugin).
|
||||
# In default case wire is encrypted using ChaCha#20 or Alleged RC4.
|
||||
# Key must be generated by auth plugin.
|
||||
# For chacha we are using 16 or 32 bytes key (depends upon what is provided
|
||||
# by auth plugin), 12 bytes nonce and 4 bytes counter, 20 (10 + 10) rounds are made.
|
||||
#
|
||||
# Per-connection configurable.
|
||||
#
|
||||
#WireCryptPlugin = Arc4
|
||||
#WireCryptPlugin = ChaCha, Arc4
|
||||
|
||||
# Key holder is a kind of temp storage for DB crypt keys.
|
||||
# There is no default for this kind of plugins.
|
@ -4411,11 +4411,6 @@
|
||||
path = ids.h;
|
||||
refType = 4;
|
||||
};
|
||||
F616C6050200B0CF01EF0ADE = {
|
||||
isa = PBXFileReference;
|
||||
path = ids.m;
|
||||
refType = 4;
|
||||
};
|
||||
F616C6060200B0CF01EF0ADE = {
|
||||
isa = PBXFileReference;
|
||||
path = idx.cpp;
|
||||
|
@ -226,7 +226,7 @@ $(TOMCRYPT_LIB): $(TOM_Objs)
|
||||
# main build target for both debug and release builds
|
||||
#
|
||||
|
||||
.PHONY: cross1 cross2 boot yvalve engine fbintl gpre utilities plugins rest codes ids examples cross_rest preliminaryCheck
|
||||
.PHONY: cross1 cross2 boot yvalve engine fbintl gpre utilities plugins rest codes examples cross_rest
|
||||
|
||||
master_process:
|
||||
ln -sf $(SRC_ROOT)/include/gen/autoconfig.auto $(SRC_ROOT)/include/gen/autoconfig.h
|
||||
@ -234,13 +234,8 @@ master_process:
|
||||
$(MAKE) export_lists
|
||||
$(MAKE) external
|
||||
$(MAKE) updateCloopInterfaces
|
||||
$(MAKE) preliminaryCheck
|
||||
$(MAKE) boot
|
||||
$(MAKE) yvalve
|
||||
ifeq ($(IsDeveloper), Y)
|
||||
# In developer mode we must regenerate various files in include/gen
|
||||
$(MAKE) ids
|
||||
endif
|
||||
$(MAKE) engine
|
||||
$(MAKE) fbintl
|
||||
$(MAKE) utilities
|
||||
@ -272,10 +267,6 @@ cross1:
|
||||
$(MAKE) updateCloopInterfaces
|
||||
$(MAKE) boot
|
||||
$(MAKE) yvalve
|
||||
ifeq ($(IsDeveloper), Y)
|
||||
# In developer mode we must regenerate various files in include/gen
|
||||
$(MAKE) ids
|
||||
endif
|
||||
$(MAKE) engine
|
||||
$(MAKE) fbintl
|
||||
$(MAKE) gbak isql gfix
|
||||
@ -306,25 +297,6 @@ cross2:
|
||||
$(MAKE) cross_rest
|
||||
|
||||
|
||||
#___________________________________________________________________________
|
||||
# preliminary checks - make sure platform is OK to build FB
|
||||
#
|
||||
|
||||
STD_SIZES:=$(SRC_ROOT)/misc/ods.txt
|
||||
RUN_SIZES:=$(GEN_ROOT)/ods.txt
|
||||
ODS_H:=$(SRC_ROOT)/jrd/ods.h
|
||||
ODS_AWK:=$(SRC_ROOT)/misc/ods.awk
|
||||
ODS_TEST_CPP:=$(GEN_ROOT)/odstest.cpp
|
||||
ODS_TEST:=$(GEN_ROOT)/odstest$(EXEC_EXT)
|
||||
|
||||
preliminaryCheck: $(STD_SIZES) $(RUN_SIZES)
|
||||
diff -u $^
|
||||
|
||||
$(RUN_SIZES): $(ODS_H) $(ODS_AWK)
|
||||
awk -f $(ODS_AWK) <$(ODS_H) >$(ODS_TEST_CPP)
|
||||
$(CXX) -o $(ODS_TEST) $(WCXXFLAGS) $(ODS_TEST_CPP)
|
||||
$(ODS_TEST) >$(RUN_SIZES)
|
||||
|
||||
#___________________________________________________________________________
|
||||
# static library - various common code, used in different FB projects
|
||||
#
|
||||
@ -610,33 +582,26 @@ $(COMPAT_SQL): $(SRC_COMPAT_SQL)
|
||||
|
||||
.PHONY: gen_codes
|
||||
CODES = $(BIN)/codes$(EXEC_EXT)
|
||||
IDS = $(SRC_ROOT)/include/gen/ids.h
|
||||
|
||||
codes: gen_codes
|
||||
|
||||
ids: $(IDS)
|
||||
|
||||
gen_codes: $(CODES) msg.timestamp
|
||||
$(CODES) $(SRC_ROOT)/include/gen $(LNG_ROOT)
|
||||
|
||||
$(CODES): $(CODES_Objects) $(COMMON_LIB)
|
||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
||||
|
||||
$(IDS): $(SRC_ROOT)/misc/ids.m $(SRC_ROOT)/jrd/relations.h
|
||||
m4 $< > $@
|
||||
|
||||
|
||||
#___________________________________________________________________________
|
||||
# all the rest we need to build
|
||||
#
|
||||
|
||||
.PHONY: qli message_file gbak_files
|
||||
.PHONY: qli message_file tzdata gbak_files
|
||||
|
||||
FDB_FILES := $(HELP_FDB) $(ROOT)/gen/msg.fdb $(SECURITY_FDB) $(FIREBIRD)/examples/empbuild/employee.fdb
|
||||
GBAK_FILES := $(FDB_FILES:.fdb=.gbak) $(FIREBIRD)/msg.gbak
|
||||
GBAK_FILES := $(subst Native,$(TARGET),$(GBAK_FILES))
|
||||
|
||||
rest: qli message_file
|
||||
rest: qli message_file tzdata
|
||||
|
||||
cross_rest: qli gbak_files
|
||||
$(MAKE) $(BUILD_FILE)
|
||||
@ -656,6 +621,12 @@ $(FIREBIRD_MSG): $(BUILD_FILE) msg.timestamp
|
||||
$(BUILD_FILE) -d msg.fdb -f $@
|
||||
$(CHMOD_6) $@
|
||||
|
||||
tzdata: $(FIREBIRD)/tzdata
|
||||
|
||||
# FIXME: For big-endian, be.zip must be used.
|
||||
$(FIREBIRD)/tzdata: $(ROOT)/extern/icu/tzdata/le.zip
|
||||
unzip -o $(ROOT)/extern/icu/tzdata/le.zip -d $(FIREBIRD)/tzdata
|
||||
|
||||
$(BUILD_FILE): $(BUILD_Objects) $(COMMON_LIB)
|
||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
||||
|
||||
|
@ -38,6 +38,7 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log
|
||||
|
||||
@mkdir %FB_OUTPUT_DIR% 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\intl 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\tzdata 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\help 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\doc 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\doc\sql.extensions 2>nul
|
||||
@ -50,6 +51,7 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log
|
||||
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\* %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\intl\* %FB_OUTPUT_DIR%\intl >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata\* %FB_OUTPUT_DIR%\tzdata >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\system32\* %FB_OUTPUT_DIR%\system32 >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\*.dll %FB_OUTPUT_DIR%\plugins >nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
||||
@ -61,11 +63,10 @@ for %%v in (gpre_boot build_msg codes) do (
|
||||
)
|
||||
|
||||
:: Firebird.conf, etc
|
||||
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR% > nul
|
||||
:: The line @UDF_COMMENT@ should be deleted from the target file.
|
||||
findstr /V "@UDF_COMMENT@" %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_OUTPUT_DIR%\firebird.conf
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\databases.conf.in %FB_OUTPUT_DIR%\databases.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl >nul
|
||||
@copy %FB_GEN_DIR%\firebird.msg %FB_OUTPUT_DIR%\ > nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_OUTPUT_DIR%\firebird.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\databases.conf %FB_OUTPUT_DIR%\databases.conf >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\fbintl.conf %FB_OUTPUT_DIR%\intl\ >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\plugins.conf %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\replication.conf %FB_OUTPUT_DIR% >nul
|
||||
@copy %FB_ROOT_PATH%\src\utilities\ntrace\fbtrace.conf %FB_OUTPUT_DIR% >nul
|
||||
|
@ -75,7 +75,7 @@ if "%ERRLEV%"=="1" goto :END
|
||||
call :isql
|
||||
if "%ERRLEV%"=="1" goto :END
|
||||
|
||||
@findstr /V "@UDF_COMMENT@" %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > %FB_BIN_DIR%\firebird.conf
|
||||
@copy %FB_ROOT_PATH%\builds\install\misc\firebird.conf %FB_BIN_DIR%\firebird.conf
|
||||
|
||||
:: Copy ICU and zlib both to Debug and Release configurations
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
::@echo off
|
||||
|
||||
@echo off
|
||||
|
||||
:: Set env vars
|
||||
@call setenvvar.bat
|
||||
@ -38,8 +37,9 @@ if errorlevel 1 (
|
||||
@call :MOVE2
|
||||
@goto :EOF
|
||||
|
||||
::===========
|
||||
|
||||
:BUILD_EMPBUILD
|
||||
::===========
|
||||
@echo.
|
||||
@echo Building empbuild.fdb
|
||||
@copy /y %FB_ROOT_PATH%\examples\empbuild\*.sql %FB_GEN_DIR%\examples\ > nul
|
||||
@ -47,7 +47,7 @@ if errorlevel 1 (
|
||||
|
||||
@echo.
|
||||
:: Here we must use cd because isql does not have an option to set a base directory
|
||||
@cd "%FB_LONG_ROOT_PATH%\gen\examples"
|
||||
@pushd "%FB_LONG_ROOT_PATH%\gen\examples"
|
||||
@echo Creating empbuild.fdb...
|
||||
@echo.
|
||||
@del empbuild.fdb 2> nul
|
||||
@ -62,7 +62,8 @@ if defined FB2_INTLEMP (
|
||||
@%FB_BIN_DIR%\isql -i intlbld.sql
|
||||
)
|
||||
|
||||
@cd "%FB_LONG_ROOT_PATH%\builds\win32"
|
||||
@popd
|
||||
|
||||
@echo.
|
||||
@echo path = %FB_GEN_DB_DIR%\examples
|
||||
@echo Preprocessing empbuild.e...
|
||||
@ -75,17 +76,18 @@ if defined FB2_INTLEMP (
|
||||
@%FB_BIN_DIR%\gpre.exe -r -m -n -z %FB_ROOT_PATH%\examples\empbuild\intlbld.e %FB_GEN_DIR%\examples\intlbld.c -b %FB_GEN_DB_DIR%/examples/
|
||||
)
|
||||
|
||||
::End of BUILD_EMPBUILD
|
||||
::---------------------
|
||||
@goto :EOF
|
||||
|
||||
|
||||
::===========
|
||||
:MOVE
|
||||
::===========
|
||||
@echo.
|
||||
@rmdir /q /s %FB_OUTPUT_DIR%\examples 2>nul
|
||||
@mkdir %FB_OUTPUT_DIR%\examples
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\api
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\dbcrypt
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\build_unix
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\build_win32
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\empbuild
|
||||
@mkdir %FB_OUTPUT_DIR%\examples\include
|
||||
@ -97,23 +99,20 @@ if defined FB2_INTLEMP (
|
||||
@mkdir %FB_OUTPUT_DIR%\plugins\udr 2>nul
|
||||
|
||||
@echo Moving files to output directory
|
||||
@copy %FB_ROOT_PATH%\examples\* %FB_OUTPUT_DIR%\examples > nul
|
||||
@ren %FB_OUTPUT_DIR%\examples\readme readme.txt > nul
|
||||
@copy %FB_ROOT_PATH%\examples\api\* %FB_OUTPUT_DIR%\examples\api > nul
|
||||
@copy %FB_ROOT_PATH%\examples\dbcrypt\* %FB_OUTPUT_DIR%\examples\dbcrypt > nul
|
||||
@copy %FB_ROOT_PATH%\examples\build_unix\* %FB_OUTPUT_DIR%\examples\build_unix > nul
|
||||
@copy %FB_ROOT_PATH%\examples\build_win32\* %FB_OUTPUT_DIR%\examples\build_win32 > nul
|
||||
copy %FB_ROOT_PATH%\examples\* %FB_OUTPUT_DIR%\examples > nul
|
||||
ren %FB_OUTPUT_DIR%\examples\readme readme.txt > nul
|
||||
copy %FB_ROOT_PATH%\examples\api\* %FB_OUTPUT_DIR%\examples\api > nul
|
||||
copy %FB_ROOT_PATH%\examples\dbcrypt\* %FB_OUTPUT_DIR%\examples\dbcrypt > nul
|
||||
copy %FB_ROOT_PATH%\examples\build_win32\* %FB_OUTPUT_DIR%\examples\build_win32 > nul
|
||||
:: @copy %FB_ROOT_PATH%\examples\empbuild\* %FB_OUTPUT_DIR%\examples\empbuild > nul
|
||||
@copy %FB_ROOT_PATH%\examples\empbuild\employe2.sql %FB_OUTPUT_DIR%\examples\empbuild > nul
|
||||
@copy %FB_ROOT_PATH%\examples\include\* %FB_OUTPUT_DIR%\examples\include > nul
|
||||
@copy %FB_ROOT_PATH%\examples\interfaces\* %FB_OUTPUT_DIR%\examples\interfaces > nul
|
||||
@copy %FB_ROOT_PATH%\examples\package\* %FB_OUTPUT_DIR%\examples\package > nul
|
||||
@copy %FB_ROOT_PATH%\examples\stat\* %FB_OUTPUT_DIR%\examples\stat > nul
|
||||
@copy %FB_ROOT_PATH%\examples\udf\* %FB_OUTPUT_DIR%\examples\udf > nul
|
||||
@copy %FB_ROOT_PATH%\examples\udr\* %FB_OUTPUT_DIR%\examples\udr > nul
|
||||
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
||||
@copy %FB_ROOT_PATH%\src\extlib\ib_udf* %FB_OUTPUT_DIR%\examples\udf > nul
|
||||
@copy %FB_ROOT_PATH%\src\extlib\fbudf\* %FB_OUTPUT_DIR%\examples\udf > nul
|
||||
copy %FB_ROOT_PATH%\examples\empbuild\employe2.sql %FB_OUTPUT_DIR%\examples\empbuild > nul
|
||||
copy %FB_ROOT_PATH%\examples\include\* %FB_OUTPUT_DIR%\examples\include > nul
|
||||
copy %FB_ROOT_PATH%\examples\interfaces\* %FB_OUTPUT_DIR%\examples\interfaces > nul
|
||||
copy %FB_ROOT_PATH%\examples\package\* %FB_OUTPUT_DIR%\examples\package > nul
|
||||
copy %FB_ROOT_PATH%\examples\stat\* %FB_OUTPUT_DIR%\examples\stat > nul
|
||||
copy %FB_ROOT_PATH%\examples\udf\* %FB_OUTPUT_DIR%\examples\udf > nul
|
||||
copy %FB_ROOT_PATH%\examples\udr\* %FB_OUTPUT_DIR%\examples\udr > nul
|
||||
copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr\*.dll %FB_OUTPUT_DIR%\plugins\udr >nul
|
||||
|
||||
::@copy %FB_GEN_DIR%\examples\empbuild.c %FB_OUTPUT_DIR%\examples\empbuild\ > nul
|
||||
::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\empbuild.exe %FB_GEN_DIR%\examples\empbuild.exe > nul
|
||||
@ -124,37 +123,50 @@ if defined FB2_INTLEMP (
|
||||
::@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\examples\intlbuild.exe %FB_GEN_DIR%\examples\intlbuild.exe > nul
|
||||
::)
|
||||
::)
|
||||
|
||||
::End of MOVE
|
||||
::-----------
|
||||
@goto :EOF
|
||||
|
||||
:BUILD_EMPLOYEE
|
||||
::===========
|
||||
:: only to test if it works
|
||||
:BUILD_EMPLOYEE
|
||||
|
||||
@echo.
|
||||
@echo Building employee.fdb
|
||||
:: Here we must use cd because isql does not have an option to set a base directory
|
||||
:: and empbuild.exe uses isql
|
||||
@set FB_SAVE_PATH=%PATH%
|
||||
@set PATH=%FB_BIN_DIR%;%PATH%
|
||||
|
||||
:: Do no mess with global variables
|
||||
setlocal
|
||||
|
||||
:: This allows us to use the new engine in embedded mode to build
|
||||
:: the employee database.
|
||||
@set FIREBIRD=%FB_BIN_DIR%
|
||||
@set PATH=%FB_BIN_DIR%;%PATH%
|
||||
|
||||
@cd "%FB_LONG_ROOT_PATH%\gen\examples"
|
||||
@del %FB_GEN_DIR%\examples\employee.fdb 2>nul
|
||||
@%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\empbuild\empbuild.exe %FB_GEN_DB_DIR%/examples/employee.fdb
|
||||
if errorlevel 44 (call :ERROR empbuild.exe failed - see empbuild_%FB_TARGET_PLATFORM%.log for details & goto :EOF)
|
||||
:: Here we must use cd because isql does not have an option to set a base directory
|
||||
:: and empbuild.exe uses isql
|
||||
:: BEWARE: It will run without error if you have FB client from previous version
|
||||
:: installed in System32 and server run but created database will have
|
||||
:: wrong ODS.
|
||||
@pushd "%FB_GEN_DIR%\examples"
|
||||
if exist employee.fdb del employee.fdb
|
||||
|
||||
%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\empbuild\empbuild.exe %FB_GEN_DB_DIR%/examples/employee.fdb
|
||||
if errorlevel 44 (call :ERROR empbuild.exe failed - see empbuild_%FB_TARGET_PLATFORM%.log for details )
|
||||
|
||||
@if defined FB2_INTLEMP (
|
||||
@echo Building intlemp.fdb
|
||||
@del %FB_GEN_DIR%\examples\intlemp.fdb 2>nul
|
||||
@del isql.tmp 2>nul
|
||||
@echo s;intlemp.fdb;%SERVER_NAME%:%FB_GEN_DIR%\examples\intlemp.fdb;g > isql.tmp
|
||||
@echo s;intlemp.fdb;%FB_GEN_DIR%\examples\intlemp.fdb;g > isql.tmp
|
||||
@%FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\intlbuild\intlbuild.exe %FB_GEN_DB_DIR%/examples/intlemp.fdb
|
||||
)
|
||||
@set FIREBIRD=
|
||||
@set PATH=%FB_SAVE_PATH%
|
||||
@cd "%FB_LONG_ROOT_PATH%\builds\win32"
|
||||
|
||||
@popd
|
||||
endlocal
|
||||
|
||||
::End of BUILD_EMPLOYEE
|
||||
::---------------------
|
||||
@goto :EOF
|
||||
|
||||
::==============
|
||||
@ -182,8 +194,8 @@ if defined FB2_INTLEMP (
|
||||
@echo Error - %*
|
||||
@echo.
|
||||
set ERRLEV=1
|
||||
cancel_script > nul 2>&1
|
||||
|
||||
exit /b 1
|
||||
|
||||
::End of ERROR
|
||||
::------------
|
||||
@goto :EOF
|
||||
|
||||
|
@ -10,12 +10,14 @@
|
||||
:: MAIN
|
||||
|
||||
@echo Extracting pre-built ICU
|
||||
|
||||
%FB_ROOT_PATH%\extern\icu\icu.exe -y > make_icu_%FB_TARGET_PLATFORM%.log 2>&1
|
||||
|
||||
if errorlevel 1 call :ERROR build failed - see make_icu_%FB_TARGET_PLATFORM%.log for details
|
||||
@goto :EOF
|
||||
|
||||
@echo Extracting tzdata
|
||||
mkdir %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata
|
||||
call zipjs.bat unzip -source "%FB_LONG_ROOT_PATH%\extern\icu\tzdata\le.zip" -destination %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\tzdata -keep yes
|
||||
|
||||
@goto :EOF
|
||||
|
||||
|
||||
:ERROR
|
||||
|
@ -4,11 +4,6 @@
|
||||
:: FB_DB_PATH unix format path of the main directory
|
||||
:: (This is used by gpre and preprocess.bat)
|
||||
:: VS_VER VisualStudio version (msvc10|msvc12|msvc14)
|
||||
:: SERVER_NAME server needed to connect to firebird (could include port)
|
||||
:: Example : localhost/3051
|
||||
:: (Note - SERVER_NAME is almost deprecated - it is only used by
|
||||
:: make_examples.bat
|
||||
::
|
||||
|
||||
@echo off
|
||||
|
||||
@ -48,8 +43,6 @@ set VS_VER=msvc%MSVC_VERSION%
|
||||
::=================
|
||||
:SET_DB_DIR
|
||||
|
||||
@SET SERVER_NAME=localhost
|
||||
|
||||
@cd ..\..
|
||||
@for /f "delims=" %%a in ('@cd') do (set FB_LONG_ROOT_PATH=%%a)
|
||||
@for /f "delims=" %%a in ('@cd') do (set FB_ROOT_PATH=%%~sa)
|
||||
@ -108,7 +101,6 @@ if defined VS_VER_EXPRESS (
|
||||
@echo msvc_version=%MSVC_VERSION%
|
||||
@echo db_path=%FB_DB_PATH%
|
||||
@echo root_path=%FB_ROOT_PATH%
|
||||
@echo server_name=%SERVER_NAME%
|
||||
@echo.
|
||||
@echo (End of %0)
|
||||
@echo.
|
||||
|
823
builds/win32/zipjs.bat
Normal file
823
builds/win32/zipjs.bat
Normal file
@ -0,0 +1,823 @@
|
||||
@if (@X)==(@Y) @end /* JScript comment
|
||||
@echo off
|
||||
|
||||
rem :: the first argument is the script name as it will be used for proper help message
|
||||
cscript //E:JScript //nologo "%~f0" "%~nx0" %*
|
||||
|
||||
exit /b %errorlevel%
|
||||
|
||||
@if (@X)==(@Y) @end JScript comment */
|
||||
|
||||
|
||||
/*
|
||||
Compression/uncompression command-line tool that uses Shell.Application and WSH/Jscript -
|
||||
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774085(v=vs.85).aspx
|
||||
|
||||
Some resources That I've used:
|
||||
http://www.robvanderwoude.com/vbstech_files_zip.php
|
||||
https://code.google.com/p/jsxt/source/browse/trunk/js/win32/ZipFile.js?r=161
|
||||
|
||||
|
||||
|
||||
|
||||
UPDATE *17-03-15*
|
||||
|
||||
Devnullius Plussed noticed a bug in ZipDirItems and ZipItem functions (now fixed)
|
||||
And also following issues (at the moment not handled by the script):
|
||||
- if there's not enough space on the system drive (usually C:\) the script could produce various errors , most often the script halts.
|
||||
- Folders and files that contain unicode symbols cannot be handled by Shell.Application object.
|
||||
|
||||
UPDATE *24-03-15*
|
||||
|
||||
Error messages are caught in waitforcount method and if shuch pops-up the script is stopped.
|
||||
As I don't know hoe to check the content of the pop-up the exact reason for the failure is not given
|
||||
but only the possible reasons.
|
||||
|
||||
UPDATE *22-02-16*
|
||||
|
||||
Javid Pack(https://github.com/JavidPack) has found two bugs in zipItem command and in ZipItem function.Now fixed.
|
||||
|
||||
------
|
||||
It's possible to be ported for C#,Powershell and JScript.net so I'm planning to do it at some time.
|
||||
|
||||
For sure there's a lot of room for improvements and optimization and I'm absolutely sure there are some bugs
|
||||
as the script is big enough to not have.
|
||||
|
||||
|
||||
|
||||
!!!
|
||||
For suggestions contact me at - npocmaka@gmail.com
|
||||
!!!
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// CONSTANTS
|
||||
|
||||
// TODO - Shell.Application and Scripting.FileSystemObject objects could be set as global variables to avoid theit creation
|
||||
// in every method.
|
||||
|
||||
//empty zip character sequense
|
||||
var ZIP_DATA= "PK" + String.fromCharCode(5) + String.fromCharCode(6) + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
|
||||
var SLEEP_INTERVAL=200;
|
||||
|
||||
//copy option(s) used by Shell.Application.CopyHere/MoveHere
|
||||
var NO_PROGRESS_BAR=4;
|
||||
|
||||
|
||||
//oprions used for zip/unzip
|
||||
var force=true;
|
||||
var move=false;
|
||||
|
||||
//option used for listing content of archive
|
||||
var flat=false;
|
||||
|
||||
var source="";
|
||||
var destination="";
|
||||
|
||||
var ARGS = WScript.Arguments;
|
||||
var scriptName=ARGS.Item(0);
|
||||
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////
|
||||
// ADODB.Stream extensions
|
||||
|
||||
if ( ! this.ADODB ) {
|
||||
var ADODB = {};
|
||||
}
|
||||
|
||||
if ( ! ADODB.Stream ) {
|
||||
ADODB.Stream = {};
|
||||
}
|
||||
|
||||
// writes a binary data to a file
|
||||
if ( ! ADODB.Stream.writeFile ) {
|
||||
ADODB.Stream.writeFile = function(filename, bindata)
|
||||
{
|
||||
var stream = new ActiveXObject("ADODB.Stream");
|
||||
stream.Type = 2;
|
||||
stream.Mode = 3;
|
||||
stream.Charset ="ASCII";
|
||||
stream.Open();
|
||||
stream.Position = 0;
|
||||
stream.WriteText(bindata);
|
||||
stream.SaveToFile(filename, 2);
|
||||
stream.Close();
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////
|
||||
// common
|
||||
|
||||
if ( ! this.Common ) {
|
||||
var Common = {};
|
||||
}
|
||||
|
||||
if ( ! Common.WaitForCount ) {
|
||||
Common.WaitForCount = function(folderObject,targetCount,countFunction){
|
||||
var shell = new ActiveXObject("Wscript.Shell");
|
||||
while (countFunction(folderObject) < targetCount ){
|
||||
WScript.Sleep(SLEEP_INTERVAL);
|
||||
//checks if a pop-up with error message appears while zipping
|
||||
//at the moment I have no idea how to read the pop-up content
|
||||
// to give the exact reason for failing
|
||||
if (shell.AppActivate("Compressed (zipped) Folders Error")) {
|
||||
WScript.Echo("Error While zipping");
|
||||
WScript.Echo("");
|
||||
WScript.Echo("Possible reasons:");
|
||||
WScript.Echo(" -source contains filename(s) with unicode characters");
|
||||
WScript.Echo(" -produces zip exceeds 8gb size (or 2,5 gb for XP and 2003)");
|
||||
WScript.Echo(" -not enough space on system drive (usually C:\\)");
|
||||
WScript.Quit(432);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Common.getParent ) {
|
||||
Common.getParent = function(path){
|
||||
var splitted=path.split("\\");
|
||||
var result="";
|
||||
for (var s=0;s<splitted.length-1;s++){
|
||||
if (s==0) {
|
||||
result=splitted[s];
|
||||
} else {
|
||||
result=result+"\\"+splitted[s];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Common.getName ) {
|
||||
Common.getName = function(path){
|
||||
var splitted=path.split("\\");
|
||||
return splitted[splitted.length-1];
|
||||
}
|
||||
}
|
||||
|
||||
//file system object has a problem to create a folder with slashes at the end
|
||||
if ( ! Common.stripTrailingSlash ) {
|
||||
Common.stripTrailingSlash = function(path){
|
||||
while (path.substr(path.length - 1,path.length) == '\\') {
|
||||
path=path.substr(0, path.length - 1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////
|
||||
// Scripting.FileSystemObject extensions
|
||||
|
||||
if (! this.Scripting) {
|
||||
var Scripting={};
|
||||
}
|
||||
|
||||
if (! Scripting.FileSystemObject) {
|
||||
Scripting.FileSystemObject={};
|
||||
}
|
||||
|
||||
if ( ! Scripting.FileSystemObject.DeleteItem ) {
|
||||
Scripting.FileSystemObject.DeleteItem = function (item)
|
||||
{
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
if (FSOObj.FileExists(item)){
|
||||
FSOObj.DeleteFile(item);
|
||||
return true;
|
||||
} else if (FSOObj.FolderExists(item) ) {
|
||||
FSOObj.DeleteFolder(Common.stripTrailingSlash(item));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( ! Scripting.FileSystemObject.ExistsFile ) {
|
||||
Scripting.FileSystemObject.ExistsFile = function (path)
|
||||
{
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
return FSOObj.FileExists(path);
|
||||
}
|
||||
}
|
||||
if ( !Scripting.FileSystemObject.ExistsFolder ) {
|
||||
Scripting.FileSystemObject.ExistsFolder = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
return FSOObj.FolderExists(path);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Scripting.FileSystemObject.isFolder ) {
|
||||
Scripting.FileSystemObject.isFolder = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
return FSOObj.FolderExists(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( ! Scripting.FileSystemObject.isEmptyFolder ) {
|
||||
Scripting.FileSystemObject.isEmptyFolder = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
if(FSOObj.FileExists(path)){
|
||||
return false;
|
||||
}else if (FSOObj.FolderExists(path)){
|
||||
var folderObj=FSOObj.GetFolder(path);
|
||||
if ((folderObj.Files.Count+folderObj.SubFolders.Count)==0){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( ! Scripting.FileSystemObject.CreateFolder) {
|
||||
Scripting.FileSystemObject.CreateFolder = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
FSOObj.CreateFolder(path);
|
||||
return FSOObj.FolderExists(path);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Scripting.FileSystemObject.ExistsItem) {
|
||||
Scripting.FileSystemObject.ExistsItem = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
return FSOObj.FolderExists(path)||FSOObj.FileExists(path);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Scripting.FileSystemObject.getFullPath) {
|
||||
Scripting.FileSystemObject.getFullPath = function (path){
|
||||
var FSOObj= new ActiveXObject("Scripting.FileSystemObject");
|
||||
return FSOObj.GetAbsolutePathName(path);
|
||||
}
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////
|
||||
// Shell.Application extensions
|
||||
if ( ! this.Shell ) {
|
||||
var Shell = {};
|
||||
}
|
||||
|
||||
if (! Shell.Application ) {
|
||||
Shell.Application={};
|
||||
}
|
||||
|
||||
if ( ! Shell.Application.ExistsFolder ) {
|
||||
Shell.Application.ExistsFolder = function(path){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var targetObject = new Object;
|
||||
var targetObject=ShellObj.NameSpace(path);
|
||||
if (typeof targetObject === 'undefined' || targetObject == null ){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Shell.Application.ExistsSubItem ) {
|
||||
Shell.Application.ExistsSubItem = function(path){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var targetObject = new Object;
|
||||
var targetObject=ShellObj.NameSpace(Common.getParent(path));
|
||||
if (typeof targetObject === 'undefined' || targetObject == null ){
|
||||
return false;
|
||||
}
|
||||
|
||||
var subItem=targetObject.ParseName(Common.getName(path));
|
||||
if(subItem === 'undefined' || subItem == null ){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( ! Shell.Application.ItemCounterL1 ) {
|
||||
Shell.Application.ItemCounterL1 = function(path){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var targetObject = new Object;
|
||||
var targetObject=ShellObj.NameSpace(path);
|
||||
if (targetObject != null ){
|
||||
return targetObject.Items().Count;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// shell application item.size returns the size of uncompressed state of the file.
|
||||
if ( ! Shell.Application.getSize ) {
|
||||
Shell.Application.getSize = function(path){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var targetObject = new Object;
|
||||
var targetObject=ShellObj.NameSpace(path);
|
||||
if (! Shell.Application.ExistsFolder (path)){
|
||||
WScript.Echo(path + "does not exists or the file is incorrect type.Be sure you are using full path to the file");
|
||||
return 0;
|
||||
}
|
||||
if (typeof size === 'undefined'){
|
||||
var size=0;
|
||||
}
|
||||
if (targetObject != null ){
|
||||
|
||||
for (var i=0; i<targetObject.Items().Count;i++){
|
||||
if(!targetObject.Items().Item(i).IsFolder){
|
||||
size=size+targetObject.Items().Item(i).Size;
|
||||
} else if (targetObject.Items().Item(i).Count!=0){
|
||||
size=size+Shell.Application.getSize(targetObject.Items().Item(i).Path);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
}
|
||||
if ( ! Shell.Application.TakeAction ) {
|
||||
Shell.Application.TakeAction = function(destination,item, move ,option){
|
||||
if(typeof destination != 'undefined' && move){
|
||||
destination.MoveHere(item,option);
|
||||
} else if(typeof destination != 'undefined') {
|
||||
destination.CopyHere(item,option);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ProcessItem and ProcessSubItems can be used both for zipping and unzipping
|
||||
// When an item is zipped another process is ran and the control is released
|
||||
// but when the script stops also the copying to the zipped file stops.
|
||||
// Though the zipping is transactional so a zipped files will be visible only after the zipping is done
|
||||
// and we can rely on items count when zip operation is performed.
|
||||
// Also is impossible to compress an empty folders.
|
||||
// So when it comes to zipping two additional checks are added - for empty folders and for count of items at the
|
||||
// destination.
|
||||
|
||||
if ( ! Shell.Application.ProcessItem ) {
|
||||
Shell.Application.ProcessItem = function(toProcess, destination , move ,isZipping,option){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
destinationObj=ShellObj.NameSpace(destination);
|
||||
|
||||
if (destinationObj!= null ){
|
||||
if (isZipping && Scripting.FileSystemObject.isEmptyFolder(toProcess)) {
|
||||
WScript.Echo(toProcess +" is an empty folder and will be not processed");
|
||||
return;
|
||||
}
|
||||
Shell.Application.TakeAction(destinationObj,toProcess, move ,option);
|
||||
var destinationCount=Shell.Application.ItemCounterL1(destination);
|
||||
var final_destination=destination + "\\" + Common.getName(toProcess);
|
||||
|
||||
if (isZipping && !Shell.Application.ExistsSubItem(final_destination)) {
|
||||
Common.WaitForCount(destination
|
||||
,destinationCount+1,Shell.Application.ItemCounterL1);
|
||||
} else if (isZipping && Shell.Application.ExistsSubItem(final_destination)){
|
||||
WScript.Echo(final_destination + " already exists and task cannot be completed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( ! Shell.Application.ProcessSubItems ) {
|
||||
Shell.Application.ProcessSubItems = function(toProcess, destination , move ,isZipping ,option){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var destinationObj=ShellObj.NameSpace(destination);
|
||||
var toItemsToProcess=new Object;
|
||||
toItemsToProcess=ShellObj.NameSpace(toProcess).Items();
|
||||
|
||||
if (destinationObj!= null ){
|
||||
|
||||
for (var i=0;i<toItemsToProcess.Count;i++) {
|
||||
|
||||
if (isZipping && Scripting.FileSystemObject.isEmptyFolder(toItemsToProcess.Item(i).Path)){
|
||||
|
||||
WScript.Echo("");
|
||||
WScript.Echo(toItemsToProcess.Item(i).Path + " is empty and will be not processed");
|
||||
WScript.Echo("");
|
||||
|
||||
} else {
|
||||
Shell.Application.TakeAction(destinationObj,toItemsToProcess.Item(i),move,option);
|
||||
var destinationCount=Shell.Application.ItemCounterL1(destination);
|
||||
if (isZipping) {
|
||||
Common.WaitForCount(destination,destinationCount+1,Shell.Application.ItemCounterL1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! Shell.Application.ListItems ) {
|
||||
Shell.Application.ListItems = function(parrentObject){
|
||||
var ShellObj=new ActiveXObject("Shell.Application");
|
||||
var targetObject = new Object;
|
||||
var targetObject=ShellObj.NameSpace(parrentObject);
|
||||
|
||||
if (! Shell.Application.ExistsFolder (parrentObject)){
|
||||
WScript.Echo(parrentObject + "does not exists or the file is incorrect type.Be sure the full path the path is used");
|
||||
return;
|
||||
}
|
||||
if (typeof initialSCount == 'undefined') {
|
||||
initialSCount=(parrentObject.split("\\").length-1);
|
||||
WScript.Echo(parrentObject);
|
||||
}
|
||||
|
||||
var spaces=function(path){
|
||||
var SCount=(path.split("\\").length-1)-initialSCount;
|
||||
var s="";
|
||||
for (var i=0;i<=SCount;i++) {
|
||||
s=" "+s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
var printP = function (item,end){
|
||||
if (flat) {
|
||||
WScript.Echo(targetObject.Items().Item(i).Path+end);
|
||||
}else{
|
||||
WScript.Echo( spaces(targetObject.Items().Item(i).Path)+targetObject.Items().Item(i).Name+end);
|
||||
}
|
||||
}
|
||||
|
||||
if (targetObject != null ){
|
||||
var folderPath="";
|
||||
|
||||
for (var i=0; i<targetObject.Items().Count;i++) {
|
||||
if(targetObject.Items().Item(i).IsFolder && targetObject.Items().Item(i).Count==0 ){
|
||||
printP(targetObject.Items().Item(i),"\\");
|
||||
} else if (targetObject.Items().Item(i).IsFolder){
|
||||
folderPath=parrentObject+"\\"+targetObject.Items().Item(i).Name;
|
||||
printP(targetObject.Items().Item(i),"\\")
|
||||
Shell.Application.ListItems(folderPath);
|
||||
|
||||
} else {
|
||||
printP(targetObject.Items().Item(i),"")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// ZIP Utils
|
||||
|
||||
if ( ! this.ZIPUtils ) {
|
||||
var ZIPUtils = {};
|
||||
}
|
||||
|
||||
|
||||
if ( ! this.ZIPUtils.ZipItem) {
|
||||
ZIPUtils.ZipItem = function(source, destination ) {
|
||||
if (!Scripting.FileSystemObject.ExistsItem(source)) {
|
||||
WScript.Echo("");
|
||||
WScript.Echo("file " + source +" does not exist");
|
||||
WScript.Quit(2);
|
||||
}
|
||||
|
||||
if (Scripting.FileSystemObject.ExistsFile(destination) && force ) {
|
||||
Scripting.FileSystemObject.DeleteItem(destination);
|
||||
ADODB.Stream.writeFile(destination,ZIP_DATA);
|
||||
} else if (!Scripting.FileSystemObject.ExistsFile(destination)) {
|
||||
ADODB.Stream.writeFile(destination,ZIP_DATA);
|
||||
} else {
|
||||
WScript.Echo("Destination "+destination+" already exists.Operation will be aborted");
|
||||
WScript.Quit(15);
|
||||
}
|
||||
source=Scripting.FileSystemObject.getFullPath(source);
|
||||
destination=Scripting.FileSystemObject.getFullPath(destination);
|
||||
|
||||
Shell.Application.ProcessItem(source,destination,move,true ,NO_PROGRESS_BAR);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( ! this.ZIPUtils.ZipDirItems) {
|
||||
ZIPUtils.ZipDirItems = function(source, destination ) {
|
||||
if (!Scripting.FileSystemObject.ExistsFolder(source)) {
|
||||
WScript.Echo();
|
||||
WScript.Echo("file " + source +" does not exist");
|
||||
WScript.Quit(2);
|
||||
}
|
||||
if (Scripting.FileSystemObject.ExistsFile(destination) && force ) {
|
||||
Scripting.FileSystemObject.DeleteItem(destination);
|
||||
ADODB.Stream.writeFile(destination,ZIP_DATA);
|
||||
} else if (!Scripting.FileSystemObject.ExistsFile(destination)) {
|
||||
ADODB.Stream.writeFile(destination,ZIP_DATA);
|
||||
} else {
|
||||
WScript.Echo("Destination "+destination+" already exists.Operation will be aborted");
|
||||
WScript.Quit(15);
|
||||
}
|
||||
|
||||
source=Scripting.FileSystemObject.getFullPath(source);
|
||||
destination=Scripting.FileSystemObject.getFullPath(destination);
|
||||
|
||||
Shell.Application.ProcessSubItems(source, destination, move ,true,NO_PROGRESS_BAR);
|
||||
|
||||
if (move){
|
||||
Scripting.FileSystemObject.DeleteItem(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! this.ZIPUtils.Unzip) {
|
||||
ZIPUtils.Unzip = function(source, destination ) {
|
||||
if(!Shell.Application.ExistsFolder(source) ){
|
||||
WScript.Echo("Either the target does not exist or is not a correct type");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Scripting.FileSystemObject.ExistsItem(destination) && force ) {
|
||||
Scripting.FileSystemObject.DeleteItem(destination);
|
||||
} else if (Scripting.FileSystemObject.ExistsItem(destination)){
|
||||
WScript.Echo("Destination " + destination + " already exists");
|
||||
return;
|
||||
}
|
||||
Scripting.FileSystemObject.CreateFolder(destination);
|
||||
source=Scripting.FileSystemObject.getFullPath(source);
|
||||
destination=Scripting.FileSystemObject.getFullPath(destination);
|
||||
Shell.Application.ProcessSubItems(source, destination, move ,false,NO_PROGRESS_BAR);
|
||||
|
||||
if (move){
|
||||
Scripting.FileSystemObject.DeleteItem(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! this.ZIPUtils.AddToZip) {
|
||||
ZIPUtils.AddToZip = function(source, destination ) {
|
||||
if(!Shell.Application.ExistsFolder(destination)) {
|
||||
WScript.Echo(destination +" is not valid path to/within zip.Be sure you are not using relative paths");
|
||||
Wscript.Exit("101");
|
||||
}
|
||||
if(!Scripting.FileSystemObject.ExistsItem(source)){
|
||||
WScript.Echo(source +" does not exist");
|
||||
Wscript.Exit("102");
|
||||
}
|
||||
source=Scripting.FileSystemObject.getFullPath(source);
|
||||
Shell.Application.ProcessItem(source,destination,move,true ,NO_PROGRESS_BAR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! this.ZIPUtils.UnzipItem) {
|
||||
ZIPUtils.UnzipItem = function(source, destination ) {
|
||||
|
||||
if(!Shell.Application.ExistsSubItem(source)){
|
||||
WScript.Echo(source + ":Either the target does not exist or is not a correct type");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Scripting.FileSystemObject.ExistsItem(destination) && force ) {
|
||||
Scripting.FileSystemObject.DeleteItem(destination);
|
||||
} else if (Scripting.FileSystemObject.ExistsItem(destination)){
|
||||
WScript.Echo(destination+" - Destination already exists");
|
||||
return;
|
||||
}
|
||||
|
||||
Scripting.FileSystemObject.CreateFolder(destination);
|
||||
destination=Scripting.FileSystemObject.getFullPath(destination);
|
||||
Shell.Application.ProcessItem(source, destination, move ,false,NO_PROGRESS_BAR);
|
||||
|
||||
}
|
||||
}
|
||||
if ( ! this.ZIPUtils.getSize) {
|
||||
ZIPUtils.getSize = function(path) {
|
||||
// first getting a full path to the file is attempted
|
||||
// as it's required by shell.application
|
||||
// otherwise is assumed that a file within a zip
|
||||
// is aimed
|
||||
|
||||
//TODO - find full path even if the path points to internal for the
|
||||
// zip directory
|
||||
|
||||
if (Scripting.FileSystemObject.ExistsFile(path)){
|
||||
path=Scripting.FileSystemObject.getFullPath(path);
|
||||
}
|
||||
WScript.Echo(Shell.Application.getSize(path));
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! this.ZIPUtils.list) {
|
||||
ZIPUtils.list = function(path) {
|
||||
// first getting a full path to the file is attempted
|
||||
// as it's required by shell.application
|
||||
// otherwise is assumed that a file within a zip
|
||||
// is aimed
|
||||
|
||||
//TODO - find full path even if the path points to internal for the
|
||||
// zip directory
|
||||
|
||||
// TODO - optional printing of each file uncompressed size
|
||||
|
||||
if (Scripting.FileSystemObject.ExistsFile(path)){
|
||||
path=Scripting.FileSystemObject.getFullPath(path);
|
||||
}
|
||||
Shell.Application.ListItems(path);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////
|
||||
// parsing'n'running
|
||||
function printHelp(){
|
||||
|
||||
WScript.Echo( scriptName + " list -source zipFile [-flat yes|no]");
|
||||
WScript.Echo( " list the content of a zip file");
|
||||
WScript.Echo( " zipFile - absolute path to the zip file");
|
||||
WScript.Echo( " could be also a directory or a directory inside a zip file or");
|
||||
WScript.Echo( " or a .cab file or an .iso file");
|
||||
WScript.Echo( " -flat - indicates if the structure of the zip will be printed as tree");
|
||||
WScript.Echo( " or with absolute paths (-flat yes).Default is yes.");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " list -source C:\\myZip.zip -flat no" );
|
||||
WScript.Echo( " " + scriptName + " list -source C:\\myZip.zip\\inZipDir -flat yes" );
|
||||
|
||||
WScript.Echo( scriptName + " getSize -source zipFile");
|
||||
WScript.Echo( " prints uncompressed size of the zipped file in bytes");
|
||||
WScript.Echo( " zipFile - absolute path to the zip file");
|
||||
WScript.Echo( " could be also a directory or a directory inside a zip file or");
|
||||
WScript.Echo( " or a .cab file or an .iso file");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " getSize -source C:\\myZip.zip" );
|
||||
|
||||
WScript.Echo( scriptName + " zipDirItems -source source_dir -destination destination.zip [-force yes|no] [-keep yes|no]");
|
||||
WScript.Echo( " zips the content of given folder without the folder itself ");
|
||||
WScript.Echo( " source_dir - path to directory which content will be compressed");
|
||||
WScript.Echo( " Empty folders in the source directory will be ignored");
|
||||
WScript.Echo( " destination.zip - path/name of the zip file that will be created");
|
||||
WScript.Echo( " -force - indicates if the destination will be overwritten if already exists.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( " -keep - indicates if the source content will be moved or just copied/kept.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " zipDirItems -source C:\\myDir\\ -destination C:\\MyZip.zip -keep yes -force no" );
|
||||
|
||||
WScript.Echo( scriptName + " zipItem -source item -destination destination.zip [-force yes|no] [-keep yes|no]");
|
||||
WScript.Echo( " zips file or directory to a destination.zip file ");
|
||||
WScript.Echo( " item - path to file or directory which content will be compressed");
|
||||
WScript.Echo( " If points to an empty folder it will be ignored");
|
||||
WScript.Echo( " If points to a folder it also will be included in the zip file alike zipdiritems command");
|
||||
WScript.Echo( " Eventually zipping a folder in this way will be faster as it does not process every element one by one");
|
||||
WScript.Echo( " destination.zip - path/name of the zip file that will be created");
|
||||
WScript.Echo( " -force - indicates if the destination will be overwritten if already exists.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( " -keep - indicates if the source content will be moved or just copied/kept.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " zipItem -source C:\\myDir\\myFile.txt -destination C:\\MyZip.zip -keep yes -force no" );
|
||||
|
||||
WScript.Echo( scriptName + " unzip -source source.zip -destination destination_dir [-force yes|no] [-keep yes|no]");
|
||||
WScript.Echo( " unzips the content of a zip file to a given directory ");
|
||||
WScript.Echo( " source - path to the zip file that will be expanded");
|
||||
WScript.Echo( " Eventually .iso , .cab or even an ordinary directory can be used as a source");
|
||||
WScript.Echo( " destination_dir - path to directory where unzipped items will be stored");
|
||||
WScript.Echo( " -force - indicates if the destination will be overwritten if already exists.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( " -keep - indicates if the source content will be moved or just copied/kept.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " unzip -source C:\\myDir\\myZip.zip -destination C:\\MyDir -keep no -force no" );
|
||||
|
||||
WScript.Echo( scriptName + " unZipItem -source source.zip -destination destination_dir [-force yes|no] [-keep yes|no]");
|
||||
WScript.Echo( " unzips a single within a given zip file to a destination directory");
|
||||
WScript.Echo( " source - path to the file/folcer within a zip that will be expanded");
|
||||
WScript.Echo( " Eventually .iso , .cab or even an ordinary directory can be used as a source");
|
||||
WScript.Echo( " destination_dir - path to directory where unzipped item will be stored");
|
||||
WScript.Echo( " -force - indicates if the destination directory will be overwritten if already exists.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( " -keep - indicates if the source content will be moved or just copied/kept.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " unZipItem -source C:\\myDir\\myZip.zip\\InzipDir\\InzipFile -destination C:\\OtherDir -keep no -force yes" );
|
||||
WScript.Echo( " " + scriptName + " unZipItem -source C:\\myDir\\myZip.zip\\InzipDir -destination C:\\OtherDir " );
|
||||
|
||||
WScript.Echo( scriptName + " addToZip -source sourceItem -destination destination.zip [-keep yes|no]");
|
||||
WScript.Echo( " adds file or folder to already exist zip file");
|
||||
WScript.Echo( " source - path to the item that will be processed");
|
||||
WScript.Echo( " destination_zip - path to the zip where the item will be added");
|
||||
WScript.Echo( " -keep - indicates if the source content will be moved or just copied/kept.");
|
||||
WScript.Echo( " default is yes");
|
||||
WScript.Echo( "Example:");
|
||||
WScript.Echo( " " + scriptName + " addToZip -source C:\\some_file -destination C:\\myDir\\myZip.zip\\InzipDir -keep no " );
|
||||
WScript.Echo( " " + scriptName + " addToZip -source C:\\some_file -destination C:\\myDir\\myZip.zip " );
|
||||
|
||||
WScript.Echo( " by Vasil \"npocmaka\" Arnaudov - npocmaka@gmail.com" );
|
||||
WScript.Echo( " ver 0.1.2 " );
|
||||
WScript.Echo( " latest version could be found here https://github.com/npocmaka/batch.scripts/blob/master/hybrids/jscript/zipjs.bat" );
|
||||
|
||||
|
||||
}
|
||||
|
||||
function parseArguments(){
|
||||
if (WScript.Arguments.Length==1 || WScript.Arguments.Length==2 || ARGS.Item(1).toLowerCase() == "-help" || ARGS.Item(1).toLowerCase() == "-h" ) {
|
||||
printHelp();
|
||||
WScript.Quit(0);
|
||||
}
|
||||
|
||||
//all arguments are key-value pairs plus one for script name and action taken - need to be even number
|
||||
if (WScript.Arguments.Length % 2 == 1 ) {
|
||||
WScript.Echo("Illegal arguments ");
|
||||
printHelp();
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
//ARGS
|
||||
for(var arg = 2 ; arg<ARGS.Length-1;arg=arg+2) {
|
||||
if (ARGS.Item(arg) == "-source") {
|
||||
source = ARGS.Item(arg +1);
|
||||
}
|
||||
if (ARGS.Item(arg) == "-destination") {
|
||||
destination = ARGS.Item(arg +1);
|
||||
}
|
||||
if (ARGS.Item(arg).toLowerCase() == "-keep" && ARGS.Item(arg +1).toLowerCase() == "no") {
|
||||
move=true;
|
||||
}
|
||||
if (ARGS.Item(arg).toLowerCase() == "-force" && ARGS.Item(arg +1).toLowerCase() == "no") {
|
||||
force=false;
|
||||
}
|
||||
if (ARGS.Item(arg).toLowerCase() == "-flat" && ARGS.Item(arg +1).toLowerCase() == "yes") {
|
||||
flat=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (source == ""){
|
||||
WScript.Echo("Source not given");
|
||||
printHelp();
|
||||
WScript.Quit(59);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var checkDestination=function(){
|
||||
if (destination == ""){
|
||||
WScript.Echo("Destination not given");
|
||||
printHelp();
|
||||
WScript.Quit(65);
|
||||
}
|
||||
}
|
||||
|
||||
var main=function(){
|
||||
parseArguments();
|
||||
switch (ARGS.Item(1).toLowerCase()) {
|
||||
case "list":
|
||||
ZIPUtils.list(source);
|
||||
break;
|
||||
case "getsize":
|
||||
ZIPUtils.getSize(source);
|
||||
break;
|
||||
case "zipdiritems":
|
||||
checkDestination();
|
||||
ZIPUtils.ZipDirItems(source,destination);
|
||||
break;
|
||||
case "zipitem":
|
||||
checkDestination();
|
||||
ZIPUtils.ZipItem(source,destination);
|
||||
break;
|
||||
case "unzip":
|
||||
checkDestination();
|
||||
ZIPUtils.Unzip(source,destination);
|
||||
break;
|
||||
case "unzipitem":
|
||||
checkDestination();
|
||||
ZIPUtils.UnzipItem(source,destination);
|
||||
break;
|
||||
case "addtozip":
|
||||
checkDestination();
|
||||
ZIPUtils.AddToZip(source,destination);
|
||||
break;
|
||||
default:
|
||||
WScript.Echo("No valid switch has been passed");
|
||||
printHelp();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
main();
|
||||
//
|
||||
//////////////////////////////////////
|
@ -1251,8 +1251,8 @@ dnl common files for all posix hosts
|
||||
dnl TODO: fix "arch-specific/linux/" paths for common posix scripts with SVN
|
||||
for fb_tgt in $FB_TARGETS; do
|
||||
AC_CONFIG_FILES([
|
||||
gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf.in
|
||||
gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf.in
|
||||
gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf
|
||||
gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf
|
||||
gen/$fb_tgt/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf
|
||||
gen/$fb_tgt/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf
|
||||
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
|
||||
@ -1371,9 +1371,6 @@ else
|
||||
fi
|
||||
AC_SUBST(POSTFIX_INCLUDE)
|
||||
|
||||
UDF_COMMENT="#"
|
||||
AC_SUBST(UDF_COMMENT)
|
||||
|
||||
AC_CONFIG_FILES(
|
||||
gen/make.rules:${MAKE_SRC_DIR}/make.rules
|
||||
gen/make.defaults:${MAKE_SRC_DIR}/make.defaults
|
||||
|
@ -114,6 +114,7 @@ Monitoring tables
|
||||
- MON$STATEMENT_TIMEOUT (statement timeout)
|
||||
- MON$WIRE_COMPRESSED (wire compression enabled/disabled)
|
||||
- MON$WIRE_ENCRYPTED (wire encryption enabled/disabled)
|
||||
- MON$WIRE_CRYPT_PLUGIN (name of wire encryption plugin)
|
||||
|
||||
MON$TRANSACTIONS (started transactions)
|
||||
- MON$TRANSACTION_ID (transaction ID)
|
||||
|
@ -64,6 +64,9 @@ Usage:
|
||||
WIRE_ENCRYPTED | Encryption status of current connection.
|
||||
| Value is the same as for compression status above.
|
||||
|
|
||||
WIRE_CRYPT_PLUGIN | If connection is encrypted - returns name of current plugin,
|
||||
| otherwise NULL.
|
||||
|
|
||||
CLIENT_ADDRESS | The wire protocol address and port number of remote client
|
||||
| represented as string. Value is IP address concatenated with
|
||||
| port number using the '/' separator character. Value is
|
||||
|
@ -32,10 +32,22 @@ New items for isc_database_info
|
||||
|
||||
See also CORE-2054.
|
||||
|
||||
4. Database encryption information:
|
||||
fb_info_crypt_state - flags describing encryption state:
|
||||
fb_info_crypt_encrypted - database is encrypted,
|
||||
fb_info_crypt_process - encryption/decryption process is not complete;
|
||||
fb_info_crypt_plugin - name of database crypt plugin;
|
||||
fb_info_crypt_key - name of used database crypt key.
|
||||
|
||||
5. Connection information:
|
||||
fb_info_conn_flags - flags describing connection state:
|
||||
isc_dpb_addr_flag_conn_compressed - compression is used for connection,
|
||||
isc_dpb_addr_flag_conn_encrypted - connection is encrypted;
|
||||
fb_info_wire_crypt - name of connection encryption plugin.
|
||||
|
||||
|
||||
New items for isc_transaction_info:
|
||||
|
||||
|
||||
1. isc_info_tra_oldest_interesting :
|
||||
return number of oldest interesting transaction when current
|
||||
transaction started. For snapshot transactions this is also the
|
||||
|
@ -301,13 +301,17 @@ Returns:
|
||||
|
||||
# Updating the time zone database
|
||||
|
||||
Time zones are often changed and when this happen it's convenient to update the time zone database as soon as possible.
|
||||
Firebird uses the [IANA time zone database](http://www.iana.org/time-zones) through the ICU library.
|
||||
|
||||
Firebird stores `WITH TIME ZONE` values translated to UTC time. If a value is created with one time zone database and later that database is updated and the update changes the information in the range of a stored value, when reading that value it will be returned as a different than the one initially stored.
|
||||
When a Firebird version is released it's released with the most up-to-date time zone database but with the time it may become outdated.
|
||||
|
||||
Firebird uses the [IANA time zone database](http://www.iana.org/time-zones) through the ICU library. ICU library present in Firebird kit (Windows) or present in OS (Linux, POSIX) sometimes has outdated time zone database.
|
||||
An updated database can be found in [this Firebird's github page](https://github.com/FirebirdSQL/firebird/tree/master/tzdata). `le.zip` stands for little-endian and is the necessary file for most computer architectures (Intel/AMD compatible x86 or x64). `be.zip` stands for big-endian architectures.
|
||||
|
||||
Update procedure is described in that [ICU page](http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data). The easiest way to update is downloading the `*.res` files in a directory and set `ICU_TIMEZONE_FILES_DIR` environment variable pointing to it.
|
||||
The content of the zip file must be extracted in the `tzdata` subdirectory of Firebird's root, overwriting the others `*.res` files of the old database.
|
||||
|
||||
Note: `<firebird root>/tzdata` is the default directory where Firebird looks for the database. It could be overriden with the `ICU_TIMEZONE_FILES_DIR` environment variable.
|
||||
|
||||
Important note: Firebird stores `WITH TIME ZONE` values translated to UTC time. If a value is created with one time zone database and later that database is updated and the update changes the information in the range of a stored value, when reading that value it will be returned as a different value than the one initially stored.
|
||||
|
||||
|
||||
# Appendix: time zone regions
|
||||
|
6
extern/icu/Readme.txt
vendored
6
extern/icu/Readme.txt
vendored
@ -2,10 +2,14 @@ icu.exe is a self-extract pre-built (by us) IBM ICU 63.1 library.
|
||||
|
||||
The sources was downloaded from http://site.icu-project.org/download.
|
||||
|
||||
The simple fix for bug ICU-20302 (Windows 7: timezone detection on Windows
|
||||
The simple fix for bug ICU-20302 (Windows 7: timezone detection on Windows
|
||||
is broken) is applyed, see:
|
||||
|
||||
https://unicode-org.atlassian.net/browse/ICU-20302
|
||||
https://github.com/unicode-org/icu/pull/315
|
||||
|
||||
The build was done using VS 2017 (15.9).
|
||||
|
||||
---
|
||||
|
||||
tzdata is automatically updated (pull request created) by GitHub Actions tzdata-update.yml.
|
||||
|
BIN
extern/icu/tzdata/be.zip
vendored
Normal file
BIN
extern/icu/tzdata/be.zip
vendored
Normal file
Binary file not shown.
BIN
extern/icu/tzdata/le.zip
vendored
Normal file
BIN
extern/icu/tzdata/le.zip
vendored
Normal file
Binary file not shown.
32
extern/icu/tzdata/update.sh
vendored
Executable file
32
extern/icu/tzdata/update.sh
vendored
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Change version.txt before run this script.
|
||||
|
||||
THIS_DIR=`readlink -f $0`
|
||||
THIS_DIR=`dirname $THIS_DIR`
|
||||
|
||||
TMP_DIR=`mktemp -d`
|
||||
VERSION=`cat $THIS_DIR/version.txt`
|
||||
BASE_URL=https://github.com/unicode-org/icu-data/raw/master/tzdata/icunew/$VERSION/44
|
||||
|
||||
echo Downloading and updating little-endian files...
|
||||
mkdir $TMP_DIR/le
|
||||
cd $TMP_DIR/le
|
||||
curl -OLs $BASE_URL/le/metaZones.res
|
||||
curl -OLs $BASE_URL/le/timezoneTypes.res
|
||||
curl -OLs $BASE_URL/le/windowsZones.res
|
||||
curl -OLs $BASE_URL/le/zoneinfo64.res
|
||||
rm $THIS_DIR/le.zip
|
||||
zip $THIS_DIR/le.zip *.res
|
||||
|
||||
echo Downloading and updating big-endian files...
|
||||
mkdir $TMP_DIR/be
|
||||
cd $TMP_DIR/be
|
||||
curl -OLs $BASE_URL/be/metaZones.res
|
||||
curl -OLs $BASE_URL/be/timezoneTypes.res
|
||||
curl -OLs $BASE_URL/be/windowsZones.res
|
||||
curl -OLs $BASE_URL/be/zoneinfo64.res
|
||||
rm $THIS_DIR/be.zip
|
||||
zip $THIS_DIR/be.zip *.res
|
||||
|
||||
rm -r $TMP_DIR
|
1
extern/icu/tzdata/version.txt
vendored
Normal file
1
extern/icu/tzdata/version.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
2019c
|
@ -909,8 +909,8 @@ add_custom_target(copy_files
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/security.fdb ${output_dir}/security4.fdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GENERATED_DIR}/help.fdb ${output_dir}/help/help.fdb
|
||||
# configs, text files
|
||||
COMMAND sed "/@UDF_COMMENT@/d" < ${CMAKE_SOURCE_DIR}/builds/install/misc/firebird.conf.in > ${output_dir}/firebird.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/databases.conf.in ${output_dir}/databases.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/firebird.conf ${output_dir}/firebird.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/databases.conf ${output_dir}/databases.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/fbintl.conf ${output_dir}/intl/fbintl.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/plugins.conf ${output_dir}/plugins.conf
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/misc/IPLicense.txt ${output_dir}/IPLicense.txt
|
||||
|
@ -826,16 +826,14 @@ int gbak(Firebird::UtilSvc* uSvc)
|
||||
FILE* tmp_outfile = os_utils::fopen(redirect, fopen_read_type);
|
||||
if (tmp_outfile)
|
||||
{
|
||||
BURP_print(true, 66, redirect);
|
||||
// msg 66 can't open status and error output file %s
|
||||
fclose(tmp_outfile);
|
||||
BURP_exit_local(FINI_ERROR, tdgbl);
|
||||
BURP_error(66, true, SafeArg() << redirect);
|
||||
// msg 66 can't open status and error output file %s
|
||||
}
|
||||
if (! (tdgbl->output_file = os_utils::fopen(redirect, fopen_write_type)))
|
||||
{
|
||||
BURP_print(true, 66, redirect);
|
||||
BURP_error(66, true, SafeArg() << redirect);
|
||||
// msg 66 can't open status and error output file %s
|
||||
BURP_exit_local(FINI_ERROR, tdgbl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1090,7 +1090,7 @@ void create_database(BurpGlobals* tdgbl, Firebird::IProvider* provider, const TE
|
||||
|
||||
if (!tdgbl->gbl_sw_crypt)
|
||||
{
|
||||
BURP_error(true, 378);
|
||||
BURP_error(378, true);
|
||||
// Unknown crypt plugin name - use -CRYPT switch
|
||||
}
|
||||
|
||||
@ -4903,12 +4903,15 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
|
||||
bool existFlag = false;
|
||||
|
||||
Firebird::ITransaction* local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;
|
||||
|
||||
if (tdgbl->runtimeODS >= DB_VERSION_DDL12)
|
||||
{
|
||||
GDS_NAME function_name;
|
||||
bool securityClass = false;
|
||||
|
||||
STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
|
||||
STORE (TRANSACTION_HANDLE local_trans
|
||||
REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
|
||||
X IN RDB$FUNCTIONS
|
||||
X.RDB$DESCRIPTION.NULL = TRUE;
|
||||
X.RDB$ENGINE_NAME.NULL = TRUE;
|
||||
@ -4959,12 +4962,12 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
|
||||
case att_function_description:
|
||||
X.RDB$DESCRIPTION.NULL = FALSE;
|
||||
get_misc_blob (tdgbl, X.RDB$DESCRIPTION, false);
|
||||
get_misc_blob (tdgbl, X.RDB$DESCRIPTION, true);
|
||||
break;
|
||||
|
||||
case att_function_description2:
|
||||
X.RDB$DESCRIPTION.NULL = FALSE;
|
||||
get_source_blob (tdgbl, X.RDB$DESCRIPTION, false);
|
||||
get_source_blob (tdgbl, X.RDB$DESCRIPTION, true);
|
||||
break;
|
||||
|
||||
case att_function_module_name:
|
||||
@ -5024,7 +5027,7 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
case att_function_blr:
|
||||
if (tdgbl->RESTORE_format >= 10)
|
||||
{
|
||||
get_blr_blob(tdgbl, X.RDB$FUNCTION_BLR, false);
|
||||
get_blr_blob(tdgbl, X.RDB$FUNCTION_BLR, true);
|
||||
X.RDB$FUNCTION_BLR.NULL = FALSE;
|
||||
}
|
||||
else
|
||||
@ -5034,7 +5037,7 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
case att_function_source:
|
||||
if (tdgbl->RESTORE_format >= 10)
|
||||
{
|
||||
get_source_blob(tdgbl, X.RDB$FUNCTION_SOURCE, false);
|
||||
get_source_blob(tdgbl, X.RDB$FUNCTION_SOURCE, true);
|
||||
X.RDB$FUNCTION_SOURCE.NULL = FALSE;
|
||||
}
|
||||
else
|
||||
@ -5054,7 +5057,7 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
case att_function_debug_info:
|
||||
if (tdgbl->RESTORE_format >= 10)
|
||||
{
|
||||
get_misc_blob(tdgbl, X.RDB$DEBUG_INFO, false);
|
||||
get_misc_blob(tdgbl, X.RDB$DEBUG_INFO, true);
|
||||
X.RDB$DEBUG_INFO.NULL = FALSE;
|
||||
}
|
||||
else
|
||||
@ -5133,7 +5136,8 @@ bool get_function(BurpGlobals* tdgbl)
|
||||
}
|
||||
else
|
||||
{
|
||||
STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
|
||||
STORE (TRANSACTION_HANDLE local_trans
|
||||
REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
|
||||
X IN RDB$FUNCTIONS
|
||||
X.RDB$SYSTEM_FLAG = 0;
|
||||
X.RDB$SYSTEM_FLAG.NULL = FALSE;
|
||||
@ -5279,6 +5283,8 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
|
||||
att_type attribute;
|
||||
scan_attr_t scan_next_attr;
|
||||
|
||||
Firebird::ITransaction* local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;
|
||||
|
||||
if (skip_arguments)
|
||||
{
|
||||
skip_init(&scan_next_attr);
|
||||
@ -5378,7 +5384,8 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
|
||||
if (tdgbl->runtimeODS >= DB_VERSION_DDL12)
|
||||
{
|
||||
// with RDB$FIELD_PRECISION
|
||||
STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
STORE (TRANSACTION_HANDLE local_trans
|
||||
REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
X IN RDB$FUNCTION_ARGUMENTS
|
||||
X.RDB$FIELD_SUB_TYPE.NULL = TRUE;
|
||||
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
|
||||
@ -5496,7 +5503,7 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
|
||||
case att_functionarg_default_value:
|
||||
if (tdgbl->RESTORE_format >= 10)
|
||||
{
|
||||
get_blr_blob(tdgbl, X.RDB$DEFAULT_VALUE, false);
|
||||
get_blr_blob(tdgbl, X.RDB$DEFAULT_VALUE, true);
|
||||
X.RDB$DEFAULT_VALUE.NULL = FALSE;
|
||||
}
|
||||
else
|
||||
@ -5587,7 +5594,8 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
|
||||
else if (tdgbl->runtimeODS >= DB_VERSION_DDL10)
|
||||
{
|
||||
// with RDB$FIELD_PRECISION
|
||||
STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
STORE (TRANSACTION_HANDLE local_trans
|
||||
REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
X IN RDB$FUNCTION_ARGUMENTS
|
||||
X.RDB$FIELD_SUB_TYPE.NULL = TRUE;
|
||||
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
|
||||
@ -5700,7 +5708,8 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
|
||||
else
|
||||
{
|
||||
// without RDB$FIELD_PRECISION
|
||||
STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
STORE (TRANSACTION_HANDLE local_trans
|
||||
REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
|
||||
X IN RDB$FUNCTION_ARGUMENTS
|
||||
X.RDB$FIELD_SUB_TYPE.NULL = TRUE;
|
||||
X.RDB$CHARACTER_SET_ID.NULL = TRUE;
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "../common/classes/timestamp.h"
|
||||
#include "../common/classes/GenericMap.h"
|
||||
#include "../common/config/config.h"
|
||||
#include "../common/os/path_utils.h"
|
||||
#include "unicode/ucal.h"
|
||||
|
||||
#ifdef TZ_UPDATE
|
||||
@ -190,6 +191,21 @@ static InitInstance<TimeZoneStartup> timeZoneStartup;
|
||||
//-------------------------------------
|
||||
|
||||
const char TimeZoneUtil::GMT_FALLBACK[5] = "GMT*";
|
||||
InitInstance<PathName> TimeZoneUtil::tzDataPath;
|
||||
|
||||
void TimeZoneUtil::initTimeZoneEnv()
|
||||
{
|
||||
PathName path;
|
||||
PathUtils::concatPath(path, Config::getRootDirectory(), "tzdata");
|
||||
|
||||
if (fb_utils::setenv("ICU_TIMEZONE_FILES_DIR", path.c_str(), false))
|
||||
tzDataPath() = path;
|
||||
}
|
||||
|
||||
const PathName& TimeZoneUtil::getTzDataPath()
|
||||
{
|
||||
return tzDataPath();
|
||||
}
|
||||
|
||||
// Return the current user's time zone.
|
||||
USHORT TimeZoneUtil::getSystemTimeZone()
|
||||
|
@ -65,6 +65,9 @@ public:
|
||||
static const unsigned MAX_LEN = 32;
|
||||
static const unsigned MAX_SIZE = MAX_LEN + 1;
|
||||
|
||||
private:
|
||||
static InitInstance<PathName> tzDataPath;
|
||||
|
||||
public:
|
||||
static UDate ticksToIcuDate(SINT64 ticks)
|
||||
{
|
||||
@ -76,6 +79,9 @@ public:
|
||||
return (SINT64(icuDate) * 10) + (TimeStamp::UNIX_DATE * TimeStamp::ISC_TICKS_PER_DAY);
|
||||
}
|
||||
|
||||
static void initTimeZoneEnv();
|
||||
static const PathName& getTzDataPath();
|
||||
|
||||
static USHORT getSystemTimeZone();
|
||||
|
||||
static void getDatabaseVersion(Firebird::string& str);
|
||||
|
@ -219,7 +219,7 @@ namespace Firebird
|
||||
}
|
||||
}
|
||||
|
||||
return ptr;
|
||||
return p;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -202,9 +202,9 @@ const Config::ConfigEntry Config::entries[MAX_CONFIG_KEY] =
|
||||
{TYPE_STRING, "UserManager", (ConfigValue) "Srp"},
|
||||
{TYPE_STRING, "TracePlugin", (ConfigValue) "fbtrace"},
|
||||
{TYPE_STRING, "SecurityDatabase", (ConfigValue) "security.db"}, // sec/db alias - rely on databases.conf
|
||||
{TYPE_STRING, "ServerMode", (ConfigValue) "Super"},
|
||||
{TYPE_STRING, "ServerMode", (ConfigValue) ""}, // actual value differs in boot/regular cases
|
||||
{TYPE_STRING, "WireCrypt", (ConfigValue) NULL},
|
||||
{TYPE_STRING, "WireCryptPlugin", (ConfigValue) "Arc4"},
|
||||
{TYPE_STRING, "WireCryptPlugin", (ConfigValue) "ChaCha, Arc4"},
|
||||
{TYPE_STRING, "KeyHolderPlugin", (ConfigValue) ""},
|
||||
{TYPE_BOOLEAN, "RemoteAccess", (ConfigValue) true},
|
||||
{TYPE_BOOLEAN, "IPv6V6Only", (ConfigValue) false},
|
||||
@ -718,7 +718,7 @@ int Config::getServerMode()
|
||||
}
|
||||
|
||||
// use default
|
||||
rc = MODE_SUPER;
|
||||
rc = fb_utils::bootBuild() ? MODE_CLASSIC : MODE_SUPER;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -1802,7 +1802,7 @@ void CVT_move_common(const dsc* from, dsc* to, DecimalStatus decSt, Callbacks* c
|
||||
const UCHAR* start = to->dsc_address;
|
||||
UCHAR fill_char = ASCII_SPACE;
|
||||
Jrd::CharSet* toCharset = cb->getToCharset(charset2);
|
||||
ULONG toLength;
|
||||
ULONG toLength = 0;
|
||||
ULONG fill;
|
||||
|
||||
if (charset2 == ttype_binary)
|
||||
|
@ -31,12 +31,14 @@
|
||||
#include "../common/isc_proto.h"
|
||||
#include "../common/CharSet.h"
|
||||
#include "../common/IntlUtil.h"
|
||||
#include "../common/TimeZoneUtil.h"
|
||||
#include "../common/gdsassert.h"
|
||||
#include "../common/classes/auto.h"
|
||||
#include "../common/classes/GenericMap.h"
|
||||
#include "../common/classes/init.h"
|
||||
#include "../common/classes/objects_array.h"
|
||||
#include "../common/classes/rwlock.h"
|
||||
#include "../common/config/config.h"
|
||||
#include "../common/StatusHolder.h"
|
||||
#include "../common/os/path_utils.h"
|
||||
|
||||
@ -126,9 +128,11 @@ public:
|
||||
void BaseICU::initialize(ModuleLoader::Module* module)
|
||||
{
|
||||
void (U_EXPORT2 *uInit)(UErrorCode* status);
|
||||
void (U_EXPORT2 *uSetTimeZoneFilesDirectory)(const char* path, UErrorCode* status);
|
||||
void (U_EXPORT2 *uSetDataDirectory)(const char* directory);
|
||||
|
||||
getEntryPoint("u_init", module, uInit, true);
|
||||
getEntryPoint("u_setTimeZoneFilesDirectory", module, uSetTimeZoneFilesDirectory, true);
|
||||
getEntryPoint("u_setDataDirectory", module, uSetDataDirectory, true);
|
||||
|
||||
#if defined(WIN_NT) || defined(DARWIN)
|
||||
@ -166,6 +170,15 @@ void BaseICU::initialize(ModuleLoader::Module* module)
|
||||
(Arg::Gds(isc_random) << diag).raise();
|
||||
}
|
||||
}
|
||||
|
||||
// ICU's u_setTimeZoneFilesDirectory is an internal API, but we try to use
|
||||
// it because internally set ICU_TIMEZONE_FILES_DIR envvar in Windows is not
|
||||
// safe. See comments in fb_utils::setenv.
|
||||
if (uSetTimeZoneFilesDirectory && TimeZoneUtil::getTzDataPath().hasData())
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
uSetTimeZoneFilesDirectory(TimeZoneUtil::getTzDataPath().c_str(), &status);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../common/gdsassert.h"
|
||||
@ -303,6 +304,35 @@ bool readenv(const char* env_name, Firebird::PathName& env_value)
|
||||
}
|
||||
|
||||
|
||||
bool setenv(const char* name, const char* value, bool overwrite)
|
||||
{
|
||||
#ifdef WIN_NT
|
||||
int errcode = 0;
|
||||
|
||||
if (!overwrite)
|
||||
{
|
||||
size_t envsize = 0;
|
||||
errcode = getenv_s(&envsize, NULL, 0, name);
|
||||
if (errcode || envsize)
|
||||
return false;
|
||||
}
|
||||
|
||||
// In Windows, _putenv_s sets only the environment data in the CRT.
|
||||
// Each DLL (for example ICU) may use a different CRT which different data
|
||||
// or use Win32's GetEnvironmentVariable, so we also use SetEnvironmentVariable.
|
||||
// This is a mess and is not guarenteed to work correctly in all situations.
|
||||
if (SetEnvironmentVariable(name, value))
|
||||
{
|
||||
_putenv_s(name, value);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
#else
|
||||
return ::setenv(name, value, (int) overwrite) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************
|
||||
// s n p r i n t f
|
||||
// ***************
|
||||
|
@ -55,6 +55,7 @@ namespace fb_utils
|
||||
int name_length_limit(const TEXT* const name, size_t bufsize);
|
||||
bool readenv(const char* env_name, Firebird::string& env_value);
|
||||
bool readenv(const char* env_name, Firebird::PathName& env_value);
|
||||
bool setenv(const char* name, const char* value, bool overwrite);
|
||||
int snprintf(char* buffer, size_t count, const char* format...);
|
||||
char* cleanup_passwd(char* arg);
|
||||
inline char* get_passwd(char* arg)
|
||||
|
@ -3314,7 +3314,7 @@ DmlNode* CastNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb
|
||||
if (itemInfo.isSpecial())
|
||||
node->itemInfo = FB_NEW_POOL(*tdbb->getDefaultPool()) ItemInfo(*tdbb->getDefaultPool(), itemInfo);
|
||||
|
||||
if (itemInfo.explicitCollation)
|
||||
if ((csb->csb_g_flags & csb_get_dependencies) && itemInfo.explicitCollation)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_collation);
|
||||
dependency.number = INTL_TEXT_TYPE(node->castDesc);
|
||||
@ -4805,10 +4805,13 @@ DmlNode* DefaultNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
|
||||
csb->csb_blr_reader.getMetaName(relationName);
|
||||
csb->csb_blr_reader.getMetaName(fieldName);
|
||||
|
||||
CompilerScratch::Dependency dependency(obj_relation);
|
||||
dependency.relation = MET_lookup_relation(tdbb, relationName);
|
||||
dependency.subName = FB_NEW_POOL(pool) MetaName(fieldName);
|
||||
csb->csb_dependencies.push(dependency);
|
||||
if (csb->csb_g_flags & csb_get_dependencies)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_relation);
|
||||
dependency.relation = MET_lookup_relation(tdbb, relationName);
|
||||
dependency.subName = FB_NEW_POOL(pool) MetaName(fieldName);
|
||||
csb->csb_dependencies.push(dependency);
|
||||
}
|
||||
|
||||
jrd_fld* fld = NULL;
|
||||
|
||||
|
@ -2174,7 +2174,7 @@ DmlNode* DeclareVariableNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerS
|
||||
csb->csb_map_item_info.put(Item(Item::TYPE_VARIABLE, node->varId), itemInfo);
|
||||
}
|
||||
|
||||
if (itemInfo.explicitCollation)
|
||||
if ((csb->csb_g_flags & csb_get_dependencies) && itemInfo.explicitCollation)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_collation);
|
||||
dependency.number = INTL_TEXT_TYPE(node->varDesc);
|
||||
@ -2715,9 +2715,13 @@ DmlNode* ErrorHandlerNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScra
|
||||
if (!MET_load_exception(tdbb, item))
|
||||
PAR_error(csb, Arg::Gds(isc_xcpnotdef) << item.name);
|
||||
|
||||
CompilerScratch::Dependency dependency(obj_exception);
|
||||
dependency.number = item.code;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
if (csb->csb_g_flags & csb_get_dependencies)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_exception);
|
||||
dependency.number = item.code;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2886,7 +2890,7 @@ DmlNode* ExecProcedureNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScr
|
||||
PAR_procedure_parms(tdbb, csb, procedure, node->outputMessage.getAddress(),
|
||||
node->outputSources.getAddress(), node->outputTargets.getAddress(), false);
|
||||
|
||||
if (!procedure->isSubRoutine())
|
||||
if ((csb->csb_g_flags & csb_get_dependencies) && !procedure->isSubRoutine())
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_procedure);
|
||||
dependency.procedure = procedure;
|
||||
@ -4500,9 +4504,12 @@ DmlNode* ExceptionNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch
|
||||
if (!MET_load_exception(tdbb, *item))
|
||||
PAR_error(csb, Arg::Gds(isc_xcpnotdef) << item->name);
|
||||
|
||||
CompilerScratch::Dependency dependency(obj_exception);
|
||||
dependency.number = item->code;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
if (csb->csb_g_flags & csb_get_dependencies)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_exception);
|
||||
dependency.number = item->code;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -153,8 +153,9 @@
|
||||
|
||||
<address-element> ::=
|
||||
isc_dpb_addr_protocol <byte-clumplet-length> <protocol-string> |
|
||||
isc_dpb_addr_endpoint <byte-clumplet-length> <remote-endpoint-string>
|
||||
isc_dpb_addr_flags <byte-clumplet-length> <flags-int>
|
||||
isc_dpb_addr_endpoint <byte-clumplet-length> <remote-endpoint-string> |
|
||||
isc_dpb_addr_flags <byte-clumplet-length> <flags-int> |
|
||||
isc_dpb_addr_crypt <byte-clumplet-length> <plugin-string>
|
||||
|
||||
<protocol-string> ::=
|
||||
"TCPv4" |
|
||||
@ -163,6 +164,11 @@
|
||||
"WNET" |
|
||||
....
|
||||
|
||||
<plugin-string> ::=
|
||||
"Arc4" |
|
||||
"ChaCha" |
|
||||
....
|
||||
|
||||
<remote-endpoint-string> ::=
|
||||
<IPv4-address> | // such as "172.20.1.1"
|
||||
<IPv6-address> | // such as "2001:0:13FF:09FF::1"
|
||||
@ -178,6 +184,7 @@
|
||||
#define isc_dpb_addr_protocol 1
|
||||
#define isc_dpb_addr_endpoint 2
|
||||
#define isc_dpb_addr_flags 3
|
||||
#define isc_dpb_addr_crypt 4
|
||||
|
||||
/* possible addr flags */
|
||||
#define isc_dpb_addr_flag_conn_compressed 0x01
|
||||
|
@ -160,6 +160,8 @@ enum db_info_types
|
||||
|
||||
fb_info_creation_timestamp_tz = 139,
|
||||
|
||||
fb_info_wire_crypt = 140,
|
||||
|
||||
isc_info_db_last_value /* Leave this LAST! */
|
||||
};
|
||||
|
||||
|
@ -1,707 +0,0 @@
|
||||
|
||||
/*
|
||||
* PROGRAM: JRD Access Method
|
||||
* MODULE: relations.h
|
||||
* DESCRIPTION: System relation definitions
|
||||
*
|
||||
* The contents of this file are subject to the Interbase 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.Inprise.com/IPL.html
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, 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 Inprise Corporation
|
||||
* and its predecessors. Portions created by Inprise Corporation are
|
||||
* Copyright (C) Inprise Corporation.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
// Order of relations in this file affect their IDs,
|
||||
// so please add new relations to the end of the list
|
||||
|
||||
// Relation 0 (RDB$PAGES)
|
||||
|
||||
const USHORT f_pag_page = 0;
|
||||
const USHORT f_pag_id = 1;
|
||||
const USHORT f_pag_seq = 2;
|
||||
const USHORT f_pag_type = 3;
|
||||
|
||||
|
||||
// Relation 1 (RDB$DATABASE)
|
||||
|
||||
const USHORT f_dat_desc = 0;
|
||||
const USHORT f_dat_id = 1;
|
||||
const USHORT f_dat_class = 2;
|
||||
const USHORT f_dat_charset = 3;
|
||||
const USHORT f_dat_linger = 4;
|
||||
const USHORT f_dat_sql_security = 5;
|
||||
|
||||
|
||||
// Relation 2 (RDB$FIELDS)
|
||||
|
||||
const USHORT f_fld_name = 0;
|
||||
const USHORT f_fld_qname = 1;
|
||||
const USHORT f_fld_v_blr = 2;
|
||||
const USHORT f_fld_v_source = 3;
|
||||
const USHORT f_fld_computed = 4;
|
||||
const USHORT f_fld_csource = 5;
|
||||
const USHORT f_fld_default = 6;
|
||||
const USHORT f_fld_dsource = 7;
|
||||
const USHORT f_fld_length = 8;
|
||||
const USHORT f_fld_scale = 9;
|
||||
const USHORT f_fld_type = 10;
|
||||
const USHORT f_fld_sub_type = 11;
|
||||
const USHORT f_fld_missing = 12;
|
||||
const USHORT f_fld_msource = 13;
|
||||
const USHORT f_fld_desc = 14;
|
||||
const USHORT f_fld_sys_flag = 15;
|
||||
const USHORT f_fld_qheader = 16;
|
||||
const USHORT f_fld_seg_len = 17;
|
||||
const USHORT f_fld_estring = 18;
|
||||
const USHORT f_fld_ext_length = 19;
|
||||
const USHORT f_fld_ext_scale = 20;
|
||||
const USHORT f_fld_ext_type = 21;
|
||||
const USHORT f_fld_dimensions = 22;
|
||||
const USHORT f_fld_null_flag = 23;
|
||||
const USHORT f_fld_char_length = 24;
|
||||
const USHORT f_fld_coll_id = 25;
|
||||
const USHORT f_fld_charset_id = 26;
|
||||
const USHORT f_fld_precision = 27;
|
||||
const USHORT f_fld_class = 28;
|
||||
const USHORT f_fld_owner = 29;
|
||||
|
||||
|
||||
// Relation 3 (RDB$INDEX_SEGMENTS)
|
||||
|
||||
const USHORT f_seg_name = 0;
|
||||
const USHORT f_seg_field = 1;
|
||||
const USHORT f_seg_position = 2;
|
||||
const USHORT f_seg_statistics = 3;
|
||||
|
||||
|
||||
// Relation 4 (RDB$INDICES)
|
||||
|
||||
const USHORT f_idx_name = 0;
|
||||
const USHORT f_idx_relation = 1;
|
||||
const USHORT f_idx_id = 2;
|
||||
const USHORT f_idx_flag = 3;
|
||||
const USHORT f_idx_desc = 4;
|
||||
const USHORT f_idx_count = 5;
|
||||
const USHORT f_idx_inactive = 6;
|
||||
const USHORT f_idx_type = 7;
|
||||
const USHORT f_idx_foreign = 8;
|
||||
const USHORT f_idx_sys_flag = 9;
|
||||
const USHORT f_idx_exp_blr = 10;
|
||||
const USHORT f_idx_exp_source = 11;
|
||||
const USHORT f_idx_statistics = 12;
|
||||
|
||||
|
||||
// Relation 5 (RDB$RELATION_FIELDS)
|
||||
|
||||
const USHORT f_rfr_fname = 0;
|
||||
const USHORT f_rfr_rname = 1;
|
||||
const USHORT f_rfr_sname = 2;
|
||||
const USHORT f_rfr_qname = 3;
|
||||
const USHORT f_rfr_base = 4;
|
||||
const USHORT f_rfr_estring = 5;
|
||||
const USHORT f_rfr_position = 6;
|
||||
const USHORT f_rfr_qheader = 7;
|
||||
const USHORT f_rfr_flag = 8;
|
||||
const USHORT f_rfr_id = 9;
|
||||
const USHORT f_rfr_context = 10;
|
||||
const USHORT f_rfr_desc = 11;
|
||||
const USHORT f_rfr_default = 12;
|
||||
const USHORT f_rfr_sys_flag = 13;
|
||||
const USHORT f_rfr_class = 14;
|
||||
const USHORT f_rfr_complex = 15;
|
||||
const USHORT f_rfr_null_flag = 16;
|
||||
const USHORT f_rfr_dsource = 17;
|
||||
const USHORT f_rfr_coll_id = 18;
|
||||
const USHORT f_rfr_gen_name = 19;
|
||||
const USHORT f_rfr_identity_type = 20;
|
||||
|
||||
|
||||
// Relation 6 (RDB$RELATIONS)
|
||||
|
||||
const USHORT f_rel_blr = 0;
|
||||
const USHORT f_rel_source = 1;
|
||||
const USHORT f_rel_desc = 2;
|
||||
const USHORT f_rel_id = 3;
|
||||
const USHORT f_rel_sys_flag = 4;
|
||||
const USHORT f_rel_key_len = 5;
|
||||
const USHORT f_rel_format = 6;
|
||||
const USHORT f_rel_field_id = 7;
|
||||
const USHORT f_rel_name = 8;
|
||||
const USHORT f_rel_class = 9;
|
||||
const USHORT f_rel_ext_file = 10;
|
||||
const USHORT f_rel_runtime = 11;
|
||||
const USHORT f_rel_ext_desc = 12;
|
||||
const USHORT f_rel_owner = 13;
|
||||
const USHORT f_rel_def_class = 14;
|
||||
const USHORT f_rel_flags = 15;
|
||||
const USHORT f_rel_type = 16;
|
||||
const USHORT f_rel_sql_security = 17;
|
||||
|
||||
|
||||
// Relation 7 (RDB$VIEW_RELATIONS)
|
||||
|
||||
const USHORT f_vrl_vname = 0;
|
||||
const USHORT f_vrl_rname = 1;
|
||||
const USHORT f_vrl_context = 2;
|
||||
const USHORT f_vrl_cname = 3;
|
||||
const USHORT f_vrl_context_type = 4;
|
||||
const USHORT f_vrl_pkg_name = 5;
|
||||
|
||||
|
||||
// Relation 8 (RDB$FORMATS)
|
||||
|
||||
const USHORT f_fmt_rid = 0;
|
||||
const USHORT f_fmt_format = 1;
|
||||
const USHORT f_fmt_desc = 2;
|
||||
|
||||
|
||||
// Relation 9 (RDB$SECURITY_CLASSES)
|
||||
|
||||
const USHORT f_cls_class = 0;
|
||||
const USHORT f_cls_acl = 1;
|
||||
const USHORT f_cls_desc = 2;
|
||||
|
||||
|
||||
// Relation 10 (RDB$FILES)
|
||||
|
||||
const USHORT f_file_name = 0;
|
||||
const USHORT f_file_seq = 1;
|
||||
const USHORT f_file_start = 2;
|
||||
const USHORT f_file_length = 3;
|
||||
const USHORT f_file_flags = 4;
|
||||
const USHORT f_file_shad_num = 5;
|
||||
|
||||
|
||||
// Relation 11 (RDB$TYPES)
|
||||
|
||||
const USHORT f_typ_field = 0;
|
||||
const USHORT f_typ_type = 1;
|
||||
const USHORT f_typ_name = 2;
|
||||
const USHORT f_typ_desc = 3;
|
||||
const USHORT f_typ_sys_flag = 4;
|
||||
|
||||
|
||||
// Relation 12 (RDB$TRIGGERS)
|
||||
|
||||
const USHORT f_trg_name = 0;
|
||||
const USHORT f_trg_rname = 1;
|
||||
const USHORT f_trg_seq = 2;
|
||||
const USHORT f_trg_type = 3;
|
||||
const USHORT f_trg_source = 4;
|
||||
const USHORT f_trg_blr = 5;
|
||||
const USHORT f_trg_desc = 6;
|
||||
const USHORT f_trg_inactive = 7;
|
||||
const USHORT f_trg_sys_flag = 8;
|
||||
const USHORT f_trg_flags = 9;
|
||||
const USHORT f_trg_valid_blr = 10;
|
||||
const USHORT f_trg_debug_info = 11;
|
||||
const USHORT f_trg_engine_name = 12;
|
||||
const USHORT f_trg_entry = 13;
|
||||
const USHORT f_trg_sql_security = 14;
|
||||
|
||||
|
||||
// Relation 13 (RDB$DEPENDENCIES)
|
||||
|
||||
const USHORT f_dpd_name = 0;
|
||||
const USHORT f_dpd_o_name = 1;
|
||||
const USHORT f_dpd_f_name = 2;
|
||||
const USHORT f_dpd_type = 3;
|
||||
const USHORT f_dpd_o_type = 4;
|
||||
const USHORT f_dpd_pkg_name = 5;
|
||||
|
||||
|
||||
// Relation 14 (RDB$FUNCTIONS)
|
||||
|
||||
const USHORT f_fun_name = 0;
|
||||
const USHORT f_fun_type = 1;
|
||||
const USHORT f_fun_qname = 2;
|
||||
const USHORT f_fun_desc = 3;
|
||||
const USHORT f_fun_module = 4;
|
||||
const USHORT f_fun_entry = 5;
|
||||
const USHORT f_fun_ret_arg = 6;
|
||||
const USHORT f_fun_sys_flag = 7;
|
||||
const USHORT f_fun_engine_name = 8;
|
||||
const USHORT f_fun_pkg_name = 9;
|
||||
const USHORT f_fun_private_flag = 10;
|
||||
const USHORT f_fun_source = 11;
|
||||
const USHORT f_fun_id = 12;
|
||||
const USHORT f_fun_blr = 13;
|
||||
const USHORT f_fun_valid_blr = 14;
|
||||
const USHORT f_fun_debug_info = 15;
|
||||
const USHORT f_fun_class = 16;
|
||||
const USHORT f_fun_owner = 17;
|
||||
const USHORT f_fun_legacy_flag = 18;
|
||||
const USHORT f_fun_deterministic_flag = 19;
|
||||
const USHORT f_fun_sql_security = 20;
|
||||
|
||||
|
||||
// Relation 15 (RDB$FUNCTION_ARGUMENTS)
|
||||
|
||||
const USHORT f_arg_fun_name = 0;
|
||||
const USHORT f_arg_pos = 1;
|
||||
const USHORT f_arg_mech = 2;
|
||||
const USHORT f_arg_type = 3;
|
||||
const USHORT f_arg_scale = 4;
|
||||
const USHORT f_arg_length = 5;
|
||||
const USHORT f_arg_sub_type = 6;
|
||||
const USHORT f_arg_charset_id = 7;
|
||||
const USHORT f_arg_precision = 8;
|
||||
const USHORT f_arg_char_length = 9;
|
||||
const USHORT f_arg_pkg_name = 10;
|
||||
const USHORT f_arg_name = 11;
|
||||
const USHORT f_arg_sname = 12;
|
||||
const USHORT f_arg_default = 13;
|
||||
const USHORT f_arg_dsource = 14;
|
||||
const USHORT f_arg_coll_id = 15;
|
||||
const USHORT f_arg_null_flag = 16;
|
||||
const USHORT f_arg_arg_mech = 17;
|
||||
const USHORT f_arg_fname = 18;
|
||||
const USHORT f_arg_rname = 19;
|
||||
const USHORT f_arg_sys_flag = 20;
|
||||
const USHORT f_arg_desc = 21;
|
||||
|
||||
|
||||
// Relation 16 (RDB$FILTERS)
|
||||
|
||||
const USHORT f_flt_name = 0;
|
||||
const USHORT f_flt_desc = 1;
|
||||
const USHORT f_flt_module = 2;
|
||||
const USHORT f_flt_entry = 3;
|
||||
const USHORT f_flt_input = 4;
|
||||
const USHORT f_flt_output = 5;
|
||||
const USHORT f_flt_sys_flag = 6;
|
||||
const USHORT f_flt_class = 7;
|
||||
const USHORT f_flt_owner = 8;
|
||||
|
||||
|
||||
// Relation 17 (RDB$TRIGGER_MESSAGES)
|
||||
|
||||
const USHORT f_msg_trigger = 0;
|
||||
const USHORT f_msg_number = 1;
|
||||
const USHORT f_msg_msg = 2;
|
||||
|
||||
|
||||
// Relation 18 (RDB$USER_PRIVILEGES)
|
||||
|
||||
const USHORT f_prv_user = 0;
|
||||
const USHORT f_prv_grantor = 1;
|
||||
const USHORT f_prv_priv = 2;
|
||||
const USHORT f_prv_grant = 3;
|
||||
const USHORT f_prv_rname = 4;
|
||||
const USHORT f_prv_fname = 5;
|
||||
const USHORT f_prv_u_type = 6;
|
||||
const USHORT f_prv_o_type = 7;
|
||||
|
||||
|
||||
// Relation 19 (RDB$TRANSACTIONS)
|
||||
|
||||
const USHORT f_trn_id = 0;
|
||||
const USHORT f_trn_state = 1;
|
||||
const USHORT f_trn_time = 2;
|
||||
const USHORT f_trn_desc = 3;
|
||||
|
||||
|
||||
// Relation 20 (RDB$GENERATORS)
|
||||
|
||||
const USHORT f_gen_name = 0;
|
||||
const USHORT f_gen_id = 1;
|
||||
const USHORT f_gen_sys_flag = 2;
|
||||
const USHORT f_gen_desc = 3;
|
||||
const USHORT f_gen_class = 4;
|
||||
const USHORT f_gen_owner = 5;
|
||||
const USHORT f_gen_init_val = 6;
|
||||
const USHORT f_gen_increment = 7;
|
||||
|
||||
|
||||
// Relation 21 (RDB$FIELD_DIMENSIONS)
|
||||
|
||||
const USHORT f_dims_fname = 0;
|
||||
const USHORT f_dims_dim = 1;
|
||||
const USHORT f_dims_lower = 2;
|
||||
const USHORT f_dims_upper = 3;
|
||||
|
||||
|
||||
// Relation 22 (RDB$RELATION_CONSTRAINTS)
|
||||
|
||||
const USHORT f_rcon_cname = 0;
|
||||
const USHORT f_rcon_ctype = 1;
|
||||
const USHORT f_rcon_rname = 2;
|
||||
const USHORT f_rcon_dfr = 3;
|
||||
const USHORT f_rcon_idfr = 4;
|
||||
const USHORT f_rcon_iname = 5;
|
||||
|
||||
|
||||
// Relation 23 (RDB$REF_CONSTRAINTS)
|
||||
|
||||
const USHORT f_refc_cname = 0;
|
||||
const USHORT f_refc_uq = 1;
|
||||
const USHORT f_refc_match = 2;
|
||||
const USHORT f_refc_upd_rul = 3;
|
||||
const USHORT f_refc_del_rul = 4;
|
||||
|
||||
|
||||
// Relation 24 (RDB$CHECK_CONSTRAINTS)
|
||||
|
||||
const USHORT f_ccon_cname = 0;
|
||||
const USHORT f_ccon_tname = 1;
|
||||
|
||||
|
||||
// Relation 25 (RDB$LOG_FILES)
|
||||
|
||||
const USHORT f_log_name = 0;
|
||||
const USHORT f_log_seq = 1;
|
||||
const USHORT f_log_length = 2;
|
||||
const USHORT f_log_partitions = 3;
|
||||
const USHORT f_log_p_offset = 4;
|
||||
const USHORT f_log_flags = 5;
|
||||
|
||||
|
||||
// Relation 26 (RDB$PROCEDURES)
|
||||
|
||||
const USHORT f_prc_name = 0;
|
||||
const USHORT f_prc_id = 1;
|
||||
const USHORT f_prc_inputs = 2;
|
||||
const USHORT f_prc_outputs = 3;
|
||||
const USHORT f_prc_desc = 4;
|
||||
const USHORT f_prc_source = 5;
|
||||
const USHORT f_prc_blr = 6;
|
||||
const USHORT f_prc_class = 7;
|
||||
const USHORT f_prc_owner = 8;
|
||||
const USHORT f_prc_runtime = 9;
|
||||
const USHORT f_prc_sys_flag = 10;
|
||||
const USHORT f_prc_type = 11;
|
||||
const USHORT f_prc_valid_blr = 12;
|
||||
const USHORT f_prc_debug_info = 13;
|
||||
const USHORT f_prc_engine_name = 14;
|
||||
const USHORT f_prc_entry = 15;
|
||||
const USHORT f_prc_pkg_name = 16;
|
||||
const USHORT f_prc_private_flag = 17;
|
||||
const USHORT f_prc_sql_security = 18;
|
||||
|
||||
|
||||
// Relation 27 (RDB$PROCEDURE_PARAMETERS)
|
||||
|
||||
const USHORT f_prm_name = 0;
|
||||
const USHORT f_prm_procedure = 1;
|
||||
const USHORT f_prm_number = 2;
|
||||
const USHORT f_prm_type = 3;
|
||||
const USHORT f_prm_sname = 4;
|
||||
const USHORT f_prm_desc = 5;
|
||||
const USHORT f_prm_sys_flag = 6;
|
||||
const USHORT f_prm_default = 7;
|
||||
const USHORT f_prm_dsource = 8;
|
||||
const USHORT f_prm_coll_id = 9;
|
||||
const USHORT f_prm_null_flag = 10;
|
||||
const USHORT f_prm_mech = 11;
|
||||
const USHORT f_prm_fname = 12;
|
||||
const USHORT f_prm_rname = 13;
|
||||
const USHORT f_prm_pkg_name = 14;
|
||||
|
||||
|
||||
// Relation 28 (RDB$CHARACTER_SETS)
|
||||
|
||||
const USHORT f_cs_cs_name = 0;
|
||||
const USHORT f_cs_form_of_use = 1;
|
||||
const USHORT f_cs_num_chars = 2;
|
||||
const USHORT f_cs_def_collate = 3;
|
||||
const USHORT f_cs_id = 4;
|
||||
const USHORT f_cs_sys_flag = 5;
|
||||
const USHORT f_cs_desc = 6;
|
||||
const USHORT f_cs_fun_name = 7;
|
||||
const USHORT f_cs_bytes_char = 8;
|
||||
const USHORT f_cs_class = 9;
|
||||
const USHORT f_cs_owner = 10;
|
||||
|
||||
|
||||
// Relation 29 (RDB$COLLATIONS)
|
||||
|
||||
const USHORT f_coll_name = 0;
|
||||
const USHORT f_coll_id = 1;
|
||||
const USHORT f_coll_cs_id = 2;
|
||||
const USHORT f_coll_attr = 3;
|
||||
const USHORT f_coll_sys_flag = 4;
|
||||
const USHORT f_coll_desc = 5;
|
||||
const USHORT f_coll_fun_name = 6;
|
||||
const USHORT f_coll_base_collation_name = 7;
|
||||
const USHORT f_coll_specific_attr = 8;
|
||||
const USHORT f_coll_class = 9;
|
||||
const USHORT f_coll_owner = 10;
|
||||
|
||||
|
||||
// Relation 30 (RDB$EXCEPTIONS)
|
||||
|
||||
const USHORT f_xcp_name = 0;
|
||||
const USHORT f_xcp_number = 1;
|
||||
const USHORT f_xcp_msg = 2;
|
||||
const USHORT f_xcp_desc = 3;
|
||||
const USHORT f_xcp_sys_flag = 4;
|
||||
const USHORT f_xcp_class = 5;
|
||||
const USHORT f_xcp_owner = 6;
|
||||
|
||||
|
||||
// Relation 31 (RDB$ROLES)
|
||||
|
||||
const USHORT f_rol_name = 0;
|
||||
const USHORT f_rol_owner = 1;
|
||||
const USHORT f_rol_desc = 2;
|
||||
const USHORT f_rol_sys_flag = 3;
|
||||
const USHORT f_rol_class = 4;
|
||||
const USHORT f_rol_sys_priv = 5;
|
||||
|
||||
|
||||
// Relation 32 (RDB$BACKUP_HISTORY)
|
||||
|
||||
const USHORT f_backup_id = 0;
|
||||
const USHORT f_backup_time = 1;
|
||||
const USHORT f_backup_level = 2;
|
||||
const USHORT f_backup_guid = 3;
|
||||
const USHORT f_backup_scn = 4;
|
||||
const USHORT f_backup_name = 5;
|
||||
|
||||
|
||||
// Relation 33 (MON$DATABASE)
|
||||
|
||||
const USHORT f_mon_db_name = 0;
|
||||
const USHORT f_mon_db_page_size = 1;
|
||||
const USHORT f_mon_db_ods_major = 2;
|
||||
const USHORT f_mon_db_ods_minor = 3;
|
||||
const USHORT f_mon_db_oit = 4;
|
||||
const USHORT f_mon_db_oat = 5;
|
||||
const USHORT f_mon_db_ost = 6;
|
||||
const USHORT f_mon_db_nt = 7;
|
||||
const USHORT f_mon_db_page_bufs = 8;
|
||||
const USHORT f_mon_db_dialect = 9;
|
||||
const USHORT f_mon_db_shut_mode = 10;
|
||||
const USHORT f_mon_db_sweep_int = 11;
|
||||
const USHORT f_mon_db_read_only = 12;
|
||||
const USHORT f_mon_db_forced_writes = 13;
|
||||
const USHORT f_mon_db_res_space = 14;
|
||||
const USHORT f_mon_db_created = 15;
|
||||
const USHORT f_mon_db_pages = 16;
|
||||
const USHORT f_mon_db_stat_id = 17;
|
||||
const USHORT f_mon_db_backup_state = 18;
|
||||
const USHORT f_mon_db_crypt_page = 19;
|
||||
const USHORT f_mon_db_owner = 20;
|
||||
const USHORT f_mon_db_secdb = 21;
|
||||
const USHORT f_mon_db_crypt_state = 22;
|
||||
|
||||
|
||||
// Relation 34 (MON$ATTACHMENTS)
|
||||
|
||||
const USHORT f_mon_att_id = 0;
|
||||
const USHORT f_mon_att_server_pid = 1;
|
||||
const USHORT f_mon_att_state = 2;
|
||||
const USHORT f_mon_att_name = 3;
|
||||
const USHORT f_mon_att_user = 4;
|
||||
const USHORT f_mon_att_role = 5;
|
||||
const USHORT f_mon_att_remote_proto = 6;
|
||||
const USHORT f_mon_att_remote_addr = 7;
|
||||
const USHORT f_mon_att_remote_pid = 8;
|
||||
const USHORT f_mon_att_charset_id = 9;
|
||||
const USHORT f_mon_att_timestamp = 10;
|
||||
const USHORT f_mon_att_gc = 11;
|
||||
const USHORT f_mon_att_remote_process = 12;
|
||||
const USHORT f_mon_att_stat_id = 13;
|
||||
const USHORT f_mon_att_client_version = 14;
|
||||
const USHORT f_mon_att_remote_version = 15;
|
||||
const USHORT f_mon_att_remote_host = 16;
|
||||
const USHORT f_mon_att_remote_os_user = 17;
|
||||
const USHORT f_mon_att_auth_method = 18;
|
||||
const USHORT f_mon_att_sys_flag = 19;
|
||||
const USHORT f_mon_att_idle_timeout = 20;
|
||||
const USHORT f_mon_att_idle_timer = 21;
|
||||
const USHORT f_mon_att_stmt_timeout = 22;
|
||||
const USHORT f_mon_att_wire_compressed = 23;
|
||||
const USHORT f_mon_att_wire_encrypted = 24;
|
||||
|
||||
|
||||
// Relation 35 (MON$TRANSACTIONS)
|
||||
|
||||
const USHORT f_mon_tra_id = 0;
|
||||
const USHORT f_mon_tra_att_id = 1;
|
||||
const USHORT f_mon_tra_state = 2;
|
||||
const USHORT f_mon_tra_timestamp = 3;
|
||||
const USHORT f_mon_tra_top = 4;
|
||||
const USHORT f_mon_tra_oit = 5;
|
||||
const USHORT f_mon_tra_oat = 6;
|
||||
const USHORT f_mon_tra_iso_mode = 7;
|
||||
const USHORT f_mon_tra_lock_timeout = 8;
|
||||
const USHORT f_mon_tra_read_only = 9;
|
||||
const USHORT f_mon_tra_auto_commit = 10;
|
||||
const USHORT f_mon_tra_auto_undo = 11;
|
||||
const USHORT f_mon_tra_stat_id = 12;
|
||||
|
||||
|
||||
// Relation 36 (MON$STATEMENTS)
|
||||
|
||||
const USHORT f_mon_stmt_id = 0;
|
||||
const USHORT f_mon_stmt_att_id = 1;
|
||||
const USHORT f_mon_stmt_tra_id = 2;
|
||||
const USHORT f_mon_stmt_state = 3;
|
||||
const USHORT f_mon_stmt_timestamp = 4;
|
||||
const USHORT f_mon_stmt_sql_text = 5;
|
||||
const USHORT f_mon_stmt_stat_id = 6;
|
||||
const USHORT f_mon_stmt_expl_plan = 7;
|
||||
const USHORT f_mon_stmt_timeout = 8;
|
||||
const USHORT f_mon_stmt_timer = 9;
|
||||
|
||||
|
||||
// Relation 37 (MON$CALL_STACK)
|
||||
|
||||
const USHORT f_mon_call_id = 0;
|
||||
const USHORT f_mon_call_stmt_id = 1;
|
||||
const USHORT f_mon_call_caller_id = 2;
|
||||
const USHORT f_mon_call_name = 3;
|
||||
const USHORT f_mon_call_type = 4;
|
||||
const USHORT f_mon_call_timestamp = 5;
|
||||
const USHORT f_mon_call_src_line = 6;
|
||||
const USHORT f_mon_call_src_column = 7;
|
||||
const USHORT f_mon_call_stat_id = 8;
|
||||
const USHORT f_mon_call_pkg_name = 9;
|
||||
|
||||
|
||||
// Relation 38 (MON$IO_STATS)
|
||||
|
||||
const USHORT f_mon_io_stat_id = 0;
|
||||
const USHORT f_mon_io_stat_group = 1;
|
||||
const USHORT f_mon_io_page_reads = 2;
|
||||
const USHORT f_mon_io_page_writes = 3;
|
||||
const USHORT f_mon_io_page_fetches = 4;
|
||||
const USHORT f_mon_io_page_marks = 5;
|
||||
|
||||
|
||||
// Relation 39 (MON$RECORD_STATS)
|
||||
|
||||
const USHORT f_mon_rec_stat_id = 0;
|
||||
const USHORT f_mon_rec_stat_group = 1;
|
||||
const USHORT f_mon_rec_seq_reads = 2;
|
||||
const USHORT f_mon_rec_idx_reads = 3;
|
||||
const USHORT f_mon_rec_inserts = 4;
|
||||
const USHORT f_mon_rec_updates = 5;
|
||||
const USHORT f_mon_rec_deletes = 6;
|
||||
const USHORT f_mon_rec_backouts = 7;
|
||||
const USHORT f_mon_rec_purges = 8;
|
||||
const USHORT f_mon_rec_expunges = 9;
|
||||
const USHORT f_mon_rec_locks = 10;
|
||||
const USHORT f_mon_rec_waits = 11;
|
||||
const USHORT f_mon_rec_conflicts = 12;
|
||||
const USHORT f_mon_rec_bkver_reads = 13;
|
||||
const USHORT f_mon_rec_frg_reads = 14;
|
||||
const USHORT f_mon_rec_rpt_reads = 15;
|
||||
const USHORT f_mon_rec_imgc = 16;
|
||||
|
||||
|
||||
// Relation 40 (MON$CONTEXT_VARIABLES)
|
||||
|
||||
const USHORT f_mon_ctx_var_att_id = 0;
|
||||
const USHORT f_mon_ctx_var_tra_id = 1;
|
||||
const USHORT f_mon_ctx_var_name = 2;
|
||||
const USHORT f_mon_ctx_var_value = 3;
|
||||
|
||||
|
||||
// Relation 41 (MON$MEMORY_USAGE)
|
||||
|
||||
const USHORT f_mon_mem_stat_id = 0;
|
||||
const USHORT f_mon_mem_stat_group = 1;
|
||||
const USHORT f_mon_mem_cur_used = 2;
|
||||
const USHORT f_mon_mem_cur_alloc = 3;
|
||||
const USHORT f_mon_mem_max_used = 4;
|
||||
const USHORT f_mon_mem_max_alloc = 5;
|
||||
|
||||
|
||||
// Relation 42 (RDB$PACKAGES)
|
||||
|
||||
const USHORT f_pkg_name = 0;
|
||||
const USHORT f_pkg_header_source = 1;
|
||||
const USHORT f_pkg_body_source = 2;
|
||||
const USHORT f_pkg_valid_body_flag = 3;
|
||||
const USHORT f_pkg_class = 4;
|
||||
const USHORT f_pkg_owner = 5;
|
||||
const USHORT f_pkg_sys_flag = 6;
|
||||
const USHORT f_pkg_desc = 7;
|
||||
const USHORT f_pkg_sql_security = 8;
|
||||
|
||||
|
||||
// Relation 43 (SEC$USERS)
|
||||
|
||||
const USHORT f_sec_user_name = 0;
|
||||
const USHORT f_sec_first_name = 1;
|
||||
const USHORT f_sec_middle_name = 2;
|
||||
const USHORT f_sec_last_name = 3;
|
||||
const USHORT f_sec_active = 4;
|
||||
const USHORT f_sec_admin = 5;
|
||||
const USHORT f_sec_comment = 6;
|
||||
const USHORT f_sec_plugin = 7;
|
||||
|
||||
|
||||
// Relation 44 (SEC$USER_ATTRIBUTES)
|
||||
|
||||
const USHORT f_sec_attr_user = 0;
|
||||
const USHORT f_sec_attr_key = 1;
|
||||
const USHORT f_sec_attr_value = 2;
|
||||
const USHORT f_sec_attr_plugin = 3;
|
||||
|
||||
|
||||
// Relation 45 (RDB$AUTH_MAPPING)
|
||||
|
||||
const USHORT f_map_name = 0;
|
||||
const USHORT f_map_using = 1;
|
||||
const USHORT f_map_plugin = 2;
|
||||
const USHORT f_map_db = 3;
|
||||
const USHORT f_map_from_type = 4;
|
||||
const USHORT f_map_from = 5;
|
||||
const USHORT f_map_to_type = 6;
|
||||
const USHORT f_map_to = 7;
|
||||
const USHORT f_map_sys_flag = 8;
|
||||
const USHORT f_map_desc = 9;
|
||||
|
||||
|
||||
// Relation 46 (SEC$GLOBAL_AUTH_MAPPING)
|
||||
|
||||
const USHORT f_sec_map_name = 0;
|
||||
const USHORT f_sec_map_using = 1;
|
||||
const USHORT f_sec_map_plugin = 2;
|
||||
const USHORT f_sec_map_db = 3;
|
||||
const USHORT f_sec_map_from_type = 4;
|
||||
const USHORT f_sec_map_from = 5;
|
||||
const USHORT f_sec_map_to_type = 6;
|
||||
const USHORT f_sec_map_to = 7;
|
||||
|
||||
|
||||
// Relation 47 (RDB$DB_CREATORS)
|
||||
|
||||
const USHORT f_crt_user = 0;
|
||||
const USHORT f_crt_u_type = 1;
|
||||
|
||||
|
||||
// Relation 48 (SEC$DB_CREATORS)
|
||||
|
||||
const USHORT f_sec_crt_user = 0;
|
||||
const USHORT f_sec_crt_u_type = 1;
|
||||
|
||||
|
||||
// Relation 49 (MON$TABLE_STATS)
|
||||
|
||||
const USHORT f_mon_tab_stat_id = 0;
|
||||
const USHORT f_mon_tab_stat_group = 1;
|
||||
const USHORT f_mon_tab_name = 2;
|
||||
const USHORT f_mon_tab_rec_stat_id = 3;
|
||||
|
||||
|
||||
// Relation 50 (RDB$TIME_ZONES)
|
||||
|
||||
const USHORT f_tz_id = 0;
|
||||
const USHORT f_tz_name = 1;
|
||||
|
||||
|
@ -417,10 +417,13 @@ int EXTRACT_list_table(const SCHAR* relation_name,
|
||||
|
||||
if ((FLD.RDB$FIELD_TYPE == T_CHAR) || (FLD.RDB$FIELD_TYPE == VARCHAR))
|
||||
{
|
||||
if (FLD.RDB$CHARACTER_LENGTH.NULL)
|
||||
isqlGlob.printf("(%d)", FLD.RDB$FIELD_LENGTH);
|
||||
else
|
||||
isqlGlob.printf("(%d)", FLD.RDB$CHARACTER_LENGTH);
|
||||
isqlGlob.printf("(%d)",
|
||||
ISQL_get_char_length(
|
||||
FLD.RDB$FIELD_LENGTH,
|
||||
FLD.RDB$CHARACTER_LENGTH.NULL, FLD.RDB$CHARACTER_LENGTH,
|
||||
FLD.RDB$CHARACTER_SET_ID.NULL, FLD.RDB$CHARACTER_SET_ID
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Catch arrays after printing the type
|
||||
@ -833,10 +836,13 @@ static void get_procedure_args(const char* proc_name)
|
||||
// FSG 18.Nov.2000
|
||||
if ((FLD.RDB$FIELD_TYPE == T_CHAR) || (FLD.RDB$FIELD_TYPE == VARCHAR))
|
||||
{
|
||||
if (FLD.RDB$CHARACTER_LENGTH.NULL)
|
||||
isqlGlob.printf("(%d)", FLD.RDB$FIELD_LENGTH);
|
||||
else
|
||||
isqlGlob.printf("(%d)", FLD.RDB$CHARACTER_LENGTH);
|
||||
isqlGlob.printf("(%d)",
|
||||
ISQL_get_char_length(
|
||||
FLD.RDB$FIELD_LENGTH,
|
||||
FLD.RDB$CHARACTER_LENGTH.NULL, FLD.RDB$CHARACTER_LENGTH,
|
||||
FLD.RDB$CHARACTER_SET_ID.NULL, FLD.RDB$CHARACTER_SET_ID
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Show international character sets and collations
|
||||
@ -1054,10 +1060,13 @@ static void get_function_args_ods12(const char* func_name, USHORT out_arg)
|
||||
// FSG 18.Nov.2000
|
||||
if ((FLD.RDB$FIELD_TYPE == T_CHAR) || (FLD.RDB$FIELD_TYPE == VARCHAR))
|
||||
{
|
||||
if (FLD.RDB$CHARACTER_LENGTH.NULL)
|
||||
isqlGlob.printf("(%d)", FLD.RDB$FIELD_LENGTH);
|
||||
else
|
||||
isqlGlob.printf("(%d)", FLD.RDB$CHARACTER_LENGTH);
|
||||
isqlGlob.printf("(%d)",
|
||||
ISQL_get_char_length(
|
||||
FLD.RDB$FIELD_LENGTH,
|
||||
FLD.RDB$CHARACTER_LENGTH.NULL, FLD.RDB$CHARACTER_LENGTH,
|
||||
FLD.RDB$CHARACTER_SET_ID.NULL, FLD.RDB$CHARACTER_SET_ID
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Show international character sets and collations
|
||||
@ -2624,10 +2633,13 @@ static void listRelationComputed(LegacyTables flag, SSHORT default_char_set_id)
|
||||
|
||||
if ((FLD.RDB$FIELD_TYPE == T_CHAR) || (FLD.RDB$FIELD_TYPE == VARCHAR))
|
||||
{
|
||||
if (FLD.RDB$CHARACTER_LENGTH.NULL)
|
||||
isqlGlob.printf("(%d)", FLD.RDB$FIELD_LENGTH);
|
||||
else
|
||||
isqlGlob.printf("(%d)", FLD.RDB$CHARACTER_LENGTH);
|
||||
isqlGlob.printf("(%d)",
|
||||
ISQL_get_char_length(
|
||||
FLD.RDB$FIELD_LENGTH,
|
||||
FLD.RDB$CHARACTER_LENGTH.NULL, FLD.RDB$CHARACTER_LENGTH,
|
||||
FLD.RDB$CHARACTER_SET_ID.NULL, FLD.RDB$CHARACTER_SET_ID
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Catch arrays after printing the type
|
||||
|
@ -1211,6 +1211,34 @@ SSHORT ISQL_get_field_length(const TEXT* field_name)
|
||||
}
|
||||
|
||||
|
||||
SSHORT ISQL_get_char_length(
|
||||
SSHORT fieldLength,
|
||||
SSHORT characterLengthNull, SSHORT characterLength,
|
||||
SSHORT characterSetIdNull, SSHORT characterSetId)
|
||||
{
|
||||
if (characterLengthNull || characterLength == 0)
|
||||
{
|
||||
if (!characterSetIdNull)
|
||||
{
|
||||
FOR CS IN RDB$CHARACTER_SETS
|
||||
WITH CS.RDB$CHARACTER_SET_ID EQ characterSetId AND
|
||||
CS.RDB$BYTES_PER_CHARACTER > 0
|
||||
{
|
||||
fieldLength /= CS.RDB$BYTES_PER_CHARACTER;
|
||||
}
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
ISQL_errmsg(fbStatus);
|
||||
END_ERROR;
|
||||
}
|
||||
|
||||
return fieldLength;
|
||||
}
|
||||
else
|
||||
return characterLength;
|
||||
}
|
||||
|
||||
|
||||
void ISQL_get_character_sets(SSHORT char_set_id, SSHORT collation, bool collate_only,
|
||||
bool not_null, bool quote, TEXT* string)
|
||||
{
|
||||
|
@ -45,6 +45,10 @@ void ISQL_get_character_sets(SSHORT, SSHORT, bool, bool, bool, TEXT*);
|
||||
SSHORT ISQL_get_default_char_set_id();
|
||||
void ISQL_get_default_source(const TEXT*, TEXT*, ISC_QUAD*);
|
||||
SSHORT ISQL_get_field_length(const TEXT*);
|
||||
SSHORT ISQL_get_char_length(
|
||||
SSHORT fieldLength,
|
||||
SSHORT characterLengthNull, SSHORT characterLength,
|
||||
SSHORT characterSetIdNull, SSHORT characterSetId);
|
||||
SLONG ISQL_get_index_segments(TEXT*, const size_t, const TEXT*, bool);
|
||||
bool ISQL_get_null_flag(const TEXT*, TEXT*);
|
||||
void ISQL_get_version(bool);
|
||||
|
@ -251,6 +251,7 @@ static const UCHAR db_items[] =
|
||||
isc_info_db_id,
|
||||
#endif
|
||||
fb_info_crypt_state,
|
||||
fb_info_wire_crypt,
|
||||
isc_info_end
|
||||
};
|
||||
|
||||
@ -554,6 +555,11 @@ bool SHOW_dbb_parameters(Firebird::IAttachment* db_handle,
|
||||
(SLONG) isqlGlob.major_ods, value_out, separator);
|
||||
break;
|
||||
|
||||
case fb_info_wire_crypt:
|
||||
if (d)
|
||||
sprintf (info, "Wire crypt plugin: %.*s%s", length, d, separator);
|
||||
break;
|
||||
|
||||
#ifdef DEV_BUILD
|
||||
case isc_info_db_id:
|
||||
{
|
||||
|
@ -221,6 +221,7 @@ Jrd::Attachment::Attachment(MemoryPool* pool, Database* dbb)
|
||||
att_context_vars(*pool),
|
||||
ddlTriggersContext(*pool),
|
||||
att_network_protocol(*pool),
|
||||
att_remote_crypt(*pool),
|
||||
att_remote_address(*pool),
|
||||
att_remote_process(*pool),
|
||||
att_client_version(*pool),
|
||||
|
@ -440,6 +440,7 @@ public:
|
||||
Firebird::StringMap att_context_vars; // Context variables for the connection
|
||||
Firebird::Stack<DdlTriggerContext*> ddlTriggersContext; // Context variables for DDL trigger event
|
||||
Firebird::string att_network_protocol; // Network protocol used by client for connection
|
||||
Firebird::PathName att_remote_crypt; // Name of wire crypt plugin (if any)
|
||||
Firebird::string att_remote_address; // Protocol-specific address of remote client
|
||||
SLONG att_remote_pid; // Process id of remote client
|
||||
ULONG att_remote_flags; // Flags specific for server/client link
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "../jrd/tra.h"
|
||||
#include "../jrd/ini.h"
|
||||
#include "../jrd/status.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
|
||||
#define DBC_DEBUG(A)
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "../jrd/tra.h"
|
||||
#include "../jrd/ini.h"
|
||||
#include "../jrd/status.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
|
||||
#ifdef WIN_NT
|
||||
#include <process.h>
|
||||
|
@ -133,13 +133,20 @@ MonitoringData::MonitoringData(const Database* dbb)
|
||||
|
||||
MonitoringData::~MonitoringData()
|
||||
{
|
||||
Guard guard(this);
|
||||
m_sharedMemory->mutexLock();
|
||||
|
||||
if (m_sharedMemory->getHeader() &&
|
||||
m_sharedMemory->getHeader()->used == alignOffset(sizeof(Header)))
|
||||
try
|
||||
{
|
||||
m_sharedMemory->removeMapFile();
|
||||
if (m_sharedMemory->getHeader() &&
|
||||
m_sharedMemory->getHeader()->used == alignOffset(sizeof(Header)))
|
||||
{
|
||||
m_sharedMemory->removeMapFile();
|
||||
}
|
||||
}
|
||||
catch (const Exception&)
|
||||
{} // no-op
|
||||
|
||||
m_sharedMemory->mutexUnlock();
|
||||
}
|
||||
|
||||
|
||||
@ -971,6 +978,8 @@ void Monitoring::putAttachment(SnapshotData::DumpRecord& record, const Jrd::Atta
|
||||
record.storeString(f_mon_att_client_version, attachment->att_client_version);
|
||||
// remote protocol version
|
||||
record.storeString(f_mon_att_remote_version, attachment->att_remote_protocol);
|
||||
// wire encryption plugin
|
||||
record.storeString(f_mon_att_remote_crypt, attachment->att_remote_crypt);
|
||||
// remote host name
|
||||
record.storeString(f_mon_att_remote_host, attachment->att_remote_host);
|
||||
// OS user name
|
||||
|
@ -335,6 +335,7 @@ const char
|
||||
NETWORK_PROTOCOL_NAME[] = "NETWORK_PROTOCOL",
|
||||
WIRE_COMPRESSED_NAME[] = "WIRE_COMPRESSED",
|
||||
WIRE_ENCRYPTED_NAME[] = "WIRE_ENCRYPTED",
|
||||
WIRE_CRYPT_PLUGIN_NAME[] = "WIRE_CRYPT_PLUGIN",
|
||||
CLIENT_ADDRESS_NAME[] = "CLIENT_ADDRESS",
|
||||
CLIENT_HOST_NAME[] = "CLIENT_HOST",
|
||||
CLIENT_PID_NAME[] = "CLIENT_PID",
|
||||
@ -4048,6 +4049,13 @@ dsc* evlGetContext(thread_db* tdbb, const SysFunction*, const NestValueArray& ar
|
||||
|
||||
resultStr = (attachment->att_remote_flags & isc_dpb_addr_flag_conn_encrypted) ? TRUE_VALUE : FALSE_VALUE;
|
||||
}
|
||||
else if (nameStr == WIRE_CRYPT_PLUGIN_NAME)
|
||||
{
|
||||
if (attachment->att_remote_crypt.isEmpty())
|
||||
return NULL;
|
||||
|
||||
resultStr = attachment->att_remote_crypt.ToString();
|
||||
}
|
||||
else if (nameStr == CLIENT_ADDRESS_NAME)
|
||||
{
|
||||
if (attachment->att_remote_address.isEmpty())
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "../jrd/Record.h"
|
||||
#include "../jrd/ini.h"
|
||||
#include "../jrd/tra.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
|
||||
using namespace Jrd;
|
||||
using namespace Firebird;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../common/security.h"
|
||||
#include "../jrd/met_proto.h"
|
||||
#include "../jrd/ini.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
|
||||
using namespace Jrd;
|
||||
using namespace Firebird;
|
||||
|
@ -3,16 +3,16 @@
|
||||
*** DO NOT EDIT ***
|
||||
TO CHANGE ANY INFORMATION IN HERE PLEASE
|
||||
EDIT src/misc/writeBuildNum.sh
|
||||
FORMAL BUILD NUMBER:1715
|
||||
FORMAL BUILD NUMBER:1743
|
||||
*/
|
||||
|
||||
#define PRODUCT_VER_STRING "4.0.0.1715"
|
||||
#define FILE_VER_STRING "WI-T4.0.0.1715"
|
||||
#define LICENSE_VER_STRING "WI-T4.0.0.1715"
|
||||
#define FILE_VER_NUMBER 4, 0, 0, 1715
|
||||
#define PRODUCT_VER_STRING "4.0.0.1743"
|
||||
#define FILE_VER_STRING "WI-T4.0.0.1743"
|
||||
#define LICENSE_VER_STRING "WI-T4.0.0.1743"
|
||||
#define FILE_VER_NUMBER 4, 0, 0, 1743
|
||||
#define FB_MAJOR_VER "4"
|
||||
#define FB_MINOR_VER "0"
|
||||
#define FB_REV_NO "0"
|
||||
#define FB_BUILD_NO "1715"
|
||||
#define FB_BUILD_NO "1743"
|
||||
#define FB_BUILD_TYPE "T"
|
||||
#define FB_BUILD_SUFFIX "Firebird 4.0 Beta 1"
|
||||
|
@ -62,7 +62,7 @@ const int TEMP_STR_LENGTH = 128;
|
||||
// Metadata constants
|
||||
|
||||
// When changing these constants, change MaxIdentifierByteLength and MaxIdentifierCharLength in
|
||||
// firebird.conf.in too.
|
||||
// firebird.conf too.
|
||||
const unsigned METADATA_IDENTIFIER_CHAR_LEN = 63;
|
||||
const unsigned METADATA_BYTES_PER_CHAR = 4;
|
||||
|
||||
|
@ -208,4 +208,5 @@
|
||||
|
||||
FIELD(fld_tz_db_version , nam_tz_db_version , dtype_varying , 10 , dsc_text_type_ascii , NULL , true)
|
||||
|
||||
FIELD(fld_crypt_state , nam_crypt_state , dtype_short , sizeof(SSHORT) , 0 , NULL , true)
|
||||
FIELD(fld_crypt_state , nam_crypt_state , dtype_short , sizeof(SSHORT) , 0 , NULL , true)
|
||||
FIELD(fld_remote_crypt , nam_wire_crypt_plugin, dtype_varying, MAX_SQL_IDENTIFIER_LEN , dsc_text_type_metadata , NULL , true)
|
||||
|
89
src/jrd/ids.h
Normal file
89
src/jrd/ids.h
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* PROGRAM: JRD Access Method
|
||||
* MODULE: ids.h
|
||||
* DESCRIPTION: System relation field numbers
|
||||
*
|
||||
* The contents of this file are subject to the Interbase 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.Inprise.com/IPL.html
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, 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 Inprise Corporation
|
||||
* and its predecessors. Portions created by Inprise Corporation are
|
||||
* Copyright (C) Inprise Corporation.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
#define RELATION(...) enum : USHORT {
|
||||
#define FIELD(field_id, ...) field_id,
|
||||
#define END_RELATION };
|
||||
|
||||
#include "relations.h"
|
||||
|
||||
#undef RELATION
|
||||
#undef FIELD
|
||||
#undef END_RELATION
|
||||
|
||||
|
||||
// Because it is ODS-related header, an additional check
|
||||
// to ensure compatibility: position of one field for each table is checked.
|
||||
// This field don't have to be the last, any one is good.
|
||||
|
||||
static_assert(f_pag_type == 3, "Wrong field id");
|
||||
static_assert(f_dat_sql_security == 5, "Wrong field id");
|
||||
static_assert(f_fld_owner == 29, "Wrong field id");
|
||||
static_assert(f_seg_statistics == 3, "Wrong field id");
|
||||
static_assert(f_idx_statistics == 12, "Wrong field id");
|
||||
static_assert(f_rfr_identity_type == 20, "Wrong field id");
|
||||
static_assert(f_rel_sql_security == 17, "Wrong field id");
|
||||
static_assert(f_vrl_pkg_name == 5, "Wrong field id");
|
||||
static_assert(f_fmt_desc == 2, "Wrong field id");
|
||||
static_assert(f_cls_desc == 2, "Wrong field id");
|
||||
static_assert(f_file_shad_num == 5, "Wrong field id");
|
||||
static_assert(f_typ_sys_flag == 4, "Wrong field id");
|
||||
static_assert(f_trg_sql_security == 14, "Wrong field id");
|
||||
static_assert(f_dpd_pkg_name == 5, "Wrong field id");
|
||||
static_assert(f_fun_sql_security == 20, "Wrong field id");
|
||||
static_assert(f_arg_desc == 21, "Wrong field id");
|
||||
static_assert(f_flt_owner == 8, "Wrong field id");
|
||||
static_assert(f_msg_msg == 2, "Wrong field id");
|
||||
static_assert(f_prv_o_type == 7, "Wrong field id");
|
||||
static_assert(f_trn_desc == 3, "Wrong field id");
|
||||
static_assert(f_gen_increment == 7, "Wrong field id");
|
||||
static_assert(f_dims_upper == 3, "Wrong field id");
|
||||
static_assert(f_rcon_iname == 5, "Wrong field id");
|
||||
static_assert(f_refc_del_rul == 4, "Wrong field id");
|
||||
static_assert(f_ccon_tname == 1, "Wrong field id");
|
||||
static_assert(f_log_flags == 5, "Wrong field id");
|
||||
static_assert(f_prc_sql_security == 18, "Wrong field id");
|
||||
static_assert(f_prm_pkg_name == 14, "Wrong field id");
|
||||
static_assert(f_cs_owner == 10, "Wrong field id");
|
||||
static_assert(f_coll_owner == 10, "Wrong field id");
|
||||
static_assert(f_xcp_owner == 6, "Wrong field id");
|
||||
static_assert(f_rol_sys_priv == 5, "Wrong field id");
|
||||
static_assert(f_backup_name == 5, "Wrong field id");
|
||||
static_assert(f_mon_db_crypt_state == 22, "Wrong field id");
|
||||
static_assert(f_mon_att_remote_crypt == 25, "Wrong field id");
|
||||
static_assert(f_mon_tra_stat_id == 12, "Wrong field id");
|
||||
static_assert(f_mon_stmt_timer == 9, "Wrong field id");
|
||||
static_assert(f_mon_call_pkg_name == 9, "Wrong field id");
|
||||
static_assert(f_mon_io_page_marks == 5, "Wrong field id");
|
||||
static_assert(f_mon_rec_imgc == 16, "Wrong field id");
|
||||
static_assert(f_mon_ctx_var_value == 3, "Wrong field id");
|
||||
static_assert(f_mon_mem_max_alloc == 5, "Wrong field id");
|
||||
static_assert(f_pkg_sql_security == 8, "Wrong field id");
|
||||
static_assert(f_sec_plugin == 7, "Wrong field id");
|
||||
static_assert(f_sec_attr_plugin == 3, "Wrong field id");
|
||||
static_assert(f_map_desc == 9, "Wrong field id");
|
||||
static_assert(f_sec_map_to == 7, "Wrong field id");
|
||||
static_assert(f_crt_u_type == 1, "Wrong field id");
|
||||
static_assert(f_sec_crt_u_type == 1, "Wrong field id");
|
||||
static_assert(f_mon_tab_rec_stat_id == 3, "Wrong field id");
|
||||
static_assert(f_tz_name == 1, "Wrong field id");
|
@ -822,6 +822,19 @@ void INF_database_info(thread_db* tdbb,
|
||||
length = INF_convert(tdbb->getAttachment()->att_remote_flags, buffer);
|
||||
break;
|
||||
|
||||
case fb_info_wire_crypt:
|
||||
{
|
||||
const PathName& nm = tdbb->getAttachment()->att_remote_crypt;
|
||||
if (!(info = INF_put_item(item, static_cast<USHORT>(nm.length()), nm.c_str(), info, end)))
|
||||
{
|
||||
if (transaction)
|
||||
TRA_commit(tdbb, transaction, false);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
case fb_info_statement_timeout_db:
|
||||
length = INF_convert(dbb->dbb_config->getStatementTimeout(), buffer);
|
||||
break;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "../jrd/val.h"
|
||||
#include "../jrd/ods.h"
|
||||
#include "../jrd/btr.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
#include "../jrd/intl.h"
|
||||
#include "../jrd/tra.h"
|
||||
#include "../jrd/trig.h"
|
||||
@ -71,9 +71,9 @@ const int FB_MAX_ACL_SIZE = 4096;
|
||||
|
||||
|
||||
static void add_index_set(thread_db*);
|
||||
static void add_security_to_sys_obj(thread_db*, AutoRequest&, AutoRequest&, AutoRequest&,
|
||||
static void add_security_to_sys_obj(thread_db*, AutoRequest&, AutoRequest&, AutoRequest&,
|
||||
const MetaName&, USHORT, const MetaName&, USHORT = 0, const UCHAR* = NULL);
|
||||
static void add_security_class(thread_db* tdbb, AutoRequest&, const MetaName& class_name,
|
||||
static void add_security_class(thread_db* tdbb, AutoRequest&, const MetaName& class_name,
|
||||
USHORT acl_length, const UCHAR* acl);
|
||||
static void add_security_to_sys_rel(thread_db*, AutoRequest&, AutoRequest&, AutoRequest&, const MetaName&,
|
||||
const TEXT*, const USHORT, const UCHAR*);
|
||||
@ -411,9 +411,12 @@ void INI_format(const char* owner, const char* charset)
|
||||
const UCHAR NON_REL_OWNER_ACL[] =
|
||||
{ACL_priv_list, priv_control, priv_alter, priv_drop, priv_usage, ACL_end};
|
||||
|
||||
const UCHAR NON_REL_PUBLIC_ACL[] =
|
||||
const UCHAR NON_REL_PUBLIC_USAGE_ACL[] =
|
||||
{ACL_priv_list, priv_usage, ACL_end};
|
||||
|
||||
const UCHAR PKG_PUBLIC_EXECUTE_ACL[] =
|
||||
{ACL_priv_list, priv_execute, ACL_end};
|
||||
|
||||
UCHAR buffer[FB_MAX_ACL_SIZE];
|
||||
UCHAR* acl = buffer;
|
||||
*acl++ = ACL_version;
|
||||
@ -431,8 +434,11 @@ void INI_format(const char* owner, const char* charset)
|
||||
|
||||
*acl++ = ACL_id_list;
|
||||
*acl++ = ACL_end;
|
||||
memcpy(acl, NON_REL_PUBLIC_ACL, sizeof(NON_REL_PUBLIC_ACL));
|
||||
acl += sizeof(NON_REL_PUBLIC_ACL);
|
||||
|
||||
UCHAR* aclPublicStart = acl;
|
||||
|
||||
memcpy(acl, NON_REL_PUBLIC_USAGE_ACL, sizeof(NON_REL_PUBLIC_USAGE_ACL));
|
||||
acl += sizeof(NON_REL_PUBLIC_USAGE_ACL);
|
||||
*acl++ = ACL_end; // Put an extra terminator to avoid scl.epp:walk_acl() missing the end.
|
||||
|
||||
USHORT length = acl - buffer;
|
||||
@ -471,13 +477,21 @@ void INI_format(const char* owner, const char* charset)
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName, obj_collation, collation->name, length, buffer);
|
||||
}
|
||||
|
||||
// Must be last!
|
||||
acl = aclPublicStart;
|
||||
memcpy(acl, PKG_PUBLIC_EXECUTE_ACL, sizeof(PKG_PUBLIC_EXECUTE_ACL));
|
||||
acl += sizeof(PKG_PUBLIC_EXECUTE_ACL);
|
||||
*acl++ = ACL_end; // Put an extra terminator to avoid scl.epp:walk_acl() missing the end.
|
||||
length = acl - buffer;
|
||||
|
||||
reqModObjSC.reset();
|
||||
for (auto& systemPackage : SystemPackage::get())
|
||||
{
|
||||
if (systemPackage.odsVersion > ENCODE_ODS(dbb->dbb_ods_version, dbb->dbb_minor_version))
|
||||
continue;
|
||||
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName, obj_package_header, systemPackage.name, length, buffer);
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName,
|
||||
obj_package_header, systemPackage.name, length, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1091,8 +1105,8 @@ static void add_security_to_sys_rel(thread_db* tdbb,
|
||||
|
||||
// Add security to system objects.
|
||||
static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
AutoRequest& reqAddSC,
|
||||
AutoRequest& reqModObjSC,
|
||||
AutoRequest& reqAddSC,
|
||||
AutoRequest& reqModObjSC,
|
||||
AutoRequest& reqInsUserPriv,
|
||||
const MetaName& user_name,
|
||||
USHORT obj_type,
|
||||
@ -1109,6 +1123,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
|
||||
add_security_class(tdbb, reqAddSC, security_class, acl_length, acl);
|
||||
|
||||
bool needsUsagePrivileges = false, needsExecPrivileges = false;
|
||||
|
||||
if (obj_type == obj_field)
|
||||
{
|
||||
FOR(REQUEST_HANDLE reqModObjSC) FLD IN RDB$FIELDS
|
||||
@ -1118,6 +1134,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
FLD.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), FLD.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsUsagePrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1130,6 +1148,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
CS.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), CS.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsUsagePrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1142,6 +1162,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
COLL.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), COLL.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsUsagePrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1154,6 +1176,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
XCP.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), XCP.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsUsagePrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1166,6 +1190,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
GEN.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), GEN.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsUsagePrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1178,6 +1204,8 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
PKG.RDB$SECURITY_CLASS.NULL = FALSE;
|
||||
PAD(security_class.c_str(), PKG.RDB$SECURITY_CLASS);
|
||||
END_MODIFY
|
||||
|
||||
needsExecPrivileges = true;
|
||||
}
|
||||
END_FOR
|
||||
}
|
||||
@ -1195,18 +1223,29 @@ static void add_security_to_sys_obj(thread_db* tdbb,
|
||||
else
|
||||
fb_assert(false);
|
||||
|
||||
for (const char* p = USAGE_PRIVILEGES; *p; ++p)
|
||||
const char* const privileges =
|
||||
needsUsagePrivileges ? USAGE_PRIVILEGES :
|
||||
needsExecPrivileges ? EXEC_PRIVILEGES :
|
||||
NULL;
|
||||
|
||||
if (privileges)
|
||||
{
|
||||
STORE(REQUEST_HANDLE reqInsUserPriv) PRIV IN RDB$USER_PRIVILEGES
|
||||
PAD(user_name.c_str(), PRIV.RDB$USER);
|
||||
PAD(obj_name.c_str(), PRIV.RDB$RELATION_NAME);
|
||||
PRIV.RDB$PRIVILEGE[0] = *p;
|
||||
PRIV.RDB$PRIVILEGE[1] = 0;
|
||||
PRIV.RDB$GRANT_OPTION = WITH_GRANT_OPTION;
|
||||
PRIV.RDB$USER_TYPE = obj_user;
|
||||
PRIV.RDB$OBJECT_TYPE = obj_type;
|
||||
PRIV.RDB$GRANTOR.NULL = TRUE;
|
||||
END_STORE
|
||||
fb_assert(user_name.hasData());
|
||||
fb_assert(obj_name.hasData());
|
||||
|
||||
for (const char* p = privileges; *p; ++p)
|
||||
{
|
||||
STORE(REQUEST_HANDLE reqInsUserPriv) PRIV IN RDB$USER_PRIVILEGES
|
||||
PAD(user_name.c_str(), PRIV.RDB$USER);
|
||||
PAD(obj_name.c_str(), PRIV.RDB$RELATION_NAME);
|
||||
PRIV.RDB$PRIVILEGE[0] = *p;
|
||||
PRIV.RDB$PRIVILEGE[1] = 0;
|
||||
PRIV.RDB$GRANT_OPTION = WITH_GRANT_OPTION;
|
||||
PRIV.RDB$USER_TYPE = obj_user;
|
||||
PRIV.RDB$OBJECT_TYPE = obj_type;
|
||||
PRIV.RDB$GRANTOR.NULL = TRUE;
|
||||
END_STORE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1065,6 +1065,7 @@ namespace Jrd
|
||||
PathName dpb_working_directory;
|
||||
string dpb_set_db_charset;
|
||||
string dpb_network_protocol;
|
||||
PathName dpb_remote_crypt;
|
||||
string dpb_remote_address;
|
||||
string dpb_remote_host;
|
||||
string dpb_remote_os_user;
|
||||
@ -6970,6 +6971,9 @@ void DatabaseOptions::get(const UCHAR* dpb, USHORT dpb_length, bool& invalid_cli
|
||||
case isc_dpb_addr_flags:
|
||||
dpb_remote_flags = address.getInt();
|
||||
break;
|
||||
case isc_dpb_addr_crypt:
|
||||
address.getPath(dpb_remote_crypt);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -7275,6 +7279,7 @@ static JAttachment* create_attachment(const PathName& alias_name,
|
||||
|
||||
attachment->att_filename = alias_name;
|
||||
attachment->att_network_protocol = options.dpb_network_protocol;
|
||||
attachment->att_remote_crypt = options.dpb_remote_crypt;
|
||||
attachment->att_remote_address = options.dpb_remote_address;
|
||||
attachment->att_remote_pid = options.dpb_remote_pid;
|
||||
attachment->att_remote_flags = options.dpb_remote_flags;
|
||||
|
@ -419,6 +419,7 @@ NAME("MON$STATEMENT_TIMER", nam_stmt_timer)
|
||||
|
||||
NAME("MON$WIRE_COMPRESSED", nam_wire_compressed)
|
||||
NAME("MON$WIRE_ENCRYPTED", nam_wire_encrypted)
|
||||
NAME("MON$WIRE_CRYPT_PLUGIN", nam_wire_crypt_plugin)
|
||||
|
||||
NAME("RDB$TIME_ZONES", nam_time_zones)
|
||||
NAME("RDB$TIME_ZONE_ID", nam_tz_id)
|
||||
|
206
src/jrd/ods.h
206
src/jrd/ods.h
@ -33,10 +33,8 @@
|
||||
#ifndef JRD_ODS_H
|
||||
#define JRD_ODS_H
|
||||
|
||||
#ifndef ODS_TESTING
|
||||
#include "../jrd/RecordNumber.h"
|
||||
#include "../common/classes/fb_string.h"
|
||||
#endif //ODS_TESTING
|
||||
|
||||
// This macro enables the ability of the engine to connect to databases
|
||||
// from ODS 8 up to the latest. If this macro is undefined, the engine
|
||||
@ -234,6 +232,14 @@ struct pag
|
||||
ULONG pag_pageno; // for validation
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct pag) == 16, "struct pag size mismatch");
|
||||
static_assert(offsetof(struct pag, pag_type) == 0, "pag_type offset mismatch");
|
||||
static_assert(offsetof(struct pag, pag_flags) == 1, "pag_flags offset mismatch");
|
||||
static_assert(offsetof(struct pag, pag_reserved) == 2, "pag_reserved offset mismatch");
|
||||
static_assert(offsetof(struct pag, pag_generation) == 4, "pag_generation offset mismatch");
|
||||
static_assert(offsetof(struct pag, pag_scn) == 8, "pag_scn offset mismatch");
|
||||
static_assert(offsetof(struct pag, pag_pageno) == 12, "pag_pageno offset mismatch");
|
||||
|
||||
typedef pag* PAG;
|
||||
|
||||
|
||||
@ -249,6 +255,14 @@ struct blob_page
|
||||
ULONG blp_page[1]; // Page number if level 1
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct blob_page) == 32, "struct blob_page size mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_header) == 0, "blp_header offset mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_lead_page) == 16, "blp_lead_page offset mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_sequence) == 20, "blp_sequence offset mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_length) == 24, "blp_length offset mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_pad) == 26, "blp_pag offset mismatch");
|
||||
static_assert(offsetof(struct blob_page, blp_page) == 28, "blp_page offset mismatch");
|
||||
|
||||
#define BLP_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::blob_page, blp_page[0]))
|
||||
|
||||
// pag_flags
|
||||
@ -272,6 +286,20 @@ struct btree_page
|
||||
UCHAR btr_nodes[1];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct btree_page) == 40, "struct btree_page size mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_header) == 0, "btr_header offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_sibling) == 16, "btr_sibling offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_left_sibling) == 20, "btr_left_sibling offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_prefix_total) == 24, "btr_prefix_total offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_relation) == 28, "btr_relation offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_length) == 30, "btr_length offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_id) == 32, "btr_id offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_level) == 33, "btr_level offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_jump_interval) == 34, "btr_jump_interval offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_jump_size) == 36, "btr_jump_size offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_jump_count) == 38, "btr_jump_count offset mismatch");
|
||||
static_assert(offsetof(struct btree_page, btr_nodes) == 39, "btr_nodes offset mismatch");
|
||||
|
||||
// NS 2014-07-17: You can define this thing as "const FB_SIZE_t ...", and it works
|
||||
// for standards-conforming compilers (recent GCC and MSVC will do)
|
||||
// But older versions might have a problem, so I leave #define in place for now
|
||||
@ -298,6 +326,17 @@ struct data_page
|
||||
} dpg_rpt[1];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct data_page) == 28, "struct data_page size mismatch");
|
||||
static_assert(offsetof(struct data_page, dpg_header) == 0, "dpg_header offset mismatch");
|
||||
static_assert(offsetof(struct data_page, dpg_sequence) == 16, "gpg_sequence offset mismatch");
|
||||
static_assert(offsetof(struct data_page, dpg_relation) == 20, "dpg_relation offset mismatch");
|
||||
static_assert(offsetof(struct data_page, dpg_count) == 22, "dpg_count offset mismatch");
|
||||
static_assert(offsetof(struct data_page, dpg_rpt) == 24, "dpg_rpt offset mismatch");
|
||||
|
||||
static_assert(sizeof(struct data_page::dpg_repeat) == 4, "struct dpg_repeat size mismatch");
|
||||
static_assert(offsetof(struct data_page::dpg_repeat, dpg_offset) == 0, "dpg_offset offset mismatch");
|
||||
static_assert(offsetof(struct data_page::dpg_repeat, dpg_length) == 2, "dpg_length offset mismatch");
|
||||
|
||||
#define DPG_SIZE (sizeof (Ods::data_page) - sizeof (Ods::data_page::dpg_repeat))
|
||||
|
||||
// pag_flags
|
||||
@ -318,9 +357,8 @@ struct index_root_page
|
||||
USHORT irt_count; // Number of indices
|
||||
struct irt_repeat
|
||||
{
|
||||
#ifndef ODS_TESTING
|
||||
private:
|
||||
#endif //ODS_TESTING
|
||||
friend struct index_root_page; // to allow offset check for private members
|
||||
ULONG irt_root; // page number of index root if irt_in_progress is NOT set, or
|
||||
// highest 32 bit of transaction if irt_in_progress is set
|
||||
ULONG irt_transaction; // transaction in progress (lowest 32 bits)
|
||||
@ -329,7 +367,6 @@ struct index_root_page
|
||||
UCHAR irt_keys; // number of keys in index
|
||||
UCHAR irt_flags;
|
||||
|
||||
#ifndef ODS_TESTING
|
||||
ULONG getRoot() const;
|
||||
void setRoot(ULONG root_page);
|
||||
|
||||
@ -337,10 +374,23 @@ struct index_root_page
|
||||
void setTransaction(TraNumber traNumber);
|
||||
|
||||
bool isUsed() const;
|
||||
#endif //ODS_TESTING
|
||||
|
||||
} irt_rpt[1];
|
||||
|
||||
static_assert(sizeof(struct irt_repeat) == 12, "struct irt_repeat size mismatch");
|
||||
static_assert(offsetof(struct irt_repeat, irt_root) == 0, "irt_root offset mismatch");
|
||||
static_assert(offsetof(struct irt_repeat, irt_transaction) == 4, "irt_transaction offset mismatch");
|
||||
static_assert(offsetof(struct irt_repeat, irt_desc) == 8, "irt_desc offset mismatch");
|
||||
static_assert(offsetof(struct irt_repeat, irt_keys) == 10, "irt_keys offset mismatch");
|
||||
static_assert(offsetof(struct irt_repeat, irt_flags) == 11, "irt_flags offset mismatch");
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct index_root_page) == 32, "struct index_root_page size mismatch");
|
||||
static_assert(offsetof(struct index_root_page, irt_header) == 0, "irt_header offset mismatch");
|
||||
static_assert(offsetof(struct index_root_page, irt_relation) == 16, "irt_relation offset mismatch");
|
||||
static_assert(offsetof(struct index_root_page, irt_count) == 18, "irt_count offset mismatch");
|
||||
static_assert(offsetof(struct index_root_page, irt_rpt) == 20, "irt_rpt offset mismatch");
|
||||
|
||||
// key descriptor
|
||||
|
||||
struct irtd
|
||||
@ -350,6 +400,11 @@ struct irtd
|
||||
float irtd_selectivity;
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct irtd) == 8, "struct irtd size mismatch");
|
||||
static_assert(offsetof(struct irtd, irtd_field) == 0, "irtd_field offset mismatch");
|
||||
static_assert(offsetof(struct irtd, irtd_itype) == 2, "irtd_itype offset mismatch");
|
||||
static_assert(offsetof(struct irtd, irtd_selectivity) == 4, "irtd_selectivity offset mismatch");
|
||||
|
||||
// irt_flags, must match the idx_flags (see btr.h)
|
||||
const USHORT irt_unique = 1;
|
||||
const USHORT irt_descending = 2;
|
||||
@ -358,7 +413,6 @@ const USHORT irt_foreign = 8;
|
||||
const USHORT irt_primary = 16;
|
||||
const USHORT irt_expression = 32;
|
||||
|
||||
#ifndef ODS_TESTING
|
||||
inline ULONG index_root_page::irt_repeat::getRoot() const
|
||||
{
|
||||
return (irt_flags & irt_in_progress) ? 0 : irt_root;
|
||||
@ -386,7 +440,6 @@ inline bool index_root_page::irt_repeat::isUsed() const
|
||||
{
|
||||
return (irt_flags & irt_in_progress) || (irt_root != 0);
|
||||
}
|
||||
#endif //ODS_TESTING
|
||||
|
||||
|
||||
const int STUFF_COUNT = 4;
|
||||
@ -427,6 +480,35 @@ struct header_page
|
||||
UCHAR hdr_data[1]; // Misc data
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct header_page) == 132, "struct header_page size mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_header) == 0, "hdr_header offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_page_size) == 16, "hdr_page_size offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_ods_version) == 18, "hdr_ods_version offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_PAGES) == 20, "hdr_PAGES offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_next_page) == 24, "hdr_next_page offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_oldest_transaction) == 28, "hdr_oldest_transaction offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_oldest_active) == 32, "hdr_oldest_active offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_next_transaction) == 36, "hdr_next_transaction offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_sequence) == 40, "hdr_sequence offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_flags) == 42, "hdr_flags offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_creation_date) == 44, "hdr_creation_date offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_attachment_id) == 52, "hdr_attachment_id offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_shadow_count) == 56, "hdr_shadow_count offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_cpu) == 60, "hdr_cpu offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_os) == 61, "hdr_os offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_cc) == 62, "hdr_cc offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_compatibility_flags) == 63, "hdr_compatibility_flags offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_ods_minor) == 64, "hdr_ods_minor offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_end) == 66, "hdr_end offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_page_buffers) == 68, "hdr_page_buffers offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_oldest_snapshot) == 72, "hdr_oldest_snapshot offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_backup_pages) == 76, "hdr_backup_pages offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_crypt_page) == 80, "hdr_crypt_page offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_crypt_plugin) == 84, "hdr_crypt_plugin offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_att_high) == 116, "hdr_att_high offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_tra_high) == 120, "hdr_tra_high offset mismatch");
|
||||
static_assert(offsetof(struct header_page, hdr_data) == 128, "hdr_data offset mismatch");
|
||||
|
||||
#define HDR_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::header_page, hdr_data[0]))
|
||||
|
||||
// Header page clumplets
|
||||
@ -492,6 +574,13 @@ struct page_inv_page
|
||||
UCHAR pip_bits[1];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct page_inv_page) == 32, "struct page_inv_page size mismatch");
|
||||
static_assert(offsetof(struct page_inv_page, pip_header) == 0, "pip_header offset mismatch");
|
||||
static_assert(offsetof(struct page_inv_page, pip_min) == 16, "pip_min offset mismatch");
|
||||
static_assert(offsetof(struct page_inv_page, pip_extent) == 20, "pip_extent offset mismatch");
|
||||
static_assert(offsetof(struct page_inv_page, pip_used) == 24, "pip_used offset mismatch");
|
||||
static_assert(offsetof(struct page_inv_page, pip_bits) == 28, "pip_bits offset mismatch");
|
||||
|
||||
|
||||
// SCN's Page
|
||||
|
||||
@ -502,6 +591,12 @@ struct scns_page
|
||||
ULONG scn_pages[1]; // SCN's vector
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct scns_page) == 24, "struct scns_page size mismatch");
|
||||
static_assert(offsetof(struct scns_page, scn_header) == 0, "scn_header offset mismatch");
|
||||
static_assert(offsetof(struct scns_page, scn_sequence) == 16, "scn_sequence offset mismatch");
|
||||
static_assert(offsetof(struct scns_page, scn_pages) == 20, "scn_pages offset mismatch");
|
||||
|
||||
|
||||
// Important note !
|
||||
// pagesPerPIP value must be multiply of pagesPerSCN value !
|
||||
//
|
||||
@ -544,6 +639,16 @@ struct pointer_page
|
||||
ULONG ppg_page[1]; // Data page vector
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct pointer_page) == 36, "struct pointer_page size mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_header) == 0, "ppg_header offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_sequence) == 16, "ppg_sequence offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_next) == 20, "ppg_next offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_count) == 24, "ppg_count offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_relation) == 26, "ppg_relation offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_min_space) == 28, "ppg_min_space offset mismatch");
|
||||
static_assert(offsetof(struct pointer_page, ppg_page) == 32, "ppg_page offset mismatch");
|
||||
|
||||
|
||||
// pag_flags
|
||||
const UCHAR ppg_eof = 1; // Last pointer page in relation
|
||||
|
||||
@ -577,6 +682,11 @@ struct tx_inv_page
|
||||
UCHAR tip_transactions[1];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct tx_inv_page) == 24, "struct tx_inv_page size mismatch");
|
||||
static_assert(offsetof(struct tx_inv_page, tip_header) == 0, "tip_header offset mismatch");
|
||||
static_assert(offsetof(struct tx_inv_page, tip_next) == 16, "tip_next offset mismatch");
|
||||
static_assert(offsetof(struct tx_inv_page, tip_transactions) == 20, "tip_transactions offset mismatch");
|
||||
|
||||
|
||||
// Generator Page
|
||||
|
||||
@ -588,6 +698,12 @@ struct generator_page
|
||||
SINT64 gpg_values[1]; // Generator vector
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct generator_page) == 32, "struct generator_page size mismatch");
|
||||
static_assert(offsetof(struct generator_page, gpg_header) == 0, "gpg_header offset mismatch");
|
||||
static_assert(offsetof(struct generator_page, gpg_sequence) == 16, "gpg_sequence offset mismatch");
|
||||
static_assert(offsetof(struct generator_page, gpg_dummy1) == 20, "gpg_dummy1 offset mismatch");
|
||||
static_assert(offsetof(struct generator_page, gpg_values) == 24, "gpg_values offset mismatch");
|
||||
|
||||
|
||||
// Record header
|
||||
|
||||
@ -601,6 +717,14 @@ struct rhd
|
||||
UCHAR rhd_data[1]; // record data
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct rhd) == 16, "struct rhd size mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_transaction) == 0, "rhd_transaction offset mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_b_page) == 4, "rhd_b_page offset mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_b_line) == 8, "rhd_b_line offset mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_flags) == 10, "rhd_flags offset mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_format) == 12, "rhd_format offset mismatch");
|
||||
static_assert(offsetof(struct rhd, rhd_data) == 13, "rhd_data offset mismatch");
|
||||
|
||||
#define RHD_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::rhd, rhd_data[0]))
|
||||
|
||||
// Record header extended to hold long transaction id
|
||||
@ -616,6 +740,15 @@ struct rhde
|
||||
UCHAR rhde_data[1]; // record data
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct rhde) == 20, "struct rhde size mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_transaction) == 0, "rhde_transaction offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_b_page) == 4, "rhde_b_page offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_b_line) == 8, "rhde_b_line offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_flags) == 10, "rhde_flags offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_format) == 12, "rhde_formats offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_tra_high) == 14, "rhde_tra_high offset mismatch");
|
||||
static_assert(offsetof(struct rhde, rhde_data) == 16, "rhde_data offset mismatch");
|
||||
|
||||
#define RHDE_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::rhde, rhde_data[0]))
|
||||
|
||||
// Record header for fragmented record
|
||||
@ -633,6 +766,17 @@ struct rhdf
|
||||
UCHAR rhdf_data[1]; // record data
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct rhdf) == 24, "struct rhdf size mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_transaction) == 0, "rhdf_transaction offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_b_page) == 4, "rhdf_b_page offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_b_line) == 8, "rhdf_b_line offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_flags) == 10, "rhdf_flags offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_format) == 12, "rhdf_format offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_tra_high) == 14, "rhdf_tra_high offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_f_page) == 16, "rhdf_f_page offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_f_line) == 20, "rhdf_f_line offset mismatch");
|
||||
static_assert(offsetof(struct rhdf, rhdf_data) == 22, "rhdf_data offset mismatch");
|
||||
|
||||
#define RHDF_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::rhdf, rhdf_data[0]))
|
||||
|
||||
|
||||
@ -649,17 +793,29 @@ struct blh
|
||||
ULONG blh_length; // Total length of data
|
||||
USHORT blh_sub_type; // Blob sub-type
|
||||
UCHAR blh_charset; // Blob charset (since ODS 11.1)
|
||||
UCHAR blh_unused;
|
||||
#ifndef ODS_TESTING
|
||||
// Macro CHECK_BLOB_FIELD_ACCESS_FOR_SELECT is never defined, code under it was left for a case
|
||||
// we would like to have that check in a future.
|
||||
#ifdef CHECK_BLOB_FIELD_ACCESS_FOR_SELECT
|
||||
USHORT blh_fld_id; // Field ID
|
||||
#endif
|
||||
#endif //ODS_TESTING
|
||||
UCHAR blh_unused;
|
||||
ULONG blh_page[1]; // Page vector for blob pages
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct blh) == 32, "struct blh size mismatch");
|
||||
static_assert(offsetof(struct blh, blh_lead_page) == 0, "blh_lead_page offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_max_sequence) == 4, "blh_max_sequence offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_max_segment) == 8, "blh_max_segment offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_flags) == 10, "blh_flags offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_level) == 12, "blh_level offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_count) == 16, "blh_count offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_length) == 20, "blh_length offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_sub_type) == 24, "blh_sub_type offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_charset) == 26, "blh_charset offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_unused) == 27, "blh_unused offset mismatch");
|
||||
static_assert(offsetof(struct blh, blh_page) == 28, "blh_page offset mismatch");
|
||||
|
||||
|
||||
#define BLH_SIZE static_cast<FB_SIZE_T>(offsetof(Ods::blh, blh_page[0]))
|
||||
// rhd_flags, rhdf_flags and blh_flags
|
||||
|
||||
@ -691,6 +847,14 @@ struct Descriptor
|
||||
ULONG dsc_offset;
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct Descriptor) == 12, "struct Descriptor size mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_dtype) == 0, "dsc_dtype offset mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_scale) == 1, "dsc_scale offset mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_length) == 2, "dsc_length offset mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_sub_type) == 4, "dsc_sub_type offset mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_flags) == 6, "dsc_flags offset mismatch");
|
||||
static_assert(offsetof(struct Descriptor, dsc_offset) == 8, "dsc_offset offset mismatch");
|
||||
|
||||
// Array description, "internal side" used by the engine.
|
||||
// And stored on the disk, in the relation summary blob.
|
||||
|
||||
@ -711,8 +875,24 @@ struct InternalArrayDesc
|
||||
SLONG iad_upper; // Upper bound
|
||||
};
|
||||
iad_repeat iad_rpt[1];
|
||||
|
||||
static_assert(sizeof(struct iad_repeat) == 24, "struct iad_repeat size mismatch");
|
||||
static_assert(offsetof(struct iad_repeat, iad_desc) == 0, "iad_desc offset mismatch");
|
||||
static_assert(offsetof(struct iad_repeat, iad_length) == 12, "iad_length offset mismatch");
|
||||
static_assert(offsetof(struct iad_repeat, iad_lower) == 16, "iad_lower offset mismatch");
|
||||
static_assert(offsetof(struct iad_repeat, iad_upper) == 20, "iad_upper offset mismatch");
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct InternalArrayDesc) == 40, "struct InternalArrayDesc size mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_version) == 0, "iad_version offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_dimensions) == 1, "iad_dimension offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_struct_count) == 2, "iad_struct_count offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_element_length) == 4, "iad_element_length offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_length) == 6, "iad_length offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_count) == 8, "iad_count offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_total_length) == 12, "iad_total_length offset mismatch");
|
||||
static_assert(offsetof(struct InternalArrayDesc, iad_rpt) == 16, "iad_rpt offset mismatch");
|
||||
|
||||
const UCHAR IAD_VERSION_1 = 1;
|
||||
|
||||
/*
|
||||
@ -727,13 +907,10 @@ inline int IAD_LEN(int count)
|
||||
#define IAD_LEN(count) (sizeof (Ods::InternalArrayDesc) + \
|
||||
(count ? count - 1: count) * sizeof (Ods::InternalArrayDesc::iad_repeat))
|
||||
|
||||
#ifndef ODS_TESTING
|
||||
Firebird::string pagtype(UCHAR type);
|
||||
#endif //ODS_TESTING
|
||||
|
||||
} //namespace Ods
|
||||
|
||||
#ifndef ODS_TESTING
|
||||
// alignment for raw page access
|
||||
const USHORT PAGE_ALIGNMENT = 1024;
|
||||
|
||||
@ -745,6 +922,5 @@ const int MAX_TABLE_VERSIONS = 255;
|
||||
|
||||
// max number of view formats (aka versions), limited by "SSHORT RDB$FORMAT"
|
||||
const int MAX_VIEW_VERSIONS = MAX_SSHORT;
|
||||
#endif //ODS_TESTING
|
||||
|
||||
#endif // JRD_ODS_H
|
||||
|
@ -713,7 +713,7 @@ jrd_file* PIO_open(thread_db* tdbb,
|
||||
}
|
||||
|
||||
const bool shareMode = dbb->dbb_config->getServerMode() != MODE_SUPER;
|
||||
lockDatabaseFile(desc, shareMode || readOnly, false, file_name.c_str(), isc_io_open_err);
|
||||
lockDatabaseFile(desc, shareMode, false, file_name.c_str(), isc_io_open_err);
|
||||
|
||||
// os_utils::posix_fadvise(desc, 0, 0, POSIX_FADV_RANDOM);
|
||||
|
||||
|
@ -506,9 +506,12 @@ USHORT PAR_desc(thread_db* tdbb, CompilerScratch* csb, dsc* desc, ItemInfo* item
|
||||
}
|
||||
}
|
||||
|
||||
CompilerScratch::Dependency dependency(obj_field);
|
||||
dependency.name = name;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
if (csb->csb_g_flags & csb_get_dependencies)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_field);
|
||||
dependency.name = name;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -568,10 +571,13 @@ USHORT PAR_desc(thread_db* tdbb, CompilerScratch* csb, dsc* desc, ItemInfo* item
|
||||
}
|
||||
}
|
||||
|
||||
CompilerScratch::Dependency dependency(obj_relation);
|
||||
dependency.relation = MET_lookup_relation(tdbb, *relationName);
|
||||
dependency.subName = fieldName;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
if (csb->csb_g_flags & csb_get_dependencies)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_relation);
|
||||
dependency.relation = MET_lookup_relation(tdbb, *relationName);
|
||||
dependency.subName = fieldName;
|
||||
csb->csb_dependencies.push(dependency);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -582,7 +588,7 @@ USHORT PAR_desc(thread_db* tdbb, CompilerScratch* csb, dsc* desc, ItemInfo* item
|
||||
break;
|
||||
}
|
||||
|
||||
if (desc->getTextType() != CS_NONE)
|
||||
if ((csb->csb_g_flags & csb_get_dependencies) && desc->getTextType() != CS_NONE)
|
||||
{
|
||||
CompilerScratch::Dependency dependency(obj_collation);
|
||||
dependency.number = INTL_TEXT_TYPE(*desc);
|
||||
@ -896,6 +902,9 @@ void PAR_dependency(thread_db* tdbb, CompilerScratch* csb, StreamType stream, SS
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
if (!(csb->csb_g_flags & csb_get_dependencies))
|
||||
return;
|
||||
|
||||
CompilerScratch::Dependency dependency(0);
|
||||
|
||||
if (csb->csb_rpt[stream].csb_relation)
|
||||
|
@ -523,6 +523,7 @@ RELATION(nam_mon_attachments, rel_mon_attachments, ODS_11_1, rel_virtual)
|
||||
FIELD(f_mon_att_stmt_timeout, nam_stmt_timeout, fld_stmt_timeout, 0, ODS_13_0)
|
||||
FIELD(f_mon_att_wire_compressed, nam_wire_compressed, fld_bool, 0, ODS_13_0)
|
||||
FIELD(f_mon_att_wire_encrypted, nam_wire_encrypted, fld_bool, 0, ODS_13_0)
|
||||
FIELD(f_mon_att_remote_crypt, nam_wire_crypt_plugin, fld_remote_crypt, 0, ODS_12_0)
|
||||
END_RELATION
|
||||
|
||||
// Relation 35 (MON$TRANSACTIONS)
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
#include "ids.h"
|
||||
#include "../ids.h"
|
||||
#include "../jrd/align.h"
|
||||
#include "../jrd/jrd.h"
|
||||
#include "../jrd/blb.h"
|
||||
|
@ -819,15 +819,14 @@ void Sort::diddleKey(UCHAR* record, bool direction, bool duplicateHandling)
|
||||
break;
|
||||
|
||||
case SKD_dec64:
|
||||
if (direction && !duplicateHandling)
|
||||
fb_assert(false); // diddleKey for Dec64/128 not tested on bigendians!
|
||||
if (direction)
|
||||
{
|
||||
((Decimal64*) p)->makeKey(lwp);
|
||||
*p ^= 1 << 7;
|
||||
}
|
||||
else if (!(key->skd_flags & SKD_separate_data))
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
if (complement && n)
|
||||
{
|
||||
UCHAR* pp = p;
|
||||
@ -843,15 +842,13 @@ void Sort::diddleKey(UCHAR* record, bool direction, bool duplicateHandling)
|
||||
|
||||
case SKD_dec128:
|
||||
fb_assert(false); // diddleKey for Dec64/128 not tested on bigendians!
|
||||
if (direction && !duplicateHandling)
|
||||
if (direction)
|
||||
{
|
||||
((Decimal128*) p)->makeKey(lwp);
|
||||
*p ^= 1 << 7;
|
||||
}
|
||||
else if (!(key->skd_flags & SKD_separate_data))
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
if (complement && n)
|
||||
{
|
||||
UCHAR* pp = p;
|
||||
@ -1133,15 +1130,13 @@ void Sort::diddleKey(UCHAR* record, bool direction, bool duplicateHandling)
|
||||
#endif // IEEE
|
||||
|
||||
case SKD_dec64:
|
||||
if (direction && !duplicateHandling)
|
||||
if (direction)
|
||||
{
|
||||
((Decimal64*) p)->makeKey(lwp);
|
||||
p[3] ^= 1 << 7;
|
||||
}
|
||||
else if (!(key->skd_flags & SKD_separate_data))
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
if (complement && n)
|
||||
{
|
||||
UCHAR* pp = p;
|
||||
@ -1156,15 +1151,13 @@ void Sort::diddleKey(UCHAR* record, bool direction, bool duplicateHandling)
|
||||
break;
|
||||
|
||||
case SKD_dec128:
|
||||
if (direction && !duplicateHandling)
|
||||
if (direction)
|
||||
{
|
||||
((Decimal128*) p)->makeKey(lwp);
|
||||
p[3] ^= 1 << 7;
|
||||
}
|
||||
else if (!(key->skd_flags & SKD_separate_data))
|
||||
{
|
||||
fb_assert(false);
|
||||
|
||||
if (complement && n)
|
||||
{
|
||||
UCHAR* pp = p;
|
||||
|
@ -1365,11 +1365,13 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
|
||||
case isc_info_svc_user_dbpath:
|
||||
if (svc_user_flag & SVC_user_dba)
|
||||
{
|
||||
// The path to the user security database (security2.fdb)
|
||||
const RefPtr<const Config> defConf(Config::getDefaultConfig());
|
||||
const char* secDb = defConf->getSecurityDatabase();
|
||||
// The path to the user security database
|
||||
PathName secDb;
|
||||
RefPtr<const Config> config;
|
||||
expandDatabaseName(svc_expected_db, secDb, &config);
|
||||
expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr);
|
||||
|
||||
if (!(info = INF_put_item(item, static_cast<USHORT>(strlen(secDb)), secDb, info, end)))
|
||||
if (!(info = INF_put_item(item, static_cast<USHORT>(secDb.length()), secDb.c_str(), info, end)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1817,11 +1819,13 @@ void Service::query(USHORT send_item_length,
|
||||
case isc_info_svc_user_dbpath:
|
||||
if (svc_user_flag & SVC_user_dba)
|
||||
{
|
||||
// The path to the user security database (security2.fdb)
|
||||
const RefPtr<const Config> defConf(Config::getDefaultConfig());
|
||||
const char* secDb = defConf->getSecurityDatabase();
|
||||
// The path to the user security database
|
||||
PathName secDb;
|
||||
RefPtr<const Config> config;
|
||||
expandDatabaseName(svc_expected_db, secDb, &config);
|
||||
expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr);
|
||||
|
||||
if (!(info = INF_put_item(item, static_cast<USHORT>(strlen(secDb)), secDb, info, end)))
|
||||
if (!(info = INF_put_item(item, static_cast<USHORT>(secDb.length()), secDb.c_str(), info, end)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "../jrd/val.h"
|
||||
#include "../jrd/req.h"
|
||||
#include "../jrd/tra.h"
|
||||
#include "gen/ids.h"
|
||||
#include "../jrd/ids.h"
|
||||
#include "../jrd/lck.h"
|
||||
#include "../jrd/lls.h"
|
||||
#include "../jrd/scl.h"
|
||||
|
@ -1,30 +0,0 @@
|
||||
divert(-1)
|
||||
/*
|
||||
* The contents of this file are subject to the Interbase 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.Inprise.com/IPL.html
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, 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 Inprise Corporation
|
||||
* and its predecessors. Portions created by Inprise Corporation are
|
||||
* Copyright (C) Inprise Corporation.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
changequote([,])
|
||||
|
||||
define(RELATION, [define([N], 0)])
|
||||
define(FIELD, [[const USHORT ] $1 [=] N[;]define([N], incr(N))
|
||||
dnl])
|
||||
define(END_RELATION, )
|
||||
define(FIELD_ODS8, )
|
||||
|
||||
divert
|
||||
include(../src/jrd/relations.h)
|
112
src/misc/ods.awk
112
src/misc/ods.awk
@ -1,112 +0,0 @@
|
||||
#
|
||||
# PROGRAM: ODS sizes and offsets validation
|
||||
# MODULE: ods.awk
|
||||
# DESCRIPTION: Generates c++ code printing reference sample for ODS strctures
|
||||
#
|
||||
# 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.firebirdsql.org/en/initial-developer-s-public-license-version-1-0/
|
||||
#
|
||||
# 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 Alexander Peshkoff
|
||||
# for the Firebird Open Source RDBMS project.
|
||||
#
|
||||
# Copyright (c) 2018 Alexander Peshkoff <peshkoff@mail.ru>
|
||||
# and all contributors signed below.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
# Contributor(s): ______________________________________.
|
||||
#
|
||||
|
||||
BEGIN {
|
||||
st = 0;
|
||||
nm = "";
|
||||
nm2 = "";
|
||||
v2 = "";
|
||||
skip = 0;
|
||||
|
||||
print "#include <stdio.h>"
|
||||
print "#ifdef _MSC_VER"
|
||||
print "#include \"gen/autoconfig_msvc.h\""
|
||||
print "#else"
|
||||
print "#include \"gen/autoconfig.h\""
|
||||
print "#endif"
|
||||
print ""
|
||||
print "#if SIZEOF_VOID_P == 8"
|
||||
print "#define FMT \"l\""
|
||||
print "#else"
|
||||
print "#define FMT \"\""
|
||||
print "#endif"
|
||||
print ""
|
||||
print "#include \"fb_types.h\""
|
||||
print "#define ODS_TESTING"
|
||||
print "#include \"../jrd/ods.h\""
|
||||
print ""
|
||||
print "using namespace Ods;"
|
||||
print ""
|
||||
print "int main() {"
|
||||
}
|
||||
|
||||
($1 == "struct") {
|
||||
++st;
|
||||
if (st <= 2)
|
||||
{
|
||||
if (st == 1)
|
||||
{
|
||||
nm = $2;
|
||||
nm2 = nm;
|
||||
}
|
||||
else
|
||||
{
|
||||
nm2 = nm "::" $2;
|
||||
}
|
||||
v2 = $2 "_";
|
||||
|
||||
print "\tprintf(\"\\n *** " $0 " %\" FMT \"u\\n\", sizeof(" nm2 "));";
|
||||
print "\t" nm2 " " v2 ";";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
($1 == "};") {
|
||||
if (st > 1)
|
||||
{
|
||||
v2 = nm "_";
|
||||
}
|
||||
st--;
|
||||
}
|
||||
|
||||
($1 == "}") {
|
||||
if (st > 1)
|
||||
{
|
||||
st--;
|
||||
v2 = nm "_";
|
||||
}
|
||||
}
|
||||
|
||||
($2 == "ODS_TESTING") { skip = 1; }
|
||||
|
||||
(st > 0 && substr($1, 1, 1) != "#" && $1 != "struct" && skip == 0 && $1 != "//") {
|
||||
m = $2;
|
||||
i = index(m, "[");
|
||||
if (i == 0)
|
||||
i = index(m, ";");
|
||||
if (i > 0)
|
||||
m = substr(m, 1, i - 1);
|
||||
|
||||
if (length(m) > 0)
|
||||
print "\tprintf(\"" m " %\" FMT \"d\\n\", (char*)&" v2 "." m " - (char*)&" v2 ");"
|
||||
}
|
||||
|
||||
($2 == "//ODS_TESTING") { skip = 0; }
|
||||
|
||||
END {
|
||||
print "}"
|
||||
}
|
||||
|
185
src/misc/ods.txt
185
src/misc/ods.txt
@ -1,185 +0,0 @@
|
||||
|
||||
*** struct pag 16
|
||||
pag_type 0
|
||||
pag_flags 1
|
||||
pag_reserved 2
|
||||
pag_generation 4
|
||||
pag_scn 8
|
||||
pag_pageno 12
|
||||
|
||||
*** struct blob_page 32
|
||||
blp_header 0
|
||||
blp_lead_page 16
|
||||
blp_sequence 20
|
||||
blp_length 24
|
||||
blp_pad 26
|
||||
blp_page 28
|
||||
|
||||
*** struct btree_page 40
|
||||
btr_header 0
|
||||
btr_sibling 16
|
||||
btr_left_sibling 20
|
||||
btr_prefix_total 24
|
||||
btr_relation 28
|
||||
btr_length 30
|
||||
btr_id 32
|
||||
btr_level 33
|
||||
btr_jump_interval 34
|
||||
btr_jump_size 36
|
||||
btr_jump_count 38
|
||||
btr_nodes 39
|
||||
|
||||
*** struct data_page 28
|
||||
dpg_header 0
|
||||
dpg_sequence 16
|
||||
dpg_relation 20
|
||||
dpg_count 22
|
||||
|
||||
*** struct dpg_repeat 4
|
||||
dpg_offset 0
|
||||
dpg_length 2
|
||||
dpg_rpt 24
|
||||
|
||||
*** struct index_root_page 32
|
||||
irt_header 0
|
||||
irt_relation 16
|
||||
irt_count 18
|
||||
|
||||
*** struct irt_repeat 12
|
||||
irt_root 0
|
||||
irt_transaction 4
|
||||
irt_desc 8
|
||||
irt_keys 10
|
||||
irt_flags 11
|
||||
irt_rpt 20
|
||||
|
||||
*** struct irtd 8
|
||||
irtd_field 0
|
||||
irtd_itype 2
|
||||
irtd_selectivity 4
|
||||
|
||||
*** struct header_page 132
|
||||
hdr_header 0
|
||||
hdr_page_size 16
|
||||
hdr_ods_version 18
|
||||
hdr_PAGES 20
|
||||
hdr_next_page 24
|
||||
hdr_oldest_transaction 28
|
||||
hdr_oldest_active 32
|
||||
hdr_next_transaction 36
|
||||
hdr_sequence 40
|
||||
hdr_flags 42
|
||||
hdr_creation_date 44
|
||||
hdr_attachment_id 52
|
||||
hdr_shadow_count 56
|
||||
hdr_cpu 60
|
||||
hdr_os 61
|
||||
hdr_cc 62
|
||||
hdr_compatibility_flags 63
|
||||
hdr_ods_minor 64
|
||||
hdr_end 66
|
||||
hdr_page_buffers 68
|
||||
hdr_oldest_snapshot 72
|
||||
hdr_backup_pages 76
|
||||
hdr_crypt_page 80
|
||||
hdr_crypt_plugin 84
|
||||
hdr_att_high 116
|
||||
hdr_tra_high 120
|
||||
hdr_data 128
|
||||
|
||||
*** struct page_inv_page 32
|
||||
pip_header 0
|
||||
pip_min 16
|
||||
pip_extent 20
|
||||
pip_used 24
|
||||
pip_bits 28
|
||||
|
||||
*** struct scns_page 24
|
||||
scn_header 0
|
||||
scn_sequence 16
|
||||
scn_pages 20
|
||||
|
||||
*** struct pointer_page 36
|
||||
ppg_header 0
|
||||
ppg_sequence 16
|
||||
ppg_next 20
|
||||
ppg_count 24
|
||||
ppg_relation 26
|
||||
ppg_min_space 28
|
||||
ppg_page 32
|
||||
|
||||
*** struct tx_inv_page 24
|
||||
tip_header 0
|
||||
tip_next 16
|
||||
tip_transactions 20
|
||||
|
||||
*** struct generator_page 32
|
||||
gpg_header 0
|
||||
gpg_sequence 16
|
||||
gpg_dummy1 20
|
||||
gpg_values 24
|
||||
|
||||
*** struct rhd 16
|
||||
rhd_transaction 0
|
||||
rhd_b_page 4
|
||||
rhd_b_line 8
|
||||
rhd_flags 10
|
||||
rhd_format 12
|
||||
rhd_data 13
|
||||
|
||||
*** struct rhde 20
|
||||
rhde_transaction 0
|
||||
rhde_b_page 4
|
||||
rhde_b_line 8
|
||||
rhde_flags 10
|
||||
rhde_format 12
|
||||
rhde_tra_high 14
|
||||
rhde_data 16
|
||||
|
||||
*** struct rhdf 24
|
||||
rhdf_transaction 0
|
||||
rhdf_b_page 4
|
||||
rhdf_b_line 8
|
||||
rhdf_flags 10
|
||||
rhdf_format 12
|
||||
rhdf_tra_high 14
|
||||
rhdf_f_page 16
|
||||
rhdf_f_line 20
|
||||
rhdf_data 22
|
||||
|
||||
*** struct blh 32
|
||||
blh_lead_page 0
|
||||
blh_max_sequence 4
|
||||
blh_max_segment 8
|
||||
blh_flags 10
|
||||
blh_level 12
|
||||
blh_count 16
|
||||
blh_length 20
|
||||
blh_sub_type 24
|
||||
blh_charset 26
|
||||
blh_unused 27
|
||||
blh_page 28
|
||||
|
||||
*** struct Descriptor 12
|
||||
dsc_dtype 0
|
||||
dsc_scale 1
|
||||
dsc_length 2
|
||||
dsc_sub_type 4
|
||||
dsc_flags 6
|
||||
dsc_offset 8
|
||||
|
||||
*** struct InternalArrayDesc 40
|
||||
iad_version 0
|
||||
iad_dimensions 1
|
||||
iad_struct_count 2
|
||||
iad_element_length 4
|
||||
iad_length 6
|
||||
iad_count 8
|
||||
iad_total_length 12
|
||||
|
||||
*** struct iad_repeat 24
|
||||
iad_desc 0
|
||||
iad_length 12
|
||||
iad_lower 16
|
||||
iad_upper 20
|
||||
iad_rpt 16
|
@ -9,7 +9,7 @@ BuildType=T
|
||||
MajorVer=4
|
||||
MinorVer=0
|
||||
RevNo=0
|
||||
BuildNum=1715
|
||||
BuildNum=1743
|
||||
|
||||
NowAt=`pwd`
|
||||
cd `dirname $0`
|
||||
|
@ -168,7 +168,7 @@ SimpleFactory<ChaCha> factory;
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
extern "C" void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master)
|
||||
extern "C" void FB_EXPORTED FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master)
|
||||
{
|
||||
CachedMasterInterface::set(master);
|
||||
PluginManagerInterfacePtr()->registerPluginFactory(IPluginManager::TYPE_WIRE_CRYPT, "ChaCha", &factory);
|
||||
|
@ -7204,7 +7204,14 @@ static THREAD_ENTRY_DECLARE event_thread(THREAD_ENTRY_PARAM arg)
|
||||
P_OP operation = op_void;
|
||||
{ // scope
|
||||
RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
|
||||
stuff = port->receive(&packet);
|
||||
try
|
||||
{
|
||||
stuff = port->receive(&packet);
|
||||
}
|
||||
catch(status_exception&)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
operation = packet.p_operation;
|
||||
|
||||
|
@ -759,7 +759,11 @@ static void disconnect(rem_port* port)
|
||||
}
|
||||
|
||||
wnet_ports->unRegisterPort(port);
|
||||
port->release();
|
||||
|
||||
if (port->port_thread_guard && port->port_events_thread && !Thread::isCurrent(port->port_events_threadId))
|
||||
port->port_thread_guard->setWait(port->port_events_thread);
|
||||
else
|
||||
port->release();
|
||||
}
|
||||
|
||||
|
||||
@ -1332,7 +1336,7 @@ static bool packet_receive(rem_port* port, UCHAR* buffer, SSHORT buffer_length,
|
||||
|
||||
if (!n)
|
||||
{
|
||||
if (port->port_flags & PORT_detached)
|
||||
if (port->port_flags & (PORT_detached | PORT_disconnect))
|
||||
return false;
|
||||
|
||||
return wnet_error(port, "ReadFile end-of-file", isc_net_read_err, dwError);
|
||||
@ -1408,10 +1412,15 @@ static bool packet_send( rem_port* port, const SCHAR* buffer, SSHORT buffer_leng
|
||||
status = GetOverlappedResult(port->port_pipe, &ovrl, &n, TRUE);
|
||||
dwError = GetLastError();
|
||||
}
|
||||
if (!status)
|
||||
if (!status && dwError != ERROR_NO_DATA)
|
||||
return wnet_error(port, "WriteFile", isc_net_write_err, dwError);
|
||||
if (n != length)
|
||||
{
|
||||
if (port->port_flags & (PORT_detached | PORT_disconnect))
|
||||
return false;
|
||||
|
||||
return wnet_error(port, "WriteFile truncated", isc_net_write_err, dwError);
|
||||
}
|
||||
|
||||
#if defined(DEBUG) && defined(WNET_trace)
|
||||
packet_print("send", reinterpret_cast<const UCHAR*>(buffer), buffer_length);
|
||||
|
@ -1068,6 +1068,14 @@ static void cleanup_port(rem_port* port)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
if (port->port_thread_guard && port->port_events_thread && !Thread::isCurrent(port->port_events_threadId))
|
||||
{
|
||||
//port->port_thread_guard->setWait(port->port_events_thread);
|
||||
|
||||
// Do not release XNET structures while event's thread working
|
||||
Thread::waitForCompletion(port->port_events_thread);
|
||||
}
|
||||
|
||||
if (port->port_xcc)
|
||||
{
|
||||
cleanup_comm(port->port_xcc);
|
||||
@ -1996,6 +2004,9 @@ static bool_t xnet_read(XDR* xdrs)
|
||||
const DWORD wait_result =
|
||||
WaitForSingleObject(xcc->xcc_event_recv_channel_filled, XNET_RECV_WAIT_TIMEOUT);
|
||||
|
||||
if (port->port_flags & PORT_disconnect)
|
||||
return FALSE;
|
||||
|
||||
if (wait_result == WAIT_OBJECT_0)
|
||||
{
|
||||
// Client has written some data for us (server) to read
|
||||
|
@ -1093,6 +1093,7 @@ struct rem_port : public Firebird::GlobalStorage, public Firebird::RefCounted
|
||||
Firebird::IWireCryptPlugin* port_crypt_plugin; // plugin used by port, when not NULL - crypts wire data
|
||||
Firebird::ICryptKeyCallback* port_client_crypt_callback; // client callback to transfer database crypt key
|
||||
ServerCallbackBase* port_server_crypt_callback; // server callback to transfer database crypt key
|
||||
Firebird::PathName port_crypt_name; // name of actual wire crypt plugin
|
||||
|
||||
Firebird::RefPtr<Firebird::IReplicator> port_replicator;
|
||||
|
||||
@ -1138,8 +1139,8 @@ public:
|
||||
port_srv_auth(NULL), port_srv_auth_block(NULL),
|
||||
port_crypt_keys(getPool()), port_crypt_complete(false), port_crypt_level(WIRECRYPT_REQUIRED),
|
||||
port_known_server_keys(getPool()), port_crypt_plugin(NULL),
|
||||
port_client_crypt_callback(NULL), port_server_crypt_callback(NULL), port_replicator(NULL),
|
||||
port_buffer(FB_NEW_POOL(getPool()) UCHAR[rpt]),
|
||||
port_client_crypt_callback(NULL), port_server_crypt_callback(NULL), port_crypt_name(getPool()),
|
||||
port_replicator(NULL), port_buffer(FB_NEW_POOL(getPool()) UCHAR[rpt]),
|
||||
port_snd_packets(0), port_rcv_packets(0), port_snd_bytes(0), port_rcv_bytes(0)
|
||||
{
|
||||
addRef();
|
||||
|
@ -2328,7 +2328,10 @@ static void addClumplets(ClumpletWriter* dpb_buffer,
|
||||
flags |= isc_dpb_addr_flag_conn_compressed;
|
||||
#endif
|
||||
if (port->port_crypt_plugin)
|
||||
{
|
||||
flags |= isc_dpb_addr_flag_conn_encrypted;
|
||||
address_record.insertString(isc_dpb_addr_crypt, port->port_crypt_name);
|
||||
}
|
||||
|
||||
if (flags)
|
||||
address_record.insertInt(isc_dpb_addr_flags, flags);
|
||||
@ -6175,6 +6178,7 @@ void rem_port::start_crypt(P_CRYPT * crypt, PACKET* sendL)
|
||||
port_crypt_plugin = cp.plugin();
|
||||
port_crypt_plugin->addRef();
|
||||
port_crypt_complete = true;
|
||||
port_crypt_name = cp.name();
|
||||
|
||||
send_response(sendL, 0, 0, &st, false);
|
||||
WIRECRYPT_DEBUG(fprintf(stderr, "Srv: Installed cipher %s\n", cp.name()));
|
||||
|
@ -3930,6 +3930,8 @@ public:
|
||||
}
|
||||
msgPrefix.copyTo(fb_prefix_msg_val, sizeof(fb_prefix_msg_val));
|
||||
fb_prefix_msg = fb_prefix_msg_val;
|
||||
|
||||
TimeZoneUtil::initTimeZoneEnv();
|
||||
}
|
||||
static void cleanup()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user