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

- External Engines implementation.

- Plugins API.

- Feature CORE-2700 - UDR (User Defined Routines) Engine - C++ API supporting functions, triggers and stored procedures.
- Feature CORE-2470 - Support for alternate format of strings literals.
- Feature CORE-2310 - DDL triggers.
- Feature CORE-2312 - PSQL Packages.
- Feature CORE-1209 - CONTINUE statement.
- Feature CORE-1180 - DDL syntax to change (not) nullable state of columns.
- Feature CORE-2090 - Support OVER () clause with current aggregate functions.

- Fixed CORE-2699 - Common table expression context could be used with parameters.

- Introduce ODS 12.0.

- Work in progress in type-safe parser.
- Refactor some DDL commands (procedures and triggers) from DYN to DdlNodes.
- Refactor virtual tables to use a class hierarchy instead of namespaces. This is basic thing, not based on the changes done in Vulcan. Window functions is based on this work.
- Refactor COMMENT ON and DROP FUNCTION from DYN to DdlNodes. COMMENT ON do not use GDML anymore, it uses DSQL with PreparedStatement class.
- Refactor EXECUTE BLOCK to StmtNodes.
- Refactor the IUDF to SysFunctions. That eliminates RDB$GET_CONTEXT and RDB$SET_CONTEXT from RDB$FUNCTIONS.
This commit is contained in:
asfernandes 2009-10-21 00:42:38 +00:00
parent 638267b16a
commit ed0e0daeb3
214 changed files with 20524 additions and 7095 deletions

View File

@ -32206,7 +32206,8 @@
* firebird2/src/jrd/: GlobalRWLock.cpp (1.3), cch.cpp (1.160): * firebird2/src/jrd/: GlobalRWLock.cpp (1.3), cch.cpp (1.160):
Small NBAK performance optimization from Rom an Simakov Small NBAK performance optimization from Rom
an Simakov
2007-05-04 16:48 asfernandes 2007-05-04 16:48 asfernandes

View File

@ -80,6 +80,7 @@ fi
# If NOCONFIGURE is set, skip the call to configure # If NOCONFIGURE is set, skip the call to configure
if test "x$NOCONFIGURE" = "x"; then if test "x$NOCONFIGURE" = "x"; then
conf_flags="$conf_flags --enable-binreloc"
echo Running $SRCDIR/configure $conf_flags "$@" ... echo Running $SRCDIR/configure $conf_flags "$@" ...
rm -f config.cache config.log rm -f config.cache config.log
chmod a+x $SRCDIR/configure chmod a+x $SRCDIR/configure

View File

@ -4286,11 +4286,6 @@
path = fun_proto.h; path = fun_proto.h;
refType = 4; refType = 4;
}; };
F616C5E30200B0CF01EF0ADE = {
isa = PBXFileReference;
path = functions.cpp;
refType = 4;
};
F616C5E40200B0CF01EF0ADE = { F616C5E40200B0CF01EF0ADE = {
isa = PBXFileReference; isa = PBXFileReference;
path = gds.bas; path = gds.bas;
@ -7498,11 +7493,6 @@
path = example.mak; path = example.mak;
refType = 4; refType = 4;
}; };
F616C9260200B0D001EF0ADE = {
isa = PBXFileReference;
path = functions.c;
refType = 4;
};
F616C9270200B0D001EF0ADE = { F616C9270200B0D001EF0ADE = {
isa = PBXFileReference; isa = PBXFileReference;
path = indexoff.sql; path = indexoff.sql;

View File

@ -66,7 +66,7 @@ all: lib_fbudf
lib_fbudf: $(LIBIBUTIL_SO) $(UDF)/fbudf.$(SHRLIB_EXT) lib_fbudf: $(LIBIBUTIL_SO) $(UDF)/fbudf.$(SHRLIB_EXT)
$(UDF)/fbudf.$(SHRLIB_EXT): $(FBUDF_Objects) $(FBUTIL_Objects) $(UDF)/fbudf.$(SHRLIB_EXT): $(FBUDF_Objects) $(FBUTIL_Objects)
$(call LINK_UDF,fbudf) -o $@ $^ $(LINK_UDF_LIBS) -lfbembed $(call LINK_UDF,fbudf) $(LINK_EMPTY_SYMBOLS) -o $@ $^ $(LINK_UDF_LIBS) -lfbembed
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -62,14 +62,14 @@ all: gbak gsplit
gbak : $(LIBFBEMBED_SO) $(GBAK) gbak : $(LIBFBEMBED_SO) $(GBAK)
$(GBAK): $(GBAK_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(GBAK): $(GBAK_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
gsplit : $(LIBFBEMBED_SO) $(GSPLIT) gsplit : $(LIBFBEMBED_SO) $(GSPLIT)
$(GSPLIT): $(GSPLIT_Objects) $(GSPLIT): $(GSPLIT_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -63,7 +63,7 @@ all: gdef
gdef: $(GDEF) gdef: $(GDEF)
$(GDEF): $(GDEF_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(GDEF): $(GDEF_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)

View File

@ -59,7 +59,7 @@ Dependencies = $(AllObjects:.o=.d)
gfix : $(LIBFBEMBED_SO) $(GFIX) gfix : $(LIBFBEMBED_SO) $(GFIX)
$(GFIX): $(AllObjects) $(GFIX): $(AllObjects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -58,7 +58,7 @@ Dependencies = $(AllObjects:.o=.d)
gpre : $(LIBFBEMBED_SO) $(GPRE) gpre : $(LIBFBEMBED_SO) $(GPRE)
$(GPRE): $(GPRE_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(GPRE): $(GPRE_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -59,7 +59,7 @@ Dependencies = $(AllObjects:.o=.d)
isql : $(LIBFBEMBED_SO) $(ISQL) isql : $(LIBFBEMBED_SO) $(ISQL)
$(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(ISQL): $(ISQL_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIBEDITLINE) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIBEDITLINE) $(LINK_LIBS)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -61,7 +61,7 @@ all: qli
qli : create_yachts $(LIBFBEMBED_SO) $(QLI) qli : create_yachts $(LIBFBEMBED_SO) $(QLI)
$(QLI): $(QLI_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(QLI): $(QLI_Objects) $(CLUMPLETS_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
# EKU: At this point yachts.lnk is a link to empty.fdb, but gpre will fail # EKU: At this point yachts.lnk is a link to empty.fdb, but gpre will fail
# with it. metadata.fdb is what is needed here. # with it. metadata.fdb is what is needed here.

View File

@ -154,68 +154,68 @@ $(CREATE_DB): $(CREATEDB_Objects) $(COMMON_Objects) $(LIBFBSTATIC_A)
nbackup: $(LIBFBEMBED_SO) $(NBACKUP) nbackup: $(LIBFBEMBED_SO) $(NBACKUP)
$(NBACKUP): $(NBACKUP_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects) $(NBACKUP): $(NBACKUP_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
fb_lock_print: $(LIBFBEMBED_SO) $(LOCKPRINT) fb_lock_print: $(LIBFBEMBED_SO) $(LOCKPRINT)
$(LOCKPRINT): $(LOCKPRINT_Objects) $(COMMON_Objects) $(LOCKPRINT): $(LOCKPRINT_Objects) $(COMMON_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
gstat : $(LIBFBEMBED_SO) $(GSTAT) gstat : $(LIBFBEMBED_SO) $(GSTAT)
$(GSTAT): $(GSTAT_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects) $(FBCONFIG_Objects) $(GSTAT): $(GSTAT_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects) $(FBCONFIG_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
gds_drop: $(GDS_DROP) gds_drop: $(GDS_DROP)
$(GDS_DROP): $(DROP_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(GDS_DROP): $(DROP_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
fbsvcmgr: $(FBSVCMGR) fbsvcmgr: $(FBSVCMGR)
$(FBSVCMGR): $(FBSVCMGR_Objects) $(LIBFBEMBED_SO) $(FBSVCMGR): $(FBSVCMGR_Objects) $(LIBFBEMBED_SO)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
fbtracemgr: $(FBTRACEMGR) fbtracemgr: $(FBTRACEMGR)
$(FBTRACEMGR): $(FBTRACEMGR_Objects) $(LIBFBEMBED_SO) $(FBTRACEMGR): $(FBTRACEMGR_Objects) $(LIBFBEMBED_SO)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
gds_relay: $(GDS_RELAY) gds_relay: $(GDS_RELAY)
$(GDS_RELAY): $(RELAY_Objects) $(LIBFBEMBED_SO) $(GDS_RELAY): $(RELAY_Objects) $(LIBFBEMBED_SO)
$(EXE_LINK) $(LINK_OPTS) $(RELAY_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $(RELAY_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
gsec: $(GSEC) gsec: $(GSEC)
$(GSEC): $(GSEC_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects) $(GSEC): $(GSEC_Objects) $(CLUMPLETS_Objects) $(COMMON_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
fbguard: $(LIBFBCLIENT_SO) $(FBGUARD) fbguard: $(LIBFBCLIENT_SO) $(FBGUARD)
$(FBGUARD): $(FBGUARD_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(FBGUARD): $(FBGUARD_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbclient $(LIB_GUI) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ -L$(LIB) -lfbclient $(LIB_GUI) $(LINK_LIBS)
ibmgr_bin: $(IBMGR_BIN) ibmgr_bin: $(IBMGR_BIN)
$(IBMGR_BIN): $(IBMGR_Objects) $(LIBFBEMBED_SO) $(IBMGR_BIN): $(IBMGR_Objects) $(LIBFBEMBED_SO)
$(EXE_LINK) $(LINK_OPTS) $(IBMGR_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $(IBMGR_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
# This one needs a bit of work. # This one needs a bit of work.
rebuild: $(GDS_REBUILD) rebuild: $(GDS_REBUILD)
$(GDS_REBUILD): $(REBUILD_Objects) $(LIBFBEMBED_SO) $(GDS_REBUILD): $(REBUILD_Objects) $(LIBFBEMBED_SO)
$(EXE_LINK) $(LINK_OPTS) $(REBUILD_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $(REBUILD_Objects) -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
include $(ROOT)/gen/make.shared.targets include $(ROOT)/gen/make.shared.targets

View File

@ -79,12 +79,12 @@ INTL_Sources = $(addprefix $(EXAMPLES_DEST)/, $(INTL_Files))
EMPLOYEE_DB= $(EXAMPLES_DEST)/employee.fdb EMPLOYEE_DB= $(EXAMPLES_DEST)/employee.fdb
INTLEMP_DB= $(EXAMPLES_DEST)/intlemp.fdb INTLEMP_DB= $(EXAMPLES_DEST)/intlemp.fdb
.PHONY: all examples .PHONY: all examples plugins_examples
all: examples all: examples plugins_examples
# examples: $(EMPLOYEE_DB) $(INTLEMP_DB) $(FIREBIRD)/examples/README # examples: $(EMPLOYEE_DB) $(INTLEMP_DB) $(FIREBIRD)/examples/README
examples: $(EMPLOYEE_DB) $(FIREBIRD)/examples/README examples: $(EMPLOYEE_DB) $(FIREBIRD)/examples/README plugins_examples
$(FIREBIRD)/examples/README: $(FIREBIRD)/examples/README:
$(CP) $(ROOT)/examples/readme $(FIREBIRD)/examples/README $(CP) $(ROOT)/examples/readme $(FIREBIRD)/examples/README
@ -165,3 +165,6 @@ $(EXAMPLES_DEST)/%.e: $(EXAMPLES_SRC)/empbuild/%.e
$(EXAMPLES_DEST)/%.h: $(EXAMPLES_SRC)/common/%.h $(EXAMPLES_DEST)/%.h: $(EXAMPLES_SRC)/common/%.h
$(CP) $^ $@ $(CP) $^ $@
plugins_examples: # plugins examples
$(MAKE) -f $(GEN_ROOT)/examples/Makefile.plugins_examples

View File

@ -49,7 +49,7 @@ SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Source
fbserver : $(FB_SUPER_SERVER) fbserver : $(FB_SUPER_SERVER)
$(FB_SUPER_SERVER): $(SERVER_Objects) $(FB_SUPER_SERVER): $(SERVER_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(LIB_GUI) $(LINK_LIBS) $(ICU_LIBS) $(EXE_LINK) $(LINK_EXEC_EXPORT) $(LINK_FIREBIRD_SYMBOLS) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(LIB_GUI) $(LINK_LIBS) $(ICU_LIBS)
AllObjects = $(SERVER_Objects) AllObjects = $(SERVER_Objects)

View File

@ -298,10 +298,10 @@ security2.fdb: gdef isql # build the security database
# database earlier, then perhaps we could build the jrdlib in one step and # database earlier, then perhaps we could build the jrdlib in one step and
# include the security bits and pieces. # include the security bits and pieces.
.PHONY: ref_databases msgs msgs_intl generated_headers intl extlib includes .PHONY: ref_databases msgs msgs_intl generated_headers intl extlib plugins includes
basic_targets: ref_databases msgs msgs_intl generated_headers \ basic_targets: ref_databases msgs msgs_intl generated_headers \
intl extlib includes examples_cp intl extlib plugins includes examples_cp
# hack to make code regeneration work # hack to make code regeneration work
generated_headers : generated_headers :
@ -319,6 +319,9 @@ intl: # international lang components $(FIREBIRD)/intl/
extlib: # external programs than can be called extlib: # external programs than can be called
$(MAKE) -f $(GEN_ROOT)/Makefile.extlib $(MAKE) -f $(GEN_ROOT)/Makefile.extlib
plugins: # plugins
$(MAKE) -f $(GEN_ROOT)/Makefile.plugins
# distribution header include files # distribution header include files
includes: include_generic includes: include_generic

View File

@ -0,0 +1,72 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
# Adriano dos Santos Fernandes
#
ROOT=..
ObjModuleType=std
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
include $(ROOT)/gen/make.rules
include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
PLUGINS= $(FIREBIRD)/plugins
UDRENG_Files = UdrEngine.cpp
UDRENG_Sources = $(addprefix plugins/udr_engine/, $(UDRENG_Files)) jrd/mod_loader.cpp
UDRENG_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(UDRENG_Sources))))
AllObjects = $(UDRENG_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects)
Dependencies = $(AllObjects:.o=.d)
.PHONY: all udr_engine
all: udr_engine $(PLUGINS)/udr_engine.conf
udr_engine: $(PLUGINS)/udr_engine.$(SHRLIB_EXT)
$(PLUGINS)/udr_engine.$(SHRLIB_EXT): $(UDRENG_Objects) $(FBCOMMON_Objects) $(FBCLASSES_Objects) $(OS_SPECIFIC_Objects)
ifeq ($(PLATFORM),DARWIN)
$(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
else
$(LIB_LINK) $(LINK_UDRENG_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)udr_engine.$(SHRLIB_EXT) \
$(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) $(SO_LINK_LIBS)
endif
$(PLUGINS)/udr_engine.conf: $(ROOT)/src/plugins/udr_engine/udr_engine.conf
cp $^ $@
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

View File

@ -0,0 +1,71 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
# Adriano dos Santos Fernandes
#
ROOT=../..
ObjModuleType=std
CXXFLAGS+= -I$(ROOT)/gen/firebird/include
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
include $(ROOT)/gen/make.rules
include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
PLUGINS= $(FIREBIRD)/plugins
UDR_Files = UdrCppExample.cpp
UDR_Sources = $(addprefix ../examples/udr/, $(UDR_Files))
UDR_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(UDR_Sources))))
AllObjects = $(UDR_Objects)
Dependencies = $(AllObjects:.o=.d)
.PHONY: all udrcpp_example
all: udrcpp_example
udrcpp_example: $(PLUGINS)/udr/udrcpp_example.$(SHRLIB_EXT)
$(PLUGINS)/udr/udrcpp_example.$(SHRLIB_EXT): $(UDR_Objects)
ifeq ($(PLATFORM),DARWIN)
$(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
else
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)udrcpp_example.$(SHRLIB_EXT) \
$(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) $(PLUGINS)/udr_engine.so
endif
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

View File

@ -60,7 +60,7 @@ $(OS_SPECIFIC_Objects)
fb_smp_server: $(FB_DAEMON) fb_smp_server: $(FB_DAEMON)
$(FB_DAEMON): $(SERVER_Objects) $(FB_DAEMON): $(SERVER_Objects)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS) $(EXE_LINK) $(LINK_EMPTY_SYMBOLS) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LINK_LIBS)
AllObjects = $(SERVER_Objects) AllObjects = $(SERVER_Objects)

26
builds/posix/empty.vers Normal file
View File

@ -0,0 +1,26 @@
# Version script to hide all symbols from executables.
#
# The contents of this file are subject to the Initial
# Developer's Public License Version 1.0 (the "License");
# you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
#
# Software distributed under the License is distributed AS IS,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
# See the License for the specific language governing rights
# and limitations under the License.
#
# The Original Code was created by Adriano dos Santos Fernandes
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) 2009 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
{
local:
*;
};

View File

@ -252,12 +252,15 @@ LINK_FIREBIRD_CLIENT_SYMBOLS = $(LINK_FIREBIRD_SYMBOLS)
LINK_TRACE_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbtrace.vers LINK_TRACE_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbtrace.vers
LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers
LINK_IBUTIL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/ib_util.vers LINK_IBUTIL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/ib_util.vers
LINK_UDRENG_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/udr_engine.vers
LINK_EMPTY_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/empty.vers
LINK_EXEC_EXPORT=-rdynamic
LIB_PLATFORM_RPATH = -Wl,-rpath,$(1) LIB_PLATFORM_RPATH = -Wl,-rpath,$(1)
ifeq ($(strip @BINRELOC_CFLAGS@),) ifeq ($(strip @BINRELOC_CFLAGS@),)
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@)) LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@))
else else
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$$$ORIGIN/../$(1)') LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$ORIGIN/../$(1)')
endif endif
LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl) LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl)
LIB_LINK_SONAME= -Wl,-soname,$(1) LIB_LINK_SONAME= -Wl,-soname,$(1)

View File

@ -75,6 +75,10 @@ help.fdb:
# Explicit dependencies on generated header # Explicit dependencies on generated header
$(OBJ)/jrd/par.o: $(SRC_ROOT)/include/gen/blrtable.h $(OBJ)/jrd/par.o: $(SRC_ROOT)/include/gen/blrtable.h
# Explicit dependence on generated header (parser)
$(SRC_ROOT)/dsql/keywords.cpp: $(SRC_ROOT)/dsql/dsql.tab.h
$(OBJ)/dsql/Parser.h: $(SRC_ROOT)/dsql/dsql.tab.h
$(OBJ)/dsql/StmtNodes.o: $(SRC_ROOT)/include/gen/blrtable.h $(OBJ)/dsql/StmtNodes.o: $(SRC_ROOT)/include/gen/blrtable.h
# Special cases for building cpp from epp # Special cases for building cpp from epp
@ -84,6 +88,9 @@ $(OBJ)/dsql/metd.cpp: $(SRC_ROOT)/dsql/metd.epp
$(OBJ)/dsql/DdlNodes.cpp: $(SRC_ROOT)/dsql/DdlNodes.epp $(OBJ)/dsql/DdlNodes.cpp: $(SRC_ROOT)/dsql/DdlNodes.epp
$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@
$(OBJ)/dsql/PackageNodes.cpp: $(SRC_ROOT)/dsql/PackageNodes.epp
$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@
# Rebuild blrtable.h # Rebuild blrtable.h
$(SRC_ROOT)/include/gen/blrtable.h: $(BLRTABLE) $(SRC_ROOT)/include/gen/blrtable.h: $(BLRTABLE)
$(BLRTABLE) > $(SRC_ROOT)/include/gen/blrtable.h $(BLRTABLE) > $(SRC_ROOT)/include/gen/blrtable.h

View File

@ -25,20 +25,21 @@ JRD_ClientSources = $(addprefix jrd/, $(JRD_ClientFiles)) common/cvt.cpp
JRD_ServerFiles= blob_filter.cpp cvt.cpp dpm.epp dyn.epp dyn_def.epp \ JRD_ServerFiles= blob_filter.cpp cvt.cpp dpm.epp dyn.epp dyn_def.epp \
dyn_del.epp dyn_mod.epp dyn_util.epp fun.epp \ dyn_del.epp dyn_mod.epp dyn_util.epp fun.epp \
grant.epp ini.epp met.epp pcmet.epp scl.epp \ grant.epp ini.epp met.epp pcmet.epp scl.epp \
CharSet.cpp Collation.cpp DatabaseSnapshot.cpp VirtualTable.cpp RecordBuffer.cpp \ CharSet.cpp Collation.cpp DatabaseSnapshot.cpp VirtualTable.cpp WindowRsb.cpp RecordBuffer.cpp \
blb.cpp btn.cpp btr.cpp builtin.cpp \ blb.cpp btn.cpp btr.cpp builtin.cpp \
GlobalRWLock.cpp cch.cpp cmp.cpp cvt2.cpp \ GlobalRWLock.cpp cch.cpp cmp.cpp cvt2.cpp \
DataTypeUtil.cpp dfw.cpp UserManagement.cpp divorce.cpp \ DataTypeUtil.cpp dfw.cpp UserManagement.cpp divorce.cpp \
err.cpp event.cpp evl.cpp exe.cpp ext.cpp \ err.cpp event.cpp ErrorImpl.cpp evl.cpp exe.cpp ext.cpp \
execute_statement.cpp filters.cpp flu.cpp functions.cpp \ execute_statement.cpp ExtEngineManager.cpp filters.cpp flu.cpp \
idx.cpp inf.cpp intl.cpp intl_builtin.cpp IntlManager.cpp \ idx.cpp inf.cpp intl.cpp intl_builtin.cpp IntlManager.cpp \
IntlUtil.cpp isc_sync.cpp \ IntlUtil.cpp isc_sync.cpp \
jrd.cpp Database.cpp lck.cpp \ jrd.cpp Database.cpp lck.cpp \
mov.cpp nav.cpp opt.cpp Optimizer.cpp pag.cpp par.cpp \ mov.cpp nav.cpp opt.cpp Optimizer.cpp pag.cpp par.cpp \
ods.cpp pwd.cpp PreparedStatement.cpp RandomGenerator.cpp \ ods.cpp PluginManager.cpp pwd.cpp PreparedStatement.cpp RandomGenerator.cpp \
Relation.cpp ResultSet.cpp rlck.cpp rpb_chain.cpp rse.cpp \ Relation.cpp ResultSet.cpp rlck.cpp rpb_chain.cpp rse.cpp \
sdw.cpp shut.cpp sort.cpp sqz.cpp \ sdw.cpp shut.cpp sort.cpp sqz.cpp \
svc.cpp SysFunction.cpp TempSpace.cpp tpc.cpp tra.cpp validation.cpp vio.cpp \ svc.cpp SysFunction.cpp TempSpace.cpp tpc.cpp tra.cpp validation.cpp \
ValueImpl.cpp ValuesImpl.cpp vio.cpp \
nodebug.cpp nbak.cpp sha.cpp $(Physical_IO_Module) TextType.cpp \ nodebug.cpp nbak.cpp sha.cpp $(Physical_IO_Module) TextType.cpp \
unicode_util.cpp RuntimeStatistics.cpp DebugInterface.cpp \ unicode_util.cpp RuntimeStatistics.cpp DebugInterface.cpp \
extds/ExtDS.cpp extds/InternalDS.cpp extds/IscDS.cpp \ extds/ExtDS.cpp extds/InternalDS.cpp extds/IscDS.cpp \
@ -71,7 +72,7 @@ DSQL_ClientFiles = array.epp blob.epp \
DSQL_ServerFiles= metd.epp \ DSQL_ServerFiles= metd.epp \
ddl.cpp dsql.cpp errd.cpp gen.cpp hsh.cpp make.cpp \ ddl.cpp dsql.cpp errd.cpp gen.cpp hsh.cpp make.cpp \
movd.cpp parse.cpp Parser.cpp pass1.cpp misc_func.cpp \ movd.cpp parse.cpp Parser.cpp pass1.cpp misc_func.cpp \
DdlNodes.epp StmtNodes.cpp DdlNodes.epp PackageNodes.epp StmtNodes.cpp
DSQL_Files = $(DSQL_ClientFiles) $(DSQL_ServerFiles) DSQL_Files = $(DSQL_ClientFiles) $(DSQL_ServerFiles)

View File

@ -0,0 +1,33 @@
#
# Version script to hide private symbols from Firebird libraries
# GNU and Solaris linkers should understand it
#
# The contents of this file are subject to the Initial
# Developer's Public License Version 1.0 (the "License");
# you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
#
# Software distributed under the License is distributed AS IS,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
# See the License for the specific language governing rights
# and limitations under the License.
#
# The Original Code was created by Nickolay Samofatov
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) 2004 Nickolay Samofatov <nickolay@broadviewsoftware.com>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Adriano dos Santos Fernandes
#
#
+e firebirdPlugin
+e fbUdrRegFunction
+e fbUdrRegProcedure
+e fbUdrRegTrigger
+e fbUdrGetFunction

View File

@ -0,0 +1,39 @@
#
# Version script to hide private symbols from Firebird libraries
# GNU and Solaris linkers should understand it
#
# The contents of this file are subject to the Initial
# Developer's Public License Version 1.0 (the "License");
# you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
#
# Software distributed under the License is distributed AS IS,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
# See the License for the specific language governing rights
# and limitations under the License.
#
# The Original Code was created by Nickolay Samofatov
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) 2004 Nickolay Samofatov <nickolay@broadviewsoftware.com>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
# Adriano dos Santos Fernandes
#
#
{
global:
firebirdPlugin;
fbUdrRegFunction;
fbUdrRegProcedure;
fbUdrRegTrigger;
fbUdrGetFunction;
local:
*;
};

View File

@ -0,0 +1,26 @@
; The contents of this file are subject to the Initial
; Developer's Public License Version 1.0 (the "License");
; you may not use this file except in compliance with the
; License. You may obtain a copy of the License at
; http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
;
; Software distributed under the License is distributed AS IS,
; WITHOUT WARRANTY OF ANY KIND, either express or implied.
; See the License for the specific language governing rights
; and limitations under the License.
;
; The Original Code was created by Adriano dos Santos Fernandes
; for the Firebird Open Source RDBMS project.
;
; Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
; and all contributors signed below.
;
; All Rights Reserved.
; Contributor(s): ______________________________________.
EXPORTS
firebirdPlugin
fbUdrRegFunction
fbUdrRegProcedure
fbUdrRegTrigger
fbUdrGetFunction

View File

@ -56,6 +56,7 @@ for %%v in ( icuuc30 icudt30 icuin30 ) do (
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\udf\* %FB_OUTPUT_DIR%\udf >nul @copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\udf\* %FB_OUTPUT_DIR%\udf >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\system32\* %FB_OUTPUT_DIR%\system32 >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\fbtrace.dll %FB_OUTPUT_DIR%\plugins\fbtrace.dll >nul @copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\fbtrace.dll %FB_OUTPUT_DIR%\plugins\fbtrace.dll >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\firebird\plugins\udr_engine.dll %FB_OUTPUT_DIR%\plugins\udr_engine.dll >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\fbclient\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul @copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\fbclient\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul @copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005 # Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "alice", "alice.vcproj", "{0D616380-1A5A-4230-A80B-021360E4E669}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "alice", "alice.vcproj", "{0D616380-1A5A-4230-A80B-021360E4E669}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "burp", "burp.vcproj", "{D1507562-A363-4685-96AF-B036F5E5E47F}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "burp", "burp.vcproj", "{D1507562-A363-4685-96AF-B036F5E5E47F}"
@ -20,25 +20,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "engine_embed", "engine_embe
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fb_inet_server", "fb_inet_server.vcproj", "{664D4A04-36E0-48EF-8BCA-D5C331EFAA24}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fb_inet_server", "fb_inet_server.vcproj", "{664D4A04-36E0-48EF-8BCA-D5C331EFAA24}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF}
{E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E} = {E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E}
{3C4993E4-946C-4029-97B8-1A111F32F4FC} = {3C4993E4-946C-4029-97B8-1A111F32F4FC}
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} = {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} = {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C} {3C4993E4-946C-4029-97B8-1A111F32F4FC} = {3C4993E4-946C-4029-97B8-1A111F32F4FC}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF}
{E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E} = {E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E} {E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E} = {E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E}
{E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E} = {E029E4E2-0C3F-4F7D-BC4C-D9C20F40EB4E}
{488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF}
{488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF}
{F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC} {53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1}
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C}
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fb_lock_print", "fb_lock_print.vcproj", "{E8397148-0E9C-449B-9F45-7FB377A08242}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fb_lock_print", "fb_lock_print.vcproj", "{E8397148-0E9C-449B-9F45-7FB377A08242}"
@ -53,89 +53,83 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbclient", "fbclient.vcproj
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbembed", "fbembed.vcproj", "{C5A60E3D-7815-4127-B856-96277BEC1D11}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbembed", "fbembed.vcproj", "{C5A60E3D-7815-4127-B856-96277BEC1D11}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{B0833E27-BCB2-4D0D-B6D2-F4621224CFD8} = {B0833E27-BCB2-4D0D-B6D2-F4621224CFD8}
{F55ACA54-70DF-4343-8E16-FA97C757CCF6} = {F55ACA54-70DF-4343-8E16-FA97C757CCF6}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} = {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} = {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D}
{B0833E27-BCB2-4D0D-B6D2-F4621224CFD8} = {B0833E27-BCB2-4D0D-B6D2-F4621224CFD8} {488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF}
{F55ACA54-70DF-4343-8E16-FA97C757CCF6} = {F55ACA54-70DF-4343-8E16-FA97C757CCF6} {E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F} {0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669} {0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF} {F5746066-8613-4811-B27C-0ED70FF9F0FF} = {F5746066-8613-4811-B27C-0ED70FF9F0FF}
{488199DD-D9F3-41C8-AED6-8AFFFB294CFF} = {488199DD-D9F3-41C8-AED6-8AFFFB294CFF} {D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1} {D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{F55ACA54-70DF-4343-8E16-FA97C757CCF6} = {F55ACA54-70DF-4343-8E16-FA97C757CCF6}
{F55ACA54-70DF-4343-8E16-FA97C757CCF6} = {F55ACA54-70DF-4343-8E16-FA97C757CCF6}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{604E1144-1A22-43AF-9A3E-08650EE4EE90} = {604E1144-1A22-43AF-9A3E-08650EE4EE90}
{53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC} {53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC}
{B0833E27-BCB2-4D0D-B6D2-F4621224CFD8} = {B0833E27-BCB2-4D0D-B6D2-F4621224CFD8}
{B0833E27-BCB2-4D0D-B6D2-F4621224CFD8} = {B0833E27-BCB2-4D0D-B6D2-F4621224CFD8}
{213C6F21-D83F-48C7-BBB5-B35AB1B706B1} = {213C6F21-D83F-48C7-BBB5-B35AB1B706B1}
{520DF501-5775-44FD-BDC6-37753A17696A} = {520DF501-5775-44FD-BDC6-37753A17696A}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbguard", "fbguard.vcproj", "{BBD83ED3-8A48-4FE8-B4B7-CB27730986B2}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbguard", "fbguard.vcproj", "{BBD83ED3-8A48-4FE8-B4B7-CB27730986B2}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbserver", "fbserver.vcproj", "{23EC8DAA-6718-4EF3-979F-89F611C7D504}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbserver", "fbserver.vcproj", "{23EC8DAA-6718-4EF3-979F-89F611C7D504}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{520DF501-5775-44FD-BDC6-37753A17696A} = {520DF501-5775-44FD-BDC6-37753A17696A}
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C}
{4BCC693D-1745-45ED-8302-E5E2F979549A} = {4BCC693D-1745-45ED-8302-E5E2F979549A}
{604E1144-1A22-43AF-9A3E-08650EE4EE90} = {604E1144-1A22-43AF-9A3E-08650EE4EE90}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{F8798A49-9D20-451E-A7BD-FEB5237103B5} = {F8798A49-9D20-451E-A7BD-FEB5237103B5}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A} {E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A}
{4BCC693D-1745-45ED-8302-E5E2F979549A} = {4BCC693D-1745-45ED-8302-E5E2F979549A}
{604E1144-1A22-43AF-9A3E-08650EE4EE90} = {604E1144-1A22-43AF-9A3E-08650EE4EE90}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{F8798A49-9D20-451E-A7BD-FEB5237103B5} = {F8798A49-9D20-451E-A7BD-FEB5237103B5}
{D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669} {0D616380-1A5A-4230-A80B-021360E4E669} = {0D616380-1A5A-4230-A80B-021360E4E669}
{E83187C1-AAC2-445D-B8B2-883EFC10C39A} = {E83187C1-AAC2-445D-B8B2-883EFC10C39A} {D1507562-A363-4685-96AF-B036F5E5E47F} = {D1507562-A363-4685-96AF-B036F5E5E47F}
{EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} = {EABA0FF3-1C4D-4FAB-8418-31C9061F3F0D} {F8798A49-9D20-451E-A7BD-FEB5237103B5} = {F8798A49-9D20-451E-A7BD-FEB5237103B5}
{520DF501-5775-44FD-BDC6-37753A17696A} = {520DF501-5775-44FD-BDC6-37753A17696A} {15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{604E1144-1A22-43AF-9A3E-08650EE4EE90} = {604E1144-1A22-43AF-9A3E-08650EE4EE90}
{4BCC693D-1745-45ED-8302-E5E2F979549A} = {4BCC693D-1745-45ED-8302-E5E2F979549A}
{53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC} {53F75437-15B8-4A5C-86BF-E238CC68FCBC} = {53F75437-15B8-4A5C-86BF-E238CC68FCBC}
{E9AAC310-465E-4384-8BCC-674F297F777C} = {E9AAC310-465E-4384-8BCC-674F297F777C}
{520DF501-5775-44FD-BDC6-37753A17696A} = {520DF501-5775-44FD-BDC6-37753A17696A}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbudf", "fbudf.vcproj", "{9DC67B05-AC3E-49A3-B0CC-83B25D757445}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbudf", "fbudf.vcproj", "{9DC67B05-AC3E-49A3-B0CC-83B25D757445}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gbak", "gbak.vcproj", "{B732F5D2-B5D9-417F-B156-D790F466CB8E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gbak", "gbak.vcproj", "{B732F5D2-B5D9-417F-B156-D790F466CB8E}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdef", "gdef.vcproj", "{E8B8E0CE-F47F-48BD-8911-C11805A711D9}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdef", "gdef.vcproj", "{E8B8E0CE-F47F-48BD-8911-C11805A711D9}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gfix", "gfix.vcproj", "{44A9E4AD-B932-4620-B319-431A153BB341}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gfix", "gfix.vcproj", "{44A9E4AD-B932-4620-B319-431A153BB341}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpre", "gpre.vcproj", "{D84F0839-28A4-40B2-B5F4-F5E1E7F48FD0}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpre", "gpre.vcproj", "{D84F0839-28A4-40B2-B5F4-F5E1E7F48FD0}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsec", "gsec.vcproj", "{7043CC61-DEC1-4C6B-86B9-0E911D1094C9}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsec", "gsec.vcproj", "{7043CC61-DEC1-4C6B-86B9-0E911D1094C9}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsplit", "gsplit.vcproj", "{B7F22B7F-9937-4874-9A8B-6AB4E36E74A5}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsplit", "gsplit.vcproj", "{B7F22B7F-9937-4874-9A8B-6AB4E36E74A5}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gstat", "gstat.vcproj", "{7E862973-37C4-4202-80E7-490ED4DEDA14}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gstat", "gstat.vcproj", "{7E862973-37C4-4202-80E7-490ED4DEDA14}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ib_udf", "ib_udf.vcproj", "{0D4A2D8E-6461-479E-9399-F7929174E050}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ib_udf", "ib_udf.vcproj", "{0D4A2D8E-6461-479E-9399-F7929174E050}"
@ -159,8 +153,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intl", "intl.vcproj", "{DFF
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isql", "isql.vcproj", "{DEE75AD5-F165-40E1-80B2-400E27725D5C}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isql", "isql.vcproj", "{DEE75AD5-F165-40E1-80B2-400E27725D5C}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lock", "lock.vcproj", "{604E1144-1A22-43AF-9A3E-08650EE4EE90}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lock", "lock.vcproj", "{604E1144-1A22-43AF-9A3E-08650EE4EE90}"
@ -169,8 +163,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lock_classic", "lock_classi
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qli", "qli.vcproj", "{EBB8361B-49D5-43A5-8771-940DF3E308EF}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qli", "qli.vcproj", "{EBB8361B-49D5-43A5-8771-940DF3E308EF}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote", "remote.vcproj", "{4BCC693D-1745-45ED-8302-E5E2F979549A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote", "remote.vcproj", "{4BCC693D-1745-45ED-8302-E5E2F979549A}"
@ -181,8 +175,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utilities", "utilities.vcpr
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nbackup", "nbackup.vcproj", "{01A41DFA-8908-4576-A1F1-C8BC7EAE39A1}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nbackup", "nbackup.vcproj", "{01A41DFA-8908-4576-A1F1-C8BC7EAE39A1}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcproj", "{E83187C1-AAC2-445D-B8B2-883EFC10C39A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcproj", "{E83187C1-AAC2-445D-B8B2-883EFC10C39A}"
@ -200,8 +194,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbrmclib", "fbrmclib.vcproj
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbsvcmgr", "fbsvcmgr.vcproj", "{EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbsvcmgr", "fbsvcmgr.vcproj", "{EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udr_engine", "udr_engine.vcproj", "{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}"
ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbtrace", "fbtrace.vcproj", "{53F75437-15B8-4A5C-86BF-E238CC68FCBC}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbtrace", "fbtrace.vcproj", "{53F75437-15B8-4A5C-86BF-E238CC68FCBC}"
@ -212,8 +211,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbtrace", "fbtrace.vcproj",
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbtracemgr", "fbtracemgr.vcproj", "{58C7E370-0EDD-4F5E-8617-3F5071170205}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbtracemgr", "fbtracemgr.vcproj", "{58C7E370-0EDD-4F5E-8617-3F5071170205}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} {492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection EndProjectSection
EndProject EndProject
Global Global
@ -558,6 +557,12 @@ Global
{EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|Win32.Build.0 = Release|Win32 {EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|Win32.Build.0 = Release|Win32
{EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|x64.ActiveCfg = Release|x64 {EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|x64.ActiveCfg = Release|x64
{EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|x64.Build.0 = Release|x64 {EFB07DBC-36E3-4C54-B941-3CDAFAACF47B}.Release|x64.Build.0 = Release|x64
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.ActiveCfg = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.Build.0 = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|x64.ActiveCfg = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.ActiveCfg = Release|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.Build.0 = Release|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|x64.ActiveCfg = Release|Win32
{53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|Win32.ActiveCfg = Debug|Win32 {53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|Win32.ActiveCfg = Debug|Win32
{53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|Win32.Build.0 = Debug|Win32 {53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|Win32.Build.0 = Debug|Win32
{53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|x64.ActiveCfg = Debug|x64 {53F75437-15B8-4A5C-86BF-E238CC68FCBC}.Debug|x64.ActiveCfg = Debug|x64

View File

@ -1,9 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005 # Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "empbuild", "empbuild.vcproj", "{FC2859B9-56DB-40B4-86C4-2DE31ECE9144}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "empbuild", "empbuild.vcproj", "{FC2859B9-56DB-40B4-86C4-2DE31ECE9144}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intlbuild", "intlbuild.vcproj", "{9546EF04-1326-464B-A6ED-395C60DD63CC}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intlbuild", "intlbuild.vcproj", "{9546EF04-1326-464B-A6ED-395C60DD63CC}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udrcpp_example", "udrcpp_example.vcproj", "{FF0FD8DF-1E5C-486E-B395-A620376A4633}"
ProjectSection(ProjectDependencies) = postProject
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B} = {20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "udr_engine", "udr_engine.vcproj", "{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}"
ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{15605F44-BFFD-444F-AD4C-55DC9D704465}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
@ -21,9 +33,29 @@ Global
{FC2859B9-56DB-40B4-86C4-2DE31ECE9144}.Release|x64.ActiveCfg = Release|x64 {FC2859B9-56DB-40B4-86C4-2DE31ECE9144}.Release|x64.ActiveCfg = Release|x64
{FC2859B9-56DB-40B4-86C4-2DE31ECE9144}.Release|x64.Build.0 = Release|x64 {FC2859B9-56DB-40B4-86C4-2DE31ECE9144}.Release|x64.Build.0 = Release|x64
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|Win32.ActiveCfg = Debug|Win32 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|Win32.ActiveCfg = Debug|Win32
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|Win32.Build.0 = Debug|Win32
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|x64.ActiveCfg = Debug|x64 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|x64.ActiveCfg = Debug|x64
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Debug|x64.Build.0 = Debug|x64
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|Win32.ActiveCfg = Release|Win32 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|Win32.ActiveCfg = Release|Win32
{9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|x64.ActiveCfg = Release|x64 {9546EF04-1326-464B-A6ED-395C60DD63CC}.Release|x64.ActiveCfg = Release|x64
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|Win32.ActiveCfg = Debug|Win32
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|Win32.Build.0 = Debug|Win32
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Debug|x64.ActiveCfg = Debug|Win32
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|Win32.ActiveCfg = Release|Win32
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|Win32.Build.0 = Release|Win32
{FF0FD8DF-1E5C-486E-B395-A620376A4633}.Release|x64.ActiveCfg = Release|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.ActiveCfg = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|Win32.Build.0 = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Debug|x64.ActiveCfg = Debug|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.ActiveCfg = Release|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|Win32.Build.0 = Release|Win32
{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}.Release|x64.ActiveCfg = Release|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|Win32.ActiveCfg = Debug|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|Win32.Build.0 = Debug|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Debug|x64.ActiveCfg = Debug|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|Win32.ActiveCfg = Release|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|Win32.Build.0 = Release|Win32
{15605F44-BFFD-444F-AD4C-55DC9D704465}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -345,6 +345,10 @@
RelativePath="..\..\..\src\dsql\DdlNodes.epp" RelativePath="..\..\..\src\dsql\DdlNodes.epp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\dsql\PackageNodes.epp"
>
</File>
<File <File
RelativePath="..\..\..\src\dsql\metd.epp" RelativePath="..\..\..\src\dsql\metd.epp"
> >
@ -365,6 +369,10 @@
RelativePath="..\..\..\gen\$(PlatformName)\dsql\DdlNodes.cpp" RelativePath="..\..\..\gen\$(PlatformName)\dsql\DdlNodes.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\gen\$(PlatformName)\dsql\PackageNodes.cpp"
>
</File>
<File <File
RelativePath="..\..\..\gen\$(PlatformName)\dsql\metd.cpp" RelativePath="..\..\..\gen\$(PlatformName)\dsql\metd.cpp"
> >
@ -404,6 +412,10 @@
RelativePath="..\..\..\src\dsql\DdlNodes.h" RelativePath="..\..\..\src\dsql\DdlNodes.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\dsql\PackageNodes.h"
>
</File>
<File <File
RelativePath="..\..\..\src\dsql\dsql.h" RelativePath="..\..\..\src\dsql\dsql.h"
> >

View File

@ -345,6 +345,10 @@
RelativePath="..\..\..\src\dsql\DdlNodes.epp" RelativePath="..\..\..\src\dsql\DdlNodes.epp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\dsql\PackageNodes.epp"
>
</File>
<File <File
RelativePath="..\..\..\src\dsql\metd.epp" RelativePath="..\..\..\src\dsql\metd.epp"
> >
@ -365,6 +369,10 @@
RelativePath="..\..\..\gen\$(PlatformName)\dsql\DdlNodes.cpp" RelativePath="..\..\..\gen\$(PlatformName)\dsql\DdlNodes.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\gen\$(PlatformName)\dsql\PackageNodes.cpp"
>
</File>
<File <File
RelativePath="..\..\..\gen\$(PlatformName)\dsql\metd.cpp" RelativePath="..\..\..\gen\$(PlatformName)\dsql\metd.cpp"
> >
@ -404,6 +412,10 @@
RelativePath="..\..\..\src\dsql\DdlNodes.h" RelativePath="..\..\..\src\dsql\DdlNodes.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\dsql\PackageNodes.h"
>
</File>
<File <File
RelativePath="..\..\..\src\dsql\dsql.h" RelativePath="..\..\..\src\dsql\dsql.h"
> >

View File

@ -379,6 +379,10 @@
RelativePath="..\..\..\src\jrd\err.cpp" RelativePath="..\..\..\src\jrd\err.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.cpp" RelativePath="..\..\..\src\jrd\event.cpp"
> >
@ -403,6 +407,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp" RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\filters.cpp" RelativePath="..\..\..\src\jrd\filters.cpp"
> >
@ -415,10 +423,6 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\functions.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\gds.cpp" RelativePath="..\..\..\src\jrd\gds.cpp"
> >
@ -543,6 +547,10 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\PluginManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\PreparedStatement.cpp" RelativePath="..\..\..\src\jrd\PreparedStatement.cpp"
> >
@ -683,6 +691,14 @@
RelativePath="..\..\..\src\jrd\validation.cpp" RelativePath="..\..\..\src\jrd\validation.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.cpp"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio.cpp" RelativePath="..\..\..\src\jrd\vio.cpp"
> >
@ -695,6 +711,10 @@
RelativePath="..\..\..\src\jrd\why.cpp" RelativePath="..\..\..\src\jrd\why.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp" RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp"
> >
@ -899,6 +919,10 @@
RelativePath="..\..\..\src\jrd\err_proto.h" RelativePath="..\..\..\src\jrd\err_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.h" RelativePath="..\..\..\src\jrd\event.h"
> >
@ -935,6 +959,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.h" RelativePath="..\..\..\src\jrd\extds\ExtDS.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.h"
>
</File>
<File <File
RelativePath="..\..\..\src\include\fb_api_proto.h" RelativePath="..\..\..\src\include\fb_api_proto.h"
> >
@ -1443,6 +1471,14 @@
RelativePath="..\..\..\src\jrd\val_proto.h" RelativePath="..\..\..\src\jrd\val_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.h"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio_debug.h" RelativePath="..\..\..\src\jrd\vio_debug.h"
> >
@ -1459,6 +1495,10 @@
RelativePath="..\..\..\src\jrd\why_proto.h" RelativePath="..\..\..\src\jrd\why_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="GPRE files" Name="GPRE files"

View File

@ -378,6 +378,10 @@
RelativePath="..\..\..\src\jrd\err.cpp" RelativePath="..\..\..\src\jrd\err.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.cpp" RelativePath="..\..\..\src\jrd\event.cpp"
> >
@ -402,6 +406,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp" RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\filters.cpp" RelativePath="..\..\..\src\jrd\filters.cpp"
> >
@ -414,10 +422,6 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\functions.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\gds.cpp" RelativePath="..\..\..\src\jrd\gds.cpp"
> >
@ -542,6 +546,10 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\PluginManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\PreparedStatement.cpp" RelativePath="..\..\..\src\jrd\PreparedStatement.cpp"
> >
@ -682,6 +690,14 @@
RelativePath="..\..\..\src\jrd\validation.cpp" RelativePath="..\..\..\src\jrd\validation.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.cpp"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio.cpp" RelativePath="..\..\..\src\jrd\vio.cpp"
> >
@ -694,6 +710,10 @@
RelativePath="..\..\..\src\jrd\why.cpp" RelativePath="..\..\..\src\jrd\why.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp" RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp"
> >
@ -898,6 +918,10 @@
RelativePath="..\..\..\src\jrd\err_proto.h" RelativePath="..\..\..\src\jrd\err_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.h" RelativePath="..\..\..\src\jrd\event.h"
> >
@ -934,6 +958,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.h" RelativePath="..\..\..\src\jrd\extds\ExtDS.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.h"
>
</File>
<File <File
RelativePath="..\..\..\src\include\fb_api_proto.h" RelativePath="..\..\..\src\include\fb_api_proto.h"
> >
@ -1438,6 +1466,14 @@
RelativePath="..\..\..\src\jrd\val_proto.h" RelativePath="..\..\..\src\jrd\val_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.h"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio_debug.h" RelativePath="..\..\..\src\jrd\vio_debug.h"
> >
@ -1454,6 +1490,10 @@
RelativePath="..\..\..\src\jrd\why_proto.h" RelativePath="..\..\..\src\jrd\why_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="GPRE files" Name="GPRE files"

View File

@ -378,6 +378,10 @@
RelativePath="..\..\..\src\jrd\err.cpp" RelativePath="..\..\..\src\jrd\err.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.cpp" RelativePath="..\..\..\src\jrd\event.cpp"
> >
@ -402,6 +406,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp" RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\filters.cpp" RelativePath="..\..\..\src\jrd\filters.cpp"
> >
@ -414,10 +422,6 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\fun.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\functions.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\gds.cpp" RelativePath="..\..\..\src\jrd\gds.cpp"
> >
@ -542,6 +546,10 @@
RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp" RelativePath="..\..\..\gen\$(PlatformName)\jrd\pcmet.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\PluginManager.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\PreparedStatement.cpp" RelativePath="..\..\..\src\jrd\PreparedStatement.cpp"
> >
@ -682,6 +690,14 @@
RelativePath="..\..\..\src\jrd\validation.cpp" RelativePath="..\..\..\src\jrd\validation.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.cpp"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio.cpp" RelativePath="..\..\..\src\jrd\vio.cpp"
> >
@ -694,6 +710,10 @@
RelativePath="..\..\..\src\jrd\why.cpp" RelativePath="..\..\..\src\jrd\why.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp" RelativePath="..\..\..\src\jrd\os\win32\winnt.cpp"
> >
@ -898,6 +918,10 @@
RelativePath="..\..\..\src\jrd\err_proto.h" RelativePath="..\..\..\src\jrd\err_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ErrorImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\event.h" RelativePath="..\..\..\src\jrd\event.h"
> >
@ -934,6 +958,10 @@
RelativePath="..\..\..\src\jrd\extds\ExtDS.h" RelativePath="..\..\..\src\jrd\extds\ExtDS.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ExtEngineManager.h"
>
</File>
<File <File
RelativePath="..\..\..\src\include\fb_api_proto.h" RelativePath="..\..\..\src\include\fb_api_proto.h"
> >
@ -1438,6 +1466,14 @@
RelativePath="..\..\..\src\jrd\val_proto.h" RelativePath="..\..\..\src\jrd\val_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\ValueImpl.h"
>
</File>
<File
RelativePath="..\..\..\src\jrd\ValuesImpl.h"
>
</File>
<File <File
RelativePath="..\..\..\src\jrd\vio_debug.h" RelativePath="..\..\..\src\jrd\vio_debug.h"
> >
@ -1454,6 +1490,10 @@
RelativePath="..\..\..\src\jrd\why_proto.h" RelativePath="..\..\..\src\jrd\why_proto.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\WindowRsb.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="GPRE files" Name="GPRE files"

View File

@ -68,83 +68,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib"
SubSystem="2" ModuleDefinitionFile="..\defs\fbclient.def"
StackReserveSize="2097152"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG,_WINDOWS,WIN32,DEV_BUILD"
BrowseInformation="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib icuuc.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib"
SubSystem="2" SubSystem="2"
StackReserveSize="2097152" StackReserveSize="2097152"
/> />
@ -225,6 +149,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="4194304" StackReserveSize="4194304"
TargetMachine="17" TargetMachine="17"
@ -254,6 +179,84 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG,_WINDOWS,WIN32,DEV_BUILD"
BrowseInformation="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib icuuc.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2"
StackReserveSize="2097152"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
ConfigurationType="1" ConfigurationType="1"
@ -304,6 +307,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="4194304" StackReserveSize="4194304"
TargetMachine="17" TargetMachine="17"
@ -352,6 +356,10 @@
RelativePath="..\..\..\src\utilities\nbackup\nbkMain.cpp" RelativePath="..\..\..\src\utilities\nbackup\nbkMain.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\perf.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\utilities\gstat\ppg.cpp" RelativePath="..\..\..\src\utilities\gstat\ppg.cpp"
> >
@ -389,7 +397,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|Win32" Name="Release|x64"
> >
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
@ -397,7 +405,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Debug|Win32"
> >
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
@ -414,6 +422,10 @@
</FileConfiguration> </FileConfiguration>
</File> </File>
</Filter> </Filter>
<File
RelativePath="..\defs\fbclient.def"
>
</File>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>

View File

@ -68,6 +68,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="2097152" StackReserveSize="2097152"
/> />
@ -145,6 +146,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="2097152" StackReserveSize="2097152"
/> />
@ -225,6 +227,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/$(ConfigurationName)/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="4194304" StackReserveSize="4194304"
TargetMachine="17" TargetMachine="17"
@ -304,6 +307,7 @@
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe" OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\bin\$(ProjectName).exe"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib" AdditionalLibraryDirectories="../../../extern/icu/$(PlatformName)/release/lib"
ModuleDefinitionFile="..\defs\fbclient.def"
SubSystem="2" SubSystem="2"
StackReserveSize="4194304" StackReserveSize="4194304"
TargetMachine="17" TargetMachine="17"
@ -352,6 +356,10 @@
RelativePath="..\..\..\src\utilities\nbackup\nbkMain.cpp" RelativePath="..\..\..\src\utilities\nbackup\nbkMain.cpp"
> >
</File> </File>
<File
RelativePath="..\..\..\src\jrd\perf.cpp"
>
</File>
<File <File
RelativePath="..\..\..\src\utilities\gstat\ppg.cpp" RelativePath="..\..\..\src\utilities\gstat\ppg.cpp"
> >
@ -414,6 +422,10 @@
</FileConfiguration> </FileConfiguration>
</File> </File>
</Filter> </Filter>
<File
RelativePath="..\defs\fbclient.def"
>
</File>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>

View File

@ -0,0 +1,413 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="udr_engine"
ProjectGUID="{20DEBF08-EF0A-4C94-ADEB-FE9BBA14588B}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../src/include;../../../src/include/gen;../../../src/jrd"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;DEV_BUILD"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\$(ProjectName).dll"
LinkIncremental="1"
ModuleDefinitionFile="..\defs\udr_engine.def"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../../src/include;../../../src/include/gen;../../../src/jrd"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\$(ProjectName).dll"
LinkIncremental="1"
ModuleDefinitionFile="..\defs\udr_engine.def"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../src/include;../../../src/include/gen;../../../src/jrd"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;DEV_BUILD"
Detect64BitPortabilityProblems="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\$(ProjectName).dll"
LinkIncremental="1"
ModuleDefinitionFile="..\defs\udr_engine.def"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../../src/include;../../../src/include/gen;../../../src/jrd"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\$(ProjectName).dll"
LinkIncremental="1"
ModuleDefinitionFile="..\defs\udr_engine.def"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\src\plugins\udr_engine\UdrEngine.cpp"
>
</File>
</Filter>
<Filter
Name="Header files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\src\include\FirebirdUdr.h"
>
</File>
</Filter>
<Filter
Name="Resource files"
>
<File
RelativePath="..\..\..\src\jrd\version.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="JRD files"
>
<File
RelativePath="..\..\..\src\jrd\gds.cpp"
>
</File>
<File
RelativePath="..\..\..\src\jrd\isc.cpp"
>
</File>
<File
RelativePath="..\..\..\src\jrd\os\win32\os_utils.cpp"
>
</File>
</Filter>
<File
RelativePath="..\defs\udr_engine.def"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,389 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="udrcpp_example"
ProjectGUID="{FF0FD8DF-1E5C-486E-B395-A620376A4633}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src\jrd"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;DEV_BUILD;_CRT_SECURE_NO_DEPRECATE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\udr\$(ProjectName).dll"
LinkIncremental="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\..\..\src\jrd"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;_CRT_SECURE_NO_DEPRECATE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\udr\$(ProjectName).dll"
LinkIncremental="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\src\jrd"
PreprocessorDefinitions="_DEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;DEV_BUILD;_CRT_SECURE_NO_DEPRECATE"
Detect64BitPortabilityProblems="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\udr\$(ProjectName).dll"
LinkIncremental="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\firebird2.vsprops;.\firebird2release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\..\..\src\jrd"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;WINDOWS_ONLY;SUPERCLIENT;WIN32;_CRT_SECURE_NO_DEPRECATE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib ws2_32.lib mpr.lib version.lib"
OutputFile="..\..\..\temp\$(PlatformName)\$(ConfigurationName)\firebird\plugins\udr\$(ProjectName).dll"
LinkIncremental="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\examples\udr\UdrCppExample.cpp"
>
</File>
</Filter>
<Filter
Name="Header files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\src\includeFirebirdUdr.h"
>
</File>
</Filter>
<Filter
Name="Resource files"
>
<File
RelativePath="..\..\..\src\jrd\version.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\..\src\jrd;$(NoInherit)"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -55,7 +55,7 @@ goto :EOF
@echo. @echo.
@set GPRE=%FB_GEN_DIR%\gpre_boot -lang_internal @set GPRE=%FB_GEN_DIR%\gpre_boot -lang_internal
@for %%i in (array, blob) do @call :PREPROCESS dsql %%i @for %%i in (array, blob) do @call :PREPROCESS dsql %%i
@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i
@for %%i in (backup, restore) do @call :PREPROCESS burp %%i @for %%i in (backup, restore) do @call :PREPROCESS burp %%i
@for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i @for %%i in (extract, isql, show) do @call :PREPROCESS isql %%i
@ -64,7 +64,7 @@ goto :EOF
@set GPRE=%FB_GEN_DIR%\gpre_boot @set GPRE=%FB_GEN_DIR%\gpre_boot
@for %%i in (alice_meta) do @call :PREPROCESS alice %%i @for %%i in (alice_meta) do @call :PREPROCESS alice %%i
@for %%i in (array, blob) do @call :PREPROCESS dsql %%i @for %%i in (array, blob) do @call :PREPROCESS dsql %%i
@for %%i in (metd, DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i
@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx
@for %%i in (stats) do @call :PREPROCESS utilities %%i @for %%i in (stats) do @call :PREPROCESS utilities %%i
@ -77,7 +77,7 @@ goto :EOF
@for %%i in (backup, restore) do @call :PREPROCESS burp %%i @for %%i in (backup, restore) do @call :PREPROCESS burp %%i
@for %%i in (array, blob) do @call :PREPROCESS dsql %%i @for %%i in (array, blob) do @call :PREPROCESS dsql %%i
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx -cxx @for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx -cxx
@for %%i in (DdlNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx
@for %%i in (exe, extract) do @call :PREPROCESS dudley %%i @for %%i in (exe, extract) do @call :PREPROCESS dudley %%i
@for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i @for %%i in (gpre_meta) do @call :PREPROCESS gpre %%i
@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl) do @call :PREPROCESS jrd %%i -gds_cxx

View File

@ -978,6 +978,7 @@ mkdir -p gen/jrd
mkdir -p gen/jrd/extds mkdir -p gen/jrd/extds
mkdir -p gen/jrd/trace mkdir -p gen/jrd/trace
mkdir -p gen/msgs mkdir -p gen/msgs
mkdir -p gen/plugins/udr_engine
mkdir -p gen/qli mkdir -p gen/qli
mkdir -p gen/utilities mkdir -p gen/utilities
mkdir -p gen/examples mkdir -p gen/examples
@ -999,11 +1000,13 @@ dnl # mkdir -p gen/firebird/examples/build_unix
dnl # mkdir -p gen/firebird/examples/build_win32 dnl # mkdir -p gen/firebird/examples/build_win32
mkdir -p gen/firebird/examples/empbuild mkdir -p gen/firebird/examples/empbuild
mkdir -p gen/firebird/examples/include mkdir -p gen/firebird/examples/include
mkdir -p gen/firebird/examples/udr
mkdir -p gen/firebird/examples/stat mkdir -p gen/firebird/examples/stat
mkdir -p gen/firebird/examples/udf mkdir -p gen/firebird/examples/udf
mkdir -p gen/firebird/lib mkdir -p gen/firebird/lib
mkdir -p gen/firebird/misc mkdir -p gen/firebird/misc
mkdir -p gen/firebird/help mkdir -p gen/firebird/help
mkdir -p gen/firebird/plugins/udr
dnl # rebuild version header if needed dnl # rebuild version header if needed
./src/misc/writeBuildNum.sh rebuildHeader ./src/misc/writeBuildNum.sh rebuildHeader
@ -1035,6 +1038,7 @@ mkdir -p temp/boot/jrd/os/darwin
mkdir -p temp/boot/lock mkdir -p temp/boot/lock
mkdir -p temp/boot/misc mkdir -p temp/boot/misc
mkdir -p temp/boot/msgs mkdir -p temp/boot/msgs
# mkdir -p temp/boot/plugins/udr_engine
mkdir -p temp/boot/qli mkdir -p temp/boot/qli
mkdir -p temp/boot/remote mkdir -p temp/boot/remote
mkdir -p temp/boot/remote/os/win32 mkdir -p temp/boot/remote/os/win32
@ -1077,6 +1081,7 @@ mkdir -p temp/std/jrd/os/darwin
mkdir -p temp/std/lock mkdir -p temp/std/lock
mkdir -p temp/std/misc mkdir -p temp/std/misc
mkdir -p temp/std/msgs mkdir -p temp/std/msgs
mkdir -p temp/std/plugins/udr_engine
mkdir -p temp/std/qli mkdir -p temp/std/qli
mkdir -p temp/std/remote mkdir -p temp/std/remote
mkdir -p temp/std/remote/os/win32 mkdir -p temp/std/remote/os/win32
@ -1118,6 +1123,7 @@ mkdir -p temp/superclient/jrd/os/darwin
mkdir -p temp/superclient/lock mkdir -p temp/superclient/lock
mkdir -p temp/superclient/misc mkdir -p temp/superclient/misc
mkdir -p temp/superclient/msgs mkdir -p temp/superclient/msgs
mkdir -p temp/superclient/plugins/udr_engine
mkdir -p temp/superclient/qli mkdir -p temp/superclient/qli
mkdir -p temp/superclient/remote mkdir -p temp/superclient/remote
mkdir -p temp/superclient/remote/os/win32 mkdir -p temp/superclient/remote/os/win32
@ -1159,6 +1165,7 @@ mkdir -p temp/superserver/jrd/os/darwin
mkdir -p temp/superserver/lock mkdir -p temp/superserver/lock
mkdir -p temp/superserver/misc mkdir -p temp/superserver/misc
mkdir -p temp/superserver/msgs mkdir -p temp/superserver/msgs
mkdir -p temp/superserver/plugins/udr_engine
mkdir -p temp/superserver/qli mkdir -p temp/superserver/qli
mkdir -p temp/superserver/remote mkdir -p temp/superserver/remote
mkdir -p temp/superserver/remote/os/win32 mkdir -p temp/superserver/remote/os/win32
@ -1176,6 +1183,8 @@ mkdir -p temp/superserver/utilities/rebuild
mkdir -p temp/superserver/utilities/ntrace mkdir -p temp/superserver/utilities/ntrace
mkdir -p temp/superserver/vulcan mkdir -p temp/superserver/vulcan
mkdir -p temp/examples/udr
]) ])
@ -1349,7 +1358,9 @@ gen/Makefile.client.gsec:${MAKE_SRC_DIR}/Makefile.in.client.gsec
gen/Makefile.intl:${MAKE_SRC_DIR}/Makefile.in.intl gen/Makefile.intl:${MAKE_SRC_DIR}/Makefile.in.intl
gen/Makefile.msgs:${MAKE_SRC_DIR}/Makefile.in.msgs gen/Makefile.msgs:${MAKE_SRC_DIR}/Makefile.in.msgs
gen/Makefile.extlib:${MAKE_SRC_DIR}/Makefile.in.extlib gen/Makefile.extlib:${MAKE_SRC_DIR}/Makefile.in.extlib
gen/Makefile.plugins:${MAKE_SRC_DIR}/Makefile.in.plugins
gen/examples/Makefile.examples:${MAKE_SRC_DIR}/Makefile.in.examples gen/examples/Makefile.examples:${MAKE_SRC_DIR}/Makefile.in.examples
gen/examples/Makefile.plugins_examples:${MAKE_SRC_DIR}/Makefile.in.plugins_examples
gen/Makefile.libfbembed:${MAKE_SRC_DIR}/Makefile.in.libfbembed gen/Makefile.libfbembed:${MAKE_SRC_DIR}/Makefile.in.libfbembed
gen/Makefile.inet_server:${MAKE_SRC_DIR}/Makefile.in.inet_server gen/Makefile.inet_server:${MAKE_SRC_DIR}/Makefile.in.inet_server
gen/Makefile.embed.util:${MAKE_SRC_DIR}/Makefile.in.embed.util gen/Makefile.embed.util:${MAKE_SRC_DIR}/Makefile.in.embed.util

View File

@ -0,0 +1,107 @@
-----------------
External Routines
-----------------
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
Syntax:
{ CREATE [ OR ALTER ] | RECREATE | ALTER } PROCEDURE <name>
[ ( <parameter list> ) ]
[ RETURNS ( <parameter list> ) ]
EXTERNAL NAME '<external name>' ENGINE <engine>
{ CREATE [ OR ALTER ] | RECREATE | ALTER } FUNCTION <name>
[ <parameter list> ]
RETURNS <data type>
EXTERNAL NAME '<external name>' ENGINE <engine>
{ CREATE [ OR ALTER ] | RECREATE | ALTER } TRIGGER <name>
...
EXTERNAL NAME '<external name>' ENGINE <engine>
Examples:
create procedure gen_rows (
start_n integer not null,
end_n integer not null
) returns (
n integer not null
) external name 'udrcpp_example!gen_rows'
engine udr;
create function wait_event (
event_name varchar(31) character set ascii
) returns integer
external name 'udrcpp_example!wait_event'
engine udr;
create trigger persons_replicate
after insert on persons
external name 'udrcpp_example!replicate!ds1'
engine udr;
How it works:
External names are opaque strings to Firebird. They are recognized by specific external engines.
External engines are declared in config files (possibly in the same file as a plugin, like in the
config example present below).
<external_engine UDR>
plugin_module UDR_engine
</external_engine>
<plugin_module UDR_engine>
filename $(this)/udr_engine
plugin_config UDR_config
</plugin_module>
<plugin_config UDR_config>
path $(this)/udr
</plugin_config>
When Firebird wants to load an external routine (function, procedure or trigger) into its metadata
cache, it gets (if not already done for the database*) the external engine through the plugin
external engine factory and ask it for the routine. The plugin used is the one referenced by the
attribute plugin_module of the external engine.
* This is in Super-Server. In [Super-]Classic, different attachments to one database creates
multiple metadata caches and hence multiple external engine instances.
----------------------------------
UDR - User Defined Routines engine
----------------------------------
The UDR (User Defined Routines) engine adds a layer on top of the FirebirdExternal interface with
these objectives:
- Establish a way to place external modules into server and make them available for usage;
- Create an API so that external modules can register their available routines;
- Make routines instances per-attachment, instead of per-database like the FirebirdExternal does
in SuperServer mode.
External names of the UDR engine are defined as following:
'<module name>!<routine name>!<misc info>'
The <module name> is used to locate the library, <routine name> is used to locate the routine
registered by the given module, and <misc info> is an user defined string passed to the routine
and can be read by the user. "!<misc info>" may be ommitted.
Modules available to the UDR engine should be in a directory listed through the path attribute of
the correspondent plugin_config tag. By default, UDR modules should be on <fbroot>/plugins/udr,
accordingly to its path attribute in <fbroot>/plugins/udr_engine.conf.
The user library should include FirebirdUdr.h (or FirebirdUdrCpp.h) and link with the udr_engine
library. Routines are easily defined and registered using some macros, but nothing prevent you of
doing things manually. A example routine library is implemented in examples/plugins, showing how to
write functions, selectable procedures and triggers. Also it shows how to interact with the current
database through the ISC API.
The UDR routines state (i.e., member variables) are shared between multiple invocations of the same
routine until it's unloaded from the metadata cache. But note that it isolates the instances per
session, different from the raw interface that shares instances by multiple sessions in SuperServer.
By default, UDR routines uses the same character set specified by the client. They can modify it
overriding the getCharSet method. The chosen character set is valid for communication with the ISC
library as well as the communications done through the FirebirdExternal API.

View File

@ -0,0 +1,25 @@
------------------------
Alternate String Quoting
------------------------
Support for alternate format of strings literals.
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
Syntax:
<alternate string literal> ::=
{ q | Q } <quote> <alternate start char> [ { <char> }... ] <alternate end char> <quote>
Syntax rules:
When <alternate start char> is '(', '{', '[' or '<', <alternate end char> is respectively
')', '}', ']' and '>'. In other cases, <alternate end char> is equal to <alternate start char>.
Notes:
Inside the string, i.e., <char> items, single (not escaped) quotes could be used.
Each quote will be part of the result string.
Examples:
select q'{abc{def}ghi}' from rdb$database; -- result: abc{def}ghi
select q'!That's a string!' from rdb$database; -- result: That's a string

View File

@ -0,0 +1,306 @@
------------
DDL triggers
------------
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
(This feature was sponsored with donations gathered in the "5th Brazilian Firebird Developers Day")
Syntax:
<database-trigger> ::=
{CREATE | RECREATE | CREATE OR ALTER}
TRIGGER <name>
[ACTIVE | INACTIVE]
{BEFORE | AFTER} <ddl event>
[POSITION <n>]
AS
BEGIN
...
END
<ddl event> ::=
ANY DDL STATEMENT
| <ddl event item> [{OR <ddl event item>}...]
<ddl event item> ::=
CREATE TABLE
| ALTER TABLE
| DROP TABLE
| CREATE PROCEDURE
| ALTER PROCEDURE
| DROP PROCEDURE
| CREATE FUNCTION
| ALTER FUNCTION
| DROP FUNCTION
| CREATE TRIGGER
| ALTER TRIGGER
| DROP TRIGGER
| CREATE EXCEPTION
| ALTER EXCEPTION
| DROP EXCEPTION
| CREATE VIEW
| ALTER VIEW
| DROP VIEW
| CREATE DOMAIN
| ALTER DOMAIN
| DROP DOMAIN
| CREATE ROLE
| ALTER ROLE
| DROP ROLE
| CREATE SEQUENCE
| ALTER SEQUENCE
| DROP SEQUENCE
| CREATE USER
| ALTER USER
| DROP USER
| CREATE INDEX
| ALTER INDEX
| DROP INDEX
| CREATE COLLATION
| DROP COLLATION
| ALTER CHARACTER SET
| CREATE PACKAGE
| ALTER PACKAGE
| DROP PACKAGE
| CREATE PACKAGE BODY
| DROP PACKAGE BODY
Syntax rules:
1) DDL triggers type can't be changed.
Semantics:
1) BEFORE triggers are fired before changes to system tables and AFTER triggers are fired after
system table changes.
2) It's possible to cancel the command raising an exception in BEFORE or in AFTER triggers.
3) Firebird really does DDL actions only when committing the transaction that run DDL commands.
You should pay attention to that. What you can do in AFTER triggers are exactly what you can
do after a DDL command without autocommit. For example, you can't create a table and use it
on the trigger.
4) With CREATE OR ALTER statements, trigger is fired one time using the CREATE or ALTER event
based on the previous existence of the object. With RECREATE statements, trigger is fired for
DROP (when the object exists) and for CREATE events.
5) ALTER and DROP events are generally not fired when the object name does not exist.
6) As exception to rule 5, BEFORE ALTER/DROP USER triggers fires even when the user name does
not exist. This is because these commands run on the security database and the verification
is not done before run the command on it. This is likely to be different with embedded users,
so do not write your code depending on this.
7) If some exception is raised after the DDL command starts its execution and before AFTER
triggers are fired, AFTER triggers will not be fired.
8) Packaged procedures and triggers do not fire individual {CREATE | ALTER | DROP} {PROCEDURE |
FUNCTION} triggers.
Utilities support:
DDL triggers is a type of database triggers, so the parameters -nodbtriggers (GBAK and ISQL)
and -T (NBACKUP) also works for them.
These parameters could only be used by database owner and SYSDBA.
Permissions:
Only database owner and SYSDBA can create/alter/drop DDL triggers.
DDL_TRIGGER context namespace:
It has been introduced the DDL_TRIGGER context for usage with RDB$GET_CONTEXT. Usage of this
namespace is valid only when DDL triggers are running. It's valid to use it in stored
procedures called by DDL triggers.
The DDL_TRIGGER context works like a stack. Before a DDL trigger is fired, it's pushed on that
stack the values relative to the executed command. After the trigger finishes, the value is
poped. So in the case of cascade DDL statements, when an user DDL command fires a DDL trigger
and this trigger executes another DDL command with EXECUTE STATEMENT, the values of DDL_TRIGGER
namespace are the ones relative to the command that fired the last DDL trigger on the call
stack.
The context elements are:
- DDL_EVENT: event name (<ddl event item>)
- OBJECT_NAME: metadata object name
- SQL_TEXT: sql statement text
Example usages:
===============
1) Enforce a name consistense scheme. All procedure names should start with the prefix "SP_".
create exception e_invalid_sp_name 'Invalid SP name (should start with SP_)';
set term !;
create trigger trig_ddl_sp before create procedure
as
begin
if (rdb$get_context('DDL_TRIGGER', 'OBJECT_NAME') not starting 'SP_') then
exception e_invalid_sp_name;
end!
-- Test
create procedure sp_test
as
begin
end!
create procedure test
as
begin
end!
-- The last command raises this exception and procedure TEST is not created
-- Statement failed, SQLSTATE = 42000
-- exception 1
-- -E_INVALID_SP_NAME
-- -Invalid SP name (should start with SP_)
-- -At trigger 'TRIG_DDL_SP' line: 4, col: 5
set term ;!
----------------------------------------
2) Implement handy-made DDL security. Only certainly users could run DDL commands.
create exception e_access_denied 'Access denied';
set term !;
create trigger trig_ddl before any ddl statement
as
begin
if (current_user <> 'SUPER_USER') then
exception e_access_denied;
end!
-- Test
create procedure sp_test
as
begin
end!
-- The last command raises this exception and procedure SP_TEST is not created
-- Statement failed, SQLSTATE = 42000
-- exception 1
-- -E_ACCESS_DENIED
-- -Access denied
-- -At trigger 'TRIG_DDL' line: 4, col: 5
set term ;!
----------------------------------------
3) Log DDL actions and attempts.
create sequence ddl_seq;
create table ddl_log (
id bigint not null primary key,
moment timestamp not null,
user_name varchar(31) not null,
ddl_event varchar(25) not null,
object_name varchar(31) not null,
sql_text blob sub_type text not null,
ok char(1) not null
);
set term !;
create trigger trig_ddl_log_before before any ddl statement
as
declare id type of column ddl_log.id;
begin
-- We do the changes in an AUTONOMOUS TRANSACTION, so if an exception happens and the command
-- didn't run, the log will survive.
in autonomous transaction do
begin
insert into ddl_log (id, moment, user_name, ddl_event, object_name, sql_text, ok)
values (next value for ddl_seq, current_timestamp, current_user,
rdb$get_context('DDL_TRIGGER', 'DDL_EVENT'),
rdb$get_context('DDL_TRIGGER', 'OBJECT_NAME'),
rdb$get_context('DDL_TRIGGER', 'SQL_TEXT'),
'N')
returning id into id;
rdb$set_context('USER_SESSION', 'trig_ddl_log_id', id);
end
end!
-- Note: the above trigger will fire for this DDL command. It's good idea to use -nodbtriggers
-- when working with them!
create trigger trig_ddl_log_after after any ddl statement
as
begin
-- Here we need an AUTONOMOUS TRANSACTION because the original transaction will not see the
-- record inserted on the BEFORE trigger autonomous transaction if user transaction is not
-- READ COMMITTED.
in autonomous transaction do
update ddl_log set ok = 'Y' where id = rdb$get_context('USER_SESSION', 'trig_ddl_log_id');
end!
commit!
set term ;!
-- So lets delete the record about trig_ddl_log_after creation.
delete from ddl_log;
commit;
-- Test
-- This will be logged one time (as T1 did not exists, RECREATE acts as CREATE) with OK = Y.
recreate table t1 (
n1 integer,
n2 integer
);
-- This will fail as T1 already exists, so OK will be N.
create table t1 (
n1 integer,
n2 integer
);
-- T2 does not exists. There will be no log.
drop table t2;
-- This will be logged two times (as T1 exists, RECREATE acts as DROP and CREATE) with OK = Y.
recreate table t1 (
n integer
);
commit;
select id, ddl_event, object_name, sql_text, ok from ddl_log order by id;
ID DDL_EVENT OBJECT_NAME SQL_TEXT OK
===================== ========================= =============================== ================= ======
2 CREATE TABLE T1 80:3 Y
==============================================================================
SQL_TEXT:
recreate table t1 (
n1 integer,
n2 integer
)
==============================================================================
3 CREATE TABLE T1 80:2 N
==============================================================================
SQL_TEXT:
create table t1 (
n1 integer,
n2 integer
)
==============================================================================
4 DROP TABLE T1 80:6 Y
==============================================================================
SQL_TEXT:
recreate table t1 (
n integer
)
==============================================================================
5 CREATE TABLE T1 80:9 Y
==============================================================================
SQL_TEXT:
recreate table t1 (
n integer
)
==============================================================================

View File

@ -0,0 +1,125 @@
--------
Packages
--------
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
(This feature was sponsored with donations gathered in the "5th Brazilian Firebird Developers Day")
Description:
A package is a group of procedures and functions managed as one entity.
Syntax:
<package_header> ::=
{ CREATE [OR ALTER] | ALTER | RECREATE } PACKAGE <name>
AS
BEGIN
[ <package_item> ... ]
END
<package_item> ::=
<function_decl> ; |
<procedure_decl> ;
<function_decl> ::=
FUNCTION <name> [( <parameters> )] RETURNS <type>
<procedure_decl> ::=
PROCEDURE <name> [( <parameters> ) [RETURNS ( <parameters> )]]
<package_body> ::=
{ CREATE | RECREATE } PACKAGE BODY <name>
AS
BEGIN
[ <package_item> ... ]
[ <package_body_item> ... ]
END
<package_body_item> ::=
<function_impl> ; |
<procedure_impl> ;
<function_impl> ::=
FUNCTION <name> [( <parameters> )] RETURNS <type>
EXTERNAL NAME '<name>' ENGINE <engine>
<procedure_impl> ::=
PROCEDURE <name> [( <parameters> ) [RETURNS ( <parameters> )]]
AS
BEGIN
...
END
|
PROCEDURE <name> [( <parameters> ) [RETURNS ( <parameters> )]]
EXTERNAL NAME '<name>' ENGINE <engine>
<drop_package_header> ::=
DROP PACKAGE <name>
<drop_package_body> ::=
DROP PACKAGE BODY <name>
Objectives:
- Make functional dependent code separated in logical modules like programming languages does.
It's well know in programming world that having code grouped in some way (for example in
namespaces, units or classes) is a good thing. With standard procedures and functions in the
database this is not possible. It's possible to group them in different scripts files, but
two problems remains:
1) The grouping is not represented in the database metadata.
2) They all participate in a flat namespace and all routines are callable by everyone (not
talking about security permissions here).
- Facilitate dependency tracking between its internal routines and between others packaged and
unpackaged routines.
Firebird packages are divided in two pieces: a header (aka PACKAGE) and a body (aka
PACKAGE BODY). This division is very similar to a Delphi unit. The header correspond to the
interface part, and the body correspond to the implementation part.
The user needs first to create the header (CREATE PACKAGE) and after it the body (CREATE
PACKAGE BODY).
When a packaged routine uses a determined database object, it's registered on Firebird system
tables that the package body depends on that object. If you want to, for example, drop that
object, you first need to remove who depends on it. As who depends on it is a package body,
you can just drop it even if some other database object depends on this package. When the body
is dropped, the header remains, allowing you to create its body again after change it based on
the object removal.
- Facilitate permission management.
It's generally a good practice to create routines with a privileged database user and grant
usage to them for users or roles. As Firebird runs the routines with the caller privileges,
it's also necessary to grant resources usage to each routine, when these resources would not
be directly accessible to the callers, and grant usage of each routine to users and/or roles.
Packaged routines do not have individual privileges. The privileges act on the package.
Privileges granted to packages are valid for all (including private) package body routines,
but are stored for the package header. Example usage:
GRANT SELECT ON TABLE secret TO PACKAGE pk_secret;
GRANT EXECUTE ON PACKAGE pk_secret TO ROLE role_secret;
- Introduce private scope to routines making them available only for internal usage in the
defining package.
All programming languages have the notion of routine scope. But without some form of grouping,
this is not possible. Firebird packages also works as Delphi units in this regard. If a
routine is not declared on the package header (interface) and is implemented in the body
(implementation), it becomes a private routine. A private routine can only be called from
inside its package.
Syntax rules:
- A package body should implement all routines declared in the header and in the body start,
with the same signature.
- Default value for procedure parameters could not be redefined (be informed in <package_item>
and <package_body_item>). That means, they can be in <package_body_item> only for private
procedures not declared.
Notes:
- DROP PACKAGE drops the package body before drop its header.
- UDFs (DECLARE EXTERNAL FUNCTION) are currently not supported inside packages.
Examples:
- To come.

View File

@ -809,9 +809,17 @@ void output_defines()
register char *s; register char *s;
FILE *dc_file; FILE *dc_file;
/* ASF: changed to separate (_yacc_defines_keywords and _yacc_defines_yystype instead of
_yacc_defines_h_) keyword definitions of YYSTYPE because keywords may conflict with other
things */
if(dflag) { if(dflag) {
/***
fprintf(defines_file, "#ifndef _yacc_defines_h_\n"); fprintf(defines_file, "#ifndef _yacc_defines_h_\n");
fprintf(defines_file, "#define _yacc_defines_h_\n\n"); fprintf(defines_file, "#define _yacc_defines_h_\n\n");
***/
fprintf(defines_file, "#ifndef _yacc_defines_keywords\n");
fprintf(defines_file, "#define _yacc_defines_keywords\n\n");
} }
/* VM: Print to either code file or defines file but not to both */ /* VM: Print to either code file or defines file but not to both */
@ -847,20 +855,32 @@ void output_defines()
++outline; ++outline;
fprintf(dc_file, "#define YYERRCODE %d\n", symbol_value[1]); fprintf(dc_file, "#define YYERRCODE %d\n", symbol_value[1]);
if(dflag) {
fprintf(defines_file, "\n#endif /* _yacc_defines_keywords */\n\n");
}
if (dflag && unionized) if (dflag && unionized)
{ {
fprintf(defines_file, "#ifndef _yacc_defines_yystype\n");
fprintf(defines_file, "#define _yacc_defines_yystype\n");
fclose(union_file); fclose(union_file);
union_file = fopen(union_file_name, "r"); union_file = fopen(union_file_name, "r");
if (union_file == NULL) open_error(union_file_name); if (union_file == NULL) open_error(union_file_name);
while ((c = getc(union_file)) != EOF) { while ((c = getc(union_file)) != EOF) {
putc(c, defines_file); putc(c, defines_file);
} }
fprintf(defines_file, "extern YYSTYPE yylval;\n"); /* ASF: we define it on the Parser class
fprintf(defines_file, "extern YYSTYPE yylval;\n"); */
fprintf(defines_file, "\n#endif /* _yacc_defines_yystype */\n\n");
} }
/***
if(dflag) { if(dflag) {
fprintf(defines_file, "\n#endif\n"); fprintf(defines_file, "\n#endif\n");
} }
***/
} }

View File

@ -1386,6 +1386,10 @@ C --
PARAMETER (GDS__eds_expl_tran_ctrl = 335544986) PARAMETER (GDS__eds_expl_tran_ctrl = 335544986)
INTEGER*4 GDS__no_trusted_spb INTEGER*4 GDS__no_trusted_spb
PARAMETER (GDS__no_trusted_spb = 335544987) PARAMETER (GDS__no_trusted_spb = 335544987)
INTEGER*4 GDS__package_name
PARAMETER (GDS__package_name = 335544988)
INTEGER*4 GDS__cannot_make_not_null
PARAMETER (GDS__cannot_make_not_null = 335544989)
INTEGER*4 GDS__gfix_db_name INTEGER*4 GDS__gfix_db_name
PARAMETER (GDS__gfix_db_name = 335740929) PARAMETER (GDS__gfix_db_name = 335740929)
INTEGER*4 GDS__gfix_invalid_sw INTEGER*4 GDS__gfix_invalid_sw
@ -1500,8 +1504,36 @@ C --
PARAMETER (GDS__dsql_incompatible_trigger_type = 336003102) PARAMETER (GDS__dsql_incompatible_trigger_type = 336003102)
INTEGER*4 GDS__dsql_db_trigger_type_cant_change INTEGER*4 GDS__dsql_db_trigger_type_cant_change
PARAMETER (GDS__dsql_db_trigger_type_cant_change = 336003103) PARAMETER (GDS__dsql_db_trigger_type_cant_change = 336003103)
INTEGER*4 GDS__dyn_filter_not_found
PARAMETER (GDS__dyn_filter_not_found = 336068645)
INTEGER*4 GDS__dyn_func_not_found
PARAMETER (GDS__dyn_func_not_found = 336068649)
INTEGER*4 GDS__dyn_index_not_found
PARAMETER (GDS__dyn_index_not_found = 336068656)
INTEGER*4 GDS__dyn_view_not_found
PARAMETER (GDS__dyn_view_not_found = 336068662)
INTEGER*4 GDS__dyn_domain_not_found
PARAMETER (GDS__dyn_domain_not_found = 336068697)
INTEGER*4 GDS__dyn_cant_modify_auto_trig
PARAMETER (GDS__dyn_cant_modify_auto_trig = 336068717)
INTEGER*4 GDS__dyn_dup_table INTEGER*4 GDS__dyn_dup_table
PARAMETER (GDS__dyn_dup_table = 336068740) PARAMETER (GDS__dyn_dup_table = 336068740)
INTEGER*4 GDS__dyn_proc_not_found
PARAMETER (GDS__dyn_proc_not_found = 336068748)
INTEGER*4 GDS__dyn_exception_not_found
PARAMETER (GDS__dyn_exception_not_found = 336068752)
INTEGER*4 GDS__dyn_proc_param_not_found
PARAMETER (GDS__dyn_proc_param_not_found = 336068754)
INTEGER*4 GDS__dyn_trig_not_found
PARAMETER (GDS__dyn_trig_not_found = 336068755)
INTEGER*4 GDS__dyn_charset_not_found
PARAMETER (GDS__dyn_charset_not_found = 336068759)
INTEGER*4 GDS__dyn_collation_not_found
PARAMETER (GDS__dyn_collation_not_found = 336068760)
INTEGER*4 GDS__dyn_role_not_found
PARAMETER (GDS__dyn_role_not_found = 336068763)
INTEGER*4 GDS__dyn_name_longer
PARAMETER (GDS__dyn_name_longer = 336068767)
INTEGER*4 GDS__dyn_column_does_not_exist INTEGER*4 GDS__dyn_column_does_not_exist
PARAMETER (GDS__dyn_column_does_not_exist = 336068784) PARAMETER (GDS__dyn_column_does_not_exist = 336068784)
INTEGER*4 GDS__dyn_role_does_not_exist INTEGER*4 GDS__dyn_role_does_not_exist
@ -1538,12 +1570,16 @@ C --
PARAMETER (GDS__dyn_dtype_conv_invalid = 336068818) PARAMETER (GDS__dyn_dtype_conv_invalid = 336068818)
INTEGER*4 GDS__dyn_zero_len_id INTEGER*4 GDS__dyn_zero_len_id
PARAMETER (GDS__dyn_zero_len_id = 336068820) PARAMETER (GDS__dyn_zero_len_id = 336068820)
INTEGER*4 GDS__dyn_gen_not_found
PARAMETER (GDS__dyn_gen_not_found = 336068822)
INTEGER*4 GDS__max_coll_per_charset INTEGER*4 GDS__max_coll_per_charset
PARAMETER (GDS__max_coll_per_charset = 336068829) PARAMETER (GDS__max_coll_per_charset = 336068829)
INTEGER*4 GDS__invalid_coll_attr INTEGER*4 GDS__invalid_coll_attr
PARAMETER (GDS__invalid_coll_attr = 336068830) PARAMETER (GDS__invalid_coll_attr = 336068830)
INTEGER*4 GDS__dyn_wrong_gtt_scope INTEGER*4 GDS__dyn_wrong_gtt_scope
PARAMETER (GDS__dyn_wrong_gtt_scope = 336068840) PARAMETER (GDS__dyn_wrong_gtt_scope = 336068840)
INTEGER*4 GDS__dyn_table_not_found
PARAMETER (GDS__dyn_table_not_found = 336068849)
INTEGER*4 GDS__dyn_scale_too_big INTEGER*4 GDS__dyn_scale_too_big
PARAMETER (GDS__dyn_scale_too_big = 336068852) PARAMETER (GDS__dyn_scale_too_big = 336068852)
INTEGER*4 GDS__dyn_precision_too_small INTEGER*4 GDS__dyn_precision_too_small

View File

@ -700,6 +700,8 @@ const
gds_out_of_temp_space = 335544985; gds_out_of_temp_space = 335544985;
gds_eds_expl_tran_ctrl = 335544986; gds_eds_expl_tran_ctrl = 335544986;
gds_no_trusted_spb = 335544987; gds_no_trusted_spb = 335544987;
gds_package_name = 335544988;
gds_cannot_make_not_null = 335544989;
gds_gfix_db_name = 335740929; gds_gfix_db_name = 335740929;
gds_gfix_invalid_sw = 335740930; gds_gfix_invalid_sw = 335740930;
gds_gfix_incmp_sw = 335740932; gds_gfix_incmp_sw = 335740932;
@ -757,7 +759,21 @@ const
gds_upd_ins_with_complex_view = 336003101; gds_upd_ins_with_complex_view = 336003101;
gds_dsql_incompatible_trigger_type = 336003102; gds_dsql_incompatible_trigger_type = 336003102;
gds_dsql_db_trigger_type_cant_change = 336003103; gds_dsql_db_trigger_type_cant_change = 336003103;
gds_dyn_filter_not_found = 336068645;
gds_dyn_func_not_found = 336068649;
gds_dyn_index_not_found = 336068656;
gds_dyn_view_not_found = 336068662;
gds_dyn_domain_not_found = 336068697;
gds_dyn_cant_modify_auto_trig = 336068717;
gds_dyn_dup_table = 336068740; gds_dyn_dup_table = 336068740;
gds_dyn_proc_not_found = 336068748;
gds_dyn_exception_not_found = 336068752;
gds_dyn_proc_param_not_found = 336068754;
gds_dyn_trig_not_found = 336068755;
gds_dyn_charset_not_found = 336068759;
gds_dyn_collation_not_found = 336068760;
gds_dyn_role_not_found = 336068763;
gds_dyn_name_longer = 336068767;
gds_dyn_column_does_not_exist = 336068784; gds_dyn_column_does_not_exist = 336068784;
gds_dyn_role_does_not_exist = 336068796; gds_dyn_role_does_not_exist = 336068796;
gds_dyn_no_grant_admin_opt = 336068797; gds_dyn_no_grant_admin_opt = 336068797;
@ -776,9 +792,11 @@ const
gds_dyn_invalid_dtype_conversion = 336068817; gds_dyn_invalid_dtype_conversion = 336068817;
gds_dyn_dtype_conv_invalid = 336068818; gds_dyn_dtype_conv_invalid = 336068818;
gds_dyn_zero_len_id = 336068820; gds_dyn_zero_len_id = 336068820;
gds_dyn_gen_not_found = 336068822;
gds_max_coll_per_charset = 336068829; gds_max_coll_per_charset = 336068829;
gds_invalid_coll_attr = 336068830; gds_invalid_coll_attr = 336068830;
gds_dyn_wrong_gtt_scope = 336068840; gds_dyn_wrong_gtt_scope = 336068840;
gds_dyn_table_not_found = 336068849;
gds_dyn_scale_too_big = 336068852; gds_dyn_scale_too_big = 336068852;
gds_dyn_precision_too_small = 336068853; gds_dyn_precision_too_small = 336068853;
gds_dyn_miss_priv_warning = 336068855; gds_dyn_miss_priv_warning = 336068855;

View File

@ -132,13 +132,14 @@ void write_exceptions();
void write_field_dimensions(); void write_field_dimensions();
void write_filters(); void write_filters();
void write_functions(); void write_functions();
void write_function_args(GDS_NAME); void write_function_args(const GDS_NAME, GDS_NAME);
void write_generators(); void write_generators();
void write_sql_roles(); void write_sql_roles();
void write_mapping(); void write_mapping();
void write_global_fields(); void write_global_fields();
void write_packages();
void write_procedures(); void write_procedures();
void write_procedure_prms(GDS_NAME); void write_procedure_prms(const GDS_NAME, const GDS_NAME);
void write_ref_constraints(); void write_ref_constraints();
void write_rel_constraints(); void write_rel_constraints();
void write_relations(); void write_relations();
@ -175,9 +176,20 @@ enum backup_capabilities
// rdb$valid_blr in rdb$procedures // rdb$valid_blr in rdb$procedures
// rdb$default_value, rdb$default_source, rdb$collation_id, // rdb$default_value, rdb$default_source, rdb$collation_id,
// rdb$null_flag and rdb$parameter_mechanism in rdb$procedure_parameters // rdb$null_flag and rdb$parameter_mechanism in rdb$procedure_parameters
BCK_ods11_2 = 65536 // rdb$field_name and rdb$relation_name in rdb$procedure_parameters BCK_ods11_2 = 65536,// rdb$field_name and rdb$relation_name in rdb$procedure_parameters
// rdb$admin system role // rdb$admin system role
// rdb$message enlarged to 1023. // rdb$message enlarged to 1023.
BCK_ods12_0 =131072 // rdb$engine_name and rdb$entrypoint in rdb$triggers
// rdb$package_name in rdb$dependencies
// rdb$engine_name, rdb$package_name and rdb$private_flag
// in rdb$functions
// rdb$package_name in rdb$function_arguments
// rdb$engine_name, rdb$entry_point, rdb$package_name
// and rdb$private_flag in rdb$procedures
// rdb$package_name in rdb$procedure_parameters
// rdb$package_name in mon$call_stack
// Table rdb$packages
// Type of rdb$triggers.rdb$trigger_type changed from SMALLINT to BIGINT
}; };
// ASF: Engine that works with ODS11.1 supports access to non-existent system fields. // ASF: Engine that works with ODS11.1 supports access to non-existent system fields.
// Reads returns NULL and writes do nothing. // Reads returns NULL and writes do nothing.
@ -232,6 +244,7 @@ const rfr_tab_t rfr_table[] =
//{"RDB$PROCEDURE_PARAMETERS", "RDB$PARAMETER_MECHANISM", BCK_ods11_1}, //{"RDB$PROCEDURE_PARAMETERS", "RDB$PARAMETER_MECHANISM", BCK_ods11_1},
{"RDB$PROCEDURE_PARAMETERS", "RDB$FIELD_NAME", BCK_ods11_2}, {"RDB$PROCEDURE_PARAMETERS", "RDB$FIELD_NAME", BCK_ods11_2},
//{"RDB$PROCEDURE_PARAMETERS", "RDB$RELATION_NAME", BCK_ods11_2}, //{"RDB$PROCEDURE_PARAMETERS", "RDB$RELATION_NAME", BCK_ods11_2},
{"RDB$PROCEDURES", "RDB$ENGINE_NAME", BCK_ods12_0},
{0, 0, 0} {0, 0, 0}
}; };
@ -386,6 +399,13 @@ int BACKUP_backup(const TEXT* dbb_file, const TEXT* file_name)
write_collations(); write_collations();
} }
if (tdgbl->BCK_capabilities & BCK_ods12_0)
{
// Write packages
BURP_verbose(336); // msg 336 writing packages
write_packages();
}
if (tdgbl->BCK_capabilities & BCK_ffmptt) if (tdgbl->BCK_capabilities & BCK_ffmptt)
{ {
// Write functions // Write functions
@ -3046,11 +3066,54 @@ void write_functions()
* *
**************************************/ **************************************/
GDS_NAME func; GDS_NAME func;
TEXT temp[GDS_NAME_LEN]; TEXT temp[GDS_NAME_LEN * 2];
isc_req_handle req_handle1 = 0; isc_req_handle req_handle1 = 0;
BurpGlobals* tdgbl = BurpGlobals::getSpecific(); BurpGlobals* tdgbl = BurpGlobals::getSpecific();
if (tdgbl->BCK_capabilities & BCK_ods12_0)
{
FOR (REQUEST_HANDLE req_handle1)
X IN RDB$FUNCTIONS WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1
put(tdgbl, rec_function);
SSHORT prefixLen = 0;
if (!X.RDB$PACKAGE_NAME.NULL)
{
prefixLen = PUT_TEXT(att_function_package_name, X.RDB$PACKAGE_NAME);
MISC_terminate(X.RDB$PACKAGE_NAME, temp, prefixLen, sizeof(temp));
temp[prefixLen++] = '.';
}
const SSHORT l = PUT_TEXT (att_function_name, X.RDB$FUNCTION_NAME);
MISC_terminate (X.RDB$FUNCTION_NAME, temp + prefixLen, l, sizeof(temp) - prefixLen);
BURP_verbose (147, temp);
// msg 147 writing function %.*s
put_source_blob (att_function_description2, att_function_description, X.RDB$DESCRIPTION);
PUT_TEXT (att_function_module_name, X.RDB$MODULE_NAME);
PUT_TEXT (att_function_entrypoint, X.RDB$ENTRYPOINT);
put_numeric (att_function_return_arg, X.RDB$RETURN_ARGUMENT);
put_numeric (att_function_type, X.RDB$FUNCTION_TYPE);
PUT_TEXT (att_function_query_name, X.RDB$QUERY_NAME);
if (!X.RDB$ENGINE_NAME.NULL)
PUT_TEXT(att_function_engine_name, X.RDB$ENGINE_NAME);
if (!X.RDB$PRIVATE_FLAG.NULL)
put_numeric(att_function_private_flag, X.RDB$PRIVATE_FLAG);
put(tdgbl, att_end);
COPY (X.RDB$FUNCTION_NAME, func);
write_function_args ((X.RDB$PACKAGE_NAME.NULL ? "" : X.RDB$PACKAGE_NAME), func);
put(tdgbl, rec_function_end);
END_FOR;
ON_ERROR
general_on_error();
END_ERROR;
}
else
{
FOR (REQUEST_HANDLE req_handle1) FOR (REQUEST_HANDLE req_handle1)
X IN RDB$FUNCTIONS WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1 X IN RDB$FUNCTIONS WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1
put(tdgbl, rec_function); put(tdgbl, rec_function);
@ -3066,18 +3129,19 @@ void write_functions()
PUT_TEXT (att_function_query_name, X.RDB$QUERY_NAME); PUT_TEXT (att_function_query_name, X.RDB$QUERY_NAME);
put(tdgbl, att_end); put(tdgbl, att_end);
COPY (X.RDB$FUNCTION_NAME, func); COPY (X.RDB$FUNCTION_NAME, func);
write_function_args (func); write_function_args ("", func);
put(tdgbl, rec_function_end); put(tdgbl, rec_function_end);
END_FOR; END_FOR;
ON_ERROR ON_ERROR
general_on_error(); general_on_error();
END_ERROR; END_ERROR;
}
MISC_release_request_silent(req_handle1); MISC_release_request_silent(req_handle1);
} }
void write_function_args( GDS_NAME funcptr) void write_function_args(const GDS_NAME package, GDS_NAME funcptr)
{ {
/************************************** /**************************************
* *
@ -3089,7 +3153,7 @@ void write_function_args( GDS_NAME funcptr)
* write all arguments for a function. * write all arguments for a function.
* *
**************************************/ **************************************/
TEXT temp[GDS_NAME_LEN]; TEXT temp[GDS_NAME_LEN * 2];
BurpGlobals* tdgbl = BurpGlobals::getSpecific(); BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -3099,7 +3163,48 @@ void write_function_args( GDS_NAME funcptr)
// requests--this requires more code but it is well worth it // requests--this requires more code but it is well worth it
// for the performance benefits, especially remotely--deej // for the performance benefits, especially remotely--deej
if (tdgbl->BCK_capabilities & BCK_ods10) if (tdgbl->BCK_capabilities & BCK_ods12_0)
{
FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle1)
X IN RDB$FUNCTION_ARGUMENTS
WITH X.RDB$FUNCTION_NAME EQ funcptr AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(package, '')
put(tdgbl, rec_function_arg);
SSHORT prefixLen = 0;
if (!X.RDB$PACKAGE_NAME.NULL)
{
prefixLen = PUT_TEXT(att_functionarg_package_name, X.RDB$PACKAGE_NAME);
MISC_terminate(X.RDB$PACKAGE_NAME, temp, prefixLen, sizeof(temp));
temp[prefixLen++] = '.';
}
const SSHORT l = PUT_TEXT (att_functionarg_name, X.RDB$FUNCTION_NAME);
MISC_terminate (X.RDB$FUNCTION_NAME, temp + prefixLen, l, sizeof(temp) - prefixLen);
BURP_verbose (141, temp);
// msg 141 writing argument for function %s
put_numeric (att_functionarg_position, X.RDB$ARGUMENT_POSITION);
put_numeric (att_functionarg_mechanism, X.RDB$MECHANISM);
put_numeric (att_functionarg_field_type, X.RDB$FIELD_TYPE);
put_numeric (att_functionarg_field_scale, X.RDB$FIELD_SCALE);
put_numeric (att_functionarg_field_length, X.RDB$FIELD_LENGTH);
put_numeric (att_functionarg_field_sub_type, X.RDB$FIELD_SUB_TYPE);
if (!X.RDB$CHARACTER_SET_ID.NULL)
put_numeric (att_functionarg_character_set, X.RDB$CHARACTER_SET_ID);
if (!X.RDB$FIELD_PRECISION.NULL)
put_numeric (att_functionarg_field_precision, X.RDB$FIELD_PRECISION);
put(tdgbl, att_end);
END_FOR;
ON_ERROR
general_on_error();
END_ERROR;
}
else if (tdgbl->BCK_capabilities & BCK_ods10)
{ {
FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle1) FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle1)
X IN RDB$FUNCTION_ARGUMENTS WITH X IN RDB$FUNCTION_ARGUMENTS WITH
@ -3436,6 +3541,65 @@ void write_global_fields()
} }
void write_packages()
{
/**************************************
*
* w r i t e _ p a c k a g e s
*
**************************************
*
* Functional description
* write a record in the burp file for
* each package.
*
**************************************/
TEXT temp[GDS_NAME_LEN];
isc_req_handle req_handle1 = 0;
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
FOR (REQUEST_HANDLE req_handle1)
X IN RDB$PACKAGES
WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1
{
put(tdgbl, rec_package);
const SSHORT l = PUT_TEXT(att_package_name, X.RDB$PACKAGE_NAME);
MISC_terminate(X.RDB$PACKAGE_NAME, temp, l, sizeof(temp));
BURP_verbose(335, temp); // msg 335 writing package @1
if (!X.RDB$PACKAGE_HEADER_SOURCE.NULL)
{
put_source_blob(att_package_header_source, att_package_header_source,
X.RDB$PACKAGE_HEADER_SOURCE);
}
if (!X.RDB$PACKAGE_BODY_SOURCE.NULL)
{
put_source_blob(att_package_body_source, att_package_body_source,
X.RDB$PACKAGE_BODY_SOURCE);
}
if (!X.RDB$SECURITY_CLASS.NULL)
PUT_TEXT(att_package_security_class, X.RDB$SECURITY_CLASS);
if (!X.RDB$OWNER_NAME.NULL)
PUT_TEXT(att_package_owner_name, X.RDB$OWNER_NAME);
if (!X.RDB$DESCRIPTION.NULL)
put_source_blob(att_package_description, att_package_description, X.RDB$DESCRIPTION);
put(tdgbl, att_end);
}
END_FOR
ON_ERROR
general_on_error();
END_ERROR
MISC_release_request_silent(req_handle1);
}
void write_procedures() void write_procedures()
{ {
/************************************** /**************************************
@ -3461,18 +3625,32 @@ void write_procedures()
X IN RDB$PROCEDURES X IN RDB$PROCEDURES
WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1 WITH X.RDB$SYSTEM_FLAG MISSING OR X.RDB$SYSTEM_FLAG NE 1
put(tdgbl, rec_procedure); put(tdgbl, rec_procedure);
const SSHORT l = PUT_TEXT (att_procedure_name, X.RDB$PROCEDURE_NAME);
MISC_terminate (X.RDB$PROCEDURE_NAME, temp, l, sizeof(temp)); SSHORT prefixLen = 0;
if (!X.RDB$PACKAGE_NAME.NULL)
{
prefixLen = PUT_TEXT(att_procedure_package_name, X.RDB$PACKAGE_NAME);
MISC_terminate (X.RDB$PACKAGE_NAME, temp, prefixLen, sizeof(temp));
temp[prefixLen++] = '.';
}
const SSHORT len = PUT_TEXT (att_procedure_name, X.RDB$PROCEDURE_NAME);
MISC_terminate (X.RDB$PROCEDURE_NAME, temp + prefixLen, len, sizeof(temp) - prefixLen);
BURP_verbose (193, temp); BURP_verbose (193, temp);
// msg 193 writing stored procedure %.*s // msg 193 writing stored procedure %.*s
put_numeric (att_procedure_inputs, X.RDB$PROCEDURE_INPUTS); put_numeric (att_procedure_inputs, X.RDB$PROCEDURE_INPUTS);
put_numeric (att_procedure_outputs, X.RDB$PROCEDURE_OUTPUTS); put_numeric (att_procedure_outputs, X.RDB$PROCEDURE_OUTPUTS);
put_source_blob(att_procedure_description2, att_procedure_description, X.RDB$DESCRIPTION); put_source_blob(att_procedure_description2, att_procedure_description, X.RDB$DESCRIPTION);
put_source_blob (att_procedure_source2, att_procedure_source, X.RDB$PROCEDURE_SOURCE); put_source_blob (att_procedure_source2, att_procedure_source, X.RDB$PROCEDURE_SOURCE);
if (!X.RDB$PROCEDURE_BLR.NULL)
put_blr_blob (att_procedure_blr, X.RDB$PROCEDURE_BLR); put_blr_blob (att_procedure_blr, X.RDB$PROCEDURE_BLR);
if (!X.RDB$SECURITY_CLASS.NULL) if (!X.RDB$SECURITY_CLASS.NULL)
PUT_TEXT (att_procedure_security_class, X.RDB$SECURITY_CLASS); PUT_TEXT (att_procedure_security_class, X.RDB$SECURITY_CLASS);
if (!X.RDB$SECURITY_CLASS.NULL) if (!X.RDB$OWNER_NAME.NULL)
PUT_TEXT (att_procedure_owner_name, X.RDB$OWNER_NAME); PUT_TEXT (att_procedure_owner_name, X.RDB$OWNER_NAME);
if (!X.RDB$PROCEDURE_TYPE.NULL) if (!X.RDB$PROCEDURE_TYPE.NULL)
put_numeric (att_procedure_type, X.RDB$PROCEDURE_TYPE); put_numeric (att_procedure_type, X.RDB$PROCEDURE_TYPE);
@ -3480,9 +3658,19 @@ void write_procedures()
put_numeric (att_procedure_valid_blr, X.RDB$VALID_BLR); put_numeric (att_procedure_valid_blr, X.RDB$VALID_BLR);
if (!X.RDB$DEBUG_INFO.NULL) if (!X.RDB$DEBUG_INFO.NULL)
put_blr_blob (att_procedure_debug_info, X.RDB$DEBUG_INFO); put_blr_blob (att_procedure_debug_info, X.RDB$DEBUG_INFO);
if (!X.RDB$ENGINE_NAME.NULL)
PUT_TEXT(att_procedure_engine_name, X.RDB$ENGINE_NAME);
if (!X.RDB$ENTRYPOINT.NULL)
PUT_TEXT(att_procedure_entrypoint, X.RDB$ENTRYPOINT);
if (!X.RDB$PRIVATE_FLAG.NULL)
put_numeric(att_procedure_private_flag, X.RDB$PRIVATE_FLAG);
put(tdgbl, att_end); put(tdgbl, att_end);
COPY(X.RDB$PROCEDURE_NAME, proc); COPY(X.RDB$PROCEDURE_NAME, proc);
write_procedure_prms (proc); write_procedure_prms ((X.RDB$PACKAGE_NAME.NULL ? "" : X.RDB$PACKAGE_NAME), proc);
put(tdgbl, rec_procedure_end); put(tdgbl, rec_procedure_end);
END_FOR; END_FOR;
ON_ERROR ON_ERROR
@ -3509,7 +3697,7 @@ void write_procedures()
PUT_TEXT (att_procedure_owner_name, X.RDB$OWNER_NAME); PUT_TEXT (att_procedure_owner_name, X.RDB$OWNER_NAME);
put(tdgbl, att_end); put(tdgbl, att_end);
COPY(X.RDB$PROCEDURE_NAME, proc); COPY(X.RDB$PROCEDURE_NAME, proc);
write_procedure_prms (proc); write_procedure_prms ("", proc);
put(tdgbl, rec_procedure_end); put(tdgbl, rec_procedure_end);
END_FOR; END_FOR;
ON_ERROR ON_ERROR
@ -3521,7 +3709,7 @@ void write_procedures()
} }
void write_procedure_prms( GDS_NAME procptr) void write_procedure_prms(const GDS_NAME package, const GDS_NAME procptr)
{ {
/************************************** /**************************************
* *
@ -3540,7 +3728,10 @@ void write_procedure_prms( GDS_NAME procptr)
if (tdgbl->BCK_capabilities & BCK_ods11_1) if (tdgbl->BCK_capabilities & BCK_ods11_1)
{ {
FOR (REQUEST_HANDLE tdgbl->handles_write_procedure_prms_req_handle1) FOR (REQUEST_HANDLE tdgbl->handles_write_procedure_prms_req_handle1)
X IN RDB$PROCEDURE_PARAMETERS WITH X.RDB$PROCEDURE_NAME EQ procptr X IN RDB$PROCEDURE_PARAMETERS
WITH X.RDB$PROCEDURE_NAME EQ procptr AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(package, '')
{
put(tdgbl, rec_procedure_prm); put(tdgbl, rec_procedure_prm);
const SSHORT l = PUT_TEXT (att_procedureprm_name, X.RDB$PARAMETER_NAME); const SSHORT l = PUT_TEXT (att_procedureprm_name, X.RDB$PARAMETER_NAME);
MISC_terminate (X.RDB$PARAMETER_NAME, temp, l, sizeof(temp)); MISC_terminate (X.RDB$PARAMETER_NAME, temp, l, sizeof(temp));
@ -3568,6 +3759,7 @@ void write_procedure_prms( GDS_NAME procptr)
PUT_TEXT(att_procedureprm_relation_name, X.RDB$RELATION_NAME); PUT_TEXT(att_procedureprm_relation_name, X.RDB$RELATION_NAME);
put(tdgbl, att_end); put(tdgbl, att_end);
}
END_FOR; END_FOR;
ON_ERROR ON_ERROR
general_on_error(); general_on_error();
@ -4037,7 +4229,12 @@ void write_triggers()
PUT_TEXT (att_trig_relation_name, X.RDB$RELATION_NAME); PUT_TEXT (att_trig_relation_name, X.RDB$RELATION_NAME);
put_numeric (att_trig_sequence, X.RDB$TRIGGER_SEQUENCE); put_numeric (att_trig_sequence, X.RDB$TRIGGER_SEQUENCE);
put_numeric (att_trig_type, X.RDB$TRIGGER_TYPE);
if (X.RDB$TRIGGER_TYPE >= SLONG_MIN && X.RDB$TRIGGER_TYPE <= SLONG_MAX)
put_numeric (att_trig_type, (SLONG) X.RDB$TRIGGER_TYPE);
else
put_int64 (att_trig_type2, X.RDB$TRIGGER_TYPE);
put_blr_blob (att_trig_blr, X.RDB$TRIGGER_BLR); put_blr_blob (att_trig_blr, X.RDB$TRIGGER_BLR);
put_source_blob (att_trig_source2, att_trig_source, X.RDB$TRIGGER_SOURCE); put_source_blob (att_trig_source2, att_trig_source, X.RDB$TRIGGER_SOURCE);
put_source_blob (att_trig_description2, att_trig_description, X.RDB$DESCRIPTION); put_source_blob (att_trig_description2, att_trig_description, X.RDB$DESCRIPTION);
@ -4053,6 +4250,12 @@ void write_triggers()
if (!X.RDB$DEBUG_INFO.NULL) if (!X.RDB$DEBUG_INFO.NULL)
put_blr_blob (att_trig_debug_info, X.RDB$DEBUG_INFO); put_blr_blob (att_trig_debug_info, X.RDB$DEBUG_INFO);
if (!X.RDB$ENGINE_NAME.NULL)
PUT_TEXT(att_trig_engine_name, X.RDB$ENGINE_NAME);
if (!X.RDB$ENTRYPOINT.NULL)
PUT_TEXT(att_trig_entrypoint, X.RDB$ENTRYPOINT);
put(tdgbl, att_end); put(tdgbl, att_end);
END_FOR; END_FOR;

View File

@ -114,7 +114,8 @@ enum rec_type {
rec_charset, // Character sets rec_charset, // Character sets
rec_collation, // Collations rec_collation, // Collations
rec_sql_roles, // SQL roles rec_sql_roles, // SQL roles
rec_mapping // Mapping of security names rec_mapping, // Mapping of security names
rec_package // Package
}; };
@ -387,6 +388,9 @@ enum att_type {
att_trig_flags, att_trig_flags,
att_trig_valid_blr, att_trig_valid_blr,
att_trig_debug_info, att_trig_debug_info,
att_trig_engine_name,
att_trig_entrypoint,
att_trig_type2,
// Function attributes // Function attributes
@ -399,6 +403,9 @@ enum att_type {
att_function_query_name, att_function_query_name,
att_function_type, att_function_type,
att_function_description2, att_function_description2,
att_function_engine_name,
att_function_package_name,
att_function_private_flag,
// Function argument attributes // Function argument attributes
@ -411,6 +418,7 @@ enum att_type {
att_functionarg_field_sub_type, att_functionarg_field_sub_type,
att_functionarg_character_set, att_functionarg_character_set,
att_functionarg_field_precision, att_functionarg_field_precision,
att_functionarg_package_name,
// TYPE relation attributes // TYPE relation attributes
att_type_name = SERIES, att_type_name = SERIES,
@ -474,6 +482,10 @@ enum att_type {
att_procedure_type, att_procedure_type,
att_procedure_valid_blr, att_procedure_valid_blr,
att_procedure_debug_info, att_procedure_debug_info,
att_procedure_engine_name,
att_procedure_entrypoint,
att_procedure_package_name,
att_procedure_private_flag,
// Stored procedure parameter attributes // Stored procedure parameter attributes
@ -551,7 +563,15 @@ enum att_type {
att_map_os = SERIES, att_map_os = SERIES,
att_map_user, att_map_user,
att_map_role, att_map_role,
att_auto_map_role att_auto_map_role,
// Package attributes
att_package_name = SERIES,
att_package_header_source,
att_package_body_source,
att_package_security_class,
att_package_owner_name,
att_package_description
}; };
@ -655,12 +675,21 @@ enum burp_rel_flags_vals {
REL_external = 2 REL_external = 2
}; };
// package definition
struct burp_pkg
{
burp_pkg* pkg_next;
GDS_NAME pkg_name;
GDS_NAME pkg_owner;
};
// procedure definition - holds useful procedure type stuff // procedure definition - holds useful procedure type stuff
struct burp_prc struct burp_prc
{ {
burp_prc* prc_next; burp_prc* prc_next;
//SSHORT prc_name_length; // Currently useless, but didn't want to delete it. //SSHORT prc_name_length; // Currently useless, but didn't want to delete it.
GDS_NAME prc_package;
GDS_NAME prc_name; GDS_NAME prc_name;
GDS_NAME prc_owner; // relation owner, if not us GDS_NAME prc_owner; // relation owner, if not us
}; };
@ -866,6 +895,7 @@ public:
UCHAR* io_ptr; UCHAR* io_ptr;
int io_cnt; int io_cnt;
burp_rel* relations; burp_rel* relations;
burp_pkg* packages;
burp_prc* procedures; burp_prc* procedures;
SLONG BCK_capabilities; SLONG BCK_capabilities;
// Format of the backup being read on restore; gbak always creates it using the latest version // Format of the backup being read on restore; gbak always creates it using the latest version
@ -922,6 +952,7 @@ public:
isc_req_handle handles_get_index_req_handle2; isc_req_handle handles_get_index_req_handle2;
isc_req_handle handles_get_index_req_handle3; isc_req_handle handles_get_index_req_handle3;
isc_req_handle handles_get_index_req_handle4; isc_req_handle handles_get_index_req_handle4;
isc_req_handle handles_get_package_req_handle1;
isc_req_handle handles_get_procedure_prm_req_handle1; isc_req_handle handles_get_procedure_prm_req_handle1;
isc_req_handle handles_get_procedure_req_handle1; isc_req_handle handles_get_procedure_req_handle1;
isc_req_handle handles_get_ranges_req_handle1; isc_req_handle handles_get_ranges_req_handle1;

View File

@ -52,6 +52,7 @@
#include "../common/classes/ClumpletWriter.h" #include "../common/classes/ClumpletWriter.h"
#include "../common/classes/UserBlob.h" #include "../common/classes/UserBlob.h"
#include "../common/classes/SafeArg.h" #include "../common/classes/SafeArg.h"
#include "../common/utils_proto.h"
#include "memory_routines.h" #include "memory_routines.h"
using MsgFormat::SafeArg; using MsgFormat::SafeArg;
@ -81,6 +82,7 @@ const int DB_VERSION_DDL10 = 100; // ods10 db, IB6, FB1, FB1.5
const int DB_VERSION_DDL11 = 110; // ods11 db, FB2 const int DB_VERSION_DDL11 = 110; // ods11 db, FB2
const int DB_VERSION_DDL11_1 = 111; // ods11.1 db, FB2.1 const int DB_VERSION_DDL11_1 = 111; // ods11.1 db, FB2.1
const int DB_VERSION_DDL11_2 = 112; // ods11.2 db, FB2.5 const int DB_VERSION_DDL11_2 = 112; // ods11.2 db, FB2.5
const int DB_VERSION_DDL12_0 = 120; // ods12.0 db, FB3.0
const int DB_VERSION_OLDEST_SUPPORTED = DB_VERSION_DDL8; // IB4.0 is ods8 const int DB_VERSION_OLDEST_SUPPORTED = DB_VERSION_DDL8; // IB4.0 is ods8
@ -137,8 +139,9 @@ bool get_index(BurpGlobals* tdgbl, const burp_rel*);
void get_misc_blob(BurpGlobals* tdgbl, ISC_QUAD&, bool); void get_misc_blob(BurpGlobals* tdgbl, ISC_QUAD&, bool);
SLONG get_numeric(BurpGlobals* tdgbl); SLONG get_numeric(BurpGlobals* tdgbl);
SINT64 get_int64(BurpGlobals* tdgbl); SINT64 get_int64(BurpGlobals* tdgbl);
bool get_package(BurpGlobals* tdgbl);
bool get_procedure(BurpGlobals* tdgbl); bool get_procedure(BurpGlobals* tdgbl);
bool get_procedure_prm (BurpGlobals* tdgbl, GDS_NAME ); bool get_procedure_prm (BurpGlobals* tdgbl, GDS_NAME, GDS_NAME);
bool get_ref_constraint(BurpGlobals* tdgbl); bool get_ref_constraint(BurpGlobals* tdgbl);
bool get_rel_constraint(BurpGlobals* tdgbl); bool get_rel_constraint(BurpGlobals* tdgbl);
bool get_relation(BurpGlobals* tdgbl); bool get_relation(BurpGlobals* tdgbl);
@ -258,7 +261,7 @@ int RESTORE_restore (const TEXT* file_name, const TEXT* database_name)
* *
**************************************/ **************************************/
isc_req_handle req_handle1 = 0, req_handle2 = 0, req_handle3 = 0; isc_req_handle req_handle1 = 0, req_handle2 = 0, req_handle3 = 0;
isc_req_handle req_handle4 = 0, req_handle5 = 0; isc_req_handle req_handle4 = 0, req_handle5 = 0, req_handle6 = 0;
BASED_ON RDB$INDICES.RDB$INDEX_NAME index_name; BASED_ON RDB$INDICES.RDB$INDEX_NAME index_name;
BurpGlobals* tdgbl = BurpGlobals::getSpecific(); BurpGlobals* tdgbl = BurpGlobals::getSpecific();
@ -267,6 +270,7 @@ int RESTORE_restore (const TEXT* file_name, const TEXT* database_name)
tdgbl->io_cnt = 0; tdgbl->io_cnt = 0;
tdgbl->relations = NULL; tdgbl->relations = NULL;
tdgbl->packages = NULL;
tdgbl->procedures = NULL; tdgbl->procedures = NULL;
tdgbl->RESTORE_format = 0; tdgbl->RESTORE_format = 0;
tdgbl->RESTORE_ods = 0; tdgbl->RESTORE_ods = 0;
@ -482,15 +486,68 @@ int RESTORE_restore (const TEXT* file_name, const TEXT* database_name)
// //
update_view_dbkey_lengths(tdgbl); update_view_dbkey_lengths(tdgbl);
// Change ownership of any procedures necessary // Change ownership of any packages
for (burp_pkg* package = tdgbl->packages; package; package = package->pkg_next)
{
if (package->pkg_owner[0])
{
FOR (REQUEST_HANDLE req_handle6)
X IN RDB$PACKAGES
WITH X.RDB$PACKAGE_NAME EQ package->pkg_name
{
MODIFY X
strcpy(X.RDB$OWNER_NAME, package->pkg_owner);
END_MODIFY;
ON_ERROR
MISC_release_request_silent(req_handle6);
general_on_error();
END_ERROR;
if (!X.RDB$SECURITY_CLASS.NULL)
restore_security_class(tdgbl, package->pkg_owner, X.RDB$SECURITY_CLASS);
}
END_FOR
ON_ERROR
MISC_release_request_silent(req_handle6);
general_on_error ();
END_ERROR
}
}
// Change ownership of any procedures necessary
for (burp_prc* procedure = tdgbl->procedures; procedure; procedure = procedure->prc_next) for (burp_prc* procedure = tdgbl->procedures; procedure; procedure = procedure->prc_next)
{ {
if (procedure->prc_owner[0]) if (procedure->prc_owner[0])
{
if (tdgbl->RESTORE_ods >= DB_VERSION_DDL12_0)
{
FOR (REQUEST_HANDLE req_handle4)
X IN RDB$PROCEDURES
WITH X.RDB$PROCEDURE_NAME EQ procedure->prc_name AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(procedure->prc_package, '')
{
MODIFY X
strcpy (X.RDB$OWNER_NAME, procedure->prc_owner);
END_MODIFY;
ON_ERROR
MISC_release_request_silent(req_handle4);
general_on_error ();
END_ERROR
if (!X.RDB$SECURITY_CLASS.NULL)
restore_security_class(tdgbl, procedure->prc_owner, X.RDB$SECURITY_CLASS);
}
END_FOR;
ON_ERROR
MISC_release_request_silent(req_handle4);
general_on_error ();
END_ERROR
}
else
{ {
FOR (REQUEST_HANDLE req_handle4) FOR (REQUEST_HANDLE req_handle4)
X IN RDB$PROCEDURES WITH X.RDB$PROCEDURE_NAME EQ procedure->prc_name X IN RDB$PROCEDURES WITH X.RDB$PROCEDURE_NAME EQ procedure->prc_name
{
MODIFY X MODIFY X
strcpy (X.RDB$OWNER_NAME, procedure->prc_owner); strcpy (X.RDB$OWNER_NAME, procedure->prc_owner);
END_MODIFY; END_MODIFY;
@ -500,12 +557,13 @@ int RESTORE_restore (const TEXT* file_name, const TEXT* database_name)
END_ERROR; END_ERROR;
restore_security_class(tdgbl, procedure->prc_owner, X.RDB$SECURITY_CLASS); restore_security_class(tdgbl, procedure->prc_owner, X.RDB$SECURITY_CLASS);
}
END_FOR; END_FOR
ON_ERROR ON_ERROR
MISC_release_request_silent(req_handle4); MISC_release_request_silent(req_handle4);
general_on_error (); general_on_error ();
END_ERROR; END_ERROR
}
} }
} }
@ -847,6 +905,7 @@ void check_db_version(BurpGlobals* tdgbl)
{"RDB$ROLES", "RDB$DESCRIPTION", DB_VERSION_DDL11}, // FB2 {"RDB$ROLES", "RDB$DESCRIPTION", DB_VERSION_DDL11}, // FB2
{"RDB$RELATIONS", "RDB$RELATION_TYPE", DB_VERSION_DDL11_1}, // FB2.1 {"RDB$RELATIONS", "RDB$RELATION_TYPE", DB_VERSION_DDL11_1}, // FB2.1
{"RDB$PROCEDURE_PARAMETERS", "RDB$FIELD_NAME", DB_VERSION_DDL11_2}, // FB2.5 {"RDB$PROCEDURE_PARAMETERS", "RDB$FIELD_NAME", DB_VERSION_DDL11_2}, // FB2.5
{"RDB$PROCEDURES", "RDB$ENGINE_NAME", DB_VERSION_DDL12_0}, // FB3.0
{0, 0, 0} {0, 0, 0}
}; };
@ -3523,13 +3582,111 @@ bool get_function(BurpGlobals* tdgbl)
* *
**************************************/ **************************************/
att_type attribute; att_type attribute;
GDS_NAME function_name; ///GDS_NAME function_name;
TEXT temp[GDS_NAME_LEN]; TEXT temp[GDS_NAME_LEN * 2];
SSHORT l; SSHORT l;
scan_attr_t scan_next_attr; scan_attr_t scan_next_attr;
bool existFlag = false; bool existFlag = false;
if (tdgbl->RESTORE_ods >= DB_VERSION_DDL12_0)
{
STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
X IN RDB$FUNCTIONS
X.RDB$SYSTEM_FLAG = 0;
X.RDB$SYSTEM_FLAG.NULL = FALSE;
X.RDB$DESCRIPTION.NULL = TRUE;
X.RDB$ENGINE_NAME.NULL = TRUE;
X.RDB$PACKAGE_NAME.NULL = TRUE;
X.RDB$PRIVATE_FLAG.NULL = TRUE;
skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
{
switch (attribute)
{
case att_function_name:
{
SSHORT prefixLen = 0;
if (!X.RDB$PACKAGE_NAME.NULL)
{
prefixLen = strlen(X.RDB$PACKAGE_NAME);
memcpy(temp, X.RDB$PACKAGE_NAME, prefixLen);
temp[prefixLen++] = '.';
}
l = GET_TEXT(X.RDB$FUNCTION_NAME);
MISC_terminate (X.RDB$FUNCTION_NAME, temp + prefixLen, l,
sizeof(temp) - prefixLen);
BURP_verbose (118, temp);
// msg 118 restoring function %s
break;
}
case att_function_description:
X.RDB$DESCRIPTION.NULL = FALSE;
get_misc_blob (tdgbl, X.RDB$DESCRIPTION, false);
break;
case att_function_description2:
X.RDB$DESCRIPTION.NULL = FALSE;
get_source_blob (tdgbl, X.RDB$DESCRIPTION, false);
break;
case att_function_module_name:
GET_TEXT(X.RDB$MODULE_NAME);
break;
case att_function_entrypoint:
GET_TEXT(X.RDB$ENTRYPOINT);
break;
case att_function_return_arg:
X.RDB$RETURN_ARGUMENT = (USHORT) get_numeric(tdgbl);
break;
case att_function_query_name:
GET_TEXT(X.RDB$QUERY_NAME);
break;
case att_function_type:
X.RDB$FUNCTION_TYPE = (USHORT) get_numeric(tdgbl);
break;
case att_function_engine_name:
GET_TEXT(X.RDB$ENGINE_NAME);
X.RDB$ENGINE_NAME.NULL = FALSE;
break;
case att_function_package_name:
GET_TEXT(X.RDB$PACKAGE_NAME);
fb_utils::exact_name(X.RDB$PACKAGE_NAME);
X.RDB$PACKAGE_NAME.NULL = FALSE;
break;
case att_function_private_flag:
X.RDB$PRIVATE_FLAG = (USHORT) get_numeric(tdgbl);
X.RDB$PRIVATE_FLAG.NULL = FALSE;
break;
default:
bad_attribute (scan_next_attr, attribute, 89);
// msg 89 function
break;
}
}
///strcpy (function_name, X.RDB$FUNCTION_NAME);
END_STORE;
ON_ERROR
if (gds_status[1] != isc_no_dup)
general_on_error ();
else
existFlag = true;
END_ERROR;
}
else
{
STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1) STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1)
X IN RDB$FUNCTIONS X IN RDB$FUNCTIONS
X.RDB$SYSTEM_FLAG = 0; X.RDB$SYSTEM_FLAG = 0;
@ -3584,18 +3741,16 @@ bool get_function(BurpGlobals* tdgbl)
break; break;
} }
} }
strcpy (function_name, X.RDB$FUNCTION_NAME);
///strcpy (function_name, X.RDB$FUNCTION_NAME);
END_STORE; END_STORE;
ON_ERROR ON_ERROR
if (gds_status[1] != isc_no_dup) if (gds_status[1] != isc_no_dup)
{
general_on_error (); general_on_error ();
}
else else
{
existFlag = true; existFlag = true;
}
END_ERROR; END_ERROR;
}
// at the end of args for a function is the rec_function_end marker // at the end of args for a function is the rec_function_end marker
while (get(tdgbl) == rec_function_arg) while (get(tdgbl) == rec_function_arg)
@ -3618,7 +3773,7 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
**************************************/ **************************************/
att_type attribute; att_type attribute;
SSHORT l; SSHORT l;
TEXT temp[GDS_NAME_LEN]; TEXT temp[GDS_NAME_LEN * 2];
scan_attr_t scan_next_attr; scan_attr_t scan_next_attr;
if (skip_arguments) if (skip_arguments)
@ -3665,6 +3820,10 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
get_numeric(tdgbl); get_numeric(tdgbl);
break; break;
case att_functionarg_package_name:
GET_TEXT(buf);
break;
default: default:
bad_attribute (scan_next_attr, attribute, 90); bad_attribute (scan_next_attr, attribute, 90);
// msg 90 function argument // msg 90 function argument
@ -3674,7 +3833,97 @@ void get_function_arg(BurpGlobals* tdgbl, bool skip_arguments)
return; return;
} }
if (tdgbl->RESTORE_ods >= DB_VERSION_DDL10) if (tdgbl->RESTORE_ods >= DB_VERSION_DDL12_0)
{
// with RDB$FIELD_PRECISION
STORE (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;
X.RDB$FIELD_PRECISION.NULL = TRUE;
X.RDB$PACKAGE_NAME.NULL = TRUE;
skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
{
switch (attribute)
{
case att_functionarg_name:
{
SSHORT prefixLen = 0;
if (!X.RDB$PACKAGE_NAME.NULL)
{
prefixLen = strlen(X.RDB$PACKAGE_NAME);
memcpy(temp, X.RDB$PACKAGE_NAME, prefixLen);
temp[prefixLen++] = '.';
}
l = GET_TEXT(X.RDB$FUNCTION_NAME);
MISC_terminate(X.RDB$FUNCTION_NAME, temp + prefixLen, l,
sizeof(temp) - prefixLen);
BURP_verbose (119, temp);
// msg 119 restoring argument for function %s
break;
}
case att_functionarg_position:
X.RDB$ARGUMENT_POSITION = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_mechanism:
X.RDB$MECHANISM = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_field_type:
X.RDB$FIELD_TYPE = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_field_scale:
X.RDB$FIELD_SCALE = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_field_length:
X.RDB$FIELD_LENGTH = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_field_sub_type:
X.RDB$FIELD_SUB_TYPE.NULL = FALSE;
X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_character_set:
X.RDB$CHARACTER_SET_ID.NULL = FALSE;
X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(tdgbl);
break;
case att_functionarg_field_precision:
if (tdgbl->RESTORE_format >= 6)
{
X.RDB$FIELD_PRECISION.NULL = FALSE;
X.RDB$FIELD_PRECISION = (USHORT) get_numeric(tdgbl);
}
else
bad_attribute (scan_next_attr, attribute, 90);
break;
case att_functionarg_package_name:
l = GET_TEXT(X.RDB$PACKAGE_NAME);
X.RDB$PACKAGE_NAME.NULL = FALSE;
fb_utils::exact_name(X.RDB$PACKAGE_NAME);
break;
default:
bad_attribute (scan_next_attr, attribute, 90);
// msg 90 function argument
break;
}
}
END_STORE;
ON_ERROR
general_on_error ();
END_ERROR;
}
else if (tdgbl->RESTORE_ods >= DB_VERSION_DDL10)
{ {
// with RDB$FIELD_PRECISION // with RDB$FIELD_PRECISION
STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1) STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1)
@ -4859,6 +5108,91 @@ SINT64 get_int64(BurpGlobals* tdgbl)
return isc_portable_integer ((UCHAR *) value, length); return isc_portable_integer ((UCHAR *) value, length);
} }
bool get_package(BurpGlobals* tdgbl)
{
/**************************************
*
* g e t _ p a c k a g e
*
**************************************
*
* Functional description
* Reconstruct a package.
*
**************************************/
att_type attribute;
TEXT temp[GDS_NAME_LEN];
SSHORT len;
scan_attr_t scan_next_attr;
isc_tr_handle local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;
burp_pkg* package = (burp_pkg*) BURP_alloc_zero(sizeof(burp_pkg));
package->pkg_next = tdgbl->packages;
tdgbl->packages = package;
STORE (TRANSACTION_HANDLE local_trans REQUEST_HANDLE tdgbl->handles_get_package_req_handle1)
X IN RDB$PACKAGES
{
X.RDB$PACKAGE_HEADER_SOURCE.NULL = TRUE;
X.RDB$PACKAGE_BODY_SOURCE.NULL = TRUE;
X.RDB$SECURITY_CLASS.NULL = TRUE;
X.RDB$OWNER_NAME.NULL = TRUE;
X.RDB$SYSTEM_FLAG = 0;
X.RDB$SYSTEM_FLAG.NULL = FALSE;
X.RDB$DESCRIPTION.NULL = TRUE;
skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
{
switch (attribute)
{
case att_package_name:
len = GET_TEXT(X.RDB$PACKAGE_NAME);
strcpy(package->pkg_name, X.RDB$PACKAGE_NAME);
MISC_terminate(X.RDB$PACKAGE_NAME, temp, len, sizeof(temp));
BURP_verbose(337, temp); // msg 337 restoring package %s
break;
case att_package_header_source:
get_source_blob(tdgbl, X.RDB$PACKAGE_HEADER_SOURCE, true);
X.RDB$PACKAGE_HEADER_SOURCE.NULL = FALSE;
break;
case att_package_body_source:
get_source_blob(tdgbl, X.RDB$PACKAGE_BODY_SOURCE, true);
X.RDB$PACKAGE_BODY_SOURCE.NULL = FALSE;
break;
case att_package_security_class:
GET_TEXT(X.RDB$SECURITY_CLASS);
if (strncmp(X.RDB$SECURITY_CLASS, SQL_SECCLASS_PREFIX, SQL_SECCLASS_PREFIX_LEN) != 0)
X.RDB$SECURITY_CLASS.NULL = FALSE;
break;
case att_package_owner_name:
GET_TEXT(package->pkg_owner);
break;
case att_package_description:
get_source_blob(tdgbl, X.RDB$DESCRIPTION, true);
X.RDB$DESCRIPTION.NULL = FALSE;
break;
default:
bad_attribute (scan_next_attr, attribute, 338); // msg 338 package
break;
}
}
}
END_STORE
ON_ERROR
general_on_error();
END_ERROR
return true;
}
bool get_procedure(BurpGlobals* tdgbl) bool get_procedure(BurpGlobals* tdgbl)
{ {
/************************************** /**************************************
@ -4875,8 +5209,9 @@ bool get_procedure(BurpGlobals* tdgbl)
* *
**************************************/ **************************************/
att_type attribute; att_type attribute;
GDS_NAME package_name = "";
GDS_NAME procedure_name = ""; GDS_NAME procedure_name = "";
TEXT temp[GDS_NAME_LEN]; TEXT temp[GDS_NAME_LEN * 2];
SSHORT l; SSHORT l;
scan_attr_t scan_next_attr; scan_attr_t scan_next_attr;
@ -4901,6 +5236,11 @@ bool get_procedure(BurpGlobals* tdgbl)
X.RDB$SYSTEM_FLAG.NULL = FALSE; X.RDB$SYSTEM_FLAG.NULL = FALSE;
X.RDB$VALID_BLR.NULL = TRUE; X.RDB$VALID_BLR.NULL = TRUE;
X.RDB$DEBUG_INFO.NULL = TRUE; X.RDB$DEBUG_INFO.NULL = TRUE;
X.RDB$PROCEDURE_BLR.NULL = TRUE;
X.RDB$ENGINE_NAME.NULL = TRUE;
X.RDB$ENTRYPOINT.NULL = TRUE;
X.RDB$PACKAGE_NAME.NULL = TRUE;
X.RDB$PRIVATE_FLAG.NULL = TRUE;
skip_init(&scan_next_attr); skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end) while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
@ -4908,13 +5248,25 @@ bool get_procedure(BurpGlobals* tdgbl)
switch (attribute) switch (attribute)
{ {
case att_procedure_name: case att_procedure_name:
{
SSHORT prefixLen = 0;
if (package_name[0])
{
prefixLen = strlen(package_name);
memcpy(temp, package_name, prefixLen);
temp[prefixLen++] = '.';
}
l = GET_TEXT(X.RDB$PROCEDURE_NAME); l = GET_TEXT(X.RDB$PROCEDURE_NAME);
//procedure->prc_name_length = l; //procedure->prc_name_length = l;
strcpy (procedure->prc_name, X.RDB$PROCEDURE_NAME); strcpy (procedure->prc_name, X.RDB$PROCEDURE_NAME);
MISC_terminate (X.RDB$PROCEDURE_NAME, temp, l, sizeof(temp));
MISC_terminate (X.RDB$PROCEDURE_NAME, temp + prefixLen, l,
sizeof(temp) - prefixLen);
BURP_verbose (195, temp); BURP_verbose (195, temp);
// msg 195 restoring stored procedure %s // msg 195 restoring stored procedure %s
break; break;
}
case att_procedure_description: case att_procedure_description:
get_misc_blob (tdgbl, X.RDB$DESCRIPTION, true); get_misc_blob (tdgbl, X.RDB$DESCRIPTION, true);
@ -4938,6 +5290,7 @@ bool get_procedure(BurpGlobals* tdgbl)
case att_procedure_blr: case att_procedure_blr:
get_blr_blob (tdgbl, X.RDB$PROCEDURE_BLR, true); get_blr_blob (tdgbl, X.RDB$PROCEDURE_BLR, true);
X.RDB$PROCEDURE_BLR.NULL = FALSE;
break; break;
case att_procedure_security_class: case att_procedure_security_class:
@ -4989,6 +5342,29 @@ bool get_procedure(BurpGlobals* tdgbl)
bad_attribute (scan_next_attr, attribute, 290); bad_attribute (scan_next_attr, attribute, 290);
break; break;
case att_procedure_engine_name:
GET_TEXT(X.RDB$ENGINE_NAME);
X.RDB$ENGINE_NAME.NULL = FALSE;
break;
case att_procedure_entrypoint:
GET_TEXT(X.RDB$ENTRYPOINT);
X.RDB$ENTRYPOINT.NULL = FALSE;
break;
case att_procedure_package_name:
GET_TEXT(X.RDB$PACKAGE_NAME);
X.RDB$PACKAGE_NAME.NULL = FALSE;
strcpy(procedure->prc_package, X.RDB$PACKAGE_NAME);
strcpy(package_name, X.RDB$PACKAGE_NAME);
fb_utils::exact_name(package_name);
break;
case att_procedure_private_flag:
X.RDB$PRIVATE_FLAG = (USHORT) get_numeric(tdgbl);
X.RDB$PRIVATE_FLAG.NULL = FALSE;
break;
default: default:
bad_attribute (scan_next_attr, attribute, 290); bad_attribute (scan_next_attr, attribute, 290);
// msg 290 procedure // msg 290 procedure
@ -5096,12 +5472,12 @@ bool get_procedure(BurpGlobals* tdgbl)
// at the end of prms for a procedure is the rec_procedure_end marker // at the end of prms for a procedure is the rec_procedure_end marker
while (get(tdgbl) == rec_procedure_prm) while (get(tdgbl) == rec_procedure_prm)
get_procedure_prm (tdgbl, procedure_name); get_procedure_prm (tdgbl, package_name, procedure_name);
return true; return true;
} }
bool get_procedure_prm (BurpGlobals* tdgbl, GDS_NAME procptr) bool get_procedure_prm (BurpGlobals* tdgbl, GDS_NAME package_name, GDS_NAME procptr)
{ {
/************************************** /**************************************
* *
@ -5131,6 +5507,14 @@ bool get_procedure_prm (BurpGlobals* tdgbl, GDS_NAME procptr)
strcpy(X.RDB$PROCEDURE_NAME, procptr); strcpy(X.RDB$PROCEDURE_NAME, procptr);
if (package_name[0])
{
strcpy(X.RDB$PACKAGE_NAME, package_name);
X.RDB$PACKAGE_NAME.NULL = FALSE;
}
else
X.RDB$PACKAGE_NAME.NULL = TRUE;
X.RDB$DESCRIPTION.NULL = TRUE; X.RDB$DESCRIPTION.NULL = TRUE;
X.RDB$DEFAULT_VALUE.NULL = TRUE; X.RDB$DEFAULT_VALUE.NULL = TRUE;
X.RDB$DEFAULT_SOURCE.NULL = TRUE; X.RDB$DEFAULT_SOURCE.NULL = TRUE;
@ -6474,6 +6858,8 @@ bool get_trigger(BurpGlobals* tdgbl)
X.RDB$FLAGS.NULL = TRUE; X.RDB$FLAGS.NULL = TRUE;
X.RDB$VALID_BLR.NULL = TRUE; X.RDB$VALID_BLR.NULL = TRUE;
X.RDB$DEBUG_INFO.NULL = TRUE; X.RDB$DEBUG_INFO.NULL = TRUE;
X.RDB$ENGINE_NAME.NULL = TRUE;
X.RDB$ENTRYPOINT.NULL = TRUE;
skip_init(&scan_next_attr); skip_init(&scan_next_attr);
while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end) while (skip_scan(&scan_next_attr), get_attribute(&attribute, tdgbl) != att_end)
@ -6484,6 +6870,10 @@ bool get_trigger(BurpGlobals* tdgbl)
X.RDB$TRIGGER_TYPE = (USHORT) get_numeric(tdgbl); X.RDB$TRIGGER_TYPE = (USHORT) get_numeric(tdgbl);
break; break;
case att_trig_type2:
X.RDB$TRIGGER_TYPE = get_int64(tdgbl);
break;
case att_trig_flags: case att_trig_flags:
X.RDB$FLAGS = (USHORT) get_numeric(tdgbl); X.RDB$FLAGS = (USHORT) get_numeric(tdgbl);
X.RDB$FLAGS.NULL = FALSE; X.RDB$FLAGS.NULL = FALSE;
@ -6559,6 +6949,16 @@ bool get_trigger(BurpGlobals* tdgbl)
bad_attribute (scan_next_attr, attribute, 134); bad_attribute (scan_next_attr, attribute, 134);
break; break;
case att_trig_engine_name:
GET_TEXT(X.RDB$ENGINE_NAME);
X.RDB$ENGINE_NAME.NULL = FALSE;
break;
case att_trig_entrypoint:
GET_TEXT(X.RDB$ENTRYPOINT);
X.RDB$ENTRYPOINT.NULL = FALSE;
break;
default: default:
bad_attribute (scan_next_attr, attribute, 134); bad_attribute (scan_next_attr, attribute, 134);
// msg 134 trigger // msg 134 trigger
@ -6942,10 +7342,22 @@ bool get_user_privilege(BurpGlobals* tdgbl)
bool exists = false; bool exists = false;
switch (object_type) switch (object_type)
{ {
case obj_package_header:
{
for (const burp_pkg* pkg = tdgbl->packages; pkg; pkg = pkg->pkg_next)
if (strcmp(pkg->pkg_name, relation_name) == 0)
{
exists = true;
local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;
break;
}
}
break;
case obj_procedure: case obj_procedure:
{ {
for (const burp_prc* proc = tdgbl->procedures; proc; proc = proc->prc_next) for (const burp_prc* proc = tdgbl->procedures; proc; proc = proc->prc_next)
if (!strcmp(proc->prc_name, relation_name)) if (!proc->prc_package[0] && strcmp(proc->prc_name, relation_name) == 0)
{ {
exists = true; exists = true;
local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;
@ -6957,7 +7369,7 @@ bool get_user_privilege(BurpGlobals* tdgbl)
case obj_relation: case obj_relation:
{ {
for (const burp_rel* rel = tdgbl->relations; rel; rel = rel->rel_next) for (const burp_rel* rel = tdgbl->relations; rel; rel = rel->rel_next)
if (!strcmp(rel->rel_name, relation_name)) if (strcmp(rel->rel_name, relation_name) == 0)
{ {
exists = true; exists = true;
if (rel->rel_flags & REL_view) if (rel->rel_flags & REL_view)
@ -7694,6 +8106,12 @@ bool restore(BurpGlobals* tdgbl,
flag = true; flag = true;
break; break;
case rec_package:
if (!get_package(tdgbl))
return false;
flag = true;
break;
case rec_procedure: case rec_procedure:
if (!get_procedure(tdgbl)) if (!get_procedure(tdgbl))
return false; return false;

View File

@ -76,9 +76,13 @@ public:
size_t length() const { return count; } size_t length() const { return count; }
const char* c_str() const { return data; } const char* c_str() const { return data; }
const char* nullStr() const { return (count == 0 ? NULL : data); }
bool isEmpty() const { return count == 0; } bool isEmpty() const { return count == 0; }
bool hasData() const { return count != 0; } bool hasData() const { return count != 0; }
const char* begin() const { return data; }
const char* end() const { return data + count; }
int compare(const char* s, size_t l) const; int compare(const char* s, size_t l) const;
int compare(const char* s) const { return compare(s, s ? strlen(s) : 0); } int compare(const char* s) const { return compare(s, s ? strlen(s) : 0); }
int compare(const MetaName& m) const { return memcmp(data, m.data, MAX_SQL_IDENTIFIER_SIZE); } int compare(const MetaName& m) const { return memcmp(data, m.data, MAX_SQL_IDENTIFIER_SIZE); }

View File

@ -0,0 +1,97 @@
/*
* PROGRAM: Client/Server Common Code
* MODULE: QualifiedName.h
* DESCRIPTION: Qualified metadata name holder.
*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2009 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef COMMON_QUALIFIEDNAME_H
#define COMMON_QUALIFIEDNAME_H
#include "MetaName.h"
#include "array.h"
namespace Firebird {
class QualifiedName
{
public:
QualifiedName(MemoryPool& p, const MetaName& aIdentifier, const MetaName& aQualifier)
: identifier(p, aIdentifier),
qualifier(p, aQualifier)
{
}
QualifiedName(const MetaName& aIdentifier, const MetaName& aQualifier)
: identifier(aIdentifier),
qualifier(aQualifier)
{
}
QualifiedName(MemoryPool& p)
: identifier(p),
qualifier(p)
{
}
QualifiedName()
{
}
QualifiedName(MemoryPool& p, const QualifiedName& src)
: identifier(p, src.identifier),
qualifier(p, src.qualifier)
{
}
public:
bool operator >(const QualifiedName& m) const
{
return qualifier > m.qualifier || (qualifier == m.qualifier && identifier > m.identifier);
}
bool operator ==(const QualifiedName& m) const
{
return identifier == m.identifier && qualifier == m.qualifier;
}
public:
string toString() const
{
string s;
if (qualifier.hasData())
{
s = qualifier.c_str();
s.append(".");
}
s.append(identifier.c_str());
return s;
}
public:
MetaName identifier;
MetaName qualifier;
};
} // namespace Firebird
#endif // COMMON_QUALIFIEDNAME_H

View File

@ -32,6 +32,71 @@
#include "firebird.h" #include "firebird.h"
// Do not have constructor to allow usage in unions (used in the parser).
template <typename T> class TriStateRawType
{
public:
static TriStateRawType<T> val(const T& v)
{
TriStateRawType<T> triState;
triState.value = v;
triState.specified = true;
return triState;
}
static TriStateRawType<T> empty()
{
TriStateRawType<T> triState;
triState.value = (T) 0;
triState.specified = false;
return triState;
}
void operator =(const T& newValue)
{
value = newValue;
specified = true;
}
bool operator ==(const TriStateRawType<T>& o) const
{
return (!specified && !o.specified) || (specified == o.specified && value == o.value);
}
public:
T value;
bool specified;
};
template <typename T> class TriStateType : public TriStateRawType<T>
{
public:
TriStateType<T>(const T& v)
{
this->value = v;
this->specified = true;
}
TriStateType<T>(const TriStateType<T>& o)
{
this->value = o.value;
this->specified = o.specified;
}
TriStateType<T>()
{
this->value = 0;
this->specified = false;
}
public:
void operator =(const TriStateRawType<T>& o)
{
this->value = o.value;
this->specified = o.specified;
}
};
class TriState class TriState
{ {
public: public:

View File

@ -40,7 +40,7 @@ template <typename What>
class SimpleDelete class SimpleDelete
{ {
public: public:
static void clear(What *ptr) static void clear(What* ptr)
{ {
delete ptr; delete ptr;
} }

View File

@ -650,7 +650,8 @@ namespace Firebird
inline StringType& operator=(const StringType& v) inline StringType& operator=(const StringType& v)
{ {
fb_assert(&v != this); if (&v == this)
return *this;
return assign(v); return assign(v);
} }
inline StringType& operator=(const_pointer s) inline StringType& operator=(const_pointer s)

View File

@ -350,7 +350,9 @@ namespace Firebird
explicit SortedObjectsArray(MemoryPool& p) : explicit SortedObjectsArray(MemoryPool& p) :
ObjectsArray <ObjectValue, SortedArray<ObjectValue*, ObjectsArray <ObjectValue, SortedArray<ObjectValue*,
ObjectStorage, const ObjectKey*, ObjectKeyOfValue, ObjectStorage, const ObjectKey*, ObjectKeyOfValue,
ObjectCmp> >(p) { } ObjectCmp> >(p)
{ }
bool find(const ObjectKey& item, size_t& pos) const bool find(const ObjectKey& item, size_t& pos) const
{ {
const ObjectKey* const pItem = &item; const ObjectKey* const pItem = &item;
@ -358,11 +360,13 @@ namespace Firebird
ObjectStorage, const ObjectKey*, ObjectKeyOfValue, ObjectStorage, const ObjectKey*, ObjectKeyOfValue,
ObjectCmp>*>(this)->find(pItem, pos); ObjectCmp>*>(this)->find(pItem, pos);
} }
bool exist(const ObjectKey& item) const bool exist(const ObjectKey& item) const
{ {
size_t pos; size_t pos; // ignored
return find(item, pos); return find(item, pos);
} }
size_t add(const ObjectValue& item) size_t add(const ObjectValue& item)
{ {
return inherited::add(item); return inherited::add(item);

View File

@ -265,12 +265,23 @@ namespace Firebird {
class ReadLockGuard class ReadLockGuard
{ {
public: public:
ReadLockGuard(RWLock &alock) ReadLockGuard(RWLock& alock)
: lock(&alock) : lock(&alock)
{ {
lock->beginRead(); lock->beginRead();
} }
~ReadLockGuard() { release(); }
ReadLockGuard(RWLock* alock)
: lock(alock)
{
if (lock)
lock->beginRead();
}
~ReadLockGuard()
{
release();
}
void release() void release()
{ {
@ -284,19 +295,30 @@ public:
private: private:
// Forbid copy constructor // Forbid copy constructor
ReadLockGuard(const ReadLockGuard& source); ReadLockGuard(const ReadLockGuard& source);
RWLock *lock; RWLock* lock;
}; };
// RAII holder of write lock // RAII holder of write lock
class WriteLockGuard class WriteLockGuard
{ {
public: public:
WriteLockGuard(RWLock &alock) WriteLockGuard(RWLock& alock)
: lock(&alock) : lock(&alock)
{ {
lock->beginWrite(); lock->beginWrite();
} }
~WriteLockGuard() { release(); }
WriteLockGuard(RWLock* alock)
: lock(alock)
{
if (lock)
lock->beginWrite();
}
~WriteLockGuard()
{
release();
}
void release() void release()
{ {
@ -310,10 +332,9 @@ public:
private: private:
// Forbid copy constructor // Forbid copy constructor
WriteLockGuard(const WriteLockGuard& source); WriteLockGuard(const WriteLockGuard& source);
RWLock *lock; RWLock* lock;
}; };
} // namespace Firebird } // namespace Firebird
#endif // #ifndef CLASSES_RWLOCK_H #endif // #ifndef CLASSES_RWLOCK_H

View File

@ -180,6 +180,25 @@ namespace Firebird {
} }
} }
// Push a element on the stack and pop when we go out of scope.
class AutoPushPop
{
public:
AutoPushPop(Stack<Object, Capacity>& s, Object& o)
: stack(s)
{
stack.push(o);
}
~AutoPushPop()
{
stack.pop();
}
private:
Stack<Object, Capacity>& stack;
};
class iterator; class iterator;
friend class iterator; friend class iterator;

View File

@ -271,7 +271,10 @@ Firebird::string ConfObject::expand(const char* rawValue)
if (!changed) if (!changed)
return temp; return temp;
return PathName::expandFilename (temp); // ASF: Do not try to expand relative filenames. It seems better to use $(this), or if necessary
// a new expansion variable. Also, this function is bugged and is returning incorrect values.
// return PathName::expandFilename (temp);
return temp;
} }
Firebird::string ConfObject::getValue(const char* attributeName) Firebird::string ConfObject::getValue(const char* attributeName)

View File

@ -46,6 +46,10 @@ define trigger grant_trigger for rdb$user_privileges pre store 0
not any prc in rdb$procedures not any prc in rdb$procedures
with prc.rdb$procedure_name eq new.rdb$relation_name with prc.rdb$procedure_name eq new.rdb$relation_name
abort 0; abort 0;
if new.rdb$object_type = 18 /* obj_package_header */ and
not any pkg in rdb$packages
with pkg.rdb$package_name eq new.rdb$relation_name
abort 0;
if new.rdb$user_type = 0 or new.rdb$user_type = 3 or if new.rdb$user_type = 0 or new.rdb$user_type = 3 or
new.rdb$user_type = 4 or new.rdb$user_type = 6 or new.rdb$user_type = 4 or new.rdb$user_type = 6 or
@ -177,6 +181,28 @@ define trigger grant_trigger for rdb$user_privileges pre store 0
else if prc.rdb$security_class not starting "SQL$" else if prc.rdb$security_class not starting "SQL$"
abort 3; abort 3;
end_for; end_for;
else if new.rdb$object_type = 18 /* obj_package_header */
for pkg in rdb$packages
with pkg.rdb$package_name eq new.rdb$relation_name
if pkg.rdb$owner_name ne UPPERCASE (rdb$user_name)
and UPPERCASE (rdb$user_name) ne "SYSDBA"
if not any priv in rdb$user_privileges
with priv.rdb$relation_name eq new.rdb$relation_name and
priv.rdb$object_type eq 18 and
priv.rdb$privilege eq new.rdb$privilege and
priv.rdb$user eq new.rdb$grantor and
priv.rdb$user_type eq 8 and
priv.rdb$grant_option ne 0 and
(priv.rdb$field_name missing or
priv.rdb$field_name eq new.rdb$field_name)
abort 2;
if pkg.rdb$security_class missing
modify pkg
pkg.rdb$security_class = "SQL$" | gen_id (RDB$SECURITY_CLASS, 1);
end_modify
else if pkg.rdb$security_class not starting "SQL$"
abort 3;
end_for;
end; end;
end_trigger; end_trigger;

File diff suppressed because it is too large Load Diff

View File

@ -25,18 +25,88 @@
#include "../jrd/common.h" #include "../jrd/common.h"
#include "../dsql/Nodes.h" #include "../dsql/Nodes.h"
#include "../common/classes/array.h"
#include "../common/classes/TriState.h"
namespace Jrd { namespace Jrd {
class ExternalClause
{
public:
explicit ExternalClause(MemoryPool& pool)
: name(pool),
engine(pool)
{
}
public:
Firebird::string name;
Firebird::MetaName engine;
};
class TypeClause
{
public:
explicit TypeClause(dsql_fld* aField, dsql_str* aCollate);
virtual ~TypeClause() {}
public:
void resolve(CompiledStatement* compiledStatement);
public:
virtual void print(Firebird::string& text) const;
public:
USHORT type;
FLD_LENGTH length;
SSHORT scale;
SSHORT subType;
USHORT segLength;
USHORT precision;
USHORT charLength;
SSHORT charSetId;
SSHORT collationId;
SSHORT textType;
bool collateSpecified;
bool fullDomain;
bool notNull;
Firebird::MetaName fieldSource;
Firebird::MetaName typeOfTable;
Firebird::MetaName typeOfName;
public:
dsql_fld* legacyField;
dsql_str* legacyCollate;
};
class ParameterClause : public TypeClause
{
public:
explicit ParameterClause(dsql_fld* field, dsql_str* collate, dsql_nod* dflt);
public:
void print(Firebird::string& text) const;
public:
static void fromLegacyParameterList(Firebird::Array<ParameterClause>& parameters, dsql_nod* list);
public:
Firebird::MetaName name;
dsql_nod* legacyDefault;
};
class AlterCharSetNode : public DdlNode class AlterCharSetNode : public DdlNode
{ {
public: public:
explicit AlterCharSetNode(MemoryPool& pool, const Firebird::MetaName& aCharSet, explicit AlterCharSetNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aDefaultCollation) const Firebird::MetaName& aCharSet, const Firebird::MetaName& aDefaultCollation)
: DdlNode(pool), : DdlNode(pool, sqlText),
charSet(getPool(), aCharSet), charSet(pool, aCharSet),
defaultCollation(getPool(), aDefaultCollation) defaultCollation(pool, aDefaultCollation)
{ {
} }
@ -50,6 +120,394 @@ private:
}; };
class CommentOnNode : public DdlNode
{
public:
explicit CommentOnNode(MemoryPool& pool, const Firebird::string& sqlText, int aObjType,
const Firebird::MetaName& aObjName, const Firebird::MetaName& aSubName,
const Firebird::string& aText)
: DdlNode(pool, sqlText),
objType(aObjType),
objName(pool, aObjName),
subName(pool, aSubName),
text(pool, aText)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
private:
int objType;
Firebird::MetaName objName;
Firebird::MetaName subName;
Firebird::string text;
};
class CreateAlterFunctionNode : public DdlNode
{
public:
explicit CreateAlterFunctionNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName, const TypeClause& aReturnType)
: DdlNode(pool, sqlText),
name(pool, aName),
returnType(aReturnType),
create(true),
alter(false),
external(NULL),
parameters(pool),
package(pool),
privateScope(false),
source(pool)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
private:
void executeCreate(thread_db* tdbb, jrd_tra* transaction);
bool executeAlter(thread_db* tdbb, jrd_tra* transaction);
void storeArgument(thread_db* tdbb, jrd_tra* transaction,
unsigned pos, const TypeClause& parameter, dsql_nod* legacyDefault);
public:
Firebird::MetaName name;
TypeClause returnType;
bool create;
bool alter;
ExternalClause* external;
Firebird::Array<ParameterClause> parameters;
Firebird::MetaName package;
bool privateScope;
Firebird::string source;
};
class DropFunctionNode : public DdlNode
{
public:
explicit DropFunctionNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName),
silent(false),
package(pool)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
public:
Firebird::MetaName name;
bool silent;
Firebird::MetaName package;
};
class CreateAlterProcedureNode;
class ProcedureNode : public DdlNode, public BlockNode
{
public:
explicit ProcedureNode(MemoryPool& p, const Firebird::string& sqlText)
: DdlNode(p, sqlText)
{
}
public:
virtual void genReturn();
virtual dsql_nod* resolveVariable(const dsql_str* varName);
protected:
virtual CreateAlterProcedureNode* getCreateAlterNode() = 0;
};
class CreateAlterProcedureNode : public ProcedureNode
{
public:
explicit CreateAlterProcedureNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: ProcedureNode(pool, sqlText),
name(pool, aName),
create(true),
alter(false),
external(NULL),
parameters(pool),
returns(pool),
legacyParameters(NULL),
legacyReturns(NULL),
source(pool),
localDeclList(NULL),
body(NULL),
compiled(false),
invalid(false),
package(pool),
packageOwner(pool),
privateScope(false)
{
}
protected:
virtual CreateAlterProcedureNode* getCreateAlterNode()
{
return this;
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
void executeCreate(thread_db* tdbb, jrd_tra* transaction);
bool executeAlter(thread_db* tdbb, jrd_tra* transaction, bool secondPass, bool runTriggers);
void storeParameter(thread_db* tdbb, jrd_tra* transaction,
USHORT type, unsigned pos, const ParameterClause& parameter);
void compile(thread_db* tdbb, jrd_tra* transaction);
public:
Firebird::MetaName name;
bool create;
bool alter;
ExternalClause* external;
Firebird::Array<ParameterClause> parameters;
Firebird::Array<ParameterClause> returns;
dsql_nod* legacyParameters;
dsql_nod* legacyReturns;
Firebird::string source;
dsql_nod* localDeclList;
dsql_nod* body;
bool compiled;
bool invalid;
Firebird::MetaName package;
Firebird::string packageOwner;
bool privateScope;
};
class DropProcedureNode : public DdlNode
{
public:
explicit DropProcedureNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName),
silent(false),
package(pool)
{
}
public:
static void dropParameters(thread_db* tdbb, jrd_tra* transaction,
const Firebird::MetaName& procedureName, const Firebird::MetaName& packageName);
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
public:
Firebird::MetaName name;
bool silent;
Firebird::MetaName package;
};
class RecreateProcedureNode : public ProcedureNode
{
public:
explicit RecreateProcedureNode(MemoryPool& p, const Firebird::string& sqlText,
CreateAlterProcedureNode* aCreateNode)
: ProcedureNode(p, sqlText),
createNode(aCreateNode),
dropNode(p, sqlText, createNode->name)
{
dropNode.silent = true;
}
protected:
virtual CreateAlterProcedureNode* getCreateAlterNode()
{
return createNode;
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
CreateAlterProcedureNode* createNode;
DropProcedureNode dropNode;
};
class CreateAlterTriggerNode;
class TriggerNode : public DdlNode, public BlockNode
{
public:
explicit TriggerNode(MemoryPool& p, const Firebird::string& sqlText)
: DdlNode(p, sqlText)
{
}
public:
virtual void genReturn()
{
fb_assert(false);
}
virtual dsql_nod* resolveVariable(const dsql_str* varName);
protected:
virtual CreateAlterTriggerNode* getCreateAlterNode() = 0;
};
class CreateAlterTriggerNode : public TriggerNode
{
public:
explicit CreateAlterTriggerNode(MemoryPool& p, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: TriggerNode(p, sqlText),
name(p, aName),
create(true),
alter(false),
relationName(p),
external(NULL),
source(p),
localDeclList(NULL),
body(NULL),
compiled(false),
invalid(false)
{
}
protected:
virtual CreateAlterTriggerNode* getCreateAlterNode()
{
return this;
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
void executeCreate(thread_db* tdbb, jrd_tra* transaction);
bool executeAlter(thread_db* tdbb, jrd_tra* transaction, bool runTriggers);
void compile(thread_db* tdbb, jrd_tra* transaction);
static inline bool hasOldContext(const unsigned value)
{
const unsigned val1 = ((value + 1) >> 1) & 3;
const unsigned val2 = ((value + 1) >> 3) & 3;
const unsigned val3 = ((value + 1) >> 5) & 3;
return (val1 && val1 != 1) || (val2 && val2 != 1) || (val3 && val3 != 1);
}
static inline bool hasNewContext(const unsigned value)
{
const unsigned val1 = ((value + 1) >> 1) & 3;
const unsigned val2 = ((value + 1) >> 3) & 3;
const unsigned val3 = ((value + 1) >> 5) & 3;
return (val1 && val1 != 3) || (val2 && val2 != 3) || (val3 && val3 != 3);
}
public:
Firebird::MetaName name;
bool create;
bool alter;
Firebird::MetaName relationName;
TriStateType<FB_UINT64> type;
TriStateType<bool> active;
TriStateType<int> position;
ExternalClause* external;
Firebird::string source;
dsql_nod* localDeclList;
dsql_nod* body;
bool compiled;
bool invalid;
};
class DropTriggerNode : public DdlNode
{
public:
explicit DropTriggerNode(MemoryPool& p, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(p, sqlText),
name(p, aName),
silent(false)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
public:
Firebird::MetaName name;
bool silent;
};
class RecreateTriggerNode : public TriggerNode
{
public:
explicit RecreateTriggerNode(MemoryPool& p, const Firebird::string& sqlText,
CreateAlterTriggerNode* aCreateNode)
: TriggerNode(p, sqlText),
createNode(aCreateNode),
dropNode(p, sqlText, createNode->name)
{
dropNode.silent = true;
}
protected:
virtual CreateAlterTriggerNode* getCreateAlterNode()
{
return createNode;
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
CreateAlterTriggerNode* createNode;
DropTriggerNode dropNode;
};
} // namespace } // namespace
#endif // DSQL_DDL_NODES_H #endif // DSQL_DDL_NODES_H

View File

@ -29,6 +29,7 @@
namespace Jrd { namespace Jrd {
class CompilerScratch; class CompilerScratch;
class TypeClause;
class Node : public Firebird::PermanentStorage class Node : public Firebird::PermanentStorage
@ -48,14 +49,14 @@ public:
Node* dsqlPass(CompiledStatement* aCompiledStatement) Node* dsqlPass(CompiledStatement* aCompiledStatement)
{ {
compiledStatement = aCompiledStatement; compiledStatement = aCompiledStatement;
return dsqlPass(); return internalDsqlPass();
} }
public: public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const = 0; virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const = 0;
protected: protected:
virtual Node* dsqlPass() virtual Node* internalDsqlPass()
{ {
return this; return this;
} }
@ -68,13 +69,41 @@ protected:
class DdlNode : public Node class DdlNode : public Node
{ {
public: public:
explicit DdlNode(MemoryPool& pool) explicit DdlNode(MemoryPool& pool, const Firebird::string& aSqlText)
: Node(pool) : Node(pool),
sqlText(pool, aSqlText)
{ {
} }
public:
const Firebird::string& getSqlText()
{
return sqlText;
}
public:
enum DdlTriggerWhen { DTW_BEFORE, DTW_AFTER };
static void executeDdlTrigger(thread_db* tdbb, jrd_tra* transaction,
DdlTriggerWhen when, int action, const Firebird::MetaName& objectName,
const Firebird::string& sqlText);
public:
static void checkEmptyName(const Firebird::MetaName& name);
static Firebird::MetaName nameInMetaCharSet(thread_db* tdbb, const Firebird::MetaName& name);
static Firebird::MetaName nameInUserCharSet(thread_db* tdbb, const Firebird::MetaName& name);
static void storeTextBlob(thread_db* tdbb, jrd_tra* transaction, bid* blobId,
const Firebird::string& text);
static void storeBlob(thread_db* tdbb, jrd_tra* transaction, bid* blobId,
const UCHAR* data, unsigned length);
protected: protected:
virtual Node* dsqlPass() void executeDdlTrigger(thread_db* tdbb, jrd_tra* transaction,
DdlTriggerWhen when, int action, const Firebird::MetaName& objectName);
void putType(const TypeClause& type, bool useSubType);
void resetContextStack();
protected:
virtual Node* internalDsqlPass()
{ {
compiledStatement->req_type = REQ_DDL; compiledStatement->req_type = REQ_DDL;
return this; return this;
@ -82,6 +111,9 @@ protected:
public: public:
virtual void execute(thread_db* tdbb, jrd_tra* transaction) = 0; virtual void execute(thread_db* tdbb, jrd_tra* transaction) = 0;
private:
Firebird::string sqlText;
}; };
@ -89,7 +121,8 @@ class DmlNode : public Node
{ {
public: public:
explicit DmlNode(MemoryPool& pool) explicit DmlNode(MemoryPool& pool)
: Node(pool) : Node(pool),
node(NULL)
{ {
} }
@ -117,6 +150,20 @@ public:
}; };
// Common node for all "code blocks" (i.e.: procedures, triggers and execute block)
class BlockNode
{
public:
virtual ~BlockNode()
{
}
public:
virtual void genReturn() = 0;
virtual dsql_nod* resolveVariable(const dsql_str* varName) = 0;
};
} // namespace } // namespace
#endif // DSQL_NODES_H #endif // DSQL_NODES_H

1140
src/dsql/PackageNodes.epp Normal file

File diff suppressed because it is too large Load Diff

230
src/dsql/PackageNodes.h Normal file
View File

@ -0,0 +1,230 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2009 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef DSQL_PACKAGE_NODES_H
#define DSQL_PACKAGE_NODES_H
#include "../jrd/common.h"
#include "../dsql/DdlNodes.h"
#include "../common/classes/array.h"
namespace Jrd {
class CreateAlterPackageNode : public DdlNode
{
public:
struct Item
{
static Item create(CreateAlterFunctionNode* function)
{
Item item;
item.type = FUNCTION;
item.function = function;
return item;
}
static Item create(CreateAlterProcedureNode* procedure)
{
Item item;
item.type = PROCEDURE;
item.procedure = procedure;
return item;
}
enum
{
FUNCTION,
PROCEDURE
} type;
union
{
CreateAlterFunctionNode* function;
CreateAlterProcedureNode* procedure;
};
};
public:
explicit CreateAlterPackageNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName),
create(true),
alter(false),
source(pool),
items(NULL),
functionNames(pool),
procedureNames(pool),
owner(pool)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
void executeCreate(thread_db* tdbb, jrd_tra* transaction);
bool executeAlter(thread_db* tdbb, jrd_tra* transaction);
public:
Firebird::MetaName name;
bool create;
bool alter;
Firebird::string source;
Firebird::Array<Item>* items;
Firebird::SortedArray<Firebird::MetaName> functionNames;
Firebird::SortedArray<Firebird::MetaName> procedureNames;
private:
Firebird::string owner;
};
class DropPackageNode : public DdlNode
{
public:
explicit DropPackageNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName),
silent(false)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
public:
Firebird::MetaName name;
bool silent;
};
class RecreatePackageNode : public DdlNode
{
public:
explicit RecreatePackageNode(MemoryPool& p, const Firebird::string& sqlText,
CreateAlterPackageNode* aCreateNode)
: DdlNode(p, sqlText),
createNode(aCreateNode),
dropNode(p, sqlText, createNode->name)
{
dropNode.silent = true;
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
CreateAlterPackageNode* createNode;
DropPackageNode dropNode;
};
class CreatePackageBodyNode : public DdlNode
{
public:
explicit CreatePackageBodyNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName),
source(pool),
declaredItems(NULL),
items(NULL),
owner(pool)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
public:
Firebird::MetaName name;
Firebird::string source;
Firebird::Array<CreateAlterPackageNode::Item>* declaredItems;
Firebird::Array<CreateAlterPackageNode::Item>* items;
private:
Firebird::string owner;
};
class DropPackageBodyNode : public DdlNode
{
public:
explicit DropPackageBodyNode(MemoryPool& pool, const Firebird::string& sqlText,
const Firebird::MetaName& aName)
: DdlNode(pool, sqlText),
name(pool, aName)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
public:
Firebird::MetaName name;
};
class RecreatePackageBodyNode : public DdlNode
{
public:
explicit RecreatePackageBodyNode(MemoryPool& p, const Firebird::string& sqlText,
CreatePackageBodyNode* aCreateNode)
: DdlNode(p, sqlText),
createNode(aCreateNode),
dropNode(p, sqlText, createNode->name)
{
}
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void execute(thread_db* tdbb, jrd_tra* transaction);
protected:
virtual Node* internalDsqlPass();
private:
CreatePackageBodyNode* createNode;
DropPackageBodyNode dropNode;
};
} // namespace
#endif // DSQL_PACKAGE_NODES_H

View File

@ -31,6 +31,7 @@ using namespace Jrd;
Parser::Parser(MemoryPool& pool, USHORT aClientDialect, USHORT aDbDialect, USHORT aParserVersion, Parser::Parser(MemoryPool& pool, USHORT aClientDialect, USHORT aDbDialect, USHORT aParserVersion,
const TEXT* string, USHORT length, SSHORT characterSet) const TEXT* string, USHORT length, SSHORT characterSet)
: PermanentStorage(pool), : PermanentStorage(pool),
compilingText(pool, string, length),
client_dialect(aClientDialect), client_dialect(aClientDialect),
db_dialect(aDbDialect), db_dialect(aDbDialect),
parser_version(aParserVersion), parser_version(aParserVersion),
@ -89,7 +90,7 @@ Parser::~Parser()
} }
Parser::YYSTYPE Parser::parse() dsql_nod* Parser::parse()
{ {
if (parseAux() != 0) if (parseAux() != 0)
return NULL; return NULL;

View File

@ -27,9 +27,14 @@
#include "../dsql/dsql.h" #include "../dsql/dsql.h"
#include "../dsql/node.h" #include "../dsql/node.h"
#include "../dsql/DdlNodes.h" #include "../dsql/DdlNodes.h"
#include "../dsql/PackageNodes.h"
#include "../dsql/StmtNodes.h" #include "../dsql/StmtNodes.h"
#include "../common/classes/TriState.h"
#include "../common/classes/stack.h" #include "../common/classes/stack.h"
#define _yacc_defines_keywords
#include "../dsql/dsql.tab.h"
namespace Jrd { namespace Jrd {
class dsql_nod; class dsql_nod;
@ -38,7 +43,6 @@ class Parser : public Firebird::PermanentStorage
{ {
private: private:
typedef int Yshort; typedef int Yshort;
typedef dsql_nod* YYSTYPE;
typedef int YYPOSN; // user-defined text position type typedef int YYPOSN; // user-defined text position type
struct yyparsestate struct yyparsestate
@ -64,7 +68,7 @@ private:
// This is, in fact, parser state. Not used in lexer itself // This is, in fact, parser state. Not used in lexer itself
dsql_fld* g_field; dsql_fld* g_field;
dsql_fil* g_file; dsql_fil* g_file;
YYSTYPE g_field_name; dsql_nod* g_field_name;
int dsql_debug; int dsql_debug;
// Actual lexer state begins from here // Actual lexer state begins from here
@ -101,7 +105,7 @@ public:
~Parser(); ~Parser();
public: public:
YYSTYPE parse(); dsql_nod* parse();
const Firebird::string& getTransformedString() const const Firebird::string& getTransformedString() const
{ {
@ -139,14 +143,15 @@ private:
void yyerror_detailed(const TEXT* error_string, int yychar, YYSTYPE&, YYPOSN&); void yyerror_detailed(const TEXT* error_string, int yychar, YYSTYPE&, YYPOSN&);
const TEXT* lex_position(); const TEXT* lex_position();
YYSTYPE make_list (YYSTYPE node); dsql_nod* make_list (dsql_nod* node);
YYSTYPE make_parameter(); dsql_nod* make_parameter();
YYSTYPE make_node(Dsql::nod_t type, int count, ...); dsql_nod* make_node(Dsql::nod_t type, int count, ...);
YYSTYPE makeClassNode(Node* node); dsql_nod* makeClassNode(Node* node);
YYSTYPE make_flag_node(Dsql::nod_t type, SSHORT flag, int count, ...); dsql_nod* make_flag_node(Dsql::nod_t type, SSHORT flag, int count, ...);
// end - defined in parse.y // end - defined in parse.y
private: private:
Firebird::string compilingText;
USHORT client_dialect; USHORT client_dialect;
USHORT db_dialect; USHORT db_dialect;
USHORT parser_version; USHORT parser_version;
@ -154,7 +159,7 @@ private:
Firebird::string transformedString; Firebird::string transformedString;
Firebird::Array<IntroducerMark> introducerMarks; Firebird::Array<IntroducerMark> introducerMarks;
bool stmt_ambiguous; bool stmt_ambiguous;
YYSTYPE DSQL_parse; dsql_nod* DSQL_parse;
// These value/posn are taken from the lexer // These value/posn are taken from the lexer
YYSTYPE yylval; YYSTYPE yylval;

View File

@ -21,6 +21,7 @@
#include "firebird.h" #include "firebird.h"
#include "../jrd/common.h" #include "../jrd/common.h"
#include "../dsql/StmtNodes.h" #include "../dsql/StmtNodes.h"
#include "../dsql/node.h"
#include "../jrd/jrd.h" #include "../jrd/jrd.h"
#include "../jrd/blr.h" #include "../jrd/blr.h"
#include "../jrd/exe.h" #include "../jrd/exe.h"
@ -29,10 +30,13 @@
#include "../jrd/exe_proto.h" #include "../jrd/exe_proto.h"
#include "../jrd/par_proto.h" #include "../jrd/par_proto.h"
#include "../jrd/tra_proto.h" #include "../jrd/tra_proto.h"
#include "../dsql/ddl_proto.h"
#include "../jrd/vio_proto.h" #include "../jrd/vio_proto.h"
#include "../dsql/gen_proto.h" #include "../dsql/gen_proto.h"
#include "../dsql/make_proto.h"
#include "../dsql/pass1_proto.h" #include "../dsql/pass1_proto.h"
using namespace Firebird;
using namespace Jrd; using namespace Jrd;
#include "gen/blrtable.h" #include "gen/blrtable.h"
@ -65,7 +69,7 @@ DmlNode* DmlNode::pass2(thread_db* tdbb, CompilerScratch* csb, jrd_nod* aNode)
//-------------------- //--------------------
RegisterNode<InAutonomousTransactionNode> regInAutonomousTransactionNode(blr_auto_trans); static RegisterNode<InAutonomousTransactionNode> regInAutonomousTransactionNode(blr_auto_trans);
DmlNode* InAutonomousTransactionNode::parse(thread_db* tdbb, MemoryPool& pool, DmlNode* InAutonomousTransactionNode::parse(thread_db* tdbb, MemoryPool& pool,
@ -82,7 +86,7 @@ DmlNode* InAutonomousTransactionNode::parse(thread_db* tdbb, MemoryPool& pool,
} }
InAutonomousTransactionNode* InAutonomousTransactionNode::dsqlPass() InAutonomousTransactionNode* InAutonomousTransactionNode::internalDsqlPass()
{ {
const bool autoTrans = compiledStatement->req_flags & REQ_in_auto_trans_block; const bool autoTrans = compiledStatement->req_flags & REQ_in_auto_trans_block;
compiledStatement->req_flags |= REQ_in_auto_trans_block; compiledStatement->req_flags |= REQ_in_auto_trans_block;
@ -98,8 +102,7 @@ InAutonomousTransactionNode* InAutonomousTransactionNode::dsqlPass()
} }
void InAutonomousTransactionNode::print(Firebird::string& text, void InAutonomousTransactionNode::print(string& text, Array<dsql_nod*>& nodes) const
Firebird::Array<dsql_nod*>& nodes) const
{ {
text = "in autonomous transaction"; text = "in autonomous transaction";
nodes.add(dsqlAction); nodes.add(dsqlAction);
@ -176,14 +179,14 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
} }
{ // scope { // scope
Firebird::AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest( AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest(
tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL); tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL);
TRA_commit(tdbb, transaction, false); TRA_commit(tdbb, transaction, false);
} // end scope } // end scope
break; break;
case jrd_req::req_unwind: case jrd_req::req_unwind:
if (request->req_flags & req_leave) if (request->req_flags & (req_leave | req_continue_loop))
{ {
try try
{ {
@ -201,13 +204,13 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
VIO_verb_cleanup(tdbb, transaction); VIO_verb_cleanup(tdbb, transaction);
} }
Firebird::AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest( AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest(
tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL); tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL);
TRA_commit(tdbb, transaction, false); TRA_commit(tdbb, transaction, false);
} }
catch (...) catch (...)
{ {
request->req_flags &= ~req_leave; request->req_flags &= ~(req_leave | req_continue_loop);
throw; throw;
} }
} }
@ -223,7 +226,7 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
EXE_execute_db_triggers(tdbb, transaction, EXE_execute_db_triggers(tdbb, transaction,
jrd_req::req_trigger_trans_rollback); jrd_req::req_trigger_trans_rollback);
} }
catch (const Firebird::Exception&) catch (const Exception&)
{ {
if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck) if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck)
{ {
@ -234,7 +237,7 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
try try
{ {
Firebird::AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest( AutoSetRestore2<jrd_req*, thread_db> autoNullifyRequest(
tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL); tdbb, &thread_db::getRequest, &thread_db::setRequest, NULL);
// undo all savepoints up to our one // undo all savepoints up to our one
@ -248,7 +251,7 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
TRA_rollback(tdbb, transaction, false, false); TRA_rollback(tdbb, transaction, false, false);
} }
catch (const Firebird::Exception&) catch (const Exception&)
{ {
if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck) if (tdbb->getDatabase()->dbb_flags & DBB_bugcheck)
{ {
@ -269,4 +272,283 @@ jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request)
} }
//--------------------
ExecBlockNode* ExecBlockNode::internalDsqlPass()
{
compiledStatement->blockNode = this;
if (legacyReturns && legacyReturns->nod_count)
compiledStatement->req_type = REQ_SELECT_BLOCK;
else
compiledStatement->req_type = REQ_EXEC_BLOCK;
compiledStatement->req_flags |= REQ_block;
ExecBlockNode* node = FB_NEW(getPool()) ExecBlockNode(getPool());
node->compiledStatement = compiledStatement;
node->legacyParameters = PASS1_node_psql(compiledStatement, legacyParameters, false);
node->legacyReturns = legacyReturns;
node->localDeclList = localDeclList;
node->body = body;
const size_t count = node->legacyParameters ? node->legacyParameters->nod_count : 0 +
node->legacyReturns ? node->legacyReturns->nod_count : 0 +
node->localDeclList ? node->localDeclList->nod_count : 0;
if (count)
{
StrArray names(*getDefaultMemoryPool(), count);
PASS1_check_unique_fields_names(names, node->legacyParameters);
PASS1_check_unique_fields_names(names, node->legacyReturns);
PASS1_check_unique_fields_names(names, node->localDeclList);
}
return node;
}
void ExecBlockNode::print(string& text, Array<dsql_nod*>& nodes) const
{
text = "execute block";
nodes.add(legacyParameters);
nodes.add(legacyReturns);
nodes.add(localDeclList);
nodes.add(body);
}
void ExecBlockNode::genBlr()
{
// Update blockNode, because we have a reference to the original unprocessed node.
compiledStatement->blockNode = this;
compiledStatement->begin_debug();
SSHORT inputs = 0, outputs = 0, locals = 0;
dsql_nod* parameters;
// now do the input parameters
if (parameters = legacyParameters)
{
SSHORT position = 0;
dsql_nod** ptr = parameters->nod_arg;
for (const dsql_nod* const* const end = ptr + parameters->nod_count; ptr < end; ptr++)
{
dsql_nod* parameter = (*ptr)->nod_arg[Dsql::e_prm_val_fld];
dsql_fld* field = (dsql_fld*) parameter->nod_arg[Dsql::e_dfl_field];
// parameter = (*ptr)->nod_arg[Dsql::e_prm_val_val]; USELESS
DDL_resolve_intl_type(compiledStatement, field,
reinterpret_cast<const dsql_str*>(parameter->nod_arg[Dsql::e_dfl_collate]));
*ptr = MAKE_variable(field, field->fld_name.c_str(), VAR_input, 0,
(USHORT) (2 * position), locals);
// ASF: do not increment locals here - CORE-2341
position++;
}
inputs = position;
}
// now do the output parameters
if (parameters = legacyReturns)
{
SSHORT position = 0;
dsql_nod** ptr = parameters->nod_arg;
for (const dsql_nod* const* const end = ptr + parameters->nod_count; ptr < end; ++ptr)
{
dsql_fld* field = (dsql_fld*) (*ptr)->nod_arg[Dsql::e_dfl_field];
DDL_resolve_intl_type(compiledStatement, field,
reinterpret_cast<const dsql_str*>((*ptr)->nod_arg[Dsql::e_dfl_collate]));
*ptr = MAKE_variable(field, field->fld_name.c_str(), VAR_output, 1,
(USHORT) (2 * position), locals++);
position++;
}
outputs = position;
}
compiledStatement->append_uchar(blr_begin);
if (inputs) {
compiledStatement->req_send->msg_parameters =
revertParametersOrder(compiledStatement->req_send->msg_parameters, NULL);
GEN_port(compiledStatement, compiledStatement->req_send);
}
else
compiledStatement->req_send = NULL;
if (outputs)
{
SSHORT position = 0;
parameters = legacyReturns;
dsql_nod** ptr = parameters->nod_arg;
for (const dsql_nod* const* const end = ptr + parameters->nod_count; ptr < end; ptr++)
{
dsql_par* param = MAKE_parameter(compiledStatement->req_receive, true, true, ++position, *ptr);
param->par_node = *ptr;
MAKE_desc(compiledStatement, &param->par_desc, *ptr, NULL);
param->par_desc.dsc_flags |= DSC_nullable;
}
}
// Set up parameter to handle EOF
dsql_par* param = MAKE_parameter(compiledStatement->req_receive, false, false, 0, NULL);
compiledStatement->req_eof = param;
param->par_desc.dsc_dtype = dtype_short;
param->par_desc.dsc_scale = 0;
param->par_desc.dsc_length = sizeof(SSHORT);
compiledStatement->req_receive->msg_parameters =
revertParametersOrder(compiledStatement->req_receive->msg_parameters, NULL);
GEN_port(compiledStatement, compiledStatement->req_receive);
if (inputs) {
compiledStatement->append_uchar(blr_receive);
compiledStatement->append_uchar(0);
}
compiledStatement->append_uchar(blr_begin);
if (parameters = legacyParameters)
{
dsql_nod** ptr = parameters->nod_arg;
for (const dsql_nod* const* const end = ptr + parameters->nod_count; ptr < end; ptr++)
{
const dsql_nod* parameter = *ptr;
const dsql_var* variable = (dsql_var*) parameter->nod_arg[Dsql::e_var_variable];
const dsql_fld* field = variable->var_field;
if (field->fld_full_domain || field->fld_not_nullable)
{
// ASF: Validation of execute block input parameters is different than procedure
// parameters, because we can't generate messages using the domains due to the
// connection charset influence. So to validate, we cast them and assign to null.
compiledStatement->append_uchar(blr_assignment);
compiledStatement->append_uchar(blr_cast);
DDL_put_field_dtype(compiledStatement, field, true);
compiledStatement->append_uchar(blr_parameter2);
compiledStatement->append_uchar(0);
compiledStatement->append_ushort(variable->var_msg_item);
compiledStatement->append_ushort(variable->var_msg_item + 1);
compiledStatement->append_uchar(blr_null);
}
}
}
if (outputs)
{
parameters = legacyReturns;
dsql_nod** ptr = parameters->nod_arg;
for (const dsql_nod* const* const end = ptr + parameters->nod_count; ptr < end; ptr++)
{
dsql_nod* parameter = *ptr;
dsql_var* variable = (dsql_var*) parameter->nod_arg[Dsql::e_var_variable];
DDL_put_local_variable(compiledStatement, variable, 0, NULL);
}
}
compiledStatement->setPsql(true);
DDL_put_local_variables(compiledStatement, localDeclList, locals);
compiledStatement->req_loop_level = 0;
dsql_nod* stmtNode = PASS1_statement(compiledStatement, body);
GEN_hidden_variables(compiledStatement, false);
compiledStatement->append_uchar(blr_stall);
// Put a label before body of procedure, so that
// any exit statement can get out
compiledStatement->append_uchar(blr_label);
compiledStatement->append_uchar(0);
GEN_statement(compiledStatement, stmtNode);
if (outputs)
compiledStatement->req_type = REQ_SELECT_BLOCK;
else
compiledStatement->req_type = REQ_EXEC_BLOCK;
compiledStatement->append_uchar(blr_end);
GEN_return(compiledStatement, legacyReturns, true);
compiledStatement->append_uchar(blr_end);
compiledStatement->end_debug();
}
ExecBlockNode* ExecBlockNode::pass1(thread_db* tdbb, CompilerScratch* csb)
{
fb_assert(false);
return this;
}
ExecBlockNode* ExecBlockNode::pass2(thread_db* tdbb, CompilerScratch* csb)
{
fb_assert(false);
return this;
}
jrd_nod* ExecBlockNode::execute(thread_db* tdbb, jrd_req* request)
{
fb_assert(false);
return NULL;
}
void ExecBlockNode::genReturn()
{
GEN_return(compiledStatement, legacyReturns, false);
}
dsql_nod* ExecBlockNode::resolveVariable(const dsql_str* varName)
{
// try to resolve variable name against input and output parameters and local variables
dsql_nod* varNode;
if (localDeclList)
{
if (varNode = PASS1_resolve_variable_name(localDeclList, varName))
return varNode;
}
if (legacyParameters)
{
if (varNode = PASS1_resolve_variable_name(legacyParameters, varName))
return varNode;
}
if (legacyReturns)
{
if (varNode = PASS1_resolve_variable_name(legacyReturns, varName))
return varNode;
}
return NULL;
}
// Revert parameters order for EXECUTE BLOCK statement
dsql_par* ExecBlockNode::revertParametersOrder(dsql_par* parameter, dsql_par* prev)
{
dsql_par* result;
if (parameter->par_next)
result = revertParametersOrder(parameter->par_next, parameter);
else
result = parameter;
parameter->par_next = prev;
return result;
}
} // namespace Jrd } // namespace Jrd

View File

@ -44,7 +44,7 @@ public:
static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb); static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb);
protected: protected:
virtual InAutonomousTransactionNode* dsqlPass(); virtual InAutonomousTransactionNode* internalDsqlPass();
public: public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
@ -60,6 +60,43 @@ public:
}; };
class ExecBlockNode : public StmtNode, public BlockNode
{
public:
explicit ExecBlockNode(MemoryPool& pool)
: StmtNode(pool),
legacyParameters(NULL),
legacyReturns(NULL),
localDeclList(NULL),
body(NULL)
{
}
protected:
virtual ExecBlockNode* internalDsqlPass();
public:
virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const;
virtual void genBlr();
virtual ExecBlockNode* pass1(thread_db* tdbb, CompilerScratch* csb);
virtual ExecBlockNode* pass2(thread_db* tdbb, CompilerScratch* csb);
virtual jrd_nod* execute(thread_db* tdbb, jrd_req* request);
public:
virtual void genReturn();
virtual dsql_nod* resolveVariable(const dsql_str* varName);
private:
static dsql_par* revertParametersOrder(dsql_par* parameter, dsql_par* prev);
public:
dsql_nod* legacyParameters;
dsql_nod* legacyReturns;
dsql_nod* localDeclList;
dsql_nod* body;
};
} // namespace } // namespace
#endif // DSQL_STMT_NODES_H #endif // DSQL_STMT_NODES_H

View File

@ -179,9 +179,11 @@ ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS* status,
handle = 0; handle = 0;
FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle) FOR (REQUEST_HANDLE handle TRANSACTION_HANDLE *trans_handle)
X IN RDB$PROCEDURE_PARAMETERS CROSS Y IN RDB$FIELDS X IN RDB$PROCEDURE_PARAMETERS
CROSS Y IN RDB$FIELDS
WITH X.RDB$FIELD_SOURCE EQ Y.RDB$FIELD_NAME AND WITH X.RDB$FIELD_SOURCE EQ Y.RDB$FIELD_NAME AND
X.RDB$PROCEDURE_NAME EQ desc->blob_desc_relation_name AND X.RDB$PROCEDURE_NAME EQ desc->blob_desc_relation_name AND
X.RDB$PACKAGE_NAME MISSING AND
X.RDB$PARAMETER_NAME EQ desc->blob_desc_field_name X.RDB$PARAMETER_NAME EQ desc->blob_desc_field_name
flag = true; flag = true;
@ -189,9 +191,8 @@ ISC_STATUS API_ROUTINE isc_blob_lookup_desc(ISC_STATUS* status,
desc->blob_desc_charset = Y.RDB$CHARACTER_SET_ID; desc->blob_desc_charset = Y.RDB$CHARACTER_SET_ID;
desc->blob_desc_segment_size = Y.RDB$SEGMENT_LENGTH; desc->blob_desc_segment_size = Y.RDB$SEGMENT_LENGTH;
if (global) { if (global)
copy_exact_name((UCHAR*) Y.RDB$FIELD_NAME, global, sizeof(Y.RDB$FIELD_NAME)); copy_exact_name((UCHAR*) Y.RDB$FIELD_NAME, global, sizeof(Y.RDB$FIELD_NAME));
}
END_FOR END_FOR
ON_ERROR ON_ERROR
ISC_STATUS_ARRAY temp_status; ISC_STATUS_ARRAY temp_status;

View File

@ -15,6 +15,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "../dsql/Nodes.h"
#include "../dsql/DdlNodes.h"
#include "../dsql/PackageNodes.h"
#include "../dsql/StmtNodes.h"
#include "../common/classes/TriState.h"
#include "dsql.tab.h" #include "dsql.tab.h"
#include "Parser.h" #include "Parser.h"

File diff suppressed because it is too large Load Diff

View File

@ -38,13 +38,38 @@ namespace Jrd {
class dsql_str; class dsql_str;
}; };
const USHORT blr_dtypes[] = {
0,
blr_text, // dtype_text
blr_cstring, // dtype_cstring
blr_varying, // dtype_varying
0,
0,
0, // dtype_packed
0, // dtype_byte
blr_short, // dtype_short
blr_long, // dtype_long
blr_quad, // dtype_quad
blr_float, // dtype_real
blr_double, // dtype_double
blr_double, // dtype_d_float
blr_sql_date, // dtype_sql_date
blr_sql_time, // dtype_sql_time
blr_timestamp, // dtype_timestamp
blr_blob, // dtype_blob // ASF: CAST use blr_blob2 because blr_blob don't fit in UCHAR
blr_short, // dtype_array
blr_int64 // dtype_int64
};
void DDL_execute(Jrd::dsql_req*); void DDL_execute(Jrd::dsql_req*);
void DDL_generate(Jrd::CompiledStatement*, Jrd::dsql_nod*); void DDL_generate(Jrd::CompiledStatement*, Jrd::dsql_nod*);
bool DDL_ids(const Jrd::dsql_req*); bool DDL_ids(const Jrd::dsql_req*);
void DDL_put_field_dtype(Jrd::CompiledStatement*, const Jrd::dsql_fld*, bool); void DDL_put_field_dtype(Jrd::CompiledStatement*, const Jrd::dsql_fld*, bool);
void DDL_resolve_intl_type(Jrd::CompiledStatement*, Jrd::dsql_fld*, const Jrd::dsql_str*); void DDL_resolve_intl_type(Jrd::CompiledStatement*, Jrd::dsql_fld*, const Jrd::dsql_str*);
void DDL_resolve_intl_type2(Jrd::CompiledStatement*, Jrd::dsql_fld*, const Jrd::dsql_str*, bool); void DDL_resolve_intl_type2(Jrd::CompiledStatement*, Jrd::dsql_fld*, const Jrd::dsql_str*, bool);
void DDL_gen_block(Jrd::CompiledStatement*, Jrd::dsql_nod*);
void DDL_put_local_variable(Jrd::CompiledStatement*, Jrd::dsql_var*, Jrd::dsql_nod*, const Jrd::dsql_str*);
void DDL_put_local_variables(Jrd::CompiledStatement*, Jrd::dsql_nod*, SSHORT);
#endif // DSQL_DDL_PROTO_H #endif // DSQL_DDL_PROTO_H

View File

@ -80,7 +80,7 @@ static void close_cursor(thread_db*, dsql_req*);
static USHORT convert(SLONG, UCHAR*); static USHORT convert(SLONG, UCHAR*);
static void execute_blob(thread_db*, dsql_req*, USHORT, const UCHAR*, USHORT, const UCHAR*, static void execute_blob(thread_db*, dsql_req*, USHORT, const UCHAR*, USHORT, const UCHAR*,
USHORT, UCHAR*, USHORT, UCHAR*); USHORT, UCHAR*, USHORT, UCHAR*);
static void execute_immediate(thread_db*, Attachment*, jrd_tra**, static void execute_immediate(thread_db*, Jrd::Attachment*, jrd_tra**,
USHORT, const TEXT*, USHORT, USHORT, const TEXT*, USHORT,
USHORT, const UCHAR*, /*USHORT,*/ USHORT, const UCHAR*, USHORT, const UCHAR*, /*USHORT,*/ USHORT, const UCHAR*,
USHORT, UCHAR*, /*USHORT,*/ USHORT, UCHAR*); USHORT, UCHAR*, /*USHORT,*/ USHORT, UCHAR*);
@ -90,7 +90,7 @@ static SSHORT filter_sub_type(const dsql_nod*);
static bool get_indices(SLONG*, const UCHAR**, SLONG*, SCHAR**); static bool get_indices(SLONG*, const UCHAR**, SLONG*, SCHAR**);
static USHORT get_request_info(thread_db*, dsql_req*, SLONG, UCHAR*); static USHORT get_request_info(thread_db*, dsql_req*, SLONG, UCHAR*);
static bool get_rsb_item(SLONG*, const UCHAR**, SLONG*, SCHAR**, USHORT*, USHORT*); static bool get_rsb_item(SLONG*, const UCHAR**, SLONG*, SCHAR**, USHORT*, USHORT*);
static dsql_dbb* init(Attachment*); static dsql_dbb* init(Jrd::Attachment*);
static void map_in_out(dsql_req*, dsql_msg*, USHORT, const UCHAR*, USHORT, UCHAR*, const UCHAR* = 0); static void map_in_out(dsql_req*, dsql_msg*, USHORT, const UCHAR*, USHORT, UCHAR*, const UCHAR* = 0);
static USHORT parse_blr(USHORT, const UCHAR*, const USHORT, dsql_par*); static USHORT parse_blr(USHORT, const UCHAR*, const USHORT, dsql_par*);
static dsql_req* prepare(thread_db*, dsql_dbb*, jrd_tra*, USHORT, const TEXT*, USHORT, USHORT); static dsql_req* prepare(thread_db*, dsql_dbb*, jrd_tra*, USHORT, const TEXT*, USHORT, USHORT);
@ -174,7 +174,7 @@ dsql_dbb::~dsql_dbb()
@param attachment @param attachment
**/ **/
dsql_req* DSQL_allocate_statement(thread_db* tdbb, Attachment* attachment) dsql_req* DSQL_allocate_statement(thread_db* tdbb, Jrd::Attachment* attachment)
{ {
SET_TDBB(tdbb); SET_TDBB(tdbb);
@ -315,7 +315,7 @@ void DSQL_execute(thread_db* tdbb,
**/ **/
void DSQL_execute_immediate(thread_db* tdbb, void DSQL_execute_immediate(thread_db* tdbb,
Attachment* attachment, Jrd::Attachment* attachment,
jrd_tra** tra_handle, jrd_tra** tra_handle,
USHORT length, const TEXT* string, USHORT dialect, USHORT length, const TEXT* string, USHORT dialect,
USHORT in_blr_length, const UCHAR* in_blr, USHORT in_blr_length, const UCHAR* in_blr,
@ -473,7 +473,7 @@ ISC_STATUS DSQL_fetch(thread_db* tdbb,
dsql_msg* message = (dsql_msg*) request->req_receive; dsql_msg* message = (dsql_msg*) request->req_receive;
// Set up things for tracing this call // Set up things for tracing this call
Attachment* att = request->req_dbb->dbb_attachment; Jrd::Attachment* att = request->req_dbb->dbb_attachment;
TraceDSQLFetch trace(att, request); TraceDSQLFetch trace(att, request);
// Insure that the blr for the message is parsed, regardless of // Insure that the blr for the message is parsed, regardless of
@ -893,7 +893,7 @@ static void close_cursor(thread_db* tdbb, dsql_req* request)
{ {
SET_TDBB(tdbb); SET_TDBB(tdbb);
Attachment* attachment = request->req_dbb->dbb_attachment; Jrd::Attachment* attachment = request->req_dbb->dbb_attachment;
if (request->req_request) if (request->req_request)
{ {
ThreadStatusGuard status_vector(tdbb); ThreadStatusGuard status_vector(tdbb);
@ -1081,7 +1081,7 @@ static void execute_blob(thread_db* tdbb,
**/ **/
static void execute_immediate(thread_db* tdbb, static void execute_immediate(thread_db* tdbb,
Attachment* attachment, Jrd::Attachment* attachment,
jrd_tra** tra_handle, jrd_tra** tra_handle,
USHORT length, const TEXT* string, USHORT dialect, USHORT length, const TEXT* string, USHORT dialect,
USHORT in_blr_length, const UCHAR* in_blr, USHORT in_blr_length, const UCHAR* in_blr,
@ -2055,7 +2055,7 @@ static bool get_rsb_item(SLONG* explain_length_ptr,
@param db_handle @param db_handle
**/ **/
static dsql_dbb* init(Attachment* attachment) static dsql_dbb* init(Jrd::Attachment* attachment)
{ {
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
@ -2840,7 +2840,7 @@ static void release_request(thread_db* tdbb, dsql_req* request, bool drop)
close_cursor(tdbb, request); close_cursor(tdbb, request);
} }
Attachment* att = request->req_dbb->dbb_attachment; Jrd::Attachment* att = request->req_dbb->dbb_attachment;
const bool need_trace_free = request->req_traced && TraceManager::need_dsql_free(att); const bool need_trace_free = request->req_traced && TraceManager::need_dsql_free(att);
if (need_trace_free) if (need_trace_free)
{ {

View File

@ -72,6 +72,7 @@ namespace Jrd
class blb; class blb;
struct bid; struct bid;
class BlockNode;
class dsql_ctx; class dsql_ctx;
class dsql_str; class dsql_str;
class dsql_nod; class dsql_nod;
@ -103,9 +104,10 @@ class dsql_str : public pool_alloc_rpt<char, dsql_type_str>
public: public:
enum Type enum Type
{ {
TYPE_SIMPLE = 0, TYPE_SIMPLE = 0, // '...'
TYPE_HEXA, TYPE_ALTERNATE, // q'{...}'
TYPE_DELIMITED TYPE_HEXA, // x'...'
TYPE_DELIMITED // "..."
}; };
public: public:
@ -131,8 +133,10 @@ class dsql_dbb : public pool_alloc<dsql_type_dbb>
{ {
public: public:
class dsql_rel* dbb_relations; // known relations in database class dsql_rel* dbb_relations; // known relations in database
class dsql_prc* dbb_procedures; // known procedures in database Firebird::GenericMap<Firebird::Pair<Firebird::Left<
class dsql_udf* dbb_functions; // known functions in database Firebird::QualifiedName, class dsql_prc*> > > dbb_procedures; // known procedures in database
Firebird::GenericMap<Firebird::Pair<Firebird::Left<
Firebird::QualifiedName, class dsql_udf*> > > dbb_functions; // known functions in database
MemoryPool& dbb_pool; // The current pool for the dbb MemoryPool& dbb_pool; // The current pool for the dbb
Database* dbb_database; Database* dbb_database;
Attachment* dbb_attachment; Attachment* dbb_attachment;
@ -149,7 +153,10 @@ public:
Firebird::Mutex dbb_cache_mutex; // mutex protecting the DSQL metadata cache Firebird::Mutex dbb_cache_mutex; // mutex protecting the DSQL metadata cache
explicit dsql_dbb(MemoryPool& p) : explicit dsql_dbb(MemoryPool& p) :
dbb_pool(p), dbb_charsets_by_id(p, 16) dbb_procedures(p),
dbb_functions(p),
dbb_pool(p),
dbb_charsets_by_id(p, 16)
{} {}
~dsql_dbb(); ~dsql_dbb();
@ -268,17 +275,16 @@ public:
{ {
} }
dsql_prc* prc_next; // Next relation in database
dsql_sym* prc_symbol; // Hash symbol for procedure
dsql_fld* prc_inputs; // Input parameters dsql_fld* prc_inputs; // Input parameters
dsql_fld* prc_outputs; // Output parameters dsql_fld* prc_outputs; // Output parameters
Firebird::MetaName prc_name; // Name of procedure Firebird::QualifiedName prc_name; // Name of procedure
Firebird::MetaName prc_owner; // Owner of procedure Firebird::MetaName prc_owner; // Owner of procedure
SSHORT prc_in_count; SSHORT prc_in_count;
SSHORT prc_def_count; // number of inputs with default values SSHORT prc_def_count; // number of inputs with default values
SSHORT prc_out_count; SSHORT prc_out_count;
USHORT prc_id; // Procedure id USHORT prc_id; // Procedure id
USHORT prc_flags; USHORT prc_flags;
bool prc_private; // Packaged private procedure
}; };
// prc_flags bits // prc_flags bits
@ -297,8 +303,6 @@ public:
{ {
} }
dsql_udf* udf_next;
dsql_sym* udf_symbol; // Hash symbol for udf
USHORT udf_dtype; USHORT udf_dtype;
SSHORT udf_scale; SSHORT udf_scale;
SSHORT udf_sub_type; SSHORT udf_sub_type;
@ -306,8 +310,9 @@ public:
SSHORT udf_character_set_id; SSHORT udf_character_set_id;
//USHORT udf_character_length; //USHORT udf_character_length;
USHORT udf_flags; USHORT udf_flags;
Firebird::MetaName udf_name; Firebird::QualifiedName udf_name;
Firebird::Array<dsc> udf_arguments; Firebird::Array<dsc> udf_arguments;
bool udf_private; // Packaged private function
}; };
// udf_flags bits // udf_flags bits
@ -397,6 +402,7 @@ public:
dsql_dbb* req_dbb; // DSQL attachment dsql_dbb* req_dbb; // DSQL attachment
jrd_tra* req_transaction; // JRD transaction jrd_tra* req_transaction; // JRD transaction
dsql_nod* req_ddl_node; // Store metadata request dsql_nod* req_ddl_node; // Store metadata request
BlockNode* blockNode;
class dsql_blb* req_blob; // Blob info for blob requests class dsql_blb* req_blob; // Blob info for blob requests
jrd_req* req_request; // JRD request jrd_req* req_request; // JRD request
//dsql_str* req_blr_string; // String block during BLR generation //dsql_str* req_blr_string; // String block during BLR generation
@ -451,6 +457,7 @@ public:
req_labels(p), req_labels(p),
req_cursors(p), req_cursors(p),
req_hidden_vars(p), req_hidden_vars(p),
req_package(p),
req_curr_ctes(p), req_curr_ctes(p),
req_ctes(p), req_ctes(p),
req_cte_aliases(p) req_cte_aliases(p)
@ -544,7 +551,6 @@ public:
psql = value; psql = value;
} }
dsql_nod* req_blk_node; // exec_block node
dsql_rel* req_relation; // relation created by this request (for DDL) dsql_rel* req_relation; // relation created by this request (for DDL)
dsql_prc* req_procedure; // procedure created by this request (for DDL) dsql_prc* req_procedure; // procedure created by this request (for DDL)
Firebird::HalfStaticArray<BLOB_PTR, 128> req_debug_data; Firebird::HalfStaticArray<BLOB_PTR, 128> req_debug_data;
@ -573,6 +579,7 @@ public:
dsql_str* req_alias_relation_prefix; // prefix for every relation-alias. dsql_str* req_alias_relation_prefix; // prefix for every relation-alias.
DsqlNodStack req_hidden_vars; // hidden variables DsqlNodStack req_hidden_vars; // hidden variables
USHORT req_hidden_vars_number; // next hidden variable number USHORT req_hidden_vars_number; // next hidden variable number
Firebird::MetaName req_package; // package being defined
DsqlNodStack req_curr_ctes; // current processing CTE's DsqlNodStack req_curr_ctes; // current processing CTE's
class dsql_ctx* req_recursive_ctx; // context of recursive CTE class dsql_ctx* req_recursive_ctx; // context of recursive CTE
@ -793,9 +800,24 @@ enum
{ {
ddl_database, ddl_domain, ddl_relation, ddl_view, ddl_procedure, ddl_trigger, ddl_database, ddl_domain, ddl_relation, ddl_view, ddl_procedure, ddl_trigger,
ddl_udf, ddl_blob_filter, ddl_exception, ddl_generator, ddl_index, ddl_role, ddl_udf, ddl_blob_filter, ddl_exception, ddl_generator, ddl_index, ddl_role,
ddl_charset, ddl_collation//, ddl_sec_class ddl_charset, ddl_collation, ddl_package//, ddl_sec_class
}; };
class CStrCmp
{
public:
static int greaterThan(const char* s1, const char* s2)
{
return strcmp(s1, s2) > 0;
}
};
typedef Firebird::SortedArray<const char*,
Firebird::EmptyStorage<const char*>, const char*,
Firebird::DefaultKeyValue<const char*>,
CStrCmp>
StrArray;
} // namespace } // namespace
// macros for error generation // macros for error generation

View File

@ -38,6 +38,7 @@
#include <stdio.h> #include <stdio.h>
#include "../dsql/dsql.h" #include "../dsql/dsql.h"
#include "../dsql/node.h" #include "../dsql/node.h"
#include "../dsql/DdlNodes.h"
#include "../dsql/StmtNodes.h" #include "../dsql/StmtNodes.h"
#include "../jrd/ibase.h" #include "../jrd/ibase.h"
#include "../jrd/align.h" #include "../jrd/align.h"
@ -92,7 +93,6 @@ static void stuff_context(CompiledStatement*, const dsql_ctx*);
static void stuff_cstring(CompiledStatement*, const char*); static void stuff_cstring(CompiledStatement*, const char*);
static void stuff_meta_string(CompiledStatement*, const char*); static void stuff_meta_string(CompiledStatement*, const char*);
static void stuff_string(CompiledStatement*, const char*, int); static void stuff_string(CompiledStatement*, const char*, int);
static void stuff_string(CompiledStatement* statement, const Firebird::MetaName& name);
static void stuff_word(CompiledStatement*, USHORT); static void stuff_word(CompiledStatement*, USHORT);
// STUFF is defined in dsql.h for use in common with ddl.c // STUFF is defined in dsql.h for use in common with ddl.c
@ -360,6 +360,10 @@ void GEN_expr(CompiledStatement* statement, dsql_nod* node)
blr_operator = blr_agg_max; blr_operator = blr_agg_max;
break; break;
case nod_window:
GEN_expr(statement, node->nod_arg[0]);
return;
case nod_agg_average: case nod_agg_average:
blr_operator = (node->nod_flags & NOD_AGG_DISTINCT) ? blr_operator = (node->nod_flags & NOD_AGG_DISTINCT) ?
blr_agg_average_distinct : blr_agg_average; blr_agg_average_distinct : blr_agg_average;
@ -708,7 +712,7 @@ void GEN_expr(CompiledStatement* statement, dsql_nod* node)
void GEN_port(CompiledStatement* statement, dsql_msg* message) void GEN_port(CompiledStatement* statement, dsql_msg* message)
{ {
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
Attachment* att = tdbb->getAttachment(); Jrd::Attachment* att = tdbb->getAttachment();
// if (statement->req_blr_string) { // if (statement->req_blr_string) {
stuff(statement, blr_message); stuff(statement, blr_message);
@ -726,10 +730,10 @@ void GEN_port(CompiledStatement* statement, dsql_msg* message)
const USHORT fromCharSet = parameter->par_desc.getCharSet(); const USHORT fromCharSet = parameter->par_desc.getCharSet();
const USHORT toCharSet = (fromCharSet == CS_NONE || fromCharSet == CS_BINARY) ? const USHORT toCharSet = (fromCharSet == CS_NONE || fromCharSet == CS_BINARY) ?
fromCharSet : att->att_charset; fromCharSet : tdbb->getCharSet();
if (parameter->par_desc.dsc_dtype <= dtype_any_text && if (parameter->par_desc.dsc_dtype <= dtype_any_text &&
att->att_charset != CS_NONE && att->att_charset != CS_BINARY) tdbb->getCharSet() != CS_NONE && tdbb->getCharSet() != CS_BINARY)
{ {
USHORT adjust = 0; USHORT adjust = 0;
if (parameter->par_desc.dsc_dtype == dtype_varying) if (parameter->par_desc.dsc_dtype == dtype_varying)
@ -754,7 +758,7 @@ void GEN_port(CompiledStatement* statement, dsql_msg* message)
statement->req_dbb->dbb_minor_version) >= ODS_11_1 && statement->req_dbb->dbb_minor_version) >= ODS_11_1 &&
parameter->par_desc.dsc_dtype == dtype_blob && parameter->par_desc.dsc_dtype == dtype_blob &&
parameter->par_desc.dsc_sub_type == isc_blob_text && parameter->par_desc.dsc_sub_type == isc_blob_text &&
att->att_charset != CS_NONE && att->att_charset != CS_BINARY) tdbb->getCharSet() != CS_NONE && tdbb->getCharSet() != CS_BINARY)
{ {
if (fromCharSet != toCharSet) if (fromCharSet != toCharSet)
parameter->par_desc.setTextType(toCharSet); parameter->par_desc.setTextType(toCharSet);
@ -1093,13 +1097,12 @@ void GEN_statement( CompiledStatement* statement, dsql_nod* node)
stuff(statement, blr_end); stuff(statement, blr_end);
return; return;
case nod_exec_block:
DDL_gen_block(statement, node);
return;
case nod_class_node: case nod_class_node:
reinterpret_cast<StmtNode*>(node->nod_arg[0])->genBlr(); {
StmtNode* stmtNode = reinterpret_cast<StmtNode*>(node->nod_arg[0]);
stmtNode->genBlr();
return; return;
}
case nod_for_select: case nod_for_select:
gen_for_select(statement, node); gen_for_select(statement, node);
@ -1198,13 +1201,8 @@ void GEN_statement( CompiledStatement* statement, dsql_nod* node)
return; return;
case nod_return: case nod_return:
if ( (temp = node->nod_arg[e_rtn_procedure]) ) if (node->nod_arg[e_rtn_procedure])
{ ((BlockNode*) node->nod_arg[e_rtn_procedure])->genReturn();
if (temp->nod_type == nod_exec_block)
GEN_return(statement, temp->nod_arg[e_exe_blk_outputs], false);
else
GEN_return(statement, temp->nod_arg[e_prc_outputs], false);
}
return; return;
case nod_exit: case nod_exit:
@ -1214,7 +1212,12 @@ void GEN_statement( CompiledStatement* statement, dsql_nod* node)
case nod_breakleave: case nod_breakleave:
stuff(statement, blr_leave); stuff(statement, blr_leave);
stuff(statement, (int) (IPTR) node->nod_arg[e_breakleave_label]->nod_arg[e_label_number]); stuff(statement, (int)(IPTR) node->nod_arg[e_breakleave_label]->nod_arg[e_label_number]);
return;
case nod_continue:
stuff(statement, blr_continue_loop);
stuff(statement, (int)(IPTR) node->nod_arg[e_continue_label]->nod_arg[e_label_number]);
return; return;
case nod_abort: case nod_abort:
@ -1400,13 +1403,21 @@ void GEN_statement( CompiledStatement* statement, dsql_nod* node)
**/ **/
static void gen_aggregate( CompiledStatement* statement, const dsql_nod* node) static void gen_aggregate( CompiledStatement* statement, const dsql_nod* node)
{ {
const dsql_ctx* context = (dsql_ctx*) node->nod_arg[e_agg_context]; dsql_ctx* context = (dsql_ctx*) node->nod_arg[e_agg_context];
stuff(statement, blr_aggregate); bool window = (node->nod_flags & NOD_AGG_WINDOW);
stuff(statement, (window ? blr_window : blr_aggregate));
stuff_context(statement, context); stuff_context(statement, context);
gen_rse(statement, node->nod_arg[e_agg_rse]); gen_rse(statement, node->nod_arg[e_agg_rse]);
// Handle GROUP BY clause // Handle PARTITION BY and GROUP BY clause
if (window)
{
stuff(statement, blr_partition_by);
stuff(statement, 0); // partition by expression count
}
else
{
stuff(statement, blr_group_by); stuff(statement, blr_group_by);
dsql_nod* list = node->nod_arg[e_agg_group]; dsql_nod* list = node->nod_arg[e_agg_group];
@ -1420,6 +1431,7 @@ static void gen_aggregate( CompiledStatement* statement, const dsql_nod* node)
} }
else else
stuff(statement, 0); stuff(statement, 0);
}
// Generate value map // Generate value map
@ -2297,13 +2309,24 @@ static void gen_relation( CompiledStatement* statement, dsql_ctx* context)
} }
else if (procedure) else if (procedure)
{ {
if (DDL_ids(statement)) { if (DDL_ids(statement))
{
stuff(statement, blr_pid); stuff(statement, blr_pid);
stuff_word(statement, procedure->prc_id); stuff_word(statement, procedure->prc_id);
} }
else { else
{
if (procedure->prc_name.qualifier.hasData())
{
stuff(statement, blr_procedure2);
stuff_meta_string(statement, procedure->prc_name.qualifier.c_str());
stuff_meta_string(statement, procedure->prc_name.identifier.c_str());
}
else
{
stuff(statement, blr_procedure); stuff(statement, blr_procedure);
stuff_meta_string(statement, procedure->prc_name.c_str()); stuff_meta_string(statement, procedure->prc_name.identifier.c_str());
}
} }
stuff_context(statement, context); stuff_context(statement, context);
@ -2919,7 +2942,14 @@ static void gen_statement(CompiledStatement* statement, const dsql_nod* node)
break; break;
case nod_exec_procedure: case nod_exec_procedure:
if (node->nod_arg[e_exe_package])
{
stuff(statement, blr_exec_proc2);
stuff_meta_string(statement, ((dsql_str*) node->nod_arg[e_exe_package])->str_data);
}
else
stuff(statement, blr_exec_proc); stuff(statement, blr_exec_proc);
name = (dsql_str*) node->nod_arg[e_exe_procedure]; name = (dsql_str*) node->nod_arg[e_exe_procedure];
stuff_meta_string(statement, name->str_data); stuff_meta_string(statement, name->str_data);
@ -3054,11 +3084,19 @@ static void gen_table_lock( CompiledStatement* statement, const dsql_nod* tbl_lo
static void gen_udf( CompiledStatement* statement, const dsql_nod* node) static void gen_udf( CompiledStatement* statement, const dsql_nod* node)
{ {
const dsql_udf* userFunc = (dsql_udf*) node->nod_arg[0]; const dsql_udf* userFunc = (dsql_udf*) node->nod_arg[0];
if (userFunc->udf_name.qualifier.isEmpty())
stuff(statement, blr_function); stuff(statement, blr_function);
stuff_string(statement, userFunc->udf_name); else
{
stuff(statement, blr_function2);
stuff_meta_string(statement, userFunc->udf_name.qualifier.c_str());
}
stuff_meta_string(statement, userFunc->udf_name.identifier.c_str());
const dsql_nod* list; const dsql_nod* list;
if ((node->nod_count == 2) && (list = node->nod_arg[1])) if ((node->nod_count == 3) && (list = node->nod_arg[2]))
{ {
stuff(statement, list->nod_count); stuff(statement, list->nod_count);
dsql_nod* const* ptr = list->nod_arg; dsql_nod* const* ptr = list->nod_arg;
@ -3210,12 +3248,6 @@ static void stuff_string(CompiledStatement* statement, const char* string, int l
} }
static void stuff_string(CompiledStatement* statement, const Firebird::MetaName& name)
{
stuff_string(statement, name.c_str(), name.length());
}
/** /**
stuff_word stuff_word

View File

@ -315,8 +315,6 @@ void HSHD_set_flag(const void* database,
switch (type) switch (type)
{ {
case SYM_relation: case SYM_relation:
case SYM_procedure:
case SYM_udf:
break; break;
default: default:
return; return;
@ -351,20 +349,6 @@ void HSHD_set_flag(const void* database,
sym_rel->rel_flags |= flag; sym_rel->rel_flags |= flag;
break; break;
} }
case SYM_procedure:
{
dsql_prc* sym_prc = (dsql_prc*) homonym->sym_object;
sym_prc->prc_flags |= flag;
break;
}
case SYM_udf:
{
dsql_udf* sym_udf = (dsql_udf*) homonym->sym_object;
sym_udf->udf_flags |= flag;
break;
}
} }
} }
} }

View File

@ -30,6 +30,11 @@
#include <string.h> #include <string.h>
#endif #endif
#include "../dsql/Nodes.h"
#include "../dsql/DdlNodes.h"
#include "../dsql/PackageNodes.h"
#include "../dsql/StmtNodes.h"
#include "../common/classes/TriState.h"
#include "dsql.tab.h" #include "dsql.tab.h"
#include "keywords.h" #include "keywords.h"
@ -92,6 +97,7 @@ static const TOK tokens[] =
{BIT_LENGTH, "BIT_LENGTH", 2, false}, {BIT_LENGTH, "BIT_LENGTH", 2, false},
{BLOB, "BLOB", 1, false}, {BLOB, "BLOB", 1, false},
{BLOCK, "BLOCK", 2, true}, {BLOCK, "BLOCK", 2, true},
{BODY, "BODY", 2, true},
{BOTH, "BOTH", 2, false}, {BOTH, "BOTH", 2, false},
{KW_BREAK, "BREAK", 2, true}, {KW_BREAK, "BREAK", 2, true},
{BY, "BY", 1, false}, {BY, "BY", 1, false},
@ -121,6 +127,7 @@ static const TOK tokens[] =
{CONNECT, "CONNECT", 2, false}, {CONNECT, "CONNECT", 2, false},
{CONSTRAINT, "CONSTRAINT", 1, false}, {CONSTRAINT, "CONSTRAINT", 1, false},
{CONTAINING, "CONTAINING", 1, false}, {CONTAINING, "CONTAINING", 1, false},
{CONTINUE, "CONTINUE", 2, true},
{COS, "COS", 2, false}, {COS, "COS", 2, false},
{COSH, "COSH", 2, false}, {COSH, "COSH", 2, false},
{COT, "COT", 2, false}, {COT, "COT", 2, false},
@ -143,6 +150,7 @@ static const TOK tokens[] =
{DATEADD, "DATEADD", 2, false}, {DATEADD, "DATEADD", 2, false},
{DATEDIFF, "DATEDIFF", 2, false}, {DATEDIFF, "DATEDIFF", 2, false},
{DAY, "DAY", 2, false}, {DAY, "DAY", 2, false},
{DDL, "DDL", 2, false},
{KW_DEC, "DEC", 1, false}, {KW_DEC, "DEC", 1, false},
{DECIMAL, "DECIMAL", 1, false}, {DECIMAL, "DECIMAL", 1, false},
{DECLARE, "DECLARE", 1, false}, {DECLARE, "DECLARE", 1, false},
@ -162,6 +170,7 @@ static const TOK tokens[] =
{DROP, "DROP", 1, false}, {DROP, "DROP", 1, false},
{ELSE, "ELSE", 1, false}, {ELSE, "ELSE", 1, false},
{END, "END", 1, false}, {END, "END", 1, false},
{ENGINE, "ENGINE", 2, false},
{ENTRY_POINT, "ENTRY_POINT", 1, false}, {ENTRY_POINT, "ENTRY_POINT", 1, false},
{ESCAPE, "ESCAPE", 1, false}, {ESCAPE, "ESCAPE", 1, false},
{EXCEPTION, "EXCEPTION", 1, false}, {EXCEPTION, "EXCEPTION", 1, false},
@ -247,6 +256,7 @@ static const TOK tokens[] =
{MOD, "MOD", 2, false}, {MOD, "MOD", 2, false},
{MODULE_NAME, "MODULE_NAME", 1, false}, {MODULE_NAME, "MODULE_NAME", 1, false},
{MONTH, "MONTH", 2, false}, {MONTH, "MONTH", 2, false},
{NAME, "NAME", 2, false},
{NAMES, "NAMES", 1, false}, {NAMES, "NAMES", 1, false},
{NATIONAL, "NATIONAL", 1, false}, {NATIONAL, "NATIONAL", 1, false},
{NATURAL, "NATURAL", 1, false}, {NATURAL, "NATURAL", 1, false},
@ -269,8 +279,10 @@ static const TOK tokens[] =
{OS_NAME, "OS_NAME", 2, false}, {OS_NAME, "OS_NAME", 2, false},
{OUTER, "OUTER", 1, false}, {OUTER, "OUTER", 1, false},
{OUTPUT_TYPE, "OUTPUT_TYPE", 1, false}, {OUTPUT_TYPE, "OUTPUT_TYPE", 1, false},
{OVER, "OVER", 2, false},
{OVERFLOW, "OVERFLOW", 1, false}, {OVERFLOW, "OVERFLOW", 1, false},
{OVERLAY, "OVERLAY", 2, false}, {OVERLAY, "OVERLAY", 2, false},
{PACKAGE, "PACKAGE", 2, true},
{PAD, "PAD", 2, true}, {PAD, "PAD", 2, true},
{PAGE, "PAGE", 1, false}, {PAGE, "PAGE", 1, false},
{PAGES, "PAGES", 1, false}, {PAGES, "PAGES", 1, false},
@ -291,6 +303,8 @@ static const TOK tokens[] =
{PROTECTED, "PROTECTED", 1, false}, {PROTECTED, "PROTECTED", 1, false},
{RAND, "RAND", 2, false}, {RAND, "RAND", 2, false},
{DB_KEY, "RDB$DB_KEY", 1, false}, {DB_KEY, "RDB$DB_KEY", 1, false},
{RDB_GET_CONTEXT, "RDB$GET_CONTEXT", 2, false},
{RDB_SET_CONTEXT, "RDB$SET_CONTEXT", 2, false},
{READ, "READ", 1, false}, {READ, "READ", 1, false},
{REAL, "REAL", 1, false}, {REAL, "REAL", 1, false},
{VERSION, "RECORD_VERSION", 1, false}, {VERSION, "RECORD_VERSION", 1, false},

View File

@ -443,6 +443,7 @@ void MAKE_desc(CompiledStatement* statement, dsc* desc, dsql_nod* node, dsql_nod
case nod_agg_min: case nod_agg_min:
case nod_agg_max: case nod_agg_max:
case nod_window:
MAKE_desc(statement, desc, node->nod_arg[0], null_replacement); MAKE_desc(statement, desc, node->nod_arg[0], null_replacement);
desc->dsc_flags = DSC_nullable; desc->dsc_flags = DSC_nullable;
return; return;
@ -1804,27 +1805,6 @@ dsql_str* MAKE_tagged_string(const char* strvar, size_t length, const char* char
} }
/**
MAKE_trigger_type
@brief Make a trigger type
@param prefix_node
@param suffix_node
**/
dsql_nod* MAKE_trigger_type(dsql_nod* prefix_node, dsql_nod* suffix_node)
{
const SLONG prefix = prefix_node->getSlong();
const SLONG suffix = suffix_node->getSlong();
delete prefix_node;
delete suffix_node;
return MAKE_const_slong(prefix + suffix - 1);
}
/** /**
MAKE_variable MAKE_variable
@ -2024,7 +2004,7 @@ static void make_parameter_names(dsql_par* parameter, const dsql_nod* item)
case nod_udf: case nod_udf:
{ {
dsql_udf* userFunc = (dsql_udf*) item->nod_arg[0]; dsql_udf* userFunc = (dsql_udf*) item->nod_arg[0];
name_alias = userFunc->udf_name.c_str(); name_alias = userFunc->udf_name.identifier.c_str();
break; break;
} }
case nod_sys_function: case nod_sys_function:
@ -2196,7 +2176,7 @@ static void make_parameter_names(dsql_par* parameter, const dsql_nod* item)
} }
else if (context->ctx_procedure) else if (context->ctx_procedure)
{ {
parameter->par_rel_name = context->ctx_procedure->prc_name.c_str(); parameter->par_rel_name = context->ctx_procedure->prc_name.identifier.c_str();
parameter->par_owner_name = context->ctx_procedure->prc_owner.c_str(); parameter->par_owner_name = context->ctx_procedure->prc_owner.c_str();
} }

View File

@ -71,7 +71,6 @@ Jrd::dsql_par* MAKE_parameter(Jrd::dsql_msg*, bool, bool, USHORT, const Jrd::dsq
Jrd::dsql_str* MAKE_string(const char*, int); Jrd::dsql_str* MAKE_string(const char*, int);
Jrd::dsql_sym* MAKE_symbol(Jrd::dsql_dbb*, const TEXT*, USHORT, Jrd::sym_type, Jrd::dsql_req*); Jrd::dsql_sym* MAKE_symbol(Jrd::dsql_dbb*, const TEXT*, USHORT, Jrd::sym_type, Jrd::dsql_req*);
Jrd::dsql_str* MAKE_tagged_string(const char* str, size_t length, const char* charset); Jrd::dsql_str* MAKE_tagged_string(const char* str, size_t length, const char* charset);
Jrd::dsql_nod* MAKE_trigger_type(Jrd::dsql_nod*, Jrd::dsql_nod*);
Jrd::dsql_nod* MAKE_variable(Jrd::dsql_fld*, const TEXT*, const Jrd::dsql_var_type type, USHORT, Jrd::dsql_nod* MAKE_variable(Jrd::dsql_fld*, const TEXT*, const Jrd::dsql_var_type type, USHORT,
USHORT, USHORT); USHORT, USHORT);

View File

@ -72,7 +72,6 @@ static const UCHAR blr_bpb[] =
}; };
static void convert_dtype(dsql_fld*, SSHORT); static void convert_dtype(dsql_fld*, SSHORT);
static void free_procedure(dsql_prc*);
static void free_relation(dsql_rel*); static void free_relation(dsql_rel*);
static void insert_symbol(dsql_sym*); static void insert_symbol(dsql_sym*);
static dsql_sym* lookup_symbol(dsql_dbb*, USHORT, const char*, const SYM_TYPE, USHORT = 0); static dsql_sym* lookup_symbol(dsql_dbb*, USHORT, const char*, const SYM_TYPE, USHORT = 0);
@ -172,7 +171,7 @@ void METD_drop_collation(dsql_req* request, const dsql_str* name)
} }
void METD_drop_function(dsql_req* request, const dsql_str* name) void METD_drop_function(dsql_req* request, const dsql_str* name, const MetaName& packageName)
{ {
/************************************** /**************************************
* *
@ -190,25 +189,24 @@ void METD_drop_function(dsql_req* request, const dsql_str* name)
* accessing it. * accessing it.
* *
**************************************/ **************************************/
thread_db* tdbb = JRD_get_thread_data();
MutexHolder holder(request); MutexHolder holder(request);
// If the symbol wasn't defined, we've got nothing to do QualifiedName metaName(MetaName(name->str_data, name->str_length), packageName);
dsql_udf* function;
dsql_sym* symbol = lookup_symbol(request->req_dbb, name, SYM_udf); if (request->req_dbb->dbb_functions.get(metaName, function))
{
if (symbol) { MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.qualifier);
dsql_udf* userFunc = (dsql_udf*) symbol->sym_object; function->udf_flags |= UDF_dropped;
userFunc->udf_flags |= UDF_dropped; request->req_dbb->dbb_functions.remove(metaName);
} }
// mark other potential candidates as maybe dropped
HSHD_set_flag(request->req_dbb, name->str_data, name->str_length, SYM_udf, UDF_dropped);
} }
void METD_drop_procedure(dsql_req* request, const dsql_str* name) void METD_drop_procedure(dsql_req* request, const dsql_str* name, const MetaName& packageName)
{ {
/************************************** /**************************************
* *
@ -226,21 +224,19 @@ void METD_drop_procedure(dsql_req* request, const dsql_str* name)
* accessing it. * accessing it.
* *
**************************************/ **************************************/
thread_db* tdbb = JRD_get_thread_data();
MutexHolder holder(request); MutexHolder holder(request);
// If the symbol wasn't defined, we've got nothing to do QualifiedName metaName(MetaName(name->str_data, name->str_length), packageName);
dsql_prc* procedure;
dsql_sym* symbol = lookup_symbol(request->req_dbb, name, SYM_procedure); if (request->req_dbb->dbb_procedures.get(metaName, procedure))
{
if (symbol) { MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.qualifier);
dsql_prc* procedure = (dsql_prc*) symbol->sym_object;
procedure->prc_flags |= PRC_dropped; procedure->prc_flags |= PRC_dropped;
request->req_dbb->dbb_procedures.remove(metaName);
} }
// mark other potential candidates as maybe dropped
HSHD_set_flag(request->req_dbb, name->str_data, name->str_length, SYM_procedure, PRC_dropped);
} }
@ -575,7 +571,7 @@ USHORT METD_get_charset_bpc(dsql_req* request, SSHORT charset_id)
dsql_dbb* dbb = request->req_dbb; dsql_dbb* dbb = request->req_dbb;
if (charset_id == CS_dynamic) if (charset_id == CS_dynamic)
charset_id = tdbb->getAttachment()->att_charset; charset_id = tdbb->getCharSet();
dsql_intlsym* cs_sym = 0; dsql_intlsym* cs_sym = 0;
size_t pos = 0; size_t pos = 0;
@ -613,7 +609,7 @@ MetaName METD_get_charset_name(dsql_req* request, SSHORT charset_id)
dsql_dbb* dbb = request->req_dbb; dsql_dbb* dbb = request->req_dbb;
if (charset_id == CS_dynamic) if (charset_id == CS_dynamic)
charset_id = tdbb->getAttachment()->att_charset; charset_id = tdbb->getCharSet();
size_t pos = 0; size_t pos = 0;
if (dbb->dbb_charsets_by_id.find(charset_id, pos)) if (dbb->dbb_charsets_by_id.find(charset_id, pos))
@ -907,7 +903,8 @@ bool METD_get_exception(dsql_req* request, const dsql_str* name)
} }
dsql_udf* METD_get_function(dsql_req* request, const dsql_str* name) dsql_udf* METD_get_function(CompiledStatement* statement, const dsql_str* name,
const dsql_str* package)
{ {
/************************************** /**************************************
* *
@ -921,39 +918,52 @@ dsql_udf* METD_get_function(dsql_req* request, const dsql_str* name)
* *
**************************************/ **************************************/
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
dsql_dbb* dbb = statement->req_dbb;
QualifiedName metaName(MetaName(name->str_data, name->str_length),
(package ? MetaName(package->str_data, package->str_length) : NULL));
MutexHolder holder(request); MutexHolder holder(statement);
bool maybeUnqualified = statement->req_package.hasData() && metaName.qualifier.isEmpty();
if (maybeUnqualified)
metaName.qualifier = statement->req_package;
// Start by seeing if symbol is already defined // Start by seeing if symbol is already defined
dsql_sym* symbol = lookup_symbol(request->req_dbb, name, SYM_udf); dsql_udf* userFunc = NULL;
if (symbol) if (dbb->dbb_functions.get(metaName, userFunc))
return (dsql_udf*) symbol->sym_object; {
if (userFunc->udf_private && metaName.qualifier != statement->req_package)
return NULL;
if (MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.qualifier))
userFunc->udf_flags |= UDF_dropped;
return userFunc;
}
// Now see if it is in the database // Now see if it is in the database
validateTransaction(request); validateTransaction(statement);
dsql_dbb* dbb = request->req_dbb;
dsql_udf* userFunc = NULL;
USHORT return_arg = 0; USHORT return_arg = 0;
while (!userFunc)
{
jrd_req* handle1 = CMP_find_request(tdbb, irq_function, IRQ_REQUESTS); jrd_req* handle1 = CMP_find_request(tdbb, irq_function, IRQ_REQUESTS);
FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE request->req_transaction) FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE statement->req_transaction)
X IN RDB$FUNCTIONS WITH X IN RDB$FUNCTIONS WITH
X.RDB$FUNCTION_NAME EQ name->str_data X.RDB$FUNCTION_NAME EQ name->str_data AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
if (!DSQL_REQUEST(irq_function)) if (!DSQL_REQUEST(irq_function))
DSQL_REQUEST(irq_function) = handle1; DSQL_REQUEST(irq_function) = handle1;
userFunc = FB_NEW(dbb->dbb_pool) dsql_udf(dbb->dbb_pool); userFunc = FB_NEW(dbb->dbb_pool) dsql_udf(dbb->dbb_pool);
// Moved below as still can't say for sure it will be stored. userFunc->udf_name = metaName;
// Following the same logic for MET_get_procedure and MET_get_relation userFunc->udf_private = !X.RDB$PRIVATE_FLAG.NULL && X.RDB$PRIVATE_FLAG != 0;
// userFunc->udf_next = dbb->dbb_functions;
// dbb->dbb_functions = userFunc;
userFunc->udf_name = name->str_data;
return_arg = X.RDB$RETURN_ARGUMENT; return_arg = X.RDB$RETURN_ARGUMENT;
END_FOR END_FOR
@ -961,9 +971,17 @@ dsql_udf* METD_get_function(dsql_req* request, const dsql_str* name)
if (!DSQL_REQUEST(irq_function)) if (!DSQL_REQUEST(irq_function))
DSQL_REQUEST(irq_function) = handle1; DSQL_REQUEST(irq_function) = handle1;
if (!userFunc) { if (!userFunc)
{
if (maybeUnqualified)
{
maybeUnqualified = false;
metaName.qualifier = "";
}
else
return NULL; return NULL;
} }
}
// Note: The following two requests differ in the fields which are // Note: The following two requests differ in the fields which are
// new since ODS7 (DBB_v3 flag). One of the two requests // new since ODS7 (DBB_v3 flag). One of the two requests
@ -973,9 +991,10 @@ dsql_udf* METD_get_function(dsql_req* request, const dsql_str* name)
jrd_req* handle2 = CMP_find_request(tdbb, irq_func_return, IRQ_REQUESTS); jrd_req* handle2 = CMP_find_request(tdbb, irq_func_return, IRQ_REQUESTS);
FOR(REQUEST_HANDLE handle2 TRANSACTION_HANDLE request->req_transaction) FOR(REQUEST_HANDLE handle2 TRANSACTION_HANDLE statement->req_transaction)
X IN RDB$FUNCTION_ARGUMENTS WITH X IN RDB$FUNCTION_ARGUMENTS WITH
X.RDB$FUNCTION_NAME EQ name->str_data X.RDB$FUNCTION_NAME EQ name->str_data AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
SORTED BY X.RDB$ARGUMENT_POSITION SORTED BY X.RDB$ARGUMENT_POSITION
if (!DSQL_REQUEST(irq_func_return)) if (!DSQL_REQUEST(irq_func_return))
@ -1059,27 +1078,12 @@ dsql_udf* METD_get_function(dsql_req* request, const dsql_str* name)
else if (userFunc->udf_dtype == dtype_varying) else if (userFunc->udf_dtype == dtype_varying)
userFunc->udf_length += sizeof(USHORT); userFunc->udf_length += sizeof(USHORT);
if ((symbol = lookup_symbol(request->req_dbb, name, SYM_udf))) dbb->dbb_functions.put(userFunc->udf_name, userFunc);
{
// Get rid of all the stuff we just read in. Use existing one
delete userFunc;
return (dsql_udf*) symbol->sym_object;
}
// Add udf in the front of the list. if (userFunc->udf_private && metaName.qualifier != statement->req_package)
userFunc->udf_next = dbb->dbb_functions; return NULL;
dbb->dbb_functions = userFunc;
// Store in the symbol table MET_dsql_cache_use(tdbb, SYM_udf, userFunc->udf_name.identifier, userFunc->udf_name.qualifier);
// The UDF_new_udf flag is not used, so nothing extra to check.
symbol = userFunc->udf_symbol = FB_NEW_RPT(dbb->dbb_pool, 0) dsql_sym;
symbol->sym_object = userFunc;
symbol->sym_string = userFunc->udf_name.c_str();
symbol->sym_length = userFunc->udf_name.length();
symbol->sym_type = SYM_udf;
symbol->sym_dbb = dbb;
insert_symbol(symbol);
return userFunc; return userFunc;
} }
@ -1133,7 +1137,8 @@ dsql_nod* METD_get_primary_key(dsql_req* request, const dsql_str* relation_name)
} }
dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name) dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name,
const dsql_str* package)
{ {
/************************************** /**************************************
* *
@ -1150,34 +1155,75 @@ dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name)
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
dsql_dbb* dbb = statement->req_dbb; dsql_dbb* dbb = statement->req_dbb;
QualifiedName metaName(MetaName(name->str_data, name->str_length),
(package ? MetaName(package->str_data, package->str_length) : ""));
// see if the procedure is the one currently being defined in this statement // ASF: I've removed the code where we verify if the procedure being looked up is the one being
// defined (statement->req_procedure). This code is totally incorrect, not considering
dsql_prc* temp = statement->req_procedure; // transactions and savepoints, hence being incompatible with packages).
if (temp != NULL && temp->prc_name == name->str_data) // Example (with autocommit off):
{ //
return temp; // SQL> create procedure p1 as begin end!
} // SQL> create procedure p2 as begin execute procedure p1; end!
// SQL> rollback!
// SQL> execute procedure p2!
// Statement failed, SQLSTATE = 42000
// Dynamic SQL Error
// -SQL error code = -204
// -Procedure unknown
// -P2
// SQL> execute procedure p1!
// Statement failed, SQLSTATE = 42000
// invalid request BLR at offset 5
// -procedure P1 is not defined
//
// The side effect is that this occur in more cases now:
//
// SQL> create procedure p as begin execute procedure p; execute procedure p2; end!
// Statement failed, SQLSTATE = 42000
// Dynamic SQL Error
// -SQL error code = -204
// -Procedure unknown
// -P2
// SQL> execute procedure p!
// Statement failed, SQLSTATE = 42000
// invalid request BLR at offset 4
// -procedure P is not defined
//
// I hope for a solution, involving savepoint logic.
MutexHolder holder(statement); MutexHolder holder(statement);
bool maybeUnqualified = statement->req_package.hasData() && metaName.qualifier.isEmpty();
if (maybeUnqualified)
metaName.qualifier = statement->req_package;
// Start by seeing if symbol is already defined // Start by seeing if symbol is already defined
dsql_sym* symbol = lookup_symbol(statement->req_dbb, name, SYM_procedure); dsql_prc* procedure = NULL;
if (symbol) if (dbb->dbb_procedures.get(metaName, procedure))
return (dsql_prc*) symbol->sym_object; {
if (procedure->prc_private && metaName.qualifier != statement->req_package)
return NULL;
if (MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.qualifier))
procedure->prc_flags |= PRC_dropped;
return procedure;
}
// now see if it is in the database // now see if it is in the database
validateTransaction(statement); validateTransaction(statement);
dsql_prc* procedure = NULL; while (!procedure)
{
jrd_req* handle1 = CMP_find_request(tdbb, irq_procedure, IRQ_REQUESTS); jrd_req* handle1 = CMP_find_request(tdbb, irq_procedure, IRQ_REQUESTS);
FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE statement->req_transaction) FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE statement->req_transaction)
X IN RDB$PROCEDURES WITH X IN RDB$PROCEDURES
X.RDB$PROCEDURE_NAME EQ name->str_data WITH X.RDB$PROCEDURE_NAME EQ name->str_data AND
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
if (!DSQL_REQUEST(irq_procedure)) if (!DSQL_REQUEST(irq_procedure))
DSQL_REQUEST(irq_procedure) = handle1; DSQL_REQUEST(irq_procedure) = handle1;
@ -1186,18 +1232,26 @@ dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name)
procedure = FB_NEW(dbb->dbb_pool) dsql_prc(dbb->dbb_pool); procedure = FB_NEW(dbb->dbb_pool) dsql_prc(dbb->dbb_pool);
procedure->prc_id = X.RDB$PROCEDURE_ID; procedure->prc_id = X.RDB$PROCEDURE_ID;
procedure->prc_name = metaName;
procedure->prc_name = name->str_data;
procedure->prc_owner = X.RDB$OWNER_NAME; procedure->prc_owner = X.RDB$OWNER_NAME;
procedure->prc_private = !X.RDB$PRIVATE_FLAG.NULL && X.RDB$PRIVATE_FLAG != 0;
END_FOR END_FOR
if (!DSQL_REQUEST(irq_procedure)) if (!DSQL_REQUEST(irq_procedure))
DSQL_REQUEST(irq_procedure) = handle1; DSQL_REQUEST(irq_procedure) = handle1;
if (!procedure) { if (!procedure)
{
if (maybeUnqualified)
{
maybeUnqualified = false;
metaName.qualifier = "";
}
else
return NULL; return NULL;
} }
}
// Lookup parameter stuff // Lookup parameter stuff
@ -1213,12 +1267,13 @@ dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name)
jrd_req* handle2 = CMP_find_request(tdbb, irq_parameters, IRQ_REQUESTS); jrd_req* handle2 = CMP_find_request(tdbb, irq_parameters, IRQ_REQUESTS);
FOR(REQUEST_HANDLE handle2 TRANSACTION_HANDLE statement->req_transaction) FOR (REQUEST_HANDLE handle2 TRANSACTION_HANDLE statement->req_transaction)
PR IN RDB$PROCEDURE_PARAMETERS CROSS PR IN RDB$PROCEDURE_PARAMETERS
FLD IN RDB$FIELDS CROSS FLD IN RDB$FIELDS
WITH FLD.RDB$FIELD_NAME EQ PR.RDB$FIELD_SOURCE WITH FLD.RDB$FIELD_NAME EQ PR.RDB$FIELD_SOURCE AND
AND PR.RDB$PROCEDURE_NAME EQ name->str_data PR.RDB$PROCEDURE_NAME EQ name->str_data AND
AND PR.RDB$PARAMETER_TYPE = type PR.RDB$PARAMETER_TYPE = type AND
PR.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
SORTED BY DESCENDING PR.RDB$PARAMETER_NUMBER SORTED BY DESCENDING PR.RDB$PARAMETER_NUMBER
if (!DSQL_REQUEST(irq_parameters)) if (!DSQL_REQUEST(irq_parameters))
@ -1235,9 +1290,12 @@ dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name)
{ {
jrd_req* handle3 = CMP_find_request(tdbb, irq_parameters2, IRQ_REQUESTS); jrd_req* handle3 = CMP_find_request(tdbb, irq_parameters2, IRQ_REQUESTS);
MetaName packageName(PR.RDB$PACKAGE_NAME.NULL ? NULL : PR.RDB$PACKAGE_NAME);
FOR(REQUEST_HANDLE handle3 TRANSACTION_HANDLE statement->req_transaction) FOR(REQUEST_HANDLE handle3 TRANSACTION_HANDLE statement->req_transaction)
PR2 IN RDB$PROCEDURE_PARAMETERS PR2 IN RDB$PROCEDURE_PARAMETERS
WITH PR2.RDB$PROCEDURE_NAME EQ PR.RDB$PROCEDURE_NAME AND WITH PR2.RDB$PROCEDURE_NAME EQ PR.RDB$PROCEDURE_NAME AND
PR2.RDB$PACKAGE_NAME EQUIV NULLIF(packageName.c_str(), '') AND
PR2.RDB$PARAMETER_NAME EQ PR.RDB$PARAMETER_NAME PR2.RDB$PARAMETER_NAME EQ PR.RDB$PARAMETER_NAME
if (!DSQL_REQUEST(irq_parameters2)) if (!DSQL_REQUEST(irq_parameters2))
@ -1322,34 +1380,13 @@ dsql_prc* METD_get_procedure(CompiledStatement* statement, const dsql_str* name)
} }
} }
// Since we could give up control due to the THREAD_EXIT and THEAD_ENTER dbb->dbb_procedures.put(procedure->prc_name, procedure);
// calls, another thread may have added the same procedure in the mean time
if ((symbol = lookup_symbol(statement->req_dbb, name, SYM_procedure))) if (procedure->prc_private && metaName.qualifier != statement->req_package)
{ return NULL;
// Get rid of all the stuff we just read in. Use existing one
free_procedure(procedure);
return (dsql_prc*) symbol->sym_object;
}
// store in the symbol table unless the procedure is not yet committed MET_dsql_cache_use(tdbb, SYM_procedure, procedure->prc_name.identifier,
// CVC: This is strange, because PRC_new_procedure is never set. procedure->prc_name.qualifier);
if (!(procedure->prc_flags & PRC_new_procedure))
{
// add procedure in the front of the list
procedure->prc_next = dbb->dbb_procedures;
dbb->dbb_procedures = procedure;
symbol = procedure->prc_symbol = FB_NEW_RPT(dbb->dbb_pool, 0) dsql_sym;
symbol->sym_object = procedure;
symbol->sym_string = procedure->prc_name.c_str();
symbol->sym_length = procedure->prc_name.length();
symbol->sym_type = SYM_procedure;
symbol->sym_dbb = dbb;
insert_symbol(symbol);
}
return procedure; return procedure;
} }
@ -1911,6 +1948,7 @@ static void convert_dtype(dsql_fld* field, SSHORT field_type)
} }
#ifdef NOT_USED_OR_REPLACED
static void free_procedure(dsql_prc* procedure) static void free_procedure(dsql_prc* procedure)
{ {
/************************************** /**************************************
@ -1943,6 +1981,7 @@ static void free_procedure(dsql_prc* procedure)
delete procedure; delete procedure;
} }
#endif // NOT_USED_OR_REPLACED
static void free_relation(dsql_rel* relation) static void free_relation(dsql_rel* relation)
@ -2036,21 +2075,11 @@ static dsql_sym* lookup_symbol(dsql_dbb* dbb, USHORT length, const char* name,
{ {
break; break;
} }
else if (type == SYM_procedure && (procedure = (dsql_prc*) symbol->sym_object) &&
!(procedure->prc_flags & PRC_dropped))
{
break;
}
else if (type == SYM_relation && (relation = (dsql_rel*) symbol->sym_object) && else if (type == SYM_relation && (relation = (dsql_rel*) symbol->sym_object) &&
!(relation->rel_flags & REL_dropped)) !(relation->rel_flags & REL_dropped))
{ {
break; break;
} }
else if (type == SYM_udf && (userFunc = (dsql_udf*) symbol->sym_object) &&
!(userFunc->udf_flags & UDF_dropped))
{
break;
}
} }
} }
@ -2067,18 +2096,10 @@ static dsql_sym* lookup_symbol(dsql_dbb* dbb, USHORT length, const char* name,
intlSym->intlsym_flags |= INTLSYM_dropped; intlSym->intlsym_flags |= INTLSYM_dropped;
break; break;
case SYM_procedure:
procedure->prc_flags |= PRC_dropped;
break;
case SYM_relation: case SYM_relation:
relation->rel_flags |= REL_dropped; relation->rel_flags |= REL_dropped;
break; break;
case SYM_udf:
userFunc->udf_flags |= UDF_dropped;
break;
default: default:
return symbol; return symbol;
} }

View File

@ -30,11 +30,11 @@
#include "../common/classes/MetaName.h" #include "../common/classes/MetaName.h"
#include "../common/classes/fb_pair.h" #include "../common/classes/fb_pair.h"
typedef Firebird::Pair<Firebird::Full<Firebird::MetaName, Firebird::MetaName> > MetaNamePair;
typedef Firebird::GenericMap<MetaNamePair> MetaNamePairMap;
// forward declarations // forward declarations
namespace Jrd { namespace Jrd {
typedef Firebird::Pair<Firebird::Full<Firebird::MetaName, Firebird::MetaName> > MetaNamePair;
typedef Firebird::GenericMap<MetaNamePair> MetaNamePairMap;
class dsql_req; class dsql_req;
class dsql_str; class dsql_str;
class CompiledStatement; class CompiledStatement;
@ -42,8 +42,8 @@ namespace Jrd {
void METD_drop_charset(Jrd::dsql_req*, const Firebird::MetaName&); void METD_drop_charset(Jrd::dsql_req*, const Firebird::MetaName&);
void METD_drop_collation(Jrd::dsql_req*, const Jrd::dsql_str*); void METD_drop_collation(Jrd::dsql_req*, const Jrd::dsql_str*);
void METD_drop_function(Jrd::dsql_req*, const Jrd::dsql_str*); void METD_drop_function(Jrd::dsql_req*, const Jrd::dsql_str*, const Firebird::MetaName&);
void METD_drop_procedure(Jrd::dsql_req*, const Jrd::dsql_str*); void METD_drop_procedure(Jrd::dsql_req*, const Jrd::dsql_str*, const Firebird::MetaName&);
void METD_drop_relation(Jrd::dsql_req*, const Jrd::dsql_str*); void METD_drop_relation(Jrd::dsql_req*, const Jrd::dsql_str*);
Jrd::dsql_intlsym* METD_get_charset(Jrd::dsql_req*, USHORT, const char* name); // UTF-8 Jrd::dsql_intlsym* METD_get_charset(Jrd::dsql_req*, USHORT, const char* name); // UTF-8
@ -55,15 +55,15 @@ Jrd::dsql_str* METD_get_default_charset(Jrd::dsql_req*);
bool METD_get_domain(Jrd::dsql_req*, class Jrd::dsql_fld*, const char* name); // UTF-8 bool METD_get_domain(Jrd::dsql_req*, class Jrd::dsql_fld*, const char* name); // UTF-8
USHORT METD_get_domain_default(Jrd::dsql_req*, const TEXT*, bool*, UCHAR*, USHORT); USHORT METD_get_domain_default(Jrd::dsql_req*, const TEXT*, bool*, UCHAR*, USHORT);
bool METD_get_exception(Jrd::dsql_req*, const Jrd::dsql_str*); bool METD_get_exception(Jrd::dsql_req*, const Jrd::dsql_str*);
Jrd::dsql_udf* METD_get_function(Jrd::dsql_req*, const Jrd::dsql_str*); Jrd::dsql_udf* METD_get_function(Jrd::CompiledStatement*, const Jrd::dsql_str*, const Jrd::dsql_str*);
Jrd::dsql_nod* METD_get_primary_key(Jrd::dsql_req*, const Jrd::dsql_str*); Jrd::dsql_nod* METD_get_primary_key(Jrd::dsql_req*, const Jrd::dsql_str*);
Jrd::dsql_prc* METD_get_procedure(Jrd::CompiledStatement*, const Jrd::dsql_str*); Jrd::dsql_prc* METD_get_procedure(Jrd::CompiledStatement*, const Jrd::dsql_str*, const Jrd::dsql_str*);
Jrd::dsql_rel* METD_get_relation(Jrd::CompiledStatement*, const Jrd::dsql_str*); Jrd::dsql_rel* METD_get_relation(Jrd::CompiledStatement*, const Jrd::dsql_str*);
bool METD_get_trigger(Jrd::dsql_req*, const Jrd::dsql_str*, Jrd::dsql_str**, USHORT*); bool METD_get_trigger(Jrd::dsql_req*, const Jrd::dsql_str*, Jrd::dsql_str**, USHORT*);
bool METD_get_type(Jrd::dsql_req*, const Jrd::dsql_str*, const char*, SSHORT*); bool METD_get_type(Jrd::dsql_req*, const Jrd::dsql_str*, const char*, SSHORT*);
Jrd::dsql_rel* METD_get_view_base(Jrd::CompiledStatement* request, Jrd::dsql_rel* METD_get_view_base(Jrd::CompiledStatement* request,
const char* view_name, // UTF-8 const char* view_name, // UTF-8
MetaNamePairMap& fields); Jrd::MetaNamePairMap& fields);
Jrd::dsql_rel* METD_get_view_relation(Jrd::CompiledStatement* request, Jrd::dsql_rel* METD_get_view_relation(Jrd::CompiledStatement* request,
const char* view_name, // UTF-8 const char* view_name, // UTF-8
const char* relation_or_alias); // UTF-8 const char* relation_or_alias); // UTF-8

View File

@ -47,6 +47,9 @@ namespace Dsql {
enum nod_t enum nod_t
{ {
// ASF: 1) These commented numbers are not all correct now;
// 2) They are going to continue been deleted;
// 3) There is no sense to numerate them.
nod_unknown_type = 0, nod_unknown_type = 0,
nod_commit = 1, // Commands, not executed. nod_commit = 1, // Commands, not executed.
nod_rollback, nod_rollback,
@ -68,15 +71,6 @@ enum nod_t
nod_del_index, nod_del_index,
nod_def_view, nod_def_view,
nod_def_constraint, // 20 nod_def_constraint, // 20
nod_def_trigger,
nod_mod_trigger,
nod_del_trigger,
// nod_def_trigger_msg,
// nod_mod_trigger_msg,
// nod_del_trigger_msg,
nod_def_procedure,
nod_mod_procedure,
nod_del_procedure,
nod_def_exception, nod_def_exception,
nod_mod_exception, nod_mod_exception,
nod_del_exception, nod_del_exception,
@ -302,15 +296,12 @@ enum nod_t
nod_redef_relation, // allows silent creation/overwriting of a relation. nod_redef_relation, // allows silent creation/overwriting of a relation.
nod_udf_param, // there should be a way to signal a param by descriptor! nod_udf_param, // there should be a way to signal a param by descriptor!
nod_limit, // limit support nod_limit, // limit support
nod_redef_procedure, // allows silent creation/overwriting of a procedure.
nod_exec_sql, // EXECUTE STATEMENT nod_exec_sql, // EXECUTE STATEMENT
nod_internal_info, // internal engine info nod_internal_info, // internal engine info
nod_searched_case, // 230 // searched CASE function nod_searched_case, // 230 // searched CASE function
nod_simple_case, // simple CASE function nod_simple_case, // simple CASE function
nod_coalesce, // COALESCE function nod_coalesce, // COALESCE function
nod_mod_view, // ALTER VIEW nod_mod_view, // ALTER VIEW
nod_replace_procedure, // CREATE OR ALTER PROCEDURE
nod_replace_trigger, // CREATE OR ALTER TRIGGER
nod_replace_view, // CREATE OR ALTER VIEW nod_replace_view, // CREATE OR ALTER VIEW
nod_redef_view, // allows silent creation/overwriting of a view nod_redef_view, // allows silent creation/overwriting of a view
nod_for_update, // FOR UPDATE clause nod_for_update, // FOR UPDATE clause
@ -330,14 +321,12 @@ enum nod_t
nod_cursor_fetch, nod_cursor_fetch,
nod_cursor_close, nod_cursor_close,
nod_fetch_seek, nod_fetch_seek,
nod_exec_block, // EXECUTE BLOCK support
nod_param_val, // default value for SP parameters support nod_param_val, // default value for SP parameters support
nod_rows, // ROWS support nod_rows, // ROWS support
nod_query_spec, nod_query_spec,
nod_equiv, // IS DISTINCT FROM nod_equiv, // IS DISTINCT FROM
nod_redef_exception, // RECREATE EXCEPTION nod_redef_exception, // RECREATE EXCEPTION
nod_replace_exception, // 260 // CREATE OR ALTER EXCEPTION nod_replace_exception, // 260 // CREATE OR ALTER EXCEPTION
nod_comment,
nod_mod_udf, nod_mod_udf,
nod_def_collation, nod_def_collation,
nod_del_collation, nod_del_collation,
@ -348,7 +337,6 @@ enum nod_t
nod_strlen, nod_strlen,
nod_trim, // 270 nod_trim, // 270
nod_returning, nod_returning,
nod_redef_trigger,
nod_tra_misc, nod_tra_misc,
nod_lock_timeout, nod_lock_timeout,
nod_agg_list, nod_agg_list,
@ -375,8 +363,15 @@ enum nod_t
nod_tran_params, nod_tran_params,
nod_named_param, nod_named_param,
nod_dfl_collate, nod_dfl_collate,
nod_trg_act,
nod_trg_ext,
nod_class_node, nod_class_node,
nod_hidden_var // 300 nod_hidden_var, // 300
nod_package_name,
nod_package_obj,
nod_window,
nod_mod_field_null_flag,
nod_continue
}; };
/* enumerations of the arguments to a node, offsets /* enumerations of the arguments to a node, offsets
@ -520,26 +515,12 @@ enum node_args {
e_cur_number, e_cur_number,
e_cur_count, e_cur_count,
e_prc_name = 0, // nod_procedure
e_prc_inputs,
e_prc_outputs,
e_prc_dcls,
e_prc_body,
e_prc_source,
e_prc_count,
e_exe_procedure = 0, // nod_exec_procedure e_exe_procedure = 0, // nod_exec_procedure
e_exe_inputs, e_exe_inputs,
e_exe_outputs, e_exe_outputs,
e_exe_package,
e_exe_count, e_exe_count,
e_exe_blk = 0, // nod_exec_block
e_exe_blk_inputs = 0,
e_exe_blk_outputs,
e_exe_blk_dcls,
e_exe_blk_body,
e_exe_blk_count,
e_prm_val_fld = 0, e_prm_val_fld = 0,
e_prm_val_val, e_prm_val_val,
e_prm_val_count, e_prm_val_count,
@ -667,6 +648,7 @@ enum node_args {
e_rpn_name = 0, // nod_rel_proc_name e_rpn_name = 0, // nod_rel_proc_name
e_rpn_alias, e_rpn_alias,
e_rpn_inputs, e_rpn_inputs,
e_rpn_package,
e_rpn_count, e_rpn_count,
e_join_left_rel = 0, // nod_join e_join_left_rel = 0, // nod_join
@ -763,19 +745,6 @@ enum node_args {
e_cnstr_source, e_cnstr_source,
e_cnstr_count, e_cnstr_count,
e_trg_name = 0, // nod_mod_trigger and nod_def_trigger
e_trg_table,
e_trg_active,
e_trg_type,
e_trg_position,
e_trg_actions,
e_trg_source,
e_trg_count,
e_trg_act_dcls = 0,
e_trg_act_body,
e_trg_act_count,
e_abrt_number = 0, // nod_abort e_abrt_number = 0, // nod_abort
e_abrt_count, e_abrt_count,
@ -952,12 +921,6 @@ enum node_args {
e_agg_function_scope_level, e_agg_function_scope_level,
e_agg_function_count, e_agg_function_count,
e_comment_obj_type = 0,
e_comment_object,
e_comment_part,
e_comment_string,
e_comment_count,
e_mod_udf_name = 0, // nod_mod_udf e_mod_udf_name = 0, // nod_mod_udf
e_mod_udf_entry_pt, e_mod_udf_entry_pt,
e_mod_udf_module, e_mod_udf_module,
@ -1012,7 +975,17 @@ enum node_args {
e_hidden_var_expr = 0, // nod_hidden_var e_hidden_var_expr = 0, // nod_hidden_var
e_hidden_var_var, e_hidden_var_var,
e_hidden_var_count e_hidden_var_count,
e_window_expr = 0,
e_window_count,
e_mod_fld_null_flag_field = 0, // nod_mod_field_null_flag
e_mod_fld_null_flag_value,
e_mod_fld_null_flag_count,
e_continue_label = 0, // nod_continue
e_continue_count,
}; };
} // namespace } // namespace
@ -1109,7 +1082,9 @@ enum nod_flags_vals {
NOD_TRAN_AUTONOMOUS = 1, // nod_exec_stmt NOD_TRAN_AUTONOMOUS = 1, // nod_exec_stmt
NOD_TRAN_COMMON = 2, NOD_TRAN_COMMON = 2,
NOD_TRAN_2PC = 3, NOD_TRAN_2PC = 3,
NOD_TRAN_DEFAULT = NOD_TRAN_COMMON NOD_TRAN_DEFAULT = NOD_TRAN_COMMON,
NOD_AGG_WINDOW = 1 // nod_aggregate
}; };
} // namespace } // namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,11 @@
#ifndef DSQL_PASS1_PROTO_H #ifndef DSQL_PASS1_PROTO_H
#define DSQL_PASS1_PROTO_H #define DSQL_PASS1_PROTO_H
void PASS1_check_unique_fields_names(Jrd::StrArray& names, const Jrd::dsql_nod* fields);
Jrd::dsql_ctx* PASS1_make_context(Jrd::CompiledStatement* statement, const Jrd::dsql_nod* relation_node); Jrd::dsql_ctx* PASS1_make_context(Jrd::CompiledStatement* statement, const Jrd::dsql_nod* relation_node);
Jrd::dsql_nod* PASS1_node(Jrd::CompiledStatement*, Jrd::dsql_nod*); Jrd::dsql_nod* PASS1_node(Jrd::CompiledStatement*, Jrd::dsql_nod*);
Jrd::dsql_nod* PASS1_node_psql(Jrd::CompiledStatement*, Jrd::dsql_nod*, bool);
Jrd::dsql_nod* PASS1_resolve_variable_name(const Jrd::dsql_nod* var_nodes, const Jrd::dsql_str* var_name);
Jrd::dsql_nod* PASS1_rse(Jrd::CompiledStatement*, Jrd::dsql_nod*, Jrd::dsql_nod*); Jrd::dsql_nod* PASS1_rse(Jrd::CompiledStatement*, Jrd::dsql_nod*, Jrd::dsql_nod*);
Jrd::dsql_nod* PASS1_statement(Jrd::CompiledStatement*, Jrd::dsql_nod*); Jrd::dsql_nod* PASS1_statement(Jrd::CompiledStatement*, Jrd::dsql_nod*);

View File

@ -2972,7 +2972,7 @@ static void get_triggers( DBB databaseL)
trigger->trg_relation = (DUDLEY_REL) rel_name->sym_object; trigger->trg_relation = (DUDLEY_REL) rel_name->sym_object;
else else
trigger->trg_relation = (DUDLEY_REL) get_symbol(SYM_relation, T.RDB$RELATION_NAME, NULL); trigger->trg_relation = (DUDLEY_REL) get_symbol(SYM_relation, T.RDB$RELATION_NAME, NULL);
trigger->trg_type = (TRG_T) T.RDB$TRIGGER_TYPE; trigger->trg_type = (TRG_T)(SINT64) T.RDB$TRIGGER_TYPE;
trigger->trg_inactive = T.RDB$TRIGGER_INACTIVE; trigger->trg_inactive = T.RDB$TRIGGER_INACTIVE;
trigger->trg_sequence = T.RDB$TRIGGER_SEQUENCE; trigger->trg_sequence = T.RDB$TRIGGER_SEQUENCE;
END_FOR; END_FOR;

View File

@ -1354,34 +1354,20 @@ static void extract_triggers()
if (T.RDB$TRIGGER_INACTIVE) if (T.RDB$TRIGGER_INACTIVE)
fprintf(output_file, "\tinactive\n"); fprintf(output_file, "\tinactive\n");
switch (T.RDB$TRIGGER_TYPE) { if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_store)
case trg_store:
fprintf(output_file, "\tpre store"); fprintf(output_file, "\tpre store");
break; else if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_post_store)
case trg_post_store:
fprintf(output_file, "\tpost store"); fprintf(output_file, "\tpost store");
break; else if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_modify)
case trg_modify:
fprintf(output_file, "\tpre modify"); fprintf(output_file, "\tpre modify");
break; else if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_post_modify)
case trg_post_modify:
fprintf(output_file, "\tpost modify"); fprintf(output_file, "\tpost modify");
break; else if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_pre_erase)
case trg_pre_erase:
fprintf(output_file, "\tpre erase"); fprintf(output_file, "\tpre erase");
break; else if (T.RDB$TRIGGER_TYPE == (SSHORT) trg_erase)
case trg_erase:
fprintf(output_file, "\tpost erase"); fprintf(output_file, "\tpost erase");
break; else
default:
put_comment(261); /* msg 261: ***** trigger type not understood **** */ put_comment(261); /* msg 261: ***** trigger type not understood **** */
}
fprintf(output_file, " %d:\n", T.RDB$TRIGGER_SEQUENCE); fprintf(output_file, " %d:\n", T.RDB$TRIGGER_SEQUENCE);
if (T.RDB$TRIGGER_SOURCE.NULL) { if (T.RDB$TRIGGER_SOURCE.NULL) {

227
src/include/FirebirdApi.h Normal file
View File

@ -0,0 +1,227 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project, based on previous work done
* by Eugeney Putilin <evgeneyputilin at mail.ru>,
* Vlad Khorsun <hvlad at users.sourceforge.net> and
* Roman Rokytskyy <roman at rokytskyy.de>.
*
* Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* Eugeney Putilin <evgeneyputilin at mail.ru>
* Vlad Khorsun <hvlad at users.sourceforge.net>
* Roman Rokytskyy <roman at rokytskyy.de>
*/
#ifndef FIREBIRD_API_H
#define FIREBIRD_API_H
#ifdef __GNUC__
# pragma GCC system_header // disable warning about non-existent virtual destructor
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
# define FB_CALL __stdcall
#else
# define FB_CALL
#endif
#define FB_NULL 0L
namespace Firebird {
typedef unsigned int uint;
typedef short int16;
typedef int int32;
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) && !defined(__GNUC__)
typedef __int64 int64;
#else
typedef long long int int64;
#endif
typedef char Utf8; // Utf8* used as nul-terminated string
// ISC compatible handle
#if defined(_LP64) || defined(__LP64__) || defined(__arch64__) || defined(_WIN64)
typedef unsigned int Handle;
#else
typedef void* Handle;
#endif
struct Date
{
int year;
int month;
int day;
};
struct Time
{
int hours;
int minutes;
int seconds;
int fractions;
};
struct DateTime //// FIXME: rename to TimeStamp
{
Date date;
Time time;
};
class Error
{
public:
virtual bool FB_CALL addCode(int32 code) = 0;
virtual bool FB_CALL addString(const char* str, uint strLength) = 0;
};
// Interface used in cases which an instance is created by one layer and released by another one.
class Disposable
{
public:
// Disposes the object.
virtual void FB_CALL dispose(Error* error) = 0;
};
class Attachment : public Disposable
{
public:
// Get an ISC compatible attachment handle.
virtual Handle FB_CALL getHandle(Error* error) const = 0;
virtual const char* FB_CALL getUserName() const = 0;
virtual const char* FB_CALL getDatabaseName() const = 0;
};
class Transaction
{
public:
// Get an ISC compatible transaction handle.
virtual Handle FB_CALL getHandle(Error* error) const = 0;
};
// Represents a parameter or column.
class Value
{
public:
// data types
enum Type
{
TYPE_SMALLINT = 1,
TYPE_INTEGER,
TYPE_BIGINT,
TYPE_DOUBLE,
TYPE_CHAR,
TYPE_VARCHAR,
TYPE_BLOB,
TYPE_DATE,
TYPE_TIME,
TYPE_TIMESTAMP
};
public:
// Get parameter or column name.
virtual const char* FB_CALL getName(Error* error) const = 0;
virtual Type FB_CALL getType(Error* error) const = 0;
virtual const char* FB_CALL getCharSet(Error* error) const = 0;
// Get BLOB sub-type.
virtual int FB_CALL getSubType(Error* error) const = 0;
// Get numeric precision or maximum string length.
virtual int FB_CALL getPrecision(Error* error) const = 0;
virtual int FB_CALL getScale(Error* error) const = 0;
virtual bool FB_CALL isNullable(Error* error) const = 0;
virtual bool FB_CALL isNull() const = 0;
virtual void FB_CALL setNull(Error* error) = 0;
virtual void FB_CALL copyFrom(Error* error, const Value* from) = 0;
virtual int16 FB_CALL getSmallInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setSmallInt(Error* error, int16 value, int scale = 0) = 0;
virtual int32 FB_CALL getInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setInt(Error* error, int32 value, int scale = 0) = 0;
virtual int64 FB_CALL getBigInt(Error* error, int scale = 0, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setBigInt(Error* error, int64 value, int scale = 0) = 0;
virtual double FB_CALL getDouble(Error* error, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setDouble(Error* error, double value) = 0;
virtual const char* FB_CALL getString(Error* error, uint* strLength = FB_NULL,
bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setString(Error* error, const char* str, uint strLength) = 0;
virtual int64 FB_CALL getBlobId(Error* error, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setBlobId(Error* error, int64 value) = 0;
virtual void FB_CALL getDate(Error* error, Date* value, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setDate(Error* error, const Date* value) = 0;
virtual void FB_CALL getTime(Error* error, Time* value, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setTime(Error* error, const Time* value) = 0;
virtual void FB_CALL getTimeStamp(Error* error, DateTime* value, bool* isNull = FB_NULL) const = 0;
virtual void FB_CALL setTimeStamp(Error* error, const DateTime* value) = 0;
};
// A queue associated with a Values. Could be used for batching processing.
class ValuesQueue : public Disposable
{
public:
virtual void FB_CALL enqueue(Error* error) = 0; // Enqueue the current Values.
virtual bool FB_CALL dequeue(Error* error) = 0; // Dequeue in Values.
};
// Represents a group of parameters or columns.
class Values
{
public:
virtual uint FB_CALL getCount() const = 0;
virtual uint FB_CALL getIndexByName(Error* error, const char* name) const = 0;
// Get a given value. The first value is at index 1.
virtual Value* FB_CALL getValue(Error* error, uint index) const = 0;
virtual Value* FB_CALL getValueByName(Error* error, const char* name) const = 0;
// Creates a queue associated with this Values.
virtual ValuesQueue* FB_CALL createQueue(Error* error) = 0;
};
} // namespace Firebird
#endif // FIREBIRD_API_H

View File

@ -0,0 +1,189 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project, based on previous work done
* by Eugeney Putilin <evgeneyputilin at mail.ru>,
* Vlad Khorsun <hvlad at users.sourceforge.net> and
* Roman Rokytskyy <roman at rokytskyy.de>.
*
* Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* Eugeney Putilin <evgeneyputilin at mail.ru>
* Vlad Khorsun <hvlad at users.sourceforge.net>
* Roman Rokytskyy <roman at rokytskyy.de>
*/
#ifndef FIREBIRD_EXTERNAL_API_H
#define FIREBIRD_EXTERNAL_API_H
#ifdef __GNUC__
# pragma GCC system_header // disable warning about non-existent virtual destructor
#endif
#include "FirebirdApi.h"
namespace Firebird {
class ExternalEngine;
const int EXTERNAL_VERSION_1 = 1;
// Connection to current database in external engine.
// Context passed to ExternalEngine has SYSDBA privileges.
// Context passed to ExternalFunction, ExternalProcedure and ExternalTrigger
// has user privileges.
// There is one ExternalContext per attachment. The privileges and character
// set properties are changed during the calls.
class ExternalContext
{
public:
// Gets the ExternalEngine associated with this context.
virtual ExternalEngine* FB_CALL getEngine(Error* error) = 0;
// Gets the Attachment associated with this context.
virtual Attachment* FB_CALL getAttachment(Error* error) = 0;
// Obtained transaction is valid only before control is returned to the engine
// or in ExternalResultSet::fetch calls of correspondent ExternalProcedure::open.
virtual Transaction* FB_CALL getTransaction(Error* error) = 0;
// Get user attachment character set.
virtual const Utf8* FB_CALL getClientCharSet() = 0;
// Misc info associated with a context. The pointers are never accessed or freed by Firebird.
// Obtains an unique (across all contexts) code to associate plugin and/or user information.
virtual int FB_CALL obtainInfoCode() = 0;
// Gets a value associated with this code or FB_NULL if no value was set.
virtual void* FB_CALL getInfo(int code) = 0;
// Sets a value associated with this code and returns the last value.
virtual void* FB_CALL setInfo(int code, void* value) = 0;
};
// To return set of rows in selectable procedures.
class ExternalResultSet : public Disposable
{
public:
virtual bool FB_CALL fetch(Error* error) = 0;
};
class ExternalFunction : public Disposable
{
public:
// This method is called just before execute and informs the engine our requested character
// set for data exchange inside that method.
// During this call, the context uses the character set obtained from ExternalEngine::getCharSet.
virtual void FB_CALL getCharSet(Error* error, ExternalContext* context,
Utf8* name, uint nameSize) = 0;
virtual void FB_CALL execute(Error* error, ExternalContext* context, Values* params,
Value* result) = 0;
};
class ExternalProcedure : public Disposable
{
public:
// This method is called just before open and informs the engine our requested character
// set for data exchange inside that method and ExternalResultSet::fetch.
// During this call, the context uses the character set obtained from ExternalEngine::getCharSet.
virtual void FB_CALL getCharSet(Error* error, ExternalContext* context,
Utf8* name, uint nameSize) = 0;
// Returns a ExternalResultSet for selectable procedures.
// Returning NULL results in a result set of one record.
// Procedures without output parameters should return NULL.
virtual ExternalResultSet* FB_CALL open(Error* error, ExternalContext* context,
Values* params, Values* results) = 0;
};
class ExternalTrigger : public Disposable
{
public:
enum Type
{
TYPE_BEFORE = 1,
TYPE_AFTER,
TYPE_DATABASE
};
enum Action
{
ACTION_INSERT = 1,
ACTION_UPDATE,
ACTION_DELETE,
ACTION_CONNECT,
ACTION_DISCONNECT,
ACTION_TRANS_START,
ACTION_TRANS_COMMIT,
ACTION_TRANS_ROLLBACK,
ACTION_DDL
};
public:
// This method is called just before execute and informs the engine our requested character
// set for data exchange inside that method.
// During this call, the context uses the character set obtained from ExternalEngine::getCharSet.
virtual void FB_CALL getCharSet(Error* error, ExternalContext* context,
Utf8* name, uint nameSize) = 0;
virtual void FB_CALL execute(Error* error, ExternalContext* context,
Action action, const Values* oldValues, Values* newValues) = 0;
};
// In SuperServer, shared by all attachments to one database and disposed when last (non-external)
// user attachment to the database is closed.
class ExternalEngine : public Disposable
{
public:
virtual int FB_CALL getVersion(Error* error) = 0;
// This method is called once (per ExternalEngine instance) before any following methods.
// The requested character set for data exchange inside methods of this interface should
// be copied to charSet parameter.
// During this call, the context uses the UTF-8 character set.
virtual void FB_CALL open(Error* error, ExternalContext* context,
Utf8* charSet, uint charSetSize) = 0;
// Attachment is being opened.
virtual void FB_CALL openAttachment(Error* error, ExternalContext* context) = 0;
// Attachment is being closed.
virtual void FB_CALL closeAttachment(Error* error, ExternalContext* context) = 0;
// Called when engine wants to load object in the cache. Objects are disposed when
// going out of the cache.
virtual ExternalFunction* FB_CALL makeFunction(Error* error, ExternalContext* context,
const char* package, const char* name, const char* entryPoint, const char* body) = 0;
virtual ExternalProcedure* FB_CALL makeProcedure(Error* error, ExternalContext* context,
const char* package, const char* name, const char* entryPoint, const char* body) = 0;
virtual ExternalTrigger* FB_CALL makeTrigger(Error* error, ExternalContext* context,
const char* name, const char* entryPoint, const char* body,
const char* table, ExternalTrigger::Type type) = 0;
};
} // namespace Firebird
#endif // FIREBIRD_EXTERNAL_API_H

View File

@ -0,0 +1,123 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
/*
* When Firebird is initializing, it opens all *.conf files from <fbroot>/plugins.
* For each plugin_module tag found, it constructs a Plugin object, reads the corresponding
* plugin_config tag and inserts all config information in the object.
*
* When requested, the engine gets the attribute value of plugin_module/filename, load it as a
* dynamic (shared) library and calls the exported function firebirdPlugin (FB_PLUGIN_ENTRY_POINT
* definition, InitPluginEntryPoint prototype) passing the Plugin object as parameter.
*
* The plugin library may save the plugin object and call they methods later. The object and all
* pointers returned by it are valid until the plugin is unloaded (done through OS unload of the
* dynamic library) when Firebird is shutting down.
*
* Inside the plugin entry point (firebirdPlugin), the plugin may register extra functionality that
* may be obtained by Firebird when required. Currently only External Engines may be registered
* through Plugin::setExternalEngineFactory.
*
* Example plugin configuration file:
*
* <external_engine UDR>
* plugin_module UDR_engine
* </external_engine>
*
* <plugin_module UDR_engine>
* filename $(this)/udr_engine
* plugin_config UDR_config
* </plugin_module>
*
* <plugin_config UDR_config>
* path $(this)/udr
* </plugin_config>
*
* Note that the external_engine tag is ignored at this stage. Only plugin_module and plugin_config
* are read. The dynamic library extension may be ommitted, and $(this) expands to the directory of
* the .conf file.
*
* Plugins may access Firebird API through the client library read from Plugin::getLibraryName
* method. This method may return different filenames depending on the server architecture, and may
* even return NULL. Currently it returns values as the table below, but this is implementation
* detail and portable plugins should just expect a filename or NULL.
*
* Architecture File
* --------------- ------------------------------------------------------
* Embedded The embedded library
* Windows SS fbserver executable
* Windows CS/SC fb_inet_server executable
* POSIX CS/SC The embedded library
* POSIX SS NULL [application should open it through dlopen(NULL)]
*/
#ifndef FIREBIRD_PLUGIN_API_H
#define FIREBIRD_PLUGIN_API_H
#ifdef __GNUC__
# pragma GCC system_header // disable warning about non-existent virtual destructor
#endif
#include "FirebirdApi.h"
#define FB_PLUGIN_ENTRY_POINT firebirdPlugin
namespace Firebird {
class ExternalEngine;
const int PLUGIN_VERSION_1 = 1;
class ExternalEngineFactory
{
public:
// Strings passed to error->addString during this call are assumed to be UTF-8.
virtual ExternalEngine* FB_CALL createEngine(Error* error, int version,
const char* name) = 0;
};
// Passed to plugin library through entry point FB_PLUGIN_ENTRY_POINT in Firebird initialization.
class Plugin
{
public:
virtual int FB_CALL getVersion() = 0;
virtual const char* FB_CALL getName() = 0;
virtual const char* FB_CALL getLibraryName() = 0;
virtual uint FB_CALL getConfigInfoCount() = 0;
virtual void FB_CALL getConfigInfo(Error* error, uint index, // first index is 0
const char** key, const char** value) = 0;
virtual void FB_CALL setExternalEngineFactory(ExternalEngineFactory* factory) = 0;
};
typedef void (*PluginEntryPoint)(Error* error, Plugin* plugin);
} // namespace Firebird
#endif // FIREBIRD_PLUGIN_API_H

95
src/include/FirebirdUdr.h Normal file
View File

@ -0,0 +1,95 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef FIREBIRD_UDR_H
#define FIREBIRD_UDR_H
#ifdef __GNUC__
# pragma GCC system_header // disable warning about non-existent virtual destructor
#endif
#include "FirebirdApi.h"
#include "FirebirdExternalApi.h"
namespace Firebird
{
namespace Udr
{
//------------------------------------------------------------------------------
// Metadata information passed from the UDR engine to user's routines factories when asking to
// create routines instances.
struct MetaInfo
{
const char* package; // package name - NULL from triggers
const char* name; // metadata object name
const char* entryPoint; // external routine's name
const char* info; // misc. info encoded on the external name
const char* body; // body text
};
struct TriggerMetaInfo : public MetaInfo
{
ExternalTrigger::Type type; // trigger type
const char* table; // table name
};
// Factory classes. They should be singletons instances created by user's modules and
// registered. When UDR engine is going to load a routine, it calls newItem.
class FunctionFactory
{
public:
virtual const char* FB_CALL getName() = 0;
virtual ExternalFunction* FB_CALL newItem(MetaInfo* metaInfo) = 0;
};
class ProcedureFactory
{
public:
virtual const char* FB_CALL getName() = 0;
virtual ExternalProcedure* FB_CALL newItem(MetaInfo* metaInfo) = 0;
};
class TriggerFactory
{
public:
virtual const char* FB_CALL getName() = 0;
virtual ExternalTrigger* FB_CALL newItem(TriggerMetaInfo* metaInfo) = 0;
};
// Routine registration functions.
extern "C" void fbUdrRegFunction(FunctionFactory* factory);
extern "C" void fbUdrRegProcedure(ProcedureFactory* factory);
extern "C" void fbUdrRegTrigger(TriggerFactory* factory);
extern "C" void* fbUdrGetFunction(const char* symbol);
//------------------------------------------------------------------------------
} // namespace Udr
} // namespace Firebird
#endif // FIREBIRD_UDR_H

View File

@ -0,0 +1,634 @@
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project.
*
* Copyright (c) 2008 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef FIREBIRD_PLUGIN_UDR_CPP
#define FIREBIRD_PLUGIN_UDR_CPP
#ifdef __GNUC__
# pragma GCC system_header // disable warning about non-existent virtual destructor
#endif
#include "FirebirdApi.h"
#include "FirebirdExternalApi.h"
#include "FirebirdUdr.h"
#include "ibase.h"
#include <string.h>
namespace Firebird
{
namespace Udr
{
//------------------------------------------------------------------------------
#define FB_UDR_FUNCTION(name) Func##name
#define FB_UDR_PROCEDURE(name) Proc##name
#define FB_UDR_TRIGGER(name) Trig##name
#define FB_UDR_BEGIN_DECLARE_FUNCTION(name) \
class FB_UDR_FUNCTION(name) : public ::Firebird::Udr::Function \
{ \
public: \
virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \
::Firebird::Values* params, ::Firebird::Value* result); \
private:
#define FB_UDR_END_DECLARE_FUNCTION(name) \
};
#define FB_UDR_DECLARE_FUNCTION(name) \
FB_UDR_BEGIN_DECLARE_FUNCTION(name) \
FB_UDR_END_DECLARE_FUNCTION(name)
#define FB_UDR_BEGIN_FUNCTION(name) \
void FB_CALL FB_UDR_FUNCTION(name)::execute(::Firebird::Error* error, \
::Firebird::ExternalContext* context, ::Firebird::Values* params, ::Firebird::Value* result) \
{ \
try \
{
#define FB_UDR_END_FUNCTION(name) \
} \
catch (const ::Firebird::Udr::ThrowError::Exception& e) \
{ \
e.stuff(error); \
} \
catch (...) \
{ \
error->addCode(isc_arg_gds); \
error->addCode(isc_random); \
error->addString( \
FB_UDR_UNRECOGNIZED_EXCEPTION, \
strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \
} \
} \
::Firebird::Udr::FunctionFactoryImpl<FB_UDR_FUNCTION(name)> FuncFactory##name(#name);
#define FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \
class FB_UDR_PROCEDURE(name) : public ::Firebird::Udr::Procedure \
{ \
public: \
virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::Error* error, \
::Firebird::ExternalContext* context, ::Firebird::Values* params, \
::Firebird::Values* results); \
#define FB_UDR_END_DECLARE_PROCEDURE(name) \
};
#define FB_UDR_DECLARE_PROCEDURE(name) \
FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \
FB_UDR_END_DECLARE_PROCEDURE(name)
#define FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \
class ResultSet##name : public ::Firebird::Udr::ResultSet \
{ \
public: \
ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \
::Firebird::Values* params, ::Firebird::Values* results); \
\
public: \
virtual bool FB_CALL fetch(::Firebird::Error* error); \
\
private:
#define FB_UDR_END_DECLARE_FETCH_PROCEDURE(name) \
};
#define FB_UDR_DECLARE_FETCH_PROCEDURE(name) \
FB_UDR_BEGIN_DECLARE_FETCH_PROCEDURE(name) \
FB_UDR_END_DECLARE_FETCH_PROCEDURE(name)
#define FB_UDR_DECLARE_PROCEDURE(name) \
FB_UDR_BEGIN_DECLARE_PROCEDURE(name) \
FB_UDR_END_DECLARE_PROCEDURE(name)
#define FB_UDR_BEGIN_PROCEDURE(name) \
::Firebird::ExternalResultSet* FB_CALL Proc##name::open(::Firebird::Error* error, \
::Firebird::ExternalContext* context, ::Firebird::Values* params, \
::Firebird::Values* results) \
{ \
return new ResultSet##name(error, context, params, results); \
} \
\
ResultSet##name::ResultSet##name(::Firebird::Error* error, ::Firebird::ExternalContext* context, \
::Firebird::Values* params, ::Firebird::Values* results) \
: ResultSet(context, params, results) \
{ \
try \
{
#define FB_UDR_FETCH_PROCEDURE(name) \
} \
catch (const ::Firebird::Udr::ThrowError::Exception& e) \
{ \
e.stuff(error); \
} \
catch (...) \
{ \
error->addCode(isc_arg_gds); \
error->addCode(isc_random); \
error->addString( \
FB_UDR_UNRECOGNIZED_EXCEPTION, \
strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \
} \
} \
\
bool FB_CALL ResultSet##name::fetch(::Firebird::Error* error) \
{ \
try \
{
#define FB_UDR_END_PROCEDURE(name) \
} \
catch (const ::Firebird::Udr::ThrowError::Exception& e) \
{ \
e.stuff(error); \
} \
catch (...) \
{ \
error->addCode(isc_arg_gds); \
error->addCode(isc_random); \
error->addString( \
FB_UDR_UNRECOGNIZED_EXCEPTION, \
strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \
} \
return false; \
} \
::Firebird::Udr::ProcedureFactoryImpl<FB_UDR_PROCEDURE(name)> ProcFactory##name(#name);
#define FB_UDR_BEGIN_DECLARE_TRIGGER(name) \
class FB_UDR_TRIGGER(name) : public ::Firebird::Udr::Trigger \
{ \
public: \
virtual void FB_CALL execute(::Firebird::Error* error, ::Firebird::ExternalContext* context, \
::Firebird::ExternalTrigger::Action action, const ::Firebird::Values* oldValues, \
::Firebird::Values* newValues); \
private:
#define FB_UDR_END_DECLARE_TRIGGER(name) \
};
#define FB_UDR_DECLARE_TRIGGER(name) \
FB_UDR_BEGIN_DECLARE_TRIGGER(name) \
FB_UDR_END_DECLARE_TRIGGER(name)
#define FB_UDR_BEGIN_TRIGGER(name) \
void FB_CALL FB_UDR_TRIGGER(name)::execute(::Firebird::Error* error, \
::Firebird::ExternalContext* context, ::Firebird::ExternalTrigger::Action action, \
const ::Firebird::Values* oldValues, ::Firebird::Values* newValues) \
{ \
try \
{
#define FB_UDR_END_TRIGGER(name) \
} \
catch (const ::Firebird::Udr::ThrowError::Exception& e) \
{ \
e.stuff(error); \
} \
catch (...) \
{ \
error->addCode(isc_arg_gds); \
error->addCode(isc_random); \
error->addString( \
FB_UDR_UNRECOGNIZED_EXCEPTION, \
strlen(FB_UDR_UNRECOGNIZED_EXCEPTION)); \
} \
} \
::Firebird::Udr::TriggerFactoryImpl<FB_UDR_TRIGGER(name)> TrigFactory##name(#name);
#define FB_UDR_UNRECOGNIZED_EXCEPTION "Unrecognized C++ exception"
class ThrowError : public Error
{
private:
struct Info
{
Info()
: next(FB_NULL),
str(FB_NULL)
{
}
~Info()
{
if (str)
delete [] str;
}
static void free(Info* info)
{
while (info)
{
Info* p = info;
info = info->next;
delete p;
}
}
enum { TYPE_CODE, TYPE_STR } type;
Info* next;
int32 code;
char* str;
int strLength;
};
public:
class Exception
{
public:
Exception(Info* aInfo)
: info(aInfo)
{
}
Exception(const Exception& e)
: info(FB_NULL)
{
Info* end = FB_NULL;
for (Info* p = e.info; p; p = p->next)
{
Info* newInfo = new Info;
newInfo->type = p->type;
newInfo->code = p->code;
if (p->str)
{
newInfo->str = new char[p->strLength];
memcpy(newInfo->str, p->str, p->strLength);
newInfo->strLength = p->strLength;
}
if (end)
end->next = newInfo;
end = newInfo;
if (!info)
info = newInfo;
}
}
~Exception()
{
Info::free(info);
}
public:
void stuff(Error* error) const
{
for (Info* p = info; p; p = p->next)
{
if (p->type == Info::TYPE_CODE)
error->addCode(p->code);
else if (p->type == Info::TYPE_STR)
error->addString(p->str, p->strLength);
}
}
private:
Info* info;
};
public:
ThrowError()
: start(FB_NULL),
end(FB_NULL)
{
}
virtual ~ThrowError()
{
raise();
Info::free(start);
}
public:
static void check(ISC_STATUS status, const ISC_STATUS* vector)
{
if (status == 0)
return;
ThrowError error;
while (*vector != isc_arg_end)
{
switch (*vector)
{
case isc_arg_warning:
case isc_arg_gds:
case isc_arg_number:
case isc_arg_interpreted:
case isc_arg_vms:
case isc_arg_unix:
case isc_arg_win32:
error.addCode(*vector++);
error.addCode(*vector++);
break;
case isc_arg_string:
error.addString((const char*) vector[1], strlen((const char*) vector[1]));
vector += 2;
break;
case isc_arg_cstring:
error.addString((const char*) vector[2], vector[1]);
vector += 3;
break;
default:
return;
}
}
}
static void check(const ISC_STATUS* vector)
{
check(vector[1], vector);
}
public:
inline operator Firebird::Error* ()
{
return this;
}
public:
virtual bool FB_CALL addCode(Firebird::int32 code)
{
Info* info = new Info;
info->type = Info::TYPE_CODE;
info->code = code;
if (end)
end->next = info;
end = info;
if (!start)
start = info;
return true;
}
virtual bool FB_CALL addString(const char* str, uint strLength)
{
Info* info = new Info;
info->type = Info::TYPE_STR;
info->str = new char[strLength];
memcpy(info->str, str, strLength);
info->strLength = strLength;
if (end)
end->next = info;
end = info;
if (!start)
start = info;
return true;
}
private:
void raise()
{
if (start)
throw Exception(start);
}
protected:
Info* start;
Info* end;
};
class Helper
{
public:
static isc_db_handle getIscDbHandle(ExternalContext* context)
{
Attachment* att = context->getAttachment(ThrowError());
return att->getHandle(ThrowError());
}
static isc_tr_handle getIscTrHandle(ExternalContext* context)
{
Transaction* tra = context->getTransaction(ThrowError());
return tra->getHandle(ThrowError());
}
static void* getEntryPoint(ExternalContext* context, const char* entryPoint)
{
return fbUdrGetFunction(entryPoint);
}
};
class ResultSet : public ExternalResultSet, public Helper
{
public:
ResultSet(Firebird::ExternalContext* aContext, Firebird::Values* aParams,
Firebird::Values* aResults)
: context(aContext),
params(aParams),
results(aResults)
{
}
virtual ~ResultSet()
{
}
public:
virtual void FB_CALL dispose(Firebird::Error* error)
{
delete this;
}
protected:
Firebird::ExternalContext* context;
Firebird::Values* params;
Firebird::Values* results;
};
class Function : public ExternalFunction, public Helper
{
public:
virtual ~Function()
{
}
public:
virtual void FB_CALL dispose(Error* error)
{
delete this;
}
void FB_CALL getCharSet(Error* error, ExternalContext* context, Utf8* name, uint nameSize)
{
}
public:
MetaInfo* metaInfo;
};
class Procedure : public ExternalProcedure, public Helper
{
public:
virtual ~Procedure()
{
}
public:
virtual void FB_CALL dispose(Error* error)
{
delete this;
}
void FB_CALL getCharSet(Error* error, ExternalContext* context, Utf8* name, uint nameSize)
{
}
public:
MetaInfo* metaInfo;
};
class Trigger : public ExternalTrigger, public Helper
{
public:
virtual ~Trigger()
{
}
public:
virtual void FB_CALL dispose(Error* error)
{
delete this;
}
void FB_CALL getCharSet(Error* error, ExternalContext* context, Utf8* name, uint nameSize)
{
}
public:
TriggerMetaInfo* metaInfo;
};
template <typename T> class FunctionFactoryImpl : public FunctionFactory
{
public:
FunctionFactoryImpl(const char* aName)
: name(aName)
{
fbUdrRegFunction(this);
}
public:
virtual const char* FB_CALL getName()
{
return name;
}
virtual ExternalFunction* FB_CALL newItem(MetaInfo* metaInfo)
{
Function* function = new T();
function->metaInfo = metaInfo;
return function;
}
private:
const char* name;
};
template <typename T> class ProcedureFactoryImpl : public ProcedureFactory
{
public:
ProcedureFactoryImpl(const char* aName)
: name(aName)
{
fbUdrRegProcedure(this);
}
public:
virtual const char* FB_CALL getName()
{
return name;
}
virtual ExternalProcedure* FB_CALL newItem(MetaInfo* metaInfo)
{
Procedure* procedure = new T();
procedure->metaInfo = metaInfo;
return procedure;
}
private:
const char* name;
};
template <typename T> class TriggerFactoryImpl : public TriggerFactory
{
public:
TriggerFactoryImpl(const char* aName)
: name(aName)
{
fbUdrRegTrigger(this);
}
public:
virtual const char* FB_CALL getName()
{
return name;
}
virtual ExternalTrigger* FB_CALL newItem(TriggerMetaInfo* metaInfo)
{
Trigger* trigger = new T();
trigger->metaInfo = metaInfo;
return trigger;
}
private:
const char* name;
};
//------------------------------------------------------------------------------
} // namespace Udr
} // namespace Firebird
#endif // FIREBIRD_PLUGIN_UDR_CPP

View File

@ -619,6 +619,7 @@
#define isc_dyn_prm_name 137 #define isc_dyn_prm_name 137
#define isc_dyn_sql_object 196 #define isc_dyn_sql_object 196
#define isc_dyn_fld_character_set_name 174 #define isc_dyn_fld_character_set_name 174
#define isc_dyn_pkg_name 247
/********************************/ /********************************/
/* Relation specific attributes */ /* Relation specific attributes */
@ -670,6 +671,8 @@
#define isc_dyn_fld_character_set 203 #define isc_dyn_fld_character_set 203
#define isc_dyn_del_computed 242 #define isc_dyn_del_computed 242
#define isc_dyn_def_engine 245
/***********************************/ /***********************************/
/* Local field specific attributes */ /* Local field specific attributes */
/***********************************/ /***********************************/
@ -717,6 +720,9 @@
#define isc_dyn_grant_user_group 205 #define isc_dyn_grant_user_group 205
#define isc_dyn_grant_role 218 #define isc_dyn_grant_role 218
#define isc_dyn_grant_grantor 245 #define isc_dyn_grant_grantor 245
#define isc_dyn_grant_package 248
#define isc_dyn_fld_null 249
/**********************************/ /**********************************/
@ -891,7 +897,7 @@
/****************************/ /****************************/
/* Last $dyn value assigned */ /* Last $dyn value assigned */
/****************************/ /****************************/
#define isc_dyn_last_dyn_value 247 #define isc_dyn_last_dyn_value 250
/******************************************/ /******************************************/
/* Array slice description language (SDL) */ /* Array slice description language (SDL) */

View File

@ -87,7 +87,7 @@ using namespace NAMESPACE;
// Comment this definition to build without priority scheduler // Comment this definition to build without priority scheduler
// OR: // OR:
// Uncomment this definition to build with priority scheduler // Uncomment this definition to build with priority scheduler
#define THREAD_PSCHED //#define THREAD_PSCHED
#endif #endif
#if defined(WIN_NT) #if defined(WIN_NT)

View File

@ -689,6 +689,8 @@ static const struct {
{"out_of_temp_space", 335544985}, {"out_of_temp_space", 335544985},
{"eds_expl_tran_ctrl", 335544986}, {"eds_expl_tran_ctrl", 335544986},
{"no_trusted_spb", 335544987}, {"no_trusted_spb", 335544987},
{"package_name", 335544988},
{"cannot_make_not_null", 335544989},
{"gfix_db_name", 335740929}, {"gfix_db_name", 335740929},
{"gfix_invalid_sw", 335740930}, {"gfix_invalid_sw", 335740930},
{"gfix_incmp_sw", 335740932}, {"gfix_incmp_sw", 335740932},
@ -746,7 +748,21 @@ static const struct {
{"upd_ins_with_complex_view", 336003101}, {"upd_ins_with_complex_view", 336003101},
{"dsql_incompatible_trigger_type", 336003102}, {"dsql_incompatible_trigger_type", 336003102},
{"dsql_db_trigger_type_cant_change", 336003103}, {"dsql_db_trigger_type_cant_change", 336003103},
{"dyn_filter_not_found", 336068645},
{"dyn_func_not_found", 336068649},
{"dyn_index_not_found", 336068656},
{"dyn_view_not_found", 336068662},
{"dyn_domain_not_found", 336068697},
{"dyn_cant_modify_auto_trig", 336068717},
{"dyn_dup_table", 336068740}, {"dyn_dup_table", 336068740},
{"dyn_proc_not_found", 336068748},
{"dyn_exception_not_found", 336068752},
{"dyn_proc_param_not_found", 336068754},
{"dyn_trig_not_found", 336068755},
{"dyn_charset_not_found", 336068759},
{"dyn_collation_not_found", 336068760},
{"dyn_role_not_found", 336068763},
{"dyn_name_longer", 336068767},
{"dyn_column_does_not_exist", 336068784}, {"dyn_column_does_not_exist", 336068784},
{"dyn_role_does_not_exist", 336068796}, {"dyn_role_does_not_exist", 336068796},
{"dyn_no_grant_admin_opt", 336068797}, {"dyn_no_grant_admin_opt", 336068797},
@ -765,9 +781,11 @@ static const struct {
{"dyn_invalid_dtype_conversion", 336068817}, {"dyn_invalid_dtype_conversion", 336068817},
{"dyn_dtype_conv_invalid", 336068818}, {"dyn_dtype_conv_invalid", 336068818},
{"dyn_zero_len_id", 336068820}, {"dyn_zero_len_id", 336068820},
{"dyn_gen_not_found", 336068822},
{"max_coll_per_charset", 336068829}, {"max_coll_per_charset", 336068829},
{"invalid_coll_attr", 336068830}, {"invalid_coll_attr", 336068830},
{"dyn_wrong_gtt_scope", 336068840}, {"dyn_wrong_gtt_scope", 336068840},
{"dyn_table_not_found", 336068849},
{"dyn_scale_too_big", 336068852}, {"dyn_scale_too_big", 336068852},
{"dyn_precision_too_small", 336068853}, {"dyn_precision_too_small", 336068853},
{"dyn_miss_priv_warning", 336068855}, {"dyn_miss_priv_warning", 336068855},

View File

@ -723,6 +723,8 @@ const ISC_STATUS isc_instance_conflict = 335544984L;
const ISC_STATUS isc_out_of_temp_space = 335544985L; const ISC_STATUS isc_out_of_temp_space = 335544985L;
const ISC_STATUS isc_eds_expl_tran_ctrl = 335544986L; const ISC_STATUS isc_eds_expl_tran_ctrl = 335544986L;
const ISC_STATUS isc_no_trusted_spb = 335544987L; const ISC_STATUS isc_no_trusted_spb = 335544987L;
const ISC_STATUS isc_package_name = 335544988L;
const ISC_STATUS isc_cannot_make_not_null = 335544989L;
const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_db_name = 335740929L;
const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L;
const ISC_STATUS isc_gfix_incmp_sw = 335740932L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L;
@ -780,7 +782,21 @@ const ISC_STATUS isc_upd_ins_doesnt_match_matching = 336003100L;
const ISC_STATUS isc_upd_ins_with_complex_view = 336003101L; const ISC_STATUS isc_upd_ins_with_complex_view = 336003101L;
const ISC_STATUS isc_dsql_incompatible_trigger_type = 336003102L; const ISC_STATUS isc_dsql_incompatible_trigger_type = 336003102L;
const ISC_STATUS isc_dsql_db_trigger_type_cant_change = 336003103L; const ISC_STATUS isc_dsql_db_trigger_type_cant_change = 336003103L;
const ISC_STATUS isc_dyn_filter_not_found = 336068645L;
const ISC_STATUS isc_dyn_func_not_found = 336068649L;
const ISC_STATUS isc_dyn_index_not_found = 336068656L;
const ISC_STATUS isc_dyn_view_not_found = 336068662L;
const ISC_STATUS isc_dyn_domain_not_found = 336068697L;
const ISC_STATUS isc_dyn_cant_modify_auto_trig = 336068717L;
const ISC_STATUS isc_dyn_dup_table = 336068740L; const ISC_STATUS isc_dyn_dup_table = 336068740L;
const ISC_STATUS isc_dyn_proc_not_found = 336068748L;
const ISC_STATUS isc_dyn_exception_not_found = 336068752L;
const ISC_STATUS isc_dyn_proc_param_not_found = 336068754L;
const ISC_STATUS isc_dyn_trig_not_found = 336068755L;
const ISC_STATUS isc_dyn_charset_not_found = 336068759L;
const ISC_STATUS isc_dyn_collation_not_found = 336068760L;
const ISC_STATUS isc_dyn_role_not_found = 336068763L;
const ISC_STATUS isc_dyn_name_longer = 336068767L;
const ISC_STATUS isc_dyn_column_does_not_exist = 336068784L; const ISC_STATUS isc_dyn_column_does_not_exist = 336068784L;
const ISC_STATUS isc_dyn_role_does_not_exist = 336068796L; const ISC_STATUS isc_dyn_role_does_not_exist = 336068796L;
const ISC_STATUS isc_dyn_no_grant_admin_opt = 336068797L; const ISC_STATUS isc_dyn_no_grant_admin_opt = 336068797L;
@ -799,9 +815,11 @@ const ISC_STATUS isc_dyn_char_fld_too_small = 336068816L;
const ISC_STATUS isc_dyn_invalid_dtype_conversion = 336068817L; const ISC_STATUS isc_dyn_invalid_dtype_conversion = 336068817L;
const ISC_STATUS isc_dyn_dtype_conv_invalid = 336068818L; const ISC_STATUS isc_dyn_dtype_conv_invalid = 336068818L;
const ISC_STATUS isc_dyn_zero_len_id = 336068820L; const ISC_STATUS isc_dyn_zero_len_id = 336068820L;
const ISC_STATUS isc_dyn_gen_not_found = 336068822L;
const ISC_STATUS isc_max_coll_per_charset = 336068829L; const ISC_STATUS isc_max_coll_per_charset = 336068829L;
const ISC_STATUS isc_invalid_coll_attr = 336068830L; const ISC_STATUS isc_invalid_coll_attr = 336068830L;
const ISC_STATUS isc_dyn_wrong_gtt_scope = 336068840L; const ISC_STATUS isc_dyn_wrong_gtt_scope = 336068840L;
const ISC_STATUS isc_dyn_table_not_found = 336068849L;
const ISC_STATUS isc_dyn_scale_too_big = 336068852L; const ISC_STATUS isc_dyn_scale_too_big = 336068852L;
const ISC_STATUS isc_dyn_precision_too_small = 336068853L; const ISC_STATUS isc_dyn_precision_too_small = 336068853L;
const ISC_STATUS isc_dyn_miss_priv_warning = 336068855L; const ISC_STATUS isc_dyn_miss_priv_warning = 336068855L;
@ -1016,7 +1034,7 @@ const ISC_STATUS isc_fbsvcmgr_fp_open = 336986160L;
const ISC_STATUS isc_fbsvcmgr_fp_read = 336986161L; const ISC_STATUS isc_fbsvcmgr_fp_read = 336986161L;
const ISC_STATUS isc_fbsvcmgr_fp_empty = 336986162L; const ISC_STATUS isc_fbsvcmgr_fp_empty = 336986162L;
const ISC_STATUS isc_utl_trusted_switch = 337051649L; const ISC_STATUS isc_utl_trusted_switch = 337051649L;
const ISC_STATUS isc_err_max = 960; const ISC_STATUS isc_err_max = 978;
#else /* c definitions */ #else /* c definitions */
@ -1709,6 +1727,8 @@ const ISC_STATUS isc_err_max = 960;
#define isc_out_of_temp_space 335544985L #define isc_out_of_temp_space 335544985L
#define isc_eds_expl_tran_ctrl 335544986L #define isc_eds_expl_tran_ctrl 335544986L
#define isc_no_trusted_spb 335544987L #define isc_no_trusted_spb 335544987L
#define isc_package_name 335544988L
#define isc_cannot_make_not_null 335544989L
#define isc_gfix_db_name 335740929L #define isc_gfix_db_name 335740929L
#define isc_gfix_invalid_sw 335740930L #define isc_gfix_invalid_sw 335740930L
#define isc_gfix_incmp_sw 335740932L #define isc_gfix_incmp_sw 335740932L
@ -1766,7 +1786,21 @@ const ISC_STATUS isc_err_max = 960;
#define isc_upd_ins_with_complex_view 336003101L #define isc_upd_ins_with_complex_view 336003101L
#define isc_dsql_incompatible_trigger_type 336003102L #define isc_dsql_incompatible_trigger_type 336003102L
#define isc_dsql_db_trigger_type_cant_change 336003103L #define isc_dsql_db_trigger_type_cant_change 336003103L
#define isc_dyn_filter_not_found 336068645L
#define isc_dyn_func_not_found 336068649L
#define isc_dyn_index_not_found 336068656L
#define isc_dyn_view_not_found 336068662L
#define isc_dyn_domain_not_found 336068697L
#define isc_dyn_cant_modify_auto_trig 336068717L
#define isc_dyn_dup_table 336068740L #define isc_dyn_dup_table 336068740L
#define isc_dyn_proc_not_found 336068748L
#define isc_dyn_exception_not_found 336068752L
#define isc_dyn_proc_param_not_found 336068754L
#define isc_dyn_trig_not_found 336068755L
#define isc_dyn_charset_not_found 336068759L
#define isc_dyn_collation_not_found 336068760L
#define isc_dyn_role_not_found 336068763L
#define isc_dyn_name_longer 336068767L
#define isc_dyn_column_does_not_exist 336068784L #define isc_dyn_column_does_not_exist 336068784L
#define isc_dyn_role_does_not_exist 336068796L #define isc_dyn_role_does_not_exist 336068796L
#define isc_dyn_no_grant_admin_opt 336068797L #define isc_dyn_no_grant_admin_opt 336068797L
@ -1785,9 +1819,11 @@ const ISC_STATUS isc_err_max = 960;
#define isc_dyn_invalid_dtype_conversion 336068817L #define isc_dyn_invalid_dtype_conversion 336068817L
#define isc_dyn_dtype_conv_invalid 336068818L #define isc_dyn_dtype_conv_invalid 336068818L
#define isc_dyn_zero_len_id 336068820L #define isc_dyn_zero_len_id 336068820L
#define isc_dyn_gen_not_found 336068822L
#define isc_max_coll_per_charset 336068829L #define isc_max_coll_per_charset 336068829L
#define isc_invalid_coll_attr 336068830L #define isc_invalid_coll_attr 336068830L
#define isc_dyn_wrong_gtt_scope 336068840L #define isc_dyn_wrong_gtt_scope 336068840L
#define isc_dyn_table_not_found 336068849L
#define isc_dyn_scale_too_big 336068852L #define isc_dyn_scale_too_big 336068852L
#define isc_dyn_precision_too_small 336068853L #define isc_dyn_precision_too_small 336068853L
#define isc_dyn_miss_priv_warning 336068855L #define isc_dyn_miss_priv_warning 336068855L
@ -2002,7 +2038,7 @@ const ISC_STATUS isc_err_max = 960;
#define isc_fbsvcmgr_fp_read 336986161L #define isc_fbsvcmgr_fp_read 336986161L
#define isc_fbsvcmgr_fp_empty 336986162L #define isc_fbsvcmgr_fp_empty 336986162L
#define isc_utl_trusted_switch 337051649L #define isc_utl_trusted_switch 337051649L
#define isc_err_max 960 #define isc_err_max 978
#endif #endif

View File

@ -171,6 +171,8 @@
const USHORT f_trg_flags = 9; const USHORT f_trg_flags = 9;
const USHORT f_trg_valid_blr = 10; const USHORT f_trg_valid_blr = 10;
const USHORT f_trg_debug_info = 11; const USHORT f_trg_debug_info = 11;
const USHORT f_trg_engine_name = 12;
const USHORT f_trg_entry = 13;
const USHORT f_dpd_name = 0; const USHORT f_dpd_name = 0;
@ -178,6 +180,7 @@
const USHORT f_dpd_f_name = 2; const USHORT f_dpd_f_name = 2;
const USHORT f_dpd_type = 3; const USHORT f_dpd_type = 3;
const USHORT f_dpd_o_type = 4; const USHORT f_dpd_o_type = 4;
const USHORT f_dpd_pkg_name = 5;
const USHORT f_fun_name = 0; const USHORT f_fun_name = 0;
@ -188,6 +191,10 @@
const USHORT f_fun_entry = 5; const USHORT f_fun_entry = 5;
const USHORT f_fun_ret_arg = 6; const USHORT f_fun_ret_arg = 6;
const USHORT f_fun_sys_flag = 7; 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_arg_fun_name = 0; const USHORT f_arg_fun_name = 0;
@ -200,6 +207,7 @@
const USHORT f_arg_charset_id = 7; const USHORT f_arg_charset_id = 7;
const USHORT f_arg_precision = 8; const USHORT f_arg_precision = 8;
const USHORT f_arg_char_length = 9; const USHORT f_arg_char_length = 9;
const USHORT f_arg_pkg_name = 10;
const USHORT f_flt_name = 0; const USHORT f_flt_name = 0;
@ -285,6 +293,10 @@
const USHORT f_prc_type = 11; const USHORT f_prc_type = 11;
const USHORT f_prc_valid_blr = 12; const USHORT f_prc_valid_blr = 12;
const USHORT f_prc_debug_info = 13; 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_prm_name = 0; const USHORT f_prm_name = 0;
@ -301,6 +313,7 @@
const USHORT f_prm_mech = 11; const USHORT f_prm_mech = 11;
const USHORT f_prm_fname = 12; const USHORT f_prm_fname = 12;
const USHORT f_prm_rname = 13; const USHORT f_prm_rname = 13;
const USHORT f_prm_pkg_name = 14;
const USHORT f_cs_cs_name = 0; const USHORT f_cs_cs_name = 0;
@ -419,6 +432,7 @@
const USHORT f_mon_call_src_line = 6; const USHORT f_mon_call_src_line = 6;
const USHORT f_mon_call_src_column = 7; const USHORT f_mon_call_src_column = 7;
const USHORT f_mon_call_stat_id = 8; const USHORT f_mon_call_stat_id = 8;
const USHORT f_mon_call_pkg_name = 9;
const USHORT f_mon_io_stat_id = 0; const USHORT f_mon_io_stat_id = 0;
@ -455,3 +469,15 @@
const USHORT f_mon_mem_max_alloc = 5; const USHORT f_mon_mem_max_alloc = 5;
// Continue persistent tables
const USHORT f_pkg_name = 0;
const USHORT f_pkg_header_source = 1;
const USHORT f_pkg_body_source = 2;
const USHORT f_pkg_class = 3;
const USHORT f_pkg_owner = 4;
const USHORT f_pkg_sys_flag = 5;
const USHORT f_pkg_desc = 6;

View File

@ -252,7 +252,7 @@ static const struct {
{335544548, "Attempt to define a second PRIMARY KEY for the same table"}, /* 228, primary_key_exists */ {335544548, "Attempt to define a second PRIMARY KEY for the same table"}, /* 228, primary_key_exists */
{335544549, "cannot modify or erase a system trigger"}, /* 229, systrig_update */ {335544549, "cannot modify or erase a system trigger"}, /* 229, systrig_update */
{335544550, "only the owner of a table may reassign ownership"}, /* 230, not_rel_owner */ {335544550, "only the owner of a table may reassign ownership"}, /* 230, not_rel_owner */
{335544551, "could not find table/procedure for GRANT"}, /* 231, grant_obj_notfound */ {335544551, "could not find table/procedure/package for GRANT"}, /* 231, grant_obj_notfound */
{335544552, "could not find column for GRANT"}, /* 232, grant_fld_notfound */ {335544552, "could not find column for GRANT"}, /* 232, grant_fld_notfound */
{335544553, "user does not have GRANT privileges for operation"}, /* 233, grant_nopriv */ {335544553, "user does not have GRANT privileges for operation"}, /* 233, grant_nopriv */
{335544554, "table/procedure has non-SQL security class defined"}, /* 234, nonsql_security_rel */ {335544554, "table/procedure has non-SQL security class defined"}, /* 234, nonsql_security_rel */
@ -523,11 +523,11 @@ static const struct {
{335544819, "File exceeded maximum size of 2GB. Add another database file or use a 64 bit I/O version of Firebird."}, /* 499, io_32bit_exceeded_err */ {335544819, "File exceeded maximum size of 2GB. Add another database file or use a 64 bit I/O version of Firebird."}, /* 499, io_32bit_exceeded_err */
{335544820, "Unable to find savepoint with name @1 in transaction context"}, /* 500, invalid_savepoint */ {335544820, "Unable to find savepoint with name @1 in transaction context"}, /* 500, invalid_savepoint */
{335544821, "Invalid column position used in the @1 clause"}, /* 501, dsql_column_pos_err */ {335544821, "Invalid column position used in the @1 clause"}, /* 501, dsql_column_pos_err */
{335544822, "Cannot use an aggregate function in a WHERE clause, use HAVING instead"}, /* 502, dsql_agg_where_err */ {335544822, "Cannot use an aggregate or window function in a WHERE clause, use HAVING (for aggregate only) instead"}, /* 502, dsql_agg_where_err */
{335544823, "Cannot use an aggregate function in a GROUP BY clause"}, /* 503, dsql_agg_group_err */ {335544823, "Cannot use an aggregate or window function in a GROUP BY clause"}, /* 503, dsql_agg_group_err */
{335544824, "Invalid expression in the @1 (not contained in either an aggregate function or the GROUP BY clause)"}, /* 504, dsql_agg_column_err */ {335544824, "Invalid expression in the @1 (not contained in either an aggregate function or the GROUP BY clause)"}, /* 504, dsql_agg_column_err */
{335544825, "Invalid expression in the @1 (neither an aggregate function nor a part of the GROUP BY clause)"}, /* 505, dsql_agg_having_err */ {335544825, "Invalid expression in the @1 (neither an aggregate function nor a part of the GROUP BY clause)"}, /* 505, dsql_agg_having_err */
{335544826, "Nested aggregate functions are not allowed"}, /* 506, dsql_agg_nested_err */ {335544826, "Nested aggregate and window functions are not allowed"}, /* 506, dsql_agg_nested_err */
{335544827, "Invalid argument in EXECUTE STATEMENT - cannot convert to string"}, /* 507, exec_sql_invalid_arg */ {335544827, "Invalid argument in EXECUTE STATEMENT - cannot convert to string"}, /* 507, exec_sql_invalid_arg */
{335544828, "Wrong request type in EXECUTE STATEMENT '@1'"}, /* 508, exec_sql_invalid_req */ {335544828, "Wrong request type in EXECUTE STATEMENT '@1'"}, /* 508, exec_sql_invalid_req */
{335544829, "Variable type (position @1) in EXECUTE STATEMENT '@2' INTO does not match returned column type"}, /* 509, exec_sql_invalid_var */ {335544829, "Variable type (position @1) in EXECUTE STATEMENT '@2' INTO does not match returned column type"}, /* 509, exec_sql_invalid_var */
@ -692,298 +692,316 @@ Data source : @4"}, /* 606, eds_statement */
{335544985, "No free space found in temporary directories"}, /* 665, out_of_temp_space */ {335544985, "No free space found in temporary directories"}, /* 665, out_of_temp_space */
{335544986, "Explicit transaction control is not allowed"}, /* 666, eds_expl_tran_ctrl */ {335544986, "Explicit transaction control is not allowed"}, /* 666, eds_expl_tran_ctrl */
{335544987, "Use of TRUSTED switches in spb_command_line is prohibited"}, /* 667, no_trusted_spb */ {335544987, "Use of TRUSTED switches in spb_command_line is prohibited"}, /* 667, no_trusted_spb */
{335740929, "data base file name (@1) already given"}, /* 668, gfix_db_name */ {335544988, "PACKAGE @1"}, /* 668, package_name */
{335740930, "invalid switch @1"}, /* 669, gfix_invalid_sw */ {335544989, "Cannot make field @1 NOT NULL because there are NULLs present"}, /* 669, cannot_make_not_null */
{335740932, "incompatible switch combination"}, /* 670, gfix_incmp_sw */ {335740929, "data base file name (@1) already given"}, /* 670, gfix_db_name */
{335740933, "replay log pathname required"}, /* 671, gfix_replay_req */ {335740930, "invalid switch @1"}, /* 671, gfix_invalid_sw */
{335740934, "number of page buffers for cache required"}, /* 672, gfix_pgbuf_req */ {335740932, "incompatible switch combination"}, /* 672, gfix_incmp_sw */
{335740935, "numeric value required"}, /* 673, gfix_val_req */ {335740933, "replay log pathname required"}, /* 673, gfix_replay_req */
{335740936, "positive numeric value required"}, /* 674, gfix_pval_req */ {335740934, "number of page buffers for cache required"}, /* 674, gfix_pgbuf_req */
{335740937, "number of transactions per sweep required"}, /* 675, gfix_trn_req */ {335740935, "numeric value required"}, /* 675, gfix_val_req */
{335740940, "\"full\" or \"reserve\" required"}, /* 676, gfix_full_req */ {335740936, "positive numeric value required"}, /* 676, gfix_pval_req */
{335740941, "user name required"}, /* 677, gfix_usrname_req */ {335740937, "number of transactions per sweep required"}, /* 677, gfix_trn_req */
{335740942, "password required"}, /* 678, gfix_pass_req */ {335740940, "\"full\" or \"reserve\" required"}, /* 678, gfix_full_req */
{335740943, "subsystem name"}, /* 679, gfix_subs_name */ {335740941, "user name required"}, /* 679, gfix_usrname_req */
{335740944, "\"wal\" required"}, /* 680, gfix_wal_req */ {335740942, "password required"}, /* 680, gfix_pass_req */
{335740945, "number of seconds required"}, /* 681, gfix_sec_req */ {335740943, "subsystem name"}, /* 681, gfix_subs_name */
{335740946, "numeric value between 0 and 32767 inclusive required"}, /* 682, gfix_nval_req */ {335740944, "\"wal\" required"}, /* 682, gfix_wal_req */
{335740947, "must specify type of shutdown"}, /* 683, gfix_type_shut */ {335740945, "number of seconds required"}, /* 683, gfix_sec_req */
{335740948, "please retry, specifying an option"}, /* 684, gfix_retry */ {335740946, "numeric value between 0 and 32767 inclusive required"}, /* 684, gfix_nval_req */
{335740951, "please retry, giving a database name"}, /* 685, gfix_retry_db */ {335740947, "must specify type of shutdown"}, /* 685, gfix_type_shut */
{335740991, "internal block exceeds maximum size"}, /* 686, gfix_exceed_max */ {335740948, "please retry, specifying an option"}, /* 686, gfix_retry */
{335740992, "corrupt pool"}, /* 687, gfix_corrupt_pool */ {335740951, "please retry, giving a database name"}, /* 687, gfix_retry_db */
{335740993, "virtual memory exhausted"}, /* 688, gfix_mem_exhausted */ {335740991, "internal block exceeds maximum size"}, /* 688, gfix_exceed_max */
{335740994, "bad pool id"}, /* 689, gfix_bad_pool */ {335740992, "corrupt pool"}, /* 689, gfix_corrupt_pool */
{335740995, "Transaction state @1 not in valid range."}, /* 690, gfix_trn_not_valid */ {335740993, "virtual memory exhausted"}, /* 690, gfix_mem_exhausted */
{335741012, "unexpected end of input"}, /* 691, gfix_unexp_eoi */ {335740994, "bad pool id"}, /* 691, gfix_bad_pool */
{335741018, "failed to reconnect to a transaction in database @1"}, /* 692, gfix_recon_fail */ {335740995, "Transaction state @1 not in valid range."}, /* 692, gfix_trn_not_valid */
{335741036, "Transaction description item unknown"}, /* 693, gfix_trn_unknown */ {335741012, "unexpected end of input"}, /* 693, gfix_unexp_eoi */
{335741038, "\"read_only\" or \"read_write\" required"}, /* 694, gfix_mode_req */ {335741018, "failed to reconnect to a transaction in database @1"}, /* 694, gfix_recon_fail */
{335741042, "positive or zero numeric value required"}, /* 695, gfix_pzval_req */ {335741036, "Transaction description item unknown"}, /* 695, gfix_trn_unknown */
{336003074, "Cannot SELECT RDB$DB_KEY from a stored procedure."}, /* 696, dsql_dbkey_from_non_table */ {335741038, "\"read_only\" or \"read_write\" required"}, /* 696, gfix_mode_req */
{336003075, "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3"}, /* 697, dsql_transitional_numeric */ {335741042, "positive or zero numeric value required"}, /* 697, gfix_pzval_req */
{336003076, "Use of @1 expression that returns different results in dialect 1 and dialect 3"}, /* 698, dsql_dialect_warning_expr */ {336003074, "Cannot SELECT RDB$DB_KEY from a stored procedure."}, /* 698, dsql_dbkey_from_non_table */
{336003077, "Database SQL dialect @1 does not support reference to @2 datatype"}, /* 699, sql_db_dialect_dtype_unsupport */ {336003075, "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3"}, /* 699, dsql_transitional_numeric */
{336003079, "DB dialect @1 and client dialect @2 conflict with respect to numeric precision @3."}, /* 700, isc_sql_dialect_conflict_num */ {336003076, "Use of @1 expression that returns different results in dialect 1 and dialect 3"}, /* 700, dsql_dialect_warning_expr */
{336003080, "WARNING: Numeric literal @1 is interpreted as a floating-point"}, /* 701, dsql_warning_number_ambiguous */ {336003077, "Database SQL dialect @1 does not support reference to @2 datatype"}, /* 701, sql_db_dialect_dtype_unsupport */
{336003081, "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3."}, /* 702, dsql_warning_number_ambiguous1 */ {336003079, "DB dialect @1 and client dialect @2 conflict with respect to numeric precision @3."}, /* 702, isc_sql_dialect_conflict_num */
{336003082, "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored"}, /* 703, dsql_warn_precision_ambiguous */ {336003080, "WARNING: Numeric literal @1 is interpreted as a floating-point"}, /* 703, dsql_warning_number_ambiguous */
{336003083, "as approximate floating-point values in SQL dialect 1, but as 64-bit"}, /* 704, dsql_warn_precision_ambiguous1 */ {336003081, "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3."}, /* 704, dsql_warning_number_ambiguous1 */
{336003084, "integers in SQL dialect 3."}, /* 705, dsql_warn_precision_ambiguous2 */ {336003082, "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored"}, /* 705, dsql_warn_precision_ambiguous */
{336003085, "Ambiguous field name between @1 and @2"}, /* 706, dsql_ambiguous_field_name */ {336003083, "as approximate floating-point values in SQL dialect 1, but as 64-bit"}, /* 706, dsql_warn_precision_ambiguous1 */
{336003086, "External function should have return position between 1 and @1"}, /* 707, dsql_udf_return_pos_err */ {336003084, "integers in SQL dialect 3."}, /* 707, dsql_warn_precision_ambiguous2 */
{336003087, "Label @1 @2 in the current scope"}, /* 708, dsql_invalid_label */ {336003085, "Ambiguous field name between @1 and @2"}, /* 708, dsql_ambiguous_field_name */
{336003088, "Datatypes @1are not comparable in expression @2"}, /* 709, dsql_datatypes_not_comparable */ {336003086, "External function should have return position between 1 and @1"}, /* 709, dsql_udf_return_pos_err */
{336003089, "Empty cursor name is not allowed"}, /* 710, dsql_cursor_invalid */ {336003087, "Label @1 @2 in the current scope"}, /* 710, dsql_invalid_label */
{336003090, "Statement already has a cursor @1 assigned"}, /* 711, dsql_cursor_redefined */ {336003088, "Datatypes @1are not comparable in expression @2"}, /* 711, dsql_datatypes_not_comparable */
{336003091, "Cursor @1 is not found in the current context"}, /* 712, dsql_cursor_not_found */ {336003089, "Empty cursor name is not allowed"}, /* 712, dsql_cursor_invalid */
{336003092, "Cursor @1 already exists in the current context"}, /* 713, dsql_cursor_exists */ {336003090, "Statement already has a cursor @1 assigned"}, /* 713, dsql_cursor_redefined */
{336003093, "Relation @1 is ambiguous in cursor @2"}, /* 714, dsql_cursor_rel_ambiguous */ {336003091, "Cursor @1 is not found in the current context"}, /* 714, dsql_cursor_not_found */
{336003094, "Relation @1 is not found in cursor @2"}, /* 715, dsql_cursor_rel_not_found */ {336003092, "Cursor @1 already exists in the current context"}, /* 715, dsql_cursor_exists */
{336003095, "Cursor is not open"}, /* 716, dsql_cursor_not_open */ {336003093, "Relation @1 is ambiguous in cursor @2"}, /* 716, dsql_cursor_rel_ambiguous */
{336003096, "Data type @1 is not supported for EXTERNAL TABLES. Relation '@2', field '@3'"}, /* 717, dsql_type_not_supp_ext_tab */ {336003094, "Relation @1 is not found in cursor @2"}, /* 717, dsql_cursor_rel_not_found */
{336003097, "Feature not supported on ODS version older than @1.@2"}, /* 718, dsql_feature_not_supported_ods */ {336003095, "Cursor is not open"}, /* 718, dsql_cursor_not_open */
{336003098, "Primary key required on table @1"}, /* 719, primary_key_required */ {336003096, "Data type @1 is not supported for EXTERNAL TABLES. Relation '@2', field '@3'"}, /* 719, dsql_type_not_supp_ext_tab */
{336003099, "UPDATE OR INSERT field list does not match primary key of table @1"}, /* 720, upd_ins_doesnt_match_pk */ {336003097, "Feature not supported on ODS version older than @1.@2"}, /* 720, dsql_feature_not_supported_ods */
{336003100, "UPDATE OR INSERT field list does not match MATCHING clause"}, /* 721, upd_ins_doesnt_match_matching */ {336003098, "Primary key required on table @1"}, /* 721, primary_key_required */
{336003101, "UPDATE OR INSERT without MATCHING could not be used with views based on more than one table"}, /* 722, upd_ins_with_complex_view */ {336003099, "UPDATE OR INSERT field list does not match primary key of table @1"}, /* 722, upd_ins_doesnt_match_pk */
{336003102, "Incompatible trigger type"}, /* 723, dsql_incompatible_trigger_type */ {336003100, "UPDATE OR INSERT field list does not match MATCHING clause"}, /* 723, upd_ins_doesnt_match_matching */
{336003103, "Database trigger type can't be changed"}, /* 724, dsql_db_trigger_type_cant_change */ {336003101, "UPDATE OR INSERT without MATCHING could not be used with views based on more than one table"}, /* 724, upd_ins_with_complex_view */
{336068740, "Table @1 already exists"}, /* 725, dyn_dup_table */ {336003102, "Incompatible trigger type"}, /* 725, dsql_incompatible_trigger_type */
{336068784, "column @1 does not exist in table/view @2"}, /* 726, dyn_column_does_not_exist */ {336003103, "Database trigger type can't be changed"}, /* 726, dsql_db_trigger_type_cant_change */
{336068796, "SQL role @1 does not exist"}, /* 727, dyn_role_does_not_exist */ {336068645, "BLOB Filter @1 not found"}, /* 727, dyn_filter_not_found */
{336068797, "user @1 has no grant admin option on SQL role @2"}, /* 728, dyn_no_grant_admin_opt */ {336068649, "Function @1 not found"}, /* 728, dyn_func_not_found */
{336068798, "user @1 is not a member of SQL role @2"}, /* 729, dyn_user_not_role_member */ {336068656, "Index not found"}, /* 729, dyn_index_not_found */
{336068799, "@1 is not the owner of SQL role @2"}, /* 730, dyn_delete_role_failed */ {336068662, "View @1 not found"}, /* 730, dyn_view_not_found */
{336068800, "@1 is a SQL role and not a user"}, /* 731, dyn_grant_role_to_user */ {336068697, "Domain not found"}, /* 731, dyn_domain_not_found */
{336068801, "user name @1 could not be used for SQL role"}, /* 732, dyn_inv_sql_role_name */ {336068717, "Triggers created automatically cannot be modified"}, /* 732, dyn_cant_modify_auto_trig */
{336068802, "SQL role @1 already exists"}, /* 733, dyn_dup_sql_role */ {336068740, "Table @1 already exists"}, /* 733, dyn_dup_table */
{336068803, "keyword @1 can not be used as a SQL role name"}, /* 734, dyn_kywd_spec_for_role */ {336068748, "Procedure @1 not found"}, /* 734, dyn_proc_not_found */
{336068804, "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required."}, /* 735, dyn_roles_not_supported */ {336068752, "Exception not found"}, /* 735, dyn_exception_not_found */
{336068812, "Cannot rename domain @1 to @2. A domain with that name already exists."}, /* 736, dyn_domain_name_exists */ {336068754, "Parameter @1 in procedure @2 not found"}, /* 736, dyn_proc_param_not_found */
{336068813, "Cannot rename column @1 to @2. A column with that name already exists in table @3."}, /* 737, dyn_field_name_exists */ {336068755, "Trigger @1 not found"}, /* 737, dyn_trig_not_found */
{336068814, "Column @1 from table @2 is referenced in @3"}, /* 738, dyn_dependency_exists */ {336068759, "Character set @1 not found"}, /* 738, dyn_charset_not_found */
{336068815, "Cannot change datatype for column @1. Changing datatype is not supported for BLOB or ARRAY columns."}, /* 739, dyn_dtype_invalid */ {336068760, "Collation @1 not found"}, /* 739, dyn_collation_not_found */
{336068816, "New size specified for column @1 must be at least @2 characters."}, /* 740, dyn_char_fld_too_small */ {336068763, "Role @1 not found"}, /* 740, dyn_role_not_found */
{336068817, "Cannot change datatype for @1. Conversion from base type @2 to @3 is not supported."}, /* 741, dyn_invalid_dtype_conversion */ {336068767, "Name longer than database column size"}, /* 741, dyn_name_longer */
{336068818, "Cannot change datatype for column @1 from a character type to a non-character type."}, /* 742, dyn_dtype_conv_invalid */ {336068784, "column @1 does not exist in table/view @2"}, /* 742, dyn_column_does_not_exist */
{336068820, "Zero length identifiers are not allowed"}, /* 743, dyn_zero_len_id */ {336068796, "SQL role @1 does not exist"}, /* 743, dyn_role_does_not_exist */
{336068829, "Maximum number of collations per character set exceeded"}, /* 744, max_coll_per_charset */ {336068797, "user @1 has no grant admin option on SQL role @2"}, /* 744, dyn_no_grant_admin_opt */
{336068830, "Invalid collation attributes"}, /* 745, invalid_coll_attr */ {336068798, "user @1 is not a member of SQL role @2"}, /* 745, dyn_user_not_role_member */
{336068840, "@1 cannot reference @2"}, /* 746, dyn_wrong_gtt_scope */ {336068799, "@1 is not the owner of SQL role @2"}, /* 746, dyn_delete_role_failed */
{336068852, "New scale specified for column @1 must be at most @2."}, /* 747, dyn_scale_too_big */ {336068800, "@1 is a SQL role and not a user"}, /* 747, dyn_grant_role_to_user */
{336068853, "New precision specified for column @1 must be at least @2."}, /* 748, dyn_precision_too_small */ {336068801, "user name @1 could not be used for SQL role"}, /* 748, dyn_inv_sql_role_name */
{336068855, "Warning: @1 on @2 is not granted to @3."}, /* 749, dyn_miss_priv_warning */ {336068802, "SQL role @1 already exists"}, /* 749, dyn_dup_sql_role */
{336068856, "Feature '@1' is not supported in ODS @2.@3"}, /* 750, dyn_ods_not_supp_feature */ {336068803, "keyword @1 can not be used as a SQL role name"}, /* 750, dyn_kywd_spec_for_role */
{336068857, "Cannot add or remove COMPUTED from column @1"}, /* 751, dyn_cannot_addrem_computed */ {336068804, "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required."}, /* 751, dyn_roles_not_supported */
{336068858, "Password should not be empty string"}, /* 752, dyn_no_empty_pw */ {336068812, "Cannot rename domain @1 to @2. A domain with that name already exists."}, /* 752, dyn_domain_name_exists */
{336068859, "Index @1 already exists"}, /* 753, dyn_dup_index */ {336068813, "Cannot rename column @1 to @2. A column with that name already exists in table @3."}, /* 753, dyn_field_name_exists */
{336330753, "found unknown switch"}, /* 754, gbak_unknown_switch */ {336068814, "Column @1 from table @2 is referenced in @3"}, /* 754, dyn_dependency_exists */
{336330754, "page size parameter missing"}, /* 755, gbak_page_size_missing */ {336068815, "Cannot change datatype for column @1. Changing datatype is not supported for BLOB or ARRAY columns."}, /* 755, dyn_dtype_invalid */
{336330755, "Page size specified (@1) greater than limit (16384 bytes)"}, /* 756, gbak_page_size_toobig */ {336068816, "New size specified for column @1 must be at least @2 characters."}, /* 756, dyn_char_fld_too_small */
{336330756, "redirect location for output is not specified"}, /* 757, gbak_redir_ouput_missing */ {336068817, "Cannot change datatype for @1. Conversion from base type @2 to @3 is not supported."}, /* 757, dyn_invalid_dtype_conversion */
{336330757, "conflicting switches for backup/restore"}, /* 758, gbak_switches_conflict */ {336068818, "Cannot change datatype for column @1 from a character type to a non-character type."}, /* 758, dyn_dtype_conv_invalid */
{336330758, "device type @1 not known"}, /* 759, gbak_unknown_device */ {336068820, "Zero length identifiers are not allowed"}, /* 759, dyn_zero_len_id */
{336330759, "protection is not there yet"}, /* 760, gbak_no_protection */ {336068822, "Generator @1 not found"}, /* 760, dyn_gen_not_found */
{336330760, "page size is allowed only on restore or create"}, /* 761, gbak_page_size_not_allowed */ {336068829, "Maximum number of collations per character set exceeded"}, /* 761, max_coll_per_charset */
{336330761, "multiple sources or destinations specified"}, /* 762, gbak_multi_source_dest */ {336068830, "Invalid collation attributes"}, /* 762, invalid_coll_attr */
{336330762, "requires both input and output filenames"}, /* 763, gbak_filename_missing */ {336068840, "@1 cannot reference @2"}, /* 763, dyn_wrong_gtt_scope */
{336330763, "input and output have the same name. Disallowed."}, /* 764, gbak_dup_inout_names */ {336068849, "Table @1 not found"}, /* 764, dyn_table_not_found */
{336330764, "expected page size, encountered \"@1\""}, /* 765, gbak_inv_page_size */ {336068852, "New scale specified for column @1 must be at most @2."}, /* 765, dyn_scale_too_big */
{336330765, "REPLACE specified, but the first file @1 is a database"}, /* 766, gbak_db_specified */ {336068853, "New precision specified for column @1 must be at least @2."}, /* 766, dyn_precision_too_small */
{336330766, "database @1 already exists. To replace it, use the -REP switch"}, /* 767, gbak_db_exists */ {336068855, "Warning: @1 on @2 is not granted to @3."}, /* 767, dyn_miss_priv_warning */
{336330767, "device type not specified"}, /* 768, gbak_unk_device */ {336068856, "Feature '@1' is not supported in ODS @2.@3"}, /* 768, dyn_ods_not_supp_feature */
{336330772, "gds_$blob_info failed"}, /* 769, gbak_blob_info_failed */ {336068857, "Cannot add or remove COMPUTED from column @1"}, /* 769, dyn_cannot_addrem_computed */
{336330773, "do not understand BLOB INFO item @1"}, /* 770, gbak_unk_blob_item */ {336068858, "Password should not be empty string"}, /* 770, dyn_no_empty_pw */
{336330774, "gds_$get_segment failed"}, /* 771, gbak_get_seg_failed */ {336068859, "Index @1 already exists"}, /* 771, dyn_dup_index */
{336330775, "gds_$close_blob failed"}, /* 772, gbak_close_blob_failed */ {336330753, "found unknown switch"}, /* 772, gbak_unknown_switch */
{336330776, "gds_$open_blob failed"}, /* 773, gbak_open_blob_failed */ {336330754, "page size parameter missing"}, /* 773, gbak_page_size_missing */
{336330777, "Failed in put_blr_gen_id"}, /* 774, gbak_put_blr_gen_id_failed */ {336330755, "Page size specified (@1) greater than limit (16384 bytes)"}, /* 774, gbak_page_size_toobig */
{336330778, "data type @1 not understood"}, /* 775, gbak_unk_type */ {336330756, "redirect location for output is not specified"}, /* 775, gbak_redir_ouput_missing */
{336330779, "gds_$compile_request failed"}, /* 776, gbak_comp_req_failed */ {336330757, "conflicting switches for backup/restore"}, /* 776, gbak_switches_conflict */
{336330780, "gds_$start_request failed"}, /* 777, gbak_start_req_failed */ {336330758, "device type @1 not known"}, /* 777, gbak_unknown_device */
{336330781, "gds_$receive failed"}, /* 778, gbak_rec_failed */ {336330759, "protection is not there yet"}, /* 778, gbak_no_protection */
{336330782, "gds_$release_request failed"}, /* 779, gbak_rel_req_failed */ {336330760, "page size is allowed only on restore or create"}, /* 779, gbak_page_size_not_allowed */
{336330783, "gds_$database_info failed"}, /* 780, gbak_db_info_failed */ {336330761, "multiple sources or destinations specified"}, /* 780, gbak_multi_source_dest */
{336330784, "Expected database description record"}, /* 781, gbak_no_db_desc */ {336330762, "requires both input and output filenames"}, /* 781, gbak_filename_missing */
{336330785, "failed to create database @1"}, /* 782, gbak_db_create_failed */ {336330763, "input and output have the same name. Disallowed."}, /* 782, gbak_dup_inout_names */
{336330786, "RESTORE: decompression length error"}, /* 783, gbak_decomp_len_error */ {336330764, "expected page size, encountered \"@1\""}, /* 783, gbak_inv_page_size */
{336330787, "cannot find table @1"}, /* 784, gbak_tbl_missing */ {336330765, "REPLACE specified, but the first file @1 is a database"}, /* 784, gbak_db_specified */
{336330788, "Cannot find column for BLOB"}, /* 785, gbak_blob_col_missing */ {336330766, "database @1 already exists. To replace it, use the -REP switch"}, /* 785, gbak_db_exists */
{336330789, "gds_$create_blob failed"}, /* 786, gbak_create_blob_failed */ {336330767, "device type not specified"}, /* 786, gbak_unk_device */
{336330790, "gds_$put_segment failed"}, /* 787, gbak_put_seg_failed */ {336330772, "gds_$blob_info failed"}, /* 787, gbak_blob_info_failed */
{336330791, "expected record length"}, /* 788, gbak_rec_len_exp */ {336330773, "do not understand BLOB INFO item @1"}, /* 788, gbak_unk_blob_item */
{336330792, "wrong length record, expected @1 encountered @2"}, /* 789, gbak_inv_rec_len */ {336330774, "gds_$get_segment failed"}, /* 789, gbak_get_seg_failed */
{336330793, "expected data attribute"}, /* 790, gbak_exp_data_type */ {336330775, "gds_$close_blob failed"}, /* 790, gbak_close_blob_failed */
{336330794, "Failed in store_blr_gen_id"}, /* 791, gbak_gen_id_failed */ {336330776, "gds_$open_blob failed"}, /* 791, gbak_open_blob_failed */
{336330795, "do not recognize record type @1"}, /* 792, gbak_unk_rec_type */ {336330777, "Failed in put_blr_gen_id"}, /* 792, gbak_put_blr_gen_id_failed */
{336330796, "Expected backup version 1..9. Found @1"}, /* 793, gbak_inv_bkup_ver */ {336330778, "data type @1 not understood"}, /* 793, gbak_unk_type */
{336330797, "expected backup description record"}, /* 794, gbak_missing_bkup_desc */ {336330779, "gds_$compile_request failed"}, /* 794, gbak_comp_req_failed */
{336330798, "string truncated"}, /* 795, gbak_string_trunc */ {336330780, "gds_$start_request failed"}, /* 795, gbak_start_req_failed */
{336330799, "warning -- record could not be restored"}, /* 796, gbak_cant_rest_record */ {336330781, "gds_$receive failed"}, /* 796, gbak_rec_failed */
{336330800, "gds_$send failed"}, /* 797, gbak_send_failed */ {336330782, "gds_$release_request failed"}, /* 797, gbak_rel_req_failed */
{336330801, "no table name for data"}, /* 798, gbak_no_tbl_name */ {336330783, "gds_$database_info failed"}, /* 798, gbak_db_info_failed */
{336330802, "unexpected end of file on backup file"}, /* 799, gbak_unexp_eof */ {336330784, "Expected database description record"}, /* 799, gbak_no_db_desc */
{336330803, "database format @1 is too old to restore to"}, /* 800, gbak_db_format_too_old */ {336330785, "failed to create database @1"}, /* 800, gbak_db_create_failed */
{336330804, "array dimension for column @1 is invalid"}, /* 801, gbak_inv_array_dim */ {336330786, "RESTORE: decompression length error"}, /* 801, gbak_decomp_len_error */
{336330807, "Expected XDR record length"}, /* 802, gbak_xdr_len_expected */ {336330787, "cannot find table @1"}, /* 802, gbak_tbl_missing */
{336330817, "cannot open backup file @1"}, /* 803, gbak_open_bkup_error */ {336330788, "Cannot find column for BLOB"}, /* 803, gbak_blob_col_missing */
{336330818, "cannot open status and error output file @1"}, /* 804, gbak_open_error */ {336330789, "gds_$create_blob failed"}, /* 804, gbak_create_blob_failed */
{336330934, "blocking factor parameter missing"}, /* 805, gbak_missing_block_fac */ {336330790, "gds_$put_segment failed"}, /* 805, gbak_put_seg_failed */
{336330935, "expected blocking factor, encountered \"@1\""}, /* 806, gbak_inv_block_fac */ {336330791, "expected record length"}, /* 806, gbak_rec_len_exp */
{336330936, "a blocking factor may not be used in conjunction with device CT"}, /* 807, gbak_block_fac_specified */ {336330792, "wrong length record, expected @1 encountered @2"}, /* 807, gbak_inv_rec_len */
{336330940, "user name parameter missing"}, /* 808, gbak_missing_username */ {336330793, "expected data attribute"}, /* 808, gbak_exp_data_type */
{336330941, "password parameter missing"}, /* 809, gbak_missing_password */ {336330794, "Failed in store_blr_gen_id"}, /* 809, gbak_gen_id_failed */
{336330952, " missing parameter for the number of bytes to be skipped"}, /* 810, gbak_missing_skipped_bytes */ {336330795, "do not recognize record type @1"}, /* 810, gbak_unk_rec_type */
{336330953, "expected number of bytes to be skipped, encountered \"@1\""}, /* 811, gbak_inv_skipped_bytes */ {336330796, "Expected backup version 1..9. Found @1"}, /* 811, gbak_inv_bkup_ver */
{336330965, "character set"}, /* 812, gbak_err_restore_charset */ {336330797, "expected backup description record"}, /* 812, gbak_missing_bkup_desc */
{336330967, "collation"}, /* 813, gbak_err_restore_collation */ {336330798, "string truncated"}, /* 813, gbak_string_trunc */
{336330972, "Unexpected I/O error while reading from backup file"}, /* 814, gbak_read_error */ {336330799, "warning -- record could not be restored"}, /* 814, gbak_cant_rest_record */
{336330973, "Unexpected I/O error while writing to backup file"}, /* 815, gbak_write_error */ {336330800, "gds_$send failed"}, /* 815, gbak_send_failed */
{336330985, "could not drop database @1 (database might be in use)"}, /* 816, gbak_db_in_use */ {336330801, "no table name for data"}, /* 816, gbak_no_tbl_name */
{336330990, "System memory exhausted"}, /* 817, gbak_sysmemex */ {336330802, "unexpected end of file on backup file"}, /* 817, gbak_unexp_eof */
{336331002, "SQL role"}, /* 818, gbak_restore_role_failed */ {336330803, "database format @1 is too old to restore to"}, /* 818, gbak_db_format_too_old */
{336331005, "SQL role parameter missing"}, /* 819, gbak_role_op_missing */ {336330804, "array dimension for column @1 is invalid"}, /* 819, gbak_inv_array_dim */
{336331010, "page buffers parameter missing"}, /* 820, gbak_page_buffers_missing */ {336330807, "Expected XDR record length"}, /* 820, gbak_xdr_len_expected */
{336331011, "expected page buffers, encountered \"@1\""}, /* 821, gbak_page_buffers_wrong_param */ {336330817, "cannot open backup file @1"}, /* 821, gbak_open_bkup_error */
{336331012, "page buffers is allowed only on restore or create"}, /* 822, gbak_page_buffers_restore */ {336330818, "cannot open status and error output file @1"}, /* 822, gbak_open_error */
{336331014, "size specification either missing or incorrect for file @1"}, /* 823, gbak_inv_size */ {336330934, "blocking factor parameter missing"}, /* 823, gbak_missing_block_fac */
{336331015, "file @1 out of sequence"}, /* 824, gbak_file_outof_sequence */ {336330935, "expected blocking factor, encountered \"@1\""}, /* 824, gbak_inv_block_fac */
{336331016, "can't join -- one of the files missing"}, /* 825, gbak_join_file_missing */ {336330936, "a blocking factor may not be used in conjunction with device CT"}, /* 825, gbak_block_fac_specified */
{336331017, " standard input is not supported when using join operation"}, /* 826, gbak_stdin_not_supptd */ {336330940, "user name parameter missing"}, /* 826, gbak_missing_username */
{336331018, "standard output is not supported when using split operation"}, /* 827, gbak_stdout_not_supptd */ {336330941, "password parameter missing"}, /* 827, gbak_missing_password */
{336331019, "backup file @1 might be corrupt"}, /* 828, gbak_bkup_corrupt */ {336330952, " missing parameter for the number of bytes to be skipped"}, /* 828, gbak_missing_skipped_bytes */
{336331020, "database file specification missing"}, /* 829, gbak_unk_db_file_spec */ {336330953, "expected number of bytes to be skipped, encountered \"@1\""}, /* 829, gbak_inv_skipped_bytes */
{336331021, "can't write a header record to file @1"}, /* 830, gbak_hdr_write_failed */ {336330965, "character set"}, /* 830, gbak_err_restore_charset */
{336331022, "free disk space exhausted"}, /* 831, gbak_disk_space_ex */ {336330967, "collation"}, /* 831, gbak_err_restore_collation */
{336331023, "file size given (@1) is less than minimum allowed (@2)"}, /* 832, gbak_size_lt_min */ {336330972, "Unexpected I/O error while reading from backup file"}, /* 832, gbak_read_error */
{336331025, "service name parameter missing"}, /* 833, gbak_svc_name_missing */ {336330973, "Unexpected I/O error while writing to backup file"}, /* 833, gbak_write_error */
{336331026, "Cannot restore over current database, must be SYSDBA or owner of the existing database."}, /* 834, gbak_not_ownr */ {336330985, "could not drop database @1 (database might be in use)"}, /* 834, gbak_db_in_use */
{336331031, "\"read_only\" or \"read_write\" required"}, /* 835, gbak_mode_req */ {336330990, "System memory exhausted"}, /* 835, gbak_sysmemex */
{336331033, "just data ignore all constraints etc."}, /* 836, gbak_just_data */ {336331002, "SQL role"}, /* 836, gbak_restore_role_failed */
{336331034, "restoring data only ignoring foreign key, unique, not null & other constraints"}, /* 837, gbak_data_only */ {336331005, "SQL role parameter missing"}, /* 837, gbak_role_op_missing */
{336397205, "ODS versions before ODS@1 are not supported"}, /* 838, dsql_too_old_ods */ {336331010, "page buffers parameter missing"}, /* 838, gbak_page_buffers_missing */
{336397206, "Table @1 does not exist"}, /* 839, dsql_table_not_found */ {336331011, "expected page buffers, encountered \"@1\""}, /* 839, gbak_page_buffers_wrong_param */
{336397207, "View @1 does not exist"}, /* 840, dsql_view_not_found */ {336331012, "page buffers is allowed only on restore or create"}, /* 840, gbak_page_buffers_restore */
{336397208, "At line @1, column @2"}, /* 841, dsql_line_col_error */ {336331014, "size specification either missing or incorrect for file @1"}, /* 841, gbak_inv_size */
{336397209, "At unknown line and column"}, /* 842, dsql_unknown_pos */ {336331015, "file @1 out of sequence"}, /* 842, gbak_file_outof_sequence */
{336397210, "Column @1 cannot be repeated in @2 statement"}, /* 843, dsql_no_dup_name */ {336331016, "can't join -- one of the files missing"}, /* 843, gbak_join_file_missing */
{336397211, "Too many values (more than @1) in member list to match against"}, /* 844, dsql_too_many_values */ {336331017, " standard input is not supported when using join operation"}, /* 844, gbak_stdin_not_supptd */
{336397212, "Array and BLOB data types not allowed in computed field"}, /* 845, dsql_no_array_computed */ {336331018, "standard output is not supported when using split operation"}, /* 845, gbak_stdout_not_supptd */
{336397213, "Implicit domain name @1 not allowed in user created domain"}, /* 846, dsql_implicit_domain_name */ {336331019, "backup file @1 might be corrupt"}, /* 846, gbak_bkup_corrupt */
{336397214, "scalar operator used on field @1 which is not an array"}, /* 847, dsql_only_can_subscript_array */ {336331020, "database file specification missing"}, /* 847, gbak_unk_db_file_spec */
{336397215, "cannot sort on more than 255 items"}, /* 848, dsql_max_sort_items */ {336331021, "can't write a header record to file @1"}, /* 848, gbak_hdr_write_failed */
{336397216, "cannot group on more than 255 items"}, /* 849, dsql_max_group_items */ {336331022, "free disk space exhausted"}, /* 849, gbak_disk_space_ex */
{336397217, "Cannot include the same field (@1.@2) twice in the ORDER BY clause with conflicting sorting options"}, /* 850, dsql_conflicting_sort_field */ {336331023, "file size given (@1) is less than minimum allowed (@2)"}, /* 850, gbak_size_lt_min */
{336397218, "column list from derived table @1 has more columns than the number of items in its SELECT statement"}, /* 851, dsql_derived_table_more_columns */ {336331025, "service name parameter missing"}, /* 851, gbak_svc_name_missing */
{336397219, "column list from derived table @1 has less columns than the number of items in its SELECT statement"}, /* 852, dsql_derived_table_less_columns */ {336331026, "Cannot restore over current database, must be SYSDBA or owner of the existing database."}, /* 852, gbak_not_ownr */
{336397220, "no column name specified for column number @1 in derived table @2"}, /* 853, dsql_derived_field_unnamed */ {336331031, "\"read_only\" or \"read_write\" required"}, /* 853, gbak_mode_req */
{336397221, "column @1 was specified multiple times for derived table @2"}, /* 854, dsql_derived_field_dup_name */ {336331033, "just data ignore all constraints etc."}, /* 854, gbak_just_data */
{336397222, "Internal dsql error: alias type expected by pass1_expand_select_node"}, /* 855, dsql_derived_alias_select */ {336331034, "restoring data only ignoring foreign key, unique, not null & other constraints"}, /* 855, gbak_data_only */
{336397223, "Internal dsql error: alias type expected by pass1_field"}, /* 856, dsql_derived_alias_field */ {336397205, "ODS versions before ODS@1 are not supported"}, /* 856, dsql_too_old_ods */
{336397224, "Internal dsql error: column position out of range in pass1_union_auto_cast"}, /* 857, dsql_auto_field_bad_pos */ {336397206, "Table @1 does not exist"}, /* 857, dsql_table_not_found */
{336397225, "Recursive CTE member (@1) can refer itself only in FROM clause"}, /* 858, dsql_cte_wrong_reference */ {336397207, "View @1 does not exist"}, /* 858, dsql_view_not_found */
{336397226, "CTE '@1' has cyclic dependencies"}, /* 859, dsql_cte_cycle */ {336397208, "At line @1, column @2"}, /* 859, dsql_line_col_error */
{336397227, "Recursive member of CTE can't be member of an outer join"}, /* 860, dsql_cte_outer_join */ {336397209, "At unknown line and column"}, /* 860, dsql_unknown_pos */
{336397228, "Recursive member of CTE can't reference itself more than once"}, /* 861, dsql_cte_mult_references */ {336397210, "Column @1 cannot be repeated in @2 statement"}, /* 861, dsql_no_dup_name */
{336397229, "Recursive CTE (@1) must be an UNION"}, /* 862, dsql_cte_not_a_union */ {336397211, "Too many values (more than @1) in member list to match against"}, /* 862, dsql_too_many_values */
{336397230, "CTE '@1' defined non-recursive member after recursive"}, /* 863, dsql_cte_nonrecurs_after_recurs */ {336397212, "Array and BLOB data types not allowed in computed field"}, /* 863, dsql_no_array_computed */
{336397231, "Recursive member of CTE '@1' has @2 clause"}, /* 864, dsql_cte_wrong_clause */ {336397213, "Implicit domain name @1 not allowed in user created domain"}, /* 864, dsql_implicit_domain_name */
{336397232, "Recursive members of CTE (@1) must be linked with another members via UNION ALL"}, /* 865, dsql_cte_union_all */ {336397214, "scalar operator used on field @1 which is not an array"}, /* 865, dsql_only_can_subscript_array */
{336397233, "Non-recursive member is missing in CTE '@1'"}, /* 866, dsql_cte_miss_nonrecursive */ {336397215, "cannot sort on more than 255 items"}, /* 866, dsql_max_sort_items */
{336397234, "WITH clause can't be nested"}, /* 867, dsql_cte_nested_with */ {336397216, "cannot group on more than 255 items"}, /* 867, dsql_max_group_items */
{336397235, "column @1 appears more than once in USING clause"}, /* 868, dsql_col_more_than_once_using */ {336397217, "Cannot include the same field (@1.@2) twice in the ORDER BY clause with conflicting sorting options"}, /* 868, dsql_conflicting_sort_field */
{336397236, "feature is not supported in dialect @1"}, /* 869, dsql_unsupp_feature_dialect */ {336397218, "column list from derived table @1 has more columns than the number of items in its SELECT statement"}, /* 869, dsql_derived_table_more_columns */
{336397237, "CTE \"@1\" is not used in query"}, /* 870, dsql_cte_not_used */ {336397219, "column list from derived table @1 has less columns than the number of items in its SELECT statement"}, /* 870, dsql_derived_table_less_columns */
{336397238, "column @1 appears more than once in ALTER VIEW"}, /* 871, dsql_col_more_than_once_view */ {336397220, "no column name specified for column number @1 in derived table @2"}, /* 871, dsql_derived_field_unnamed */
{336397239, "@1 is not supported inside IN AUTONOMOUS TRANSACTION block"}, /* 872, dsql_unsupported_in_auto_trans */ {336397221, "column @1 was specified multiple times for derived table @2"}, /* 872, dsql_derived_field_dup_name */
{336397240, "Unknown node type @1 in dsql/GEN_expr"}, /* 873, dsql_eval_unknode */ {336397222, "Internal dsql error: alias type expected by pass1_expand_select_node"}, /* 873, dsql_derived_alias_select */
{336397241, "Argument for @1 in dialect 1 must be string or numeric"}, /* 874, dsql_agg_wrongarg */ {336397223, "Internal dsql error: alias type expected by pass1_field"}, /* 874, dsql_derived_alias_field */
{336397242, "Argument for @1 in dialect 3 must be numeric"}, /* 875, dsql_agg2_wrongarg */ {336397224, "Internal dsql error: column position out of range in pass1_union_auto_cast"}, /* 875, dsql_auto_field_bad_pos */
{336397243, "Strings cannot be added to or subtracted from DATE or TIME types"}, /* 876, dsql_nodateortime_pm_string */ {336397225, "Recursive CTE member (@1) can refer itself only in FROM clause"}, /* 876, dsql_cte_wrong_reference */
{336397244, "Invalid data type for subtraction involving DATE, TIME or TIMESTAMP types"}, /* 877, dsql_invalid_datetime_subtract */ {336397226, "CTE '@1' has cyclic dependencies"}, /* 877, dsql_cte_cycle */
{336397245, "Adding two DATE values or two TIME values is not allowed"}, /* 878, dsql_invalid_dateortime_add */ {336397227, "Recursive member of CTE can't be member of an outer join"}, /* 878, dsql_cte_outer_join */
{336397246, "DATE value cannot be subtracted from the provided data type"}, /* 879, dsql_invalid_type_minus_date */ {336397228, "Recursive member of CTE can't reference itself more than once"}, /* 879, dsql_cte_mult_references */
{336397247, "Strings cannot be added or subtracted in dialect 3"}, /* 880, dsql_nostring_addsub_dial3 */ {336397229, "Recursive CTE (@1) must be an UNION"}, /* 880, dsql_cte_not_a_union */
{336397248, "Invalid data type for addition or subtraction in dialect 3"}, /* 881, dsql_invalid_type_addsub_dial3 */ {336397230, "CTE '@1' defined non-recursive member after recursive"}, /* 881, dsql_cte_nonrecurs_after_recurs */
{336397249, "Invalid data type for multiplication in dialect 1"}, /* 882, dsql_invalid_type_multip_dial1 */ {336397231, "Recursive member of CTE '@1' has @2 clause"}, /* 882, dsql_cte_wrong_clause */
{336397250, "Strings cannot be multiplied in dialect 3"}, /* 883, dsql_nostring_multip_dial3 */ {336397232, "Recursive members of CTE (@1) must be linked with another members via UNION ALL"}, /* 883, dsql_cte_union_all */
{336397251, "Invalid data type for multiplication in dialect 3"}, /* 884, dsql_invalid_type_multip_dial3 */ {336397233, "Non-recursive member is missing in CTE '@1'"}, /* 884, dsql_cte_miss_nonrecursive */
{336397252, "Division in dialect 1 must be between numeric data types"}, /* 885, dsql_mustuse_numeric_div_dial1 */ {336397234, "WITH clause can't be nested"}, /* 885, dsql_cte_nested_with */
{336397253, "Strings cannot be divided in dialect 3"}, /* 886, dsql_nostring_div_dial3 */ {336397235, "column @1 appears more than once in USING clause"}, /* 886, dsql_col_more_than_once_using */
{336397254, "Invalid data type for division in dialect 3"}, /* 887, dsql_invalid_type_div_dial3 */ {336397236, "feature is not supported in dialect @1"}, /* 887, dsql_unsupp_feature_dialect */
{336397255, "Strings cannot be negated (applied the minus operator) in dialect 3"}, /* 888, dsql_nostring_neg_dial3 */ {336397237, "CTE \"@1\" is not used in query"}, /* 888, dsql_cte_not_used */
{336397256, "Invalid data type for negation (minus operator)"}, /* 889, dsql_invalid_type_neg */ {336397238, "column @1 appears more than once in ALTER VIEW"}, /* 889, dsql_col_more_than_once_view */
{336397257, "Cannot have more than 255 items in DISTINCT list"}, /* 890, dsql_max_distinct_items */ {336397239, "@1 is not supported inside IN AUTONOMOUS TRANSACTION block"}, /* 890, dsql_unsupported_in_auto_trans */
{336723983, "unable to open database"}, /* 891, gsec_cant_open_db */ {336397240, "Unknown node type @1 in dsql/GEN_expr"}, /* 891, dsql_eval_unknode */
{336723984, "error in switch specifications"}, /* 892, gsec_switches_error */ {336397241, "Argument for @1 in dialect 1 must be string or numeric"}, /* 892, dsql_agg_wrongarg */
{336723985, "no operation specified"}, /* 893, gsec_no_op_spec */ {336397242, "Argument for @1 in dialect 3 must be numeric"}, /* 893, dsql_agg2_wrongarg */
{336723986, "no user name specified"}, /* 894, gsec_no_usr_name */ {336397243, "Strings cannot be added to or subtracted from DATE or TIME types"}, /* 894, dsql_nodateortime_pm_string */
{336723987, "add record error"}, /* 895, gsec_err_add */ {336397244, "Invalid data type for subtraction involving DATE, TIME or TIMESTAMP types"}, /* 895, dsql_invalid_datetime_subtract */
{336723988, "modify record error"}, /* 896, gsec_err_modify */ {336397245, "Adding two DATE values or two TIME values is not allowed"}, /* 896, dsql_invalid_dateortime_add */
{336723989, "find/modify record error"}, /* 897, gsec_err_find_mod */ {336397246, "DATE value cannot be subtracted from the provided data type"}, /* 897, dsql_invalid_type_minus_date */
{336723990, "record not found for user: @1"}, /* 898, gsec_err_rec_not_found */ {336397247, "Strings cannot be added or subtracted in dialect 3"}, /* 898, dsql_nostring_addsub_dial3 */
{336723991, "delete record error"}, /* 899, gsec_err_delete */ {336397248, "Invalid data type for addition or subtraction in dialect 3"}, /* 899, dsql_invalid_type_addsub_dial3 */
{336723992, "find/delete record error"}, /* 900, gsec_err_find_del */ {336397249, "Invalid data type for multiplication in dialect 1"}, /* 900, dsql_invalid_type_multip_dial1 */
{336723996, "find/display record error"}, /* 901, gsec_err_find_disp */ {336397250, "Strings cannot be multiplied in dialect 3"}, /* 901, dsql_nostring_multip_dial3 */
{336723997, "invalid parameter, no switch defined"}, /* 902, gsec_inv_param */ {336397251, "Invalid data type for multiplication in dialect 3"}, /* 902, dsql_invalid_type_multip_dial3 */
{336723998, "operation already specified"}, /* 903, gsec_op_specified */ {336397252, "Division in dialect 1 must be between numeric data types"}, /* 903, dsql_mustuse_numeric_div_dial1 */
{336723999, "password already specified"}, /* 904, gsec_pw_specified */ {336397253, "Strings cannot be divided in dialect 3"}, /* 904, dsql_nostring_div_dial3 */
{336724000, "uid already specified"}, /* 905, gsec_uid_specified */ {336397254, "Invalid data type for division in dialect 3"}, /* 905, dsql_invalid_type_div_dial3 */
{336724001, "gid already specified"}, /* 906, gsec_gid_specified */ {336397255, "Strings cannot be negated (applied the minus operator) in dialect 3"}, /* 906, dsql_nostring_neg_dial3 */
{336724002, "project already specified"}, /* 907, gsec_proj_specified */ {336397256, "Invalid data type for negation (minus operator)"}, /* 907, dsql_invalid_type_neg */
{336724003, "organization already specified"}, /* 908, gsec_org_specified */ {336397257, "Cannot have more than 255 items in DISTINCT list"}, /* 908, dsql_max_distinct_items */
{336724004, "first name already specified"}, /* 909, gsec_fname_specified */ {336723983, "unable to open database"}, /* 909, gsec_cant_open_db */
{336724005, "middle name already specified"}, /* 910, gsec_mname_specified */ {336723984, "error in switch specifications"}, /* 910, gsec_switches_error */
{336724006, "last name already specified"}, /* 911, gsec_lname_specified */ {336723985, "no operation specified"}, /* 911, gsec_no_op_spec */
{336724008, "invalid switch specified"}, /* 912, gsec_inv_switch */ {336723986, "no user name specified"}, /* 912, gsec_no_usr_name */
{336724009, "ambiguous switch specified"}, /* 913, gsec_amb_switch */ {336723987, "add record error"}, /* 913, gsec_err_add */
{336724010, "no operation specified for parameters"}, /* 914, gsec_no_op_specified */ {336723988, "modify record error"}, /* 914, gsec_err_modify */
{336724011, "no parameters allowed for this operation"}, /* 915, gsec_params_not_allowed */ {336723989, "find/modify record error"}, /* 915, gsec_err_find_mod */
{336724012, "incompatible switches specified"}, /* 916, gsec_incompat_switch */ {336723990, "record not found for user: @1"}, /* 916, gsec_err_rec_not_found */
{336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 917, gsec_inv_username */ {336723991, "delete record error"}, /* 917, gsec_err_delete */
{336724045, "Warning - maximum 8 significant bytes of password used"}, /* 918, gsec_inv_pw_length */ {336723992, "find/delete record error"}, /* 918, gsec_err_find_del */
{336724046, "database already specified"}, /* 919, gsec_db_specified */ {336723996, "find/display record error"}, /* 919, gsec_err_find_disp */
{336724047, "database administrator name already specified"}, /* 920, gsec_db_admin_specified */ {336723997, "invalid parameter, no switch defined"}, /* 920, gsec_inv_param */
{336724048, "database administrator password already specified"}, /* 921, gsec_db_admin_pw_specified */ {336723998, "operation already specified"}, /* 921, gsec_op_specified */
{336724049, "SQL role name already specified"}, /* 922, gsec_sql_role_specified */ {336723999, "password already specified"}, /* 922, gsec_pw_specified */
{336789504, "The license file does not exist or could not be opened for read"}, /* 923, license_no_file */ {336724000, "uid already specified"}, /* 923, gsec_uid_specified */
{336789523, "operation already specified"}, /* 924, license_op_specified */ {336724001, "gid already specified"}, /* 924, gsec_gid_specified */
{336789524, "no operation specified"}, /* 925, license_op_missing */ {336724002, "project already specified"}, /* 925, gsec_proj_specified */
{336789525, "invalid switch"}, /* 926, license_inv_switch */ {336724003, "organization already specified"}, /* 926, gsec_org_specified */
{336789526, "invalid switch combination"}, /* 927, license_inv_switch_combo */ {336724004, "first name already specified"}, /* 927, gsec_fname_specified */
{336789527, "illegal operation/switch combination"}, /* 928, license_inv_op_combo */ {336724005, "middle name already specified"}, /* 928, gsec_mname_specified */
{336789528, "ambiguous switch"}, /* 929, license_amb_switch */ {336724006, "last name already specified"}, /* 929, gsec_lname_specified */
{336789529, "invalid parameter, no switch specified"}, /* 930, license_inv_parameter */ {336724008, "invalid switch specified"}, /* 930, gsec_inv_switch */
{336789530, "switch does not take any parameter"}, /* 931, license_param_specified */ {336724009, "ambiguous switch specified"}, /* 931, gsec_amb_switch */
{336789531, "switch requires a parameter"}, /* 932, license_param_req */ {336724010, "no operation specified for parameters"}, /* 932, gsec_no_op_specified */
{336789532, "syntax error in command line"}, /* 933, license_syntx_error */ {336724011, "no parameters allowed for this operation"}, /* 933, gsec_params_not_allowed */
{336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 934, license_dup_id */ {336724012, "incompatible switches specified"}, /* 934, gsec_incompat_switch */
{336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 935, license_inv_id_key */ {336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 935, gsec_inv_username */
{336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 936, license_err_remove */ {336724045, "Warning - maximum 8 significant bytes of password used"}, /* 936, gsec_inv_pw_length */
{336789537, "An error occurred updating the license file. Operation cancelled."}, /* 937, license_err_update */ {336724046, "database already specified"}, /* 937, gsec_db_specified */
{336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 938, license_err_convert */ {336724047, "database administrator name already specified"}, /* 938, gsec_db_admin_specified */
{336789539, "Operation failed. An unknown error occurred."}, /* 939, license_err_unk */ {336724048, "database administrator password already specified"}, /* 939, gsec_db_admin_pw_specified */
{336789540, "Add license operation failed, KEY: @1 ID: @2"}, /* 940, license_svc_err_add */ {336724049, "SQL role name already specified"}, /* 940, gsec_sql_role_specified */
{336789541, "Remove license operation failed, KEY: @1"}, /* 941, license_svc_err_remove */ {336789504, "The license file does not exist or could not be opened for read"}, /* 941, license_no_file */
{336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 942, license_eval_exists */ {336789523, "operation already specified"}, /* 942, license_op_specified */
{336920577, "found unknown switch"}, /* 943, gstat_unknown_switch */ {336789524, "no operation specified"}, /* 943, license_op_missing */
{336920578, "please retry, giving a database name"}, /* 944, gstat_retry */ {336789525, "invalid switch"}, /* 944, license_inv_switch */
{336920579, "Wrong ODS version, expected @1, encountered @2"}, /* 945, gstat_wrong_ods */ {336789526, "invalid switch combination"}, /* 945, license_inv_switch_combo */
{336920580, "Unexpected end of database file."}, /* 946, gstat_unexpected_eof */ {336789527, "illegal operation/switch combination"}, /* 946, license_inv_op_combo */
{336920605, "Can't open database file @1"}, /* 947, gstat_open_err */ {336789528, "ambiguous switch"}, /* 947, license_amb_switch */
{336920606, "Can't read a database page"}, /* 948, gstat_read_err */ {336789529, "invalid parameter, no switch specified"}, /* 948, license_inv_parameter */
{336920607, "System memory exhausted"}, /* 949, gstat_sysmemex */ {336789530, "switch does not take any parameter"}, /* 949, license_param_specified */
{336986113, "Wrong value for access mode"}, /* 950, fbsvcmgr_bad_am */ {336789531, "switch requires a parameter"}, /* 950, license_param_req */
{336986114, "Wrong value for write mode"}, /* 951, fbsvcmgr_bad_wm */ {336789532, "syntax error in command line"}, /* 951, license_syntx_error */
{336986115, "Wrong value for reserve space"}, /* 952, fbsvcmgr_bad_rs */ {336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 952, license_dup_id */
{336986116, "Unknown tag (@1) in info_svr_db_info block after isc_svc_query()"}, /* 953, fbsvcmgr_info_err */ {336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 953, license_inv_id_key */
{336986117, "Unknown tag (@1) in isc_svc_query() results"}, /* 954, fbsvcmgr_query_err */ {336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 954, license_err_remove */
{336986118, "Unknown switch \"@1\""}, /* 955, fbsvcmgr_switch_unknown */ {336789537, "An error occurred updating the license file. Operation cancelled."}, /* 955, license_err_update */
{336986159, "Wrong value for shutdown mode"}, /* 956, fbsvcmgr_bad_sm */ {336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 956, license_err_convert */
{336986160, "could not open file @1"}, /* 957, fbsvcmgr_fp_open */ {336789539, "Operation failed. An unknown error occurred."}, /* 957, license_err_unk */
{336986161, "could not read file @1"}, /* 958, fbsvcmgr_fp_read */ {336789540, "Add license operation failed, KEY: @1 ID: @2"}, /* 958, license_svc_err_add */
{336986162, "empty file @1"}, /* 959, fbsvcmgr_fp_empty */ {336789541, "Remove license operation failed, KEY: @1"}, /* 959, license_svc_err_remove */
{337051649, "Switches trusted_svc and trusted_role are not supported from command line"}, /* 960, utl_trusted_switch */ {336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 960, license_eval_exists */
{336920577, "found unknown switch"}, /* 961, gstat_unknown_switch */
{336920578, "please retry, giving a database name"}, /* 962, gstat_retry */
{336920579, "Wrong ODS version, expected @1, encountered @2"}, /* 963, gstat_wrong_ods */
{336920580, "Unexpected end of database file."}, /* 964, gstat_unexpected_eof */
{336920605, "Can't open database file @1"}, /* 965, gstat_open_err */
{336920606, "Can't read a database page"}, /* 966, gstat_read_err */
{336920607, "System memory exhausted"}, /* 967, gstat_sysmemex */
{336986113, "Wrong value for access mode"}, /* 968, fbsvcmgr_bad_am */
{336986114, "Wrong value for write mode"}, /* 969, fbsvcmgr_bad_wm */
{336986115, "Wrong value for reserve space"}, /* 970, fbsvcmgr_bad_rs */
{336986116, "Unknown tag (@1) in info_svr_db_info block after isc_svc_query()"}, /* 971, fbsvcmgr_info_err */
{336986117, "Unknown tag (@1) in isc_svc_query() results"}, /* 972, fbsvcmgr_query_err */
{336986118, "Unknown switch \"@1\""}, /* 973, fbsvcmgr_switch_unknown */
{336986159, "Wrong value for shutdown mode"}, /* 974, fbsvcmgr_bad_sm */
{336986160, "could not open file @1"}, /* 975, fbsvcmgr_fp_open */
{336986161, "could not read file @1"}, /* 976, fbsvcmgr_fp_read */
{336986162, "empty file @1"}, /* 977, fbsvcmgr_fp_empty */
{337051649, "Switches trusted_svc and trusted_role are not supported from command line"}, /* 978, utl_trusted_switch */
{0, NULL} {0, NULL}
}; };

View File

@ -688,6 +688,8 @@ static const struct {
{335544985, -901}, /* 665 out_of_temp_space */ {335544985, -901}, /* 665 out_of_temp_space */
{335544986, -901}, /* 666 eds_expl_tran_ctrl */ {335544986, -901}, /* 666 eds_expl_tran_ctrl */
{335544987, -902}, /* 667 no_trusted_spb */ {335544987, -902}, /* 667 no_trusted_spb */
{335544988, -901}, /* 668 package_name */
{335544989, -901}, /* 669 cannot_make_not_null */
{335740929, -901}, /* 1 gfix_db_name */ {335740929, -901}, /* 1 gfix_db_name */
{335740930, -901}, /* 2 gfix_invalid_sw */ {335740930, -901}, /* 2 gfix_invalid_sw */
{335740932, -901}, /* 4 gfix_incmp_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */
@ -745,7 +747,21 @@ static const struct {
{336003101, -817}, /* 29 upd_ins_with_complex_view */ {336003101, -817}, /* 29 upd_ins_with_complex_view */
{336003102, -817}, /* 30 dsql_incompatible_trigger_type */ {336003102, -817}, /* 30 dsql_incompatible_trigger_type */
{336003103, -817}, /* 31 dsql_db_trigger_type_cant_change */ {336003103, -817}, /* 31 dsql_db_trigger_type_cant_change */
{336068645, -901}, /* 37 dyn_filter_not_found */
{336068649, -901}, /* 41 dyn_func_not_found */
{336068656, -901}, /* 48 dyn_index_not_found */
{336068662, -901}, /* 54 dyn_view_not_found */
{336068697, -901}, /* 89 dyn_domain_not_found */
{336068717, -901}, /* 109 dyn_cant_modify_auto_trig */
{336068740, -901}, /* 132 dyn_dup_table */ {336068740, -901}, /* 132 dyn_dup_table */
{336068748, -901}, /* 140 dyn_proc_not_found */
{336068752, -901}, /* 144 dyn_exception_not_found */
{336068754, -901}, /* 146 dyn_proc_param_not_found */
{336068755, -901}, /* 147 dyn_trig_not_found */
{336068759, -901}, /* 151 dyn_charset_not_found */
{336068760, -901}, /* 152 dyn_collation_not_found */
{336068763, -901}, /* 155 dyn_role_not_found */
{336068767, -901}, /* 159 dyn_name_longer */
{336068784, -901}, /* 176 dyn_column_does_not_exist */ {336068784, -901}, /* 176 dyn_column_does_not_exist */
{336068796, -901}, /* 188 dyn_role_does_not_exist */ {336068796, -901}, /* 188 dyn_role_does_not_exist */
{336068797, -901}, /* 189 dyn_no_grant_admin_opt */ {336068797, -901}, /* 189 dyn_no_grant_admin_opt */
@ -764,9 +780,11 @@ static const struct {
{336068817, -829}, /* 209 dyn_invalid_dtype_conversion */ {336068817, -829}, /* 209 dyn_invalid_dtype_conversion */
{336068818, -829}, /* 210 dyn_dtype_conv_invalid */ {336068818, -829}, /* 210 dyn_dtype_conv_invalid */
{336068820, -901}, /* 212 dyn_zero_len_id */ {336068820, -901}, /* 212 dyn_zero_len_id */
{336068822, -901}, /* 214 dyn_gen_not_found */
{336068829, -829}, /* 221 max_coll_per_charset */ {336068829, -829}, /* 221 max_coll_per_charset */
{336068830, -829}, /* 222 invalid_coll_attr */ {336068830, -829}, /* 222 invalid_coll_attr */
{336068840, -901}, /* 232 dyn_wrong_gtt_scope */ {336068840, -901}, /* 232 dyn_wrong_gtt_scope */
{336068849, -901}, /* 241 dyn_table_not_found */
{336068852, -829}, /* 244 dyn_scale_too_big */ {336068852, -829}, /* 244 dyn_scale_too_big */
{336068853, -829}, /* 245 dyn_precision_too_small */ {336068853, -829}, /* 245 dyn_precision_too_small */
{336068855, 106}, /* 247 dyn_miss_priv_warning */ {336068855, 106}, /* 247 dyn_miss_priv_warning */

View File

@ -688,6 +688,8 @@ static const struct {
{335544985, "HY000"}, // 665 out_of_temp_space {335544985, "HY000"}, // 665 out_of_temp_space
{335544986, "42000"}, // 666 eds_expl_tran_ctrl {335544986, "42000"}, // 666 eds_expl_tran_ctrl
{335544987, "28000"}, // 667 no_trusted_spb {335544987, "28000"}, // 667 no_trusted_spb
{335544988, "42000"}, // 668 package_name
{335544989, "22006"}, // 669 cannot_make_not_null
{335740929, "00000"}, // 1 gfix_db_name {335740929, "00000"}, // 1 gfix_db_name
{335740930, "00000"}, // 2 gfix_invalid_sw {335740930, "00000"}, // 2 gfix_invalid_sw
{335740932, "00000"}, // 4 gfix_incmp_sw {335740932, "00000"}, // 4 gfix_incmp_sw
@ -745,7 +747,21 @@ static const struct {
{336003101, "54001"}, // 29 upd_ins_with_complex_view {336003101, "54001"}, // 29 upd_ins_with_complex_view
{336003102, "42000"}, // 30 dsql_incompatible_trigger_type {336003102, "42000"}, // 30 dsql_incompatible_trigger_type
{336003103, "42000"}, // 31 dsql_db_trigger_type_cant_change {336003103, "42000"}, // 31 dsql_db_trigger_type_cant_change
{336068645, "42000"}, // 37 dyn_filter_not_found
{336068649, "42000"}, // 41 dyn_func_not_found
{336068656, "42000"}, // 48 dyn_index_not_found
{336068662, "42000"}, // 54 dyn_view_not_found
{336068697, "42000"}, // 89 dyn_domain_not_found
{336068717, "42000"}, // 109 dyn_cant_modify_auto_trig
{336068740, "42S01"}, // 132 dyn_dup_table {336068740, "42S01"}, // 132 dyn_dup_table
{336068748, "42000"}, // 140 dyn_proc_not_found
{336068752, "42000"}, // 144 dyn_exception_not_found
{336068754, "42000"}, // 146 dyn_proc_param_not_found
{336068755, "42000"}, // 147 dyn_trig_not_found
{336068759, "42000"}, // 151 dyn_charset_not_found
{336068760, "42000"}, // 152 dyn_collation_not_found
{336068763, "42000"}, // 155 dyn_role_not_found
{336068767, "42000"}, // 159 dyn_name_longer
{336068784, "42S22"}, // 176 dyn_column_does_not_exist {336068784, "42S22"}, // 176 dyn_column_does_not_exist
{336068796, "28000"}, // 188 dyn_role_does_not_exist {336068796, "28000"}, // 188 dyn_role_does_not_exist
{336068797, "28000"}, // 189 dyn_no_grant_admin_opt {336068797, "28000"}, // 189 dyn_no_grant_admin_opt
@ -764,9 +780,11 @@ static const struct {
{336068817, "42000"}, // 209 dyn_invalid_dtype_conversion {336068817, "42000"}, // 209 dyn_invalid_dtype_conversion
{336068818, "42000"}, // 210 dyn_dtype_conv_invalid {336068818, "42000"}, // 210 dyn_dtype_conv_invalid
{336068820, "42000"}, // 212 dyn_zero_len_id {336068820, "42000"}, // 212 dyn_zero_len_id
{336068822, "42000"}, // 214 dyn_gen_not_found
{336068829, "2C000"}, // 221 max_coll_per_charset {336068829, "2C000"}, // 221 max_coll_per_charset
{336068830, "HY000"}, // 222 invalid_coll_attr {336068830, "HY000"}, // 222 invalid_coll_attr
{336068840, "HY000"}, // 232 dyn_wrong_gtt_scope {336068840, "HY000"}, // 232 dyn_wrong_gtt_scope
{336068849, "42000"}, // 241 dyn_table_not_found
{336068852, "42000"}, // 244 dyn_scale_too_big {336068852, "42000"}, // 244 dyn_scale_too_big
{336068853, "42000"}, // 245 dyn_precision_too_small {336068853, "42000"}, // 245 dyn_precision_too_small
{336068855, "42000"}, // 247 dyn_miss_priv_warning {336068855, "42000"}, // 247 dyn_miss_priv_warning

View File

@ -5496,6 +5496,9 @@ static processing_state get_statement(TEXT* const statement,
in_double_quoted_string in_double_quoted_string
} state = normal; } state = normal;
char lastChar = '\0';
char altQuoteChar = '\0';
while (!done) while (!done)
{ {
SSHORT c = getNextInputChar(); SSHORT c = getNextInputChar();
@ -5624,9 +5627,35 @@ static processing_state get_statement(TEXT* const statement,
switch (state) switch (state)
{ {
case normal: case normal:
if (lastChar == 'q' || lastChar == 'Q')
{
*p++ = lastChar = c;
count++;
altQuoteChar = c = getNextInputChar();
switch (altQuoteChar)
{
case '{':
altQuoteChar = '}';
break;
case '(':
altQuoteChar = ')';
break;
case '[':
altQuoteChar = ']';
break;
case '<':
altQuoteChar = '>';
break;
}
}
else
altQuoteChar = '\0';
state = in_single_quoted_string; state = in_single_quoted_string;
break; break;
case in_single_quoted_string: case in_single_quoted_string:
if (!altQuoteChar || lastChar == altQuoteChar)
state = normal; state = normal;
break; break;
} }
@ -5673,7 +5702,7 @@ static processing_state get_statement(TEXT* const statement,
} }
} }
*p++ = c; *p++ = lastChar = c;
count++; count++;
if (count > bufsize && !done) if (count > bufsize && !done)

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