From: <fir...@us...> - 2011-10-06 03:19:13
|
Revision: 53520 http://firebird.svn.sourceforge.net/firebird/?rev=53520&view=rev Author: firebirds Date: 2011-10-06 03:19:07 +0000 (Thu, 06 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-06 01:41:10 UTC (rev 53519) +++ firebird/trunk/ChangeLog 2011-10-06 03:19:07 UTC (rev 53520) @@ -1,3 +1,24 @@ + 2011-10-06 01:41 asfernandes + M src/jrd/recsrc/ProcedureScan.cpp + M src/jrd/recsrc/RecordSource.h + M src/jrd/req.h +Avoid waste some bytes per record and procedure streams. + + 2011-10-05 17:14 dimitr + M src/auth/AuthInterface.h + M src/common/Auth.h +Fixed the Windows build. + + 2011-10-05 10:31 alexpeshkoff + M src/auth/trusted/AuthSspi.cpp +Added forgotten upgradeInterface() - thanks to Claudio + + 2011-10-05 09:59 alexpeshkoff + M src/gpre/gpre.cpp + M src/isql/isql.epp + M src/qli/lex.cpp +Posix-only fix for CORE-3600: temp files fb_query_xxxx remains after ISQL has been closed + 2011-10-04 13:43 alexpeshkoff M src/remote/inet.cpp Front-ported fix for unregistered bug - check return value of poll() before using it's output structures Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-06 01:41:10 UTC (rev 53519) +++ firebird/trunk/src/jrd/build_no.h 2011-10-06 03:19:07 UTC (rev 53520) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29563 + FORMAL BUILD NUMBER:29567 */ -#define PRODUCT_VER_STRING "3.0.0.29563" -#define FILE_VER_STRING "WI-T3.0.0.29563" -#define LICENSE_VER_STRING "WI-T3.0.0.29563" -#define FILE_VER_NUMBER 3, 0, 0, 29563 +#define PRODUCT_VER_STRING "3.0.0.29567" +#define FILE_VER_STRING "WI-T3.0.0.29567" +#define LICENSE_VER_STRING "WI-T3.0.0.29567" +#define FILE_VER_NUMBER 3, 0, 0, 29567 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29563" +#define FB_BUILD_NO "29567" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-06 01:41:10 UTC (rev 53519) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-06 03:19:07 UTC (rev 53520) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29563 +BuildNum=29567 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-07 03:18:31
|
Revision: 53530 http://firebird.svn.sourceforge.net/firebird/?rev=53530&view=rev Author: firebirds Date: 2011-10-07 03:18:24 +0000 (Fri, 07 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-07 02:33:02 UTC (rev 53529) +++ firebird/trunk/ChangeLog 2011-10-07 03:18:24 UTC (rev 53530) @@ -1,3 +1,39 @@ + 2011-10-07 02:33 asfernandes + M src/alice/exe.cpp + M src/auth/AuthDbg.cpp + M src/auth/AuthInterface.h + M src/auth/SecurityDatabase/LegacyManagement.epp + M src/auth/trusted/AuthSspi.cpp + M src/common/Auth.cpp + M src/common/Auth.h + M src/common/StatusArg.cpp + M src/common/StatusArg.h + M src/common/classes/ClumpletReader.h + M src/common/utils.cpp + M src/jrd/idx.cpp + M src/jrd/vio.cpp + M src/remote/client/interface.cpp + M src/remote/remote.h + M src/remote/server/server.cpp + M src/utilities/gsec/gsec.cpp + M src/utilities/gstat/dba.epp + M src/utilities/nbackup/nbackup.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Misc. + + 2011-10-06 12:19 alexpeshkoff + M builds/install/arch-specific/linux/misc/makeInstallImage.sh.in +Added license files to linux packages + + 2011-10-06 09:31 alexpeshkoff + M builds/install/arch-specific/freebsd/install.sh.in + M builds/install/arch-specific/hpux/Makefile.in + M builds/install/arch-specific/linux/Makefile.in + M builds/install/arch-specific/netbsd/Makefile.in + M builds/posix/Makefile.in +Fronported CORE-3615: add silent_install target to firebird's Makefile (and some other misc install-related fixes) + 2011-10-06 01:41 asfernandes M src/jrd/recsrc/ProcedureScan.cpp M src/jrd/recsrc/RecordSource.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-07 02:33:02 UTC (rev 53529) +++ firebird/trunk/src/jrd/build_no.h 2011-10-07 03:18:24 UTC (rev 53530) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29567 + FORMAL BUILD NUMBER:29570 */ -#define PRODUCT_VER_STRING "3.0.0.29567" -#define FILE_VER_STRING "WI-T3.0.0.29567" -#define LICENSE_VER_STRING "WI-T3.0.0.29567" -#define FILE_VER_NUMBER 3, 0, 0, 29567 +#define PRODUCT_VER_STRING "3.0.0.29570" +#define FILE_VER_STRING "WI-T3.0.0.29570" +#define LICENSE_VER_STRING "WI-T3.0.0.29570" +#define FILE_VER_NUMBER 3, 0, 0, 29570 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29567" +#define FB_BUILD_NO "29570" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-07 02:33:02 UTC (rev 53529) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-07 03:18:24 UTC (rev 53530) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29567 +BuildNum=29570 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-11 03:18:17
|
Revision: 53538 http://firebird.svn.sourceforge.net/firebird/?rev=53538&view=rev Author: firebirds Date: 2011-10-11 03:18:11 +0000 (Tue, 11 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-10 17:15:20 UTC (rev 53537) +++ firebird/trunk/ChangeLog 2011-10-11 03:18:11 UTC (rev 53538) @@ -1,3 +1,24 @@ + 2011-10-10 17:15 alexpeshkoff + M src/auth/AuthDbg.cpp +misc + + 2011-10-10 13:51 dimitr + M src/jrd/Database.h + M src/jrd/cch.cpp + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/jrd.cpp + M src/jrd/shut.cpp + M src/jrd/shut_proto.h + M src/jrd/tra.cpp + M src/jrd/tra_proto.h +Refactored the database shutdown. Work in progress. + + 2011-10-10 10:39 dimitr + M src/jrd/SysFunction.cpp + M src/jrd/btr.cpp +Misc. + 2011-10-07 02:33 asfernandes M src/alice/exe.cpp M src/auth/AuthDbg.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-10 17:15:20 UTC (rev 53537) +++ firebird/trunk/src/jrd/build_no.h 2011-10-11 03:18:11 UTC (rev 53538) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29570 + FORMAL BUILD NUMBER:29573 */ -#define PRODUCT_VER_STRING "3.0.0.29570" -#define FILE_VER_STRING "WI-T3.0.0.29570" -#define LICENSE_VER_STRING "WI-T3.0.0.29570" -#define FILE_VER_NUMBER 3, 0, 0, 29570 +#define PRODUCT_VER_STRING "3.0.0.29573" +#define FILE_VER_STRING "WI-T3.0.0.29573" +#define LICENSE_VER_STRING "WI-T3.0.0.29573" +#define FILE_VER_NUMBER 3, 0, 0, 29573 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29570" +#define FB_BUILD_NO "29573" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-10 17:15:20 UTC (rev 53537) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-11 03:18:11 UTC (rev 53538) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29570 +BuildNum=29573 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2011-10-11 08:20:22
|
Revision: 53542 http://firebird.svn.sourceforge.net/firebird/?rev=53542&view=rev Author: alexpeshkoff Date: 2011-10-11 08:20:16 +0000 (Tue, 11 Oct 2011) Log Message: ----------- Create metadata.fdb using isql Modified Paths: -------------- firebird/trunk/builds/posix/Makefile.in firebird/trunk/src/dbs/metadata.sql Modified: firebird/trunk/builds/posix/Makefile.in =================================================================== --- firebird/trunk/builds/posix/Makefile.in 2011-10-11 07:46:13 UTC (rev 53541) +++ firebird/trunk/builds/posix/Makefile.in 2011-10-11 08:20:16 UTC (rev 53542) @@ -219,8 +219,9 @@ -$(RM) $@ $(LN) $^ $@ -metadata.fdb: $(BLD_ROOT)/misc/metadata.gbak - $(GBAK) -MODE read_only -R $< $@ +metadata.fdb: $(ISQL) $(SRC_ROOT)/dbs/metadata.sql + -$(RM) $@ + $(ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql $(CHMOD) 0444 $@ $(HELP_FDB): help.fdb Modified: firebird/trunk/src/dbs/metadata.sql =================================================================== --- firebird/trunk/src/dbs/metadata.sql 2011-10-11 07:46:13 UTC (rev 53541) +++ firebird/trunk/src/dbs/metadata.sql 2011-10-11 08:20:16 UTC (rev 53542) @@ -19,12 +19,6 @@ * files. */ SET SQL DIALECT 1; -/* - * Commented out the delete since it gives an error message, that puts off - * the builder. Deletion handled in shell script instead. MOD 04-Jan-01 -CONNECT 'metadata.fdb'; -DROP DATABASE; -*/ CREATE DATABASE 'metadata.fdb' PAGE_SIZE 1024; @@ -36,11 +30,6 @@ CREATE TABLE QLI$PROCEDURES (QLI$PROCEDURE_NAME QLI$PROCEDURE_NAME, QLI$PROCEDURE QLI$PROCEDURE); -/* Table: RDB$ROLES, Owner: BUILDER (For Interbase server < 5.0) - * CREATE TABLE RDB$ROLES (RDB$ROLE_NAME CHAR(31) default null, - * RDB$OWNER_NAME CHAR(31) default null); - */ - /* Index definitions for all user tables */ CREATE UNIQUE INDEX QLI$PROCEDURES_IDX1 ON QLI$PROCEDURES(QLI$PROCEDURE_NAME); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-12 03:19:17
|
Revision: 53550 http://firebird.svn.sourceforge.net/firebird/?rev=53550&view=rev Author: firebirds Date: 2011-10-12 03:19:10 +0000 (Wed, 12 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-12 02:06:25 UTC (rev 53549) +++ firebird/trunk/ChangeLog 2011-10-12 03:19:10 UTC (rev 53550) @@ -1,3 +1,48 @@ + 2011-10-12 02:06 asfernandes + M src/common/unicode_util.cpp +Avoid thrown exceptions in normal operation when loading non-existent ICU versions. This was a pain in the debugger. + + 2011-10-11 13:42 alexpeshkoff + M builds/posix/make.defaults + M builds/posix/make.rules +Cleanup + + 2011-10-11 11:59 alexpeshkoff + M src/remote/server/os/posix/inet_server.cpp +Fixed CORE-3607: Solaris does not define the RLIMIT_NPROC limit + + 2011-10-11 10:29 alexpeshkoff + M src/common/os/posix/isc_ipc.cpp +Porting - some Debians miss SA_SIGINFO, committed fixing it patch by Samuel Thibault + + 2011-10-11 08:20 alexpeshkoff + M builds/posix/Makefile.in + M src/dbs/metadata.sql +Create metadata.fdb using isql + + 2011-10-11 07:46 alexpeshkoff + D src/dbs/dflt.gdl + D src/dbs/grant.gdl + D src/dbs/isc.gdl + D src/dbs/ods10.gdl + D src/dbs/ods101.gdl + D src/dbs/ods72.gdl + D src/dbs/ods80.gdl + D src/dbs/ods80dif.gdl + D src/dbs/ods81.gdl + D src/dbs/ods91.gdl + D src/dbs/procs2.gdl + D src/dbs/scrty_unix.gdl + D src/dbs/scrty_vms.gdl + D src/dbs/security.gdl + D src/dbs/stored_proc.gdl + D src/dbs/v2_triggers.gdl +Cleanup: remove all GDEF files - we anyway have no tool to run them + + 2011-10-11 06:46 alexpeshkoff + M src/common/unicode_util.cpp +Fixed CORE-3576: Make ICU built with U_DISABLE_RENAMING load correctly - thanks to Treeve Jelbert + 2011-10-10 17:15 alexpeshkoff M src/auth/AuthDbg.cpp misc Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-12 02:06:25 UTC (rev 53549) +++ firebird/trunk/src/jrd/build_no.h 2011-10-12 03:19:10 UTC (rev 53550) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29573 + FORMAL BUILD NUMBER:29580 */ -#define PRODUCT_VER_STRING "3.0.0.29573" -#define FILE_VER_STRING "WI-T3.0.0.29573" -#define LICENSE_VER_STRING "WI-T3.0.0.29573" -#define FILE_VER_NUMBER 3, 0, 0, 29573 +#define PRODUCT_VER_STRING "3.0.0.29580" +#define FILE_VER_STRING "WI-T3.0.0.29580" +#define LICENSE_VER_STRING "WI-T3.0.0.29580" +#define FILE_VER_NUMBER 3, 0, 0, 29580 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29573" +#define FB_BUILD_NO "29580" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-12 02:06:25 UTC (rev 53549) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-12 03:19:10 UTC (rev 53550) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29573 +BuildNum=29580 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-13 03:19:12
|
Revision: 53563 http://firebird.svn.sourceforge.net/firebird/?rev=53563&view=rev Author: firebirds Date: 2011-10-13 03:19:05 +0000 (Thu, 13 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-12 23:17:45 UTC (rev 53562) +++ firebird/trunk/ChangeLog 2011-10-13 03:19:05 UTC (rev 53563) @@ -1,3 +1,23 @@ + 2011-10-12 23:17 asfernandes + M src/remote/client/interface.cpp +Avoid exception in successfull attachments. + + 2011-10-12 18:59 hvlad + M src/jrd/idx.cpp +Fixed bug CORE-3631 : Duplicate records with NULLs checked incorrectly + + 2011-10-12 11:55 alexpeshkoff + M builds/posix/make.defaults +Fixed CORE-3606: Linker commands that use c or c++ compiler should apply CFLAGS and CXXFLAGS respectively + + 2011-10-12 11:24 alexpeshkoff + M builds/posix/Makefile.in +Fixed non-root build + + 2011-10-12 09:57 alexpeshkoff + M src/common/cvt.cpp +Frontported fix for CORE-3627: Server crashes with access violation when inserting row into table with unique index + 2011-10-12 02:06 asfernandes M src/common/unicode_util.cpp Avoid thrown exceptions in normal operation when loading non-existent ICU versions. This was a pain in the debugger. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-12 23:17:45 UTC (rev 53562) +++ firebird/trunk/src/jrd/build_no.h 2011-10-13 03:19:05 UTC (rev 53563) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29580 + FORMAL BUILD NUMBER:29585 */ -#define PRODUCT_VER_STRING "3.0.0.29580" -#define FILE_VER_STRING "WI-T3.0.0.29580" -#define LICENSE_VER_STRING "WI-T3.0.0.29580" -#define FILE_VER_NUMBER 3, 0, 0, 29580 +#define PRODUCT_VER_STRING "3.0.0.29585" +#define FILE_VER_STRING "WI-T3.0.0.29585" +#define LICENSE_VER_STRING "WI-T3.0.0.29585" +#define FILE_VER_NUMBER 3, 0, 0, 29585 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29580" +#define FB_BUILD_NO "29585" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-12 23:17:45 UTC (rev 53562) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-13 03:19:05 UTC (rev 53563) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29580 +BuildNum=29585 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-14 03:19:55
|
Revision: 53571 http://firebird.svn.sourceforge.net/firebird/?rev=53571&view=rev Author: firebirds Date: 2011-10-14 03:19:48 +0000 (Fri, 14 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-13 12:39:06 UTC (rev 53570) +++ firebird/trunk/ChangeLog 2011-10-14 03:19:48 UTC (rev 53571) @@ -1,3 +1,20 @@ + 2011-10-13 12:39 alexpeshkoff + M src/jrd/trace/TraceConfigStorage.cpp + M src/jrd/trace/TraceConfigStorage.h +Frontported fix for CORE-3532: Server hangs starting new session when trace is running + + 2011-10-13 11:58 alexpeshkoff + M builds/install/arch-specific/linux/misc/firebird.init.d.suse.in +misc + + 2011-10-13 11:31 alexpeshkoff + M src/common/isc_sync.cpp + M src/jrd/event.cpp + M src/jrd/event_proto.h + M src/lock/lock.cpp + M src/lock/lock_proto.h +Frontported fix for CORE-3589: Internal shared resource leak. Make trunk work with SystemV semaphores as shared mutexes/events. + 2011-10-12 23:17 asfernandes M src/remote/client/interface.cpp Avoid exception in successfull attachments. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-13 12:39:06 UTC (rev 53570) +++ firebird/trunk/src/jrd/build_no.h 2011-10-14 03:19:48 UTC (rev 53571) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29585 + FORMAL BUILD NUMBER:29588 */ -#define PRODUCT_VER_STRING "3.0.0.29585" -#define FILE_VER_STRING "WI-T3.0.0.29585" -#define LICENSE_VER_STRING "WI-T3.0.0.29585" -#define FILE_VER_NUMBER 3, 0, 0, 29585 +#define PRODUCT_VER_STRING "3.0.0.29588" +#define FILE_VER_STRING "WI-T3.0.0.29588" +#define LICENSE_VER_STRING "WI-T3.0.0.29588" +#define FILE_VER_NUMBER 3, 0, 0, 29588 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29585" +#define FB_BUILD_NO "29588" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-13 12:39:06 UTC (rev 53570) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-14 03:19:48 UTC (rev 53571) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29585 +BuildNum=29588 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-17 03:18:39
|
Revision: 53580 http://firebird.svn.sourceforge.net/firebird/?rev=53580&view=rev Author: firebirds Date: 2011-10-17 03:18:32 +0000 (Mon, 17 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-16 20:36:07 UTC (rev 53579) +++ firebird/trunk/ChangeLog 2011-10-17 03:18:32 UTC (rev 53580) @@ -1,3 +1,48 @@ + 2011-10-16 20:36 asfernandes + M src/dsql/BlrWriter.cpp + M src/dsql/BlrWriter.h + M src/dsql/DdlNodes.epp + M src/dsql/DsqlCompilerScratch.cpp + M src/dsql/DsqlCompilerScratch.h + M src/dsql/ExprNodes.cpp + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/dsql.h + M src/dsql/parse.y + M src/dsql/pass1.cpp + M src/include/consts_pub.h + M src/jrd/DebugInterface.cpp + M src/jrd/DebugInterface.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/Function.epp + M src/jrd/Function.h + M src/jrd/JrdStatement.cpp + M src/jrd/RecordSourceNodes.cpp + M src/jrd/Routine.h + M src/jrd/blp.h + M src/jrd/blr.h + M src/jrd/dfw.epp + M src/jrd/evl.cpp + M src/jrd/exe.cpp + M src/jrd/exe.h + M src/jrd/fun.epp + M src/jrd/jrd.h + M src/jrd/met.epp + M src/jrd/met_proto.h + M src/jrd/par.cpp + M src/yvalve/gds.cpp +Feature CORE-3626 - Subfunctions in PSQL and EXECUTE BLOCK. +Tests at http://firebird.cvs.sourceforge.net/viewvc/firebird/fbtcs/GTCS/tests/FB_SQL_SUBFUNC_1.output. +Also did: +- Refactor to share more code/data between procedures and functions. +- Fixed some PSQL functions problems. + + 2011-10-16 14:10 hvlad + M src/jrd/trace/TraceConfigStorage.cpp + M src/jrd/trace/TraceConfigStorage.h +Port forward fix for bug CORE-3636 : Firebird 2.5.1 server crashes with Trace API + 2011-10-13 12:39 alexpeshkoff M src/jrd/trace/TraceConfigStorage.cpp M src/jrd/trace/TraceConfigStorage.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-16 20:36:07 UTC (rev 53579) +++ firebird/trunk/src/jrd/build_no.h 2011-10-17 03:18:32 UTC (rev 53580) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29588 + FORMAL BUILD NUMBER:29590 */ -#define PRODUCT_VER_STRING "3.0.0.29588" -#define FILE_VER_STRING "WI-T3.0.0.29588" -#define LICENSE_VER_STRING "WI-T3.0.0.29588" -#define FILE_VER_NUMBER 3, 0, 0, 29588 +#define PRODUCT_VER_STRING "3.0.0.29590" +#define FILE_VER_STRING "WI-T3.0.0.29590" +#define LICENSE_VER_STRING "WI-T3.0.0.29590" +#define FILE_VER_NUMBER 3, 0, 0, 29590 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29588" +#define FB_BUILD_NO "29590" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-16 20:36:07 UTC (rev 53579) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-17 03:18:32 UTC (rev 53580) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29588 +BuildNum=29590 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-19 03:21:06
|
Revision: 53583 http://firebird.svn.sourceforge.net/firebird/?rev=53583&view=rev Author: firebirds Date: 2011-10-19 03:20:59 +0000 (Wed, 19 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-18 18:02:57 UTC (rev 53582) +++ firebird/trunk/ChangeLog 2011-10-19 03:20:59 UTC (rev 53583) @@ -1,3 +1,29 @@ + 2011-10-18 18:02 dimitr + M src/jrd/Attachment.cpp + M src/jrd/Attachment.h + M src/jrd/Collation.cpp + M src/jrd/Collation.h + M src/jrd/Database.cpp + M src/jrd/Database.h + M src/jrd/DatabaseSnapshot.cpp + M src/jrd/Function.epp + M src/jrd/GlobalRWLock.cpp + M src/jrd/cch.cpp + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/idx.cpp + M src/jrd/intl.cpp + M src/jrd/jrd.cpp + M src/jrd/jrd.h + M src/jrd/met.epp + M src/jrd/pag.cpp + M src/jrd/sdw.cpp + M src/jrd/tra.cpp + M src/jrd/vio.cpp +Refactored the tdbb initialization, especially in AST and BG threads. +Replaced dbb_use_count with a list of active requests (to be utilized later). +Misc cleanup. + 2011-10-16 20:36 asfernandes M src/dsql/BlrWriter.cpp M src/dsql/BlrWriter.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-18 18:02:57 UTC (rev 53582) +++ firebird/trunk/src/jrd/build_no.h 2011-10-19 03:20:59 UTC (rev 53583) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29590 + FORMAL BUILD NUMBER:29591 */ -#define PRODUCT_VER_STRING "3.0.0.29590" -#define FILE_VER_STRING "WI-T3.0.0.29590" -#define LICENSE_VER_STRING "WI-T3.0.0.29590" -#define FILE_VER_NUMBER 3, 0, 0, 29590 +#define PRODUCT_VER_STRING "3.0.0.29591" +#define FILE_VER_STRING "WI-T3.0.0.29591" +#define LICENSE_VER_STRING "WI-T3.0.0.29591" +#define FILE_VER_NUMBER 3, 0, 0, 29591 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29590" +#define FB_BUILD_NO "29591" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-18 18:02:57 UTC (rev 53582) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-19 03:20:59 UTC (rev 53583) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29590 +BuildNum=29591 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-22 03:23:26
|
Revision: 53585 http://firebird.svn.sourceforge.net/firebird/?rev=53585&view=rev Author: firebirds Date: 2011-10-22 03:23:18 +0000 (Sat, 22 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-20 12:20:33 UTC (rev 53584) +++ firebird/trunk/ChangeLog 2011-10-22 03:23:18 UTC (rev 53585) @@ -1,3 +1,14 @@ + 2011-10-20 12:20 alexpeshkoff + M src/auth/AuthDbg.cpp + M src/auth/trusted/AuthSspi.cpp + M src/common/Auth.h + M src/common/classes/ClumpletReader.cpp + M src/jrd/svc.cpp + M src/remote/client/interface.cpp + M src/remote/server/server.cpp + M src/yvalve/why.cpp +Fixed services to make them work with trusted auth emulator and old client + 2011-10-18 18:02 dimitr M src/jrd/Attachment.cpp M src/jrd/Attachment.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-20 12:20:33 UTC (rev 53584) +++ firebird/trunk/src/jrd/build_no.h 2011-10-22 03:23:18 UTC (rev 53585) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29591 + FORMAL BUILD NUMBER:29592 */ -#define PRODUCT_VER_STRING "3.0.0.29591" -#define FILE_VER_STRING "WI-T3.0.0.29591" -#define LICENSE_VER_STRING "WI-T3.0.0.29591" -#define FILE_VER_NUMBER 3, 0, 0, 29591 +#define PRODUCT_VER_STRING "3.0.0.29592" +#define FILE_VER_STRING "WI-T3.0.0.29592" +#define LICENSE_VER_STRING "WI-T3.0.0.29592" +#define FILE_VER_NUMBER 3, 0, 0, 29592 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29591" +#define FB_BUILD_NO "29592" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-20 12:20:33 UTC (rev 53584) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-22 03:23:18 UTC (rev 53585) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29591 +BuildNum=29592 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-10-23 01:31:19
|
Revision: 53586 http://firebird.svn.sourceforge.net/firebird/?rev=53586&view=rev Author: asfernandes Date: 2011-10-23 01:31:11 +0000 (Sun, 23 Oct 2011) Log Message: ----------- Improvement CORE-3639 - Allow the use of multiple WHEN MATCHED / NOT MATCHED clauses in MERGE, as per the SQL 2008 specification. Also updated MERGE and RETURNING docs, and fixed a bug with MERGE WHEN MATCHED DELETE and RETURNING. Modified Paths: -------------- firebird/trunk/doc/sql.extensions/README.merge.txt firebird/trunk/doc/sql.extensions/README.returning firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/dsql/StmtNodes.h firebird/trunk/src/dsql/parse.y Modified: firebird/trunk/doc/sql.extensions/README.merge.txt =================================================================== --- firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-22 03:23:18 UTC (rev 53585) +++ firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-23 01:31:11 UTC (rev 53586) @@ -15,21 +15,24 @@ INTO <table or view> [ [AS] <correlation name> ] USING <table or view or derived table> [ [AS] <correlation name> ] ON <condition> - [ <merge when matched> ] - [ <merge when not matched> ] + <merge when>... + <returning clause> + <merge when> ::= + <merge when matched> | + <merge when not matched> + <merge when matched> ::= - WHEN MATCHED THEN + WHEN MATCHED [ AND <condition> ] THEN UPDATE SET <assignment list> <merge when not matched> ::= - WHEN NOT MATCHED THEN + WHEN NOT MATCHED [ AND <condition> ] THEN INSERT [ <left paren> <column list> <right paren> ] VALUES <left paren> <value list> <right paren> Syntax rules: - 1. At least one of <merge when matched> and <merge when not matched> should be specified - and each one should not be specified more than one time. + 1. At least one of <merge when matched> and <merge when not matched> should be specified. Scope: DSQL, PSQL @@ -52,4 +55,9 @@ UPDATE is called when a record exist in the left table (INTO), otherwise INSERT is called. + As soon is decided if the source matched or not a record in the target, the set of the + correspondent (WHEN MATCHED / WHEN NOT MATCHED) statements are evaluated in the order specified, + to check its optional conditions. The first statement which have its condition evaluated to true + is the one which will be executed, and the subsequent ones will be ignored. + If no record is returned in the join, INSERT is not called. Modified: firebird/trunk/doc/sql.extensions/README.returning =================================================================== --- firebird/trunk/doc/sql.extensions/README.returning 2011-10-22 03:23:18 UTC (rev 53585) +++ firebird/trunk/doc/sql.extensions/README.returning 2011-10-23 01:31:11 UTC (rev 53586) @@ -4,7 +4,7 @@ Function: Allow to return the column values actually stored in the table as a result of the "INSERT", - "UPDATE OR INSERT", UPDATE and DELETE statements. + "UPDATE OR INSERT", UPDATE, DELETE and MERGE statements. The most common usage is to retrieve the value of the primary key generated inside a BEFORE-trigger. Authors: @@ -41,12 +41,15 @@ so the existing connectivity drivers should support this feature automagically. 4. Any explicit record change (update or delete) performed by AFTER-triggers is ignored by the RETURNING clause. - 5. OLD and NEW could be used in RETURNING clause of UPDATE and INSERT OR UPDATE statements. + 5. OLD and NEW could be used in RETURNING clause of UPDATE, INSERT OR UPDATE and MERGE statements. 6. In UPDATE and INSERT OR UPDATE statements, unqualified or qualified by table name/alias fields are resolved to NEW. + 7. In MERGE WHEN MATCHED UPDATE and MERGE WHEN NOT MATCHED statements, unqualified or qualified + by table name/alias fields are resolved to NEW. In MERGE WHEN MATCHED DELETE they are + resolved to OLD. Limitations: - 1. The modify statement (INSERT, UPDATE, DELETE) should operate in no more than one record + 1. The modify statement (INSERT, UPDATE, DELETE, MERGE) should operate in no more than one record (i.e. should be singleton). 2. The statement always return one row in DSQL, even if no record is inserted/updated/deleted. This may be changed in the future (i.e. return empty resultset). Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-22 03:23:18 UTC (rev 53585) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-23 01:31:11 UTC (rev 53586) @@ -128,12 +128,12 @@ // Play with contexts for RETURNING purposes. // Its assumed that oldContext is already on the stack. // Changes oldContext name to "OLD". - ReturningProcessor(DsqlCompilerScratch* aScratch, dsql_ctx* oldContext, dsql_ctx* modContext) + ReturningProcessor(DsqlCompilerScratch* aScratch, dsql_ctx* aOldContext, dsql_ctx* modContext) : scratch(aScratch), - autoAlias(&oldContext->ctx_alias, OLD_CONTEXT), - autoInternalAlias(&oldContext->ctx_internal_alias, oldContext->ctx_alias), - autoFlags(&oldContext->ctx_flags, oldContext->ctx_flags | CTX_system | CTX_returning), - hasModContext(modContext != NULL) + oldContext(aOldContext), + oldAlias(oldContext->ctx_alias), + oldInternalAlias(oldContext->ctx_internal_alias), + autoFlags(&oldContext->ctx_flags, oldContext->ctx_flags | CTX_system | CTX_returning) { // Clone the modify/old context and push with name "NEW" in a greater scope level. @@ -141,21 +141,26 @@ if (modContext) { - // push the modify context in the same scope level + // Push the modify context in the same scope level. scratch->context->push(modContext); *newContext = *modContext; newContext->ctx_flags |= CTX_system; } else { + // Create the target (= OLD) context and push it on the stack. + dsql_ctx* targetContext = FB_NEW(scratch->getPool()) dsql_ctx(scratch->getPool()); + *targetContext = *oldContext; + targetContext->ctx_flags &= ~CTX_system; // resolve unqualified fields + scratch->context->push(targetContext); + // This is NEW in the context of a DELETE. Mark it as NULL. *newContext = *oldContext; newContext->ctx_flags |= CTX_null; - - // Remove the system flag, so unqualified fields could be resolved to this context. - oldContext->ctx_flags &= ~CTX_system; } + oldContext->ctx_alias = oldContext->ctx_internal_alias = OLD_CONTEXT; + newContext->ctx_alias = newContext->ctx_internal_alias = MAKE_cstring(NEW_CONTEXT)->str_data; newContext->ctx_flags |= CTX_returning; @@ -164,10 +169,12 @@ ~ReturningProcessor() { + oldContext->ctx_alias = oldAlias; + oldContext->ctx_internal_alias = oldInternalAlias; + // Restore the context stack. scratch->context->pop(); - if (hasModContext) - scratch->context->pop(); + scratch->context->pop(); } // Process the RETURNING clause. @@ -208,8 +215,8 @@ private: DsqlCompilerScratch* scratch; - AutoSetRestore<string> autoAlias; - AutoSetRestore<string> autoInternalAlias; + dsql_ctx* oldContext; + string oldAlias, oldInternalAlias; AutoSetRestore<USHORT> autoFlags; bool hasModContext; }; @@ -4752,8 +4759,6 @@ dsql_nod* source = dsqlUsing; // USING dsql_nod* target = dsqlRelation; // INTO - dsql_nod* updDelCondition = dsqlWhenMatchedCondition; - dsql_nod* insCondition = dsqlWhenNotMatchedCondition; // Build a join between USING and INTO tables. RseNode* join = FB_NEW(pool) RseNode(pool); @@ -4763,7 +4768,7 @@ join->dsqlFrom->nod_arg[0] = source; // Left join if WHEN NOT MATCHED is present. - if (dsqlWhenNotMatchedPresent) + if (dsqlWhenNotMatched.hasData()) join->rse_jointype = blr_left; join->dsqlFrom->nod_arg[1] = target; @@ -4777,13 +4782,40 @@ dsql_nod* querySpecNod = MAKE_node(Dsql::nod_class_exprnode, 1); querySpecNod->nod_arg[0] = reinterpret_cast<dsql_nod*>(querySpec); - if (updDelCondition || insCondition) + dsql_nod* matchedConditions = NULL; + dsql_nod* notMatchedConditions = NULL; + + for (Matched* matched = dsqlWhenMatched.begin(); matched != dsqlWhenMatched.end(); ++matched) { + if (matched->condition) + matchedConditions = PASS1_compose(matchedConditions, matched->condition, blr_or); + else + { + matchedConditions = NULL; + break; + } + } + + for (NotMatched* notMatched = dsqlWhenNotMatched.begin(); + notMatched != dsqlWhenNotMatched.end(); + ++notMatched) + { + if (notMatched->condition) + notMatchedConditions = PASS1_compose(notMatchedConditions, notMatched->condition, blr_or); + else + { + notMatchedConditions = NULL; + break; + } + } + + if (matchedConditions || notMatchedConditions) + { const char* targetName = ExprNode::as<RelationSourceNode>(target)->alias.nullStr(); if (!targetName) targetName = ExprNode::as<RelationSourceNode>(target)->dsqlName.c_str(); - if (dsqlWhenMatchedPresent) // WHEN MATCHED + if (dsqlWhenMatched.hasData()) // WHEN MATCHED { MissingBoolNode* missingNode = FB_NEW(pool) MissingBoolNode( pool, MAKE_node(Dsql::nod_class_exprnode, 1)); @@ -4796,14 +4828,14 @@ querySpec->dsqlWhere = MAKE_node(Dsql::nod_class_exprnode, 1); querySpec->dsqlWhere->nod_arg[0] = reinterpret_cast<dsql_nod*>(notNode); + + if (matchedConditions) + querySpec->dsqlWhere = PASS1_compose(querySpec->dsqlWhere, matchedConditions, blr_and); } - if (updDelCondition) - querySpec->dsqlWhere = PASS1_compose(querySpec->dsqlWhere, updDelCondition, blr_and); - dsql_nod* temp = NULL; - if (dsqlWhenNotMatchedPresent) // WHEN NOT MATCHED + if (dsqlWhenNotMatched.hasData()) // WHEN NOT MATCHED { MissingBoolNode* missingNode = FB_NEW(pool) MissingBoolNode( pool, MAKE_node(Dsql::nod_class_exprnode, 1)); @@ -4813,8 +4845,8 @@ temp = MAKE_node(Dsql::nod_class_exprnode, 1); temp->nod_arg[0] = reinterpret_cast<dsql_nod*>(missingNode); - if (insCondition) - temp = PASS1_compose(temp, insCondition, blr_and); + if (notMatchedConditions) + temp = PASS1_compose(temp, notMatchedConditions, blr_and); querySpec->dsqlWhere = PASS1_compose(querySpec->dsqlWhere, temp, blr_or); } @@ -4845,113 +4877,124 @@ DsqlContextStack usingCtxs; dsqlGetContexts(usingCtxs, source); - StmtNode* update = NULL; - StmtNode* matchedRet = NULL; + StmtNode* processedRet = NULL; StmtNode* nullRet = NULL; - if (dsqlWhenMatchedPresent && dsqlWhenMatchedAssignments) + StmtNode* update = NULL; + IfNode* lastIf = NULL; + + for (Matched* matched = dsqlWhenMatched.begin(); matched != dsqlWhenMatched.end(); ++matched) { - // Get the assignments of the UPDATE dsqlScratch. - CompoundStmtNode* stmts = dsqlWhenMatchedAssignments; - Array<dsql_nod*> org_values, new_values; + IfNode* thisIf = FB_NEW(pool) IfNode(pool); - // Separate the new and org values to process in correct contexts. - for (size_t i = 0; i < stmts->statements.getCount(); ++i) + if (matched->assignments) { - const AssignmentNode* const assign = stmts->statements[i]->as<AssignmentNode>(); - fb_assert(assign); - org_values.add(assign->dsqlAsgnFrom); - new_values.add(assign->dsqlAsgnTo); - } + // Get the assignments of the UPDATE dsqlScratch. + CompoundStmtNode* stmts = matched->assignments; + Array<dsql_nod*> orgValues, newValues; - // Build the MODIFY node. - ModifyNode* modify = FB_NEW(pool) ModifyNode(pool); + // Separate the new and org values to process in correct contexts. + for (size_t i = 0; i < stmts->statements.getCount(); ++i) + { + const AssignmentNode* const assign = stmts->statements[i]->as<AssignmentNode>(); + fb_assert(assign); + orgValues.add(assign->dsqlAsgnFrom); + newValues.add(assign->dsqlAsgnTo); + } - dsql_ctx* const old_context = dsqlGetContext(target); - dsql_nod** ptr; + // Build the MODIFY node. + ModifyNode* modify = FB_NEW(pool) ModifyNode(pool); + thisIf->trueAction = modify; - modify->dsqlContext = old_context; + dsql_ctx* const oldContext = dsqlGetContext(target); - ++dsqlScratch->scopeLevel; // Go to the same level of source and target contexts. + modify->dsqlContext = oldContext; - for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) - dsqlScratch->context->push(itr.object()); // push the USING contexts + ++dsqlScratch->scopeLevel; // Go to the same level of source and target contexts. - dsqlScratch->context->push(old_context); // process old context values + for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) + dsqlScratch->context->push(itr.object()); // push the USING contexts - for (ptr = org_values.begin(); ptr != org_values.end(); ++ptr) - *ptr = PASS1_node_psql(dsqlScratch, *ptr, false); + dsqlScratch->context->push(oldContext); // process old context values - // And pop the contexts. - dsqlScratch->context->pop(); - dsqlScratch->context->pop(); - --dsqlScratch->scopeLevel; + if (matched->condition) + thisIf->dsqlCondition = PASS1_node_psql(dsqlScratch, matched->condition, false); - // Process relation. - modify->dsqlRelation = PASS1_relation(dsqlScratch, dsqlRelation); - dsql_ctx* mod_context = dsqlGetContext(modify->dsqlRelation); + dsql_nod** ptr; - // Process new context values. - for (ptr = new_values.begin(); ptr != new_values.end(); ++ptr) - *ptr = PASS1_node_psql(dsqlScratch, *ptr, false); + for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr) + *ptr = PASS1_node_psql(dsqlScratch, *ptr, false); - dsqlScratch->context->pop(); + // And pop the contexts. + dsqlScratch->context->pop(); + dsqlScratch->context->pop(); + --dsqlScratch->scopeLevel; - if (dsqlReturning) - { - // Repush the source contexts. - ++dsqlScratch->scopeLevel; // Go to the same level of source and target contexts. + // Process relation. + modify->dsqlRelation = PASS1_relation(dsqlScratch, dsqlRelation); + dsql_ctx* modContext = dsqlGetContext(modify->dsqlRelation); - for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) - dsqlScratch->context->push(itr.object()); // push the USING contexts + // Process new context values. + for (ptr = newValues.begin(); ptr != newValues.end(); ++ptr) + *ptr = PASS1_node_psql(dsqlScratch, *ptr, false); - dsqlScratch->context->push(old_context); // process old context values + dsqlScratch->context->pop(); - mod_context->ctx_scope_level = old_context->ctx_scope_level; + if (dsqlReturning) + { + StmtNode* updRet = ReturningProcessor::clone(dsqlScratch, dsqlReturning, processedRet); - matchedRet = modify->statement2 = ReturningProcessor( - dsqlScratch, old_context, mod_context).process(dsqlReturning, NULL); + // Repush the source contexts. + ++dsqlScratch->scopeLevel; // Go to the same level of source and target contexts. - nullRet = dsqlNullifyReturning(dsqlScratch, modify, false); + for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) + dsqlScratch->context->push(itr.object()); // push the USING contexts - // And pop them. - dsqlScratch->context->pop(); - dsqlScratch->context->pop(); - --dsqlScratch->scopeLevel; - } + dsqlScratch->context->push(oldContext); // process old context values - // Recreate the list of assignments. + modContext->ctx_scope_level = oldContext->ctx_scope_level; - CompoundStmtNode* assignStatements = FB_NEW(pool) CompoundStmtNode(pool); - modify->statement = assignStatements; + processedRet = modify->statement2 = ReturningProcessor( + dsqlScratch, oldContext, modContext).process(dsqlReturning, updRet); - assignStatements->statements.resize(stmts->statements.getCount()); + nullRet = dsqlNullifyReturning(dsqlScratch, modify, false); - for (size_t i = 0; i < assignStatements->statements.getCount(); ++i) - { - if (!PASS1_set_parameter_type(dsqlScratch, org_values[i], new_values[i], false)) - PASS1_set_parameter_type(dsqlScratch, new_values[i], org_values[i], false); + // And pop them. + dsqlScratch->context->pop(); + dsqlScratch->context->pop(); + --dsqlScratch->scopeLevel; + } - AssignmentNode* assign = FB_NEW(pool) AssignmentNode(pool); - assign->dsqlAsgnFrom = org_values[i]; - assign->dsqlAsgnTo = new_values[i]; - assignStatements->statements[i] = assign; - } + // Recreate the list of assignments. - // We do not allow cases like UPDATE SET f1 = v1, f2 = v2, f1 = v3... - dsqlFieldAppearsOnce(new_values, "MERGE"); + CompoundStmtNode* assignStatements = FB_NEW(pool) CompoundStmtNode(pool); + modify->statement = assignStatements; - update = modify; - } - else if (dsqlWhenMatchedPresent && !dsqlWhenMatchedAssignments) - { - // build the DELETE node - EraseNode* erase = FB_NEW(pool) EraseNode(pool); - dsql_ctx* context = dsqlGetContext(target); - erase->dsqlContext = context; + assignStatements->statements.resize(stmts->statements.getCount()); - if (dsqlReturning) + for (size_t i = 0; i < assignStatements->statements.getCount(); ++i) + { + if (!PASS1_set_parameter_type(dsqlScratch, orgValues[i], newValues[i], false)) + PASS1_set_parameter_type(dsqlScratch, newValues[i], orgValues[i], false); + + AssignmentNode* assign = FB_NEW(pool) AssignmentNode(pool); + assign->dsqlAsgnFrom = orgValues[i]; + assign->dsqlAsgnTo = newValues[i]; + assignStatements->statements[i] = assign; + } + + // We do not allow cases like UPDATE SET f1 = v1, f2 = v2, f1 = v3... + dsqlFieldAppearsOnce(newValues, "MERGE"); + } + else { + // Build the DELETE node. + EraseNode* erase = FB_NEW(pool) EraseNode(pool); + thisIf->trueAction = erase; + + dsql_ctx* context = dsqlGetContext(target); + erase->dsqlContext = context; + ++dsqlScratch->scopeLevel; // Go to the same level of source and target contexts. for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) @@ -4959,24 +5002,46 @@ dsqlScratch->context->push(context); // process old context values - matchedRet = erase->statement = ReturningProcessor( - dsqlScratch, context, NULL).process(dsqlReturning, NULL); + if (matched->condition) + thisIf->dsqlCondition = PASS1_node_psql(dsqlScratch, matched->condition, false); - nullRet = dsqlNullifyReturning(dsqlScratch, erase, false); + if (dsqlReturning) + { + StmtNode* delRet = ReturningProcessor::clone(dsqlScratch, dsqlReturning, processedRet); + processedRet = erase->statement = ReturningProcessor( + dsqlScratch, context, NULL).process(dsqlReturning, delRet); + + nullRet = dsqlNullifyReturning(dsqlScratch, erase, false); + } + // And pop the contexts. dsqlScratch->context->pop(); dsqlScratch->context->pop(); --dsqlScratch->scopeLevel; } - update = erase; + if (lastIf) + lastIf->falseAction = thisIf->dsqlCondition ? thisIf : thisIf->trueAction; + else + update = thisIf->dsqlCondition ? thisIf : thisIf->trueAction; + + lastIf = thisIf; + + // If a statement executes unconditionally, no other will ever execute. + if (!thisIf->dsqlCondition) + break; } StmtNode* insert = NULL; + lastIf = NULL; - if (dsqlWhenNotMatchedPresent) + for (NotMatched* notMatched = dsqlWhenNotMatched.begin(); + notMatched != dsqlWhenNotMatched.end(); + ++notMatched) { + IfNode* thisIf = FB_NEW(pool) IfNode(pool); + ++dsqlScratch->scopeLevel; // Go to the same level of the source context. for (DsqlContextStack::iterator itr(usingCtxs); itr.hasData(); ++itr) @@ -4988,29 +5053,32 @@ // Build the INSERT node. StoreNode* store = FB_NEW(pool) StoreNode(pool); store->dsqlRelation = dsqlRelation; - store->dsqlFields = dsqlWhenNotMatchedFields; - store->dsqlValues = dsqlWhenNotMatchedValues; + store->dsqlFields = notMatched->fields; + store->dsqlValues = notMatched->values; - store = store->internalDsqlPass(dsqlScratch, false)->as<StoreNode>(); + thisIf->trueAction = store = store->internalDsqlPass(dsqlScratch, false)->as<StoreNode>(); fb_assert(store); + if (notMatched->condition) + thisIf->dsqlCondition = PASS1_node_psql(dsqlScratch, notMatched->condition, false); + // Restore the scope level. --dsqlScratch->scopeLevel; - StmtNode* insRet = ReturningProcessor::clone(dsqlScratch, dsqlReturning, matchedRet); - if (dsqlReturning) { - dsql_ctx* const old_context = dsqlGetContext(target); - dsqlScratch->context->push(old_context); + StmtNode* insRet = ReturningProcessor::clone(dsqlScratch, dsqlReturning, processedRet); + dsql_ctx* const oldContext = dsqlGetContext(target); + dsqlScratch->context->push(oldContext); + dsql_ctx* context = dsqlGetContext(store->dsqlRelation); - context->ctx_scope_level = old_context->ctx_scope_level; + context->ctx_scope_level = oldContext->ctx_scope_level; - store->statement2 = ReturningProcessor( - dsqlScratch, old_context, context).process(dsqlReturning, insRet); + processedRet = store->statement2 = ReturningProcessor( + dsqlScratch, oldContext, context).process(dsqlReturning, insRet); - if (!matchedRet) + if (!processedRet) nullRet = dsqlNullifyReturning(dsqlScratch, store, false); dsqlScratch->context->pop(); @@ -5020,7 +5088,16 @@ dsqlScratch->context->pop(); --dsqlScratch->scopeLevel; - insert = store; + if (lastIf) + lastIf->falseAction = thisIf->dsqlCondition ? thisIf : thisIf->trueAction; + else + insert = thisIf->dsqlCondition ? thisIf : thisIf->trueAction; + + lastIf = thisIf; + + // If a statement executes unconditionally, no other will ever execute. + if (!thisIf->dsqlCondition) + break; } MissingBoolNode* missingNode = FB_NEW(pool) MissingBoolNode( Modified: firebird/trunk/src/dsql/StmtNodes.h =================================================================== --- firebird/trunk/src/dsql/StmtNodes.h 2011-10-22 03:23:18 UTC (rev 53585) +++ firebird/trunk/src/dsql/StmtNodes.h 2011-10-23 01:31:11 UTC (rev 53586) @@ -937,18 +937,39 @@ class MergeNode : public TypedNode<DsqlOnlyStmtNode, StmtNode::TYPE_MERGE> { public: + struct Matched + { + Matched() + : assignments(NULL), + condition(NULL) + { + } + + CompoundStmtNode* assignments; + dsql_nod* condition; + }; + + struct NotMatched + { + NotMatched() + : fields(NULL), + values(NULL), + condition(NULL) + { + } + + dsql_nod* fields; + dsql_nod* values; + dsql_nod* condition; + }; + explicit MergeNode(MemoryPool& pool, dsql_nod* val = NULL) : TypedNode<DsqlOnlyStmtNode, StmtNode::TYPE_MERGE>(pool), dsqlRelation(NULL), dsqlUsing(NULL), dsqlCondition(NULL), - dsqlWhenMatchedPresent(false), - dsqlWhenMatchedAssignments(NULL), - dsqlWhenMatchedCondition(NULL), - dsqlWhenNotMatchedPresent(false), - dsqlWhenNotMatchedFields(NULL), - dsqlWhenNotMatchedValues(NULL), - dsqlWhenNotMatchedCondition(NULL), + dsqlWhenMatched(pool), + dsqlWhenNotMatched(pool), dsqlReturning(NULL) { } @@ -961,13 +982,8 @@ dsql_nod* dsqlRelation; dsql_nod* dsqlUsing; dsql_nod* dsqlCondition; - bool dsqlWhenMatchedPresent; - CompoundStmtNode* dsqlWhenMatchedAssignments; - dsql_nod* dsqlWhenMatchedCondition; - bool dsqlWhenNotMatchedPresent; - dsql_nod* dsqlWhenNotMatchedFields; - dsql_nod* dsqlWhenNotMatchedValues; - dsql_nod* dsqlWhenNotMatchedCondition; + Firebird::Array<Matched> dsqlWhenMatched; + Firebird::Array<NotMatched> dsqlWhenNotMatched; ReturningClause* dsqlReturning; }; Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2011-10-22 03:23:18 UTC (rev 53585) +++ firebird/trunk/src/dsql/parse.y 2011-10-23 01:31:11 UTC (rev 53586) @@ -4789,47 +4789,62 @@ ; merge_when_clause($mergeNode) - : merge_when_matched_clause($mergeNode) merge_when_not_matched_clause($mergeNode) - | merge_when_not_matched_clause($mergeNode) merge_when_matched_clause($mergeNode) - | merge_when_matched_clause($mergeNode) + : merge_when_matched_clause($mergeNode) | merge_when_not_matched_clause($mergeNode) + | merge_when_clause merge_when_matched_clause($mergeNode) + | merge_when_clause merge_when_not_matched_clause($mergeNode) ; merge_when_matched_clause($mergeNode) : WHEN MATCHED merge_update_specification($mergeNode) - { $mergeNode->dsqlWhenMatchedPresent = true; } ; merge_when_not_matched_clause($mergeNode) : WHEN NOT MATCHED merge_insert_specification($mergeNode) - { $mergeNode->dsqlWhenNotMatchedPresent = true; } ; merge_update_specification($mergeNode) : THEN UPDATE SET assignments - { $mergeNode->dsqlWhenMatchedAssignments = $4; } + { + MergeNode::Matched when; + when.assignments = $4; + $mergeNode->dsqlWhenMatched.add(when); + } | AND search_condition THEN UPDATE SET assignments { - $mergeNode->dsqlWhenMatchedAssignments = $6; - $mergeNode->dsqlWhenMatchedCondition = $2; + MergeNode::Matched when; + when.assignments = $6; + when.condition = $2; + $mergeNode->dsqlWhenMatched.add(when); } | THEN KW_DELETE - // Nothing to do here. + { + MergeNode::Matched when; + $mergeNode->dsqlWhenMatched.add(when); + } | AND search_condition THEN KW_DELETE - { $mergeNode->dsqlWhenMatchedCondition = $2; } + { + MergeNode::Matched when; + when.condition = $2; + $mergeNode->dsqlWhenMatched.add(when); + } ; merge_insert_specification($mergeNode) : THEN INSERT ins_column_parens_opt VALUES '(' value_list ')' { - $mergeNode->dsqlWhenNotMatchedFields = make_list($3); - $mergeNode->dsqlWhenNotMatchedValues = make_list($6); + MergeNode::NotMatched when; + when.fields = make_list($3); + when.values = make_list($6); + $mergeNode->dsqlWhenNotMatched.add(when); } | AND search_condition THEN INSERT ins_column_parens_opt VALUES '(' value_list ')' { - $mergeNode->dsqlWhenNotMatchedFields = make_list($5); - $mergeNode->dsqlWhenNotMatchedValues = make_list($8); - $mergeNode->dsqlWhenNotMatchedCondition = $2; + MergeNode::NotMatched when; + when.fields = make_list($5); + when.values = make_list($8); + when.condition = $2; + $mergeNode->dsqlWhenNotMatched.add(when); } ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-23 03:19:26
|
Revision: 53587 http://firebird.svn.sourceforge.net/firebird/?rev=53587&view=rev Author: firebirds Date: 2011-10-23 03:19:20 +0000 (Sun, 23 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-23 01:31:11 UTC (rev 53586) +++ firebird/trunk/ChangeLog 2011-10-23 03:19:20 UTC (rev 53587) @@ -1,3 +1,12 @@ + 2011-10-23 01:31 asfernandes + M doc/sql.extensions/README.merge.txt + M doc/sql.extensions/README.returning + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/parse.y +Improvement CORE-3639 - Allow the use of multiple WHEN MATCHED / NOT MATCHED clauses in MERGE, as per the SQL 2008 specification. +Also updated MERGE and RETURNING docs, and fixed a bug with MERGE WHEN MATCHED DELETE and RETURNING. + 2011-10-20 12:20 alexpeshkoff M src/auth/AuthDbg.cpp M src/auth/trusted/AuthSspi.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-23 01:31:11 UTC (rev 53586) +++ firebird/trunk/src/jrd/build_no.h 2011-10-23 03:19:20 UTC (rev 53587) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29592 + FORMAL BUILD NUMBER:29593 */ -#define PRODUCT_VER_STRING "3.0.0.29592" -#define FILE_VER_STRING "WI-T3.0.0.29592" -#define LICENSE_VER_STRING "WI-T3.0.0.29592" -#define FILE_VER_NUMBER 3, 0, 0, 29592 +#define PRODUCT_VER_STRING "3.0.0.29593" +#define FILE_VER_STRING "WI-T3.0.0.29593" +#define LICENSE_VER_STRING "WI-T3.0.0.29593" +#define FILE_VER_NUMBER 3, 0, 0, 29593 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29592" +#define FB_BUILD_NO "29593" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-23 01:31:11 UTC (rev 53586) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-23 03:19:20 UTC (rev 53587) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29592 +BuildNum=29593 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-24 03:20:07
|
Revision: 53591 http://firebird.svn.sourceforge.net/firebird/?rev=53591&view=rev Author: firebirds Date: 2011-10-24 03:20:01 +0000 (Mon, 24 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-23 21:27:55 UTC (rev 53590) +++ firebird/trunk/ChangeLog 2011-10-24 03:20:01 UTC (rev 53591) @@ -1,3 +1,18 @@ + 2011-10-23 21:27 asfernandes + M src/dsql/WinNodes.cpp + M src/dsql/WinNodes.h + M src/dsql/parse.y + M src/yvalve/keywords.cpp +Feature CORE-3619 - Windows function FIRST_VALUE. + + 2011-10-23 21:27 asfernandes + M src/dsql/WinNodes.cpp +Misc. + + 2011-10-23 21:26 asfernandes + M src/jrd/recsrc/AggregatedStream.cpp +Correction. + 2011-10-23 01:31 asfernandes M doc/sql.extensions/README.merge.txt M doc/sql.extensions/README.returning Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-23 21:27:55 UTC (rev 53590) +++ firebird/trunk/src/jrd/build_no.h 2011-10-24 03:20:01 UTC (rev 53591) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29593 + FORMAL BUILD NUMBER:29596 */ -#define PRODUCT_VER_STRING "3.0.0.29593" -#define FILE_VER_STRING "WI-T3.0.0.29593" -#define LICENSE_VER_STRING "WI-T3.0.0.29593" -#define FILE_VER_NUMBER 3, 0, 0, 29593 +#define PRODUCT_VER_STRING "3.0.0.29596" +#define FILE_VER_STRING "WI-T3.0.0.29596" +#define LICENSE_VER_STRING "WI-T3.0.0.29596" +#define FILE_VER_NUMBER 3, 0, 0, 29596 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29593" +#define FB_BUILD_NO "29596" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-23 21:27:55 UTC (rev 53590) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-24 03:20:01 UTC (rev 53591) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29593 +BuildNum=29596 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-26 03:21:07
|
Revision: 53594 http://firebird.svn.sourceforge.net/firebird/?rev=53594&view=rev Author: firebirds Date: 2011-10-26 03:21:00 +0000 (Wed, 26 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-25 15:04:17 UTC (rev 53593) +++ firebird/trunk/ChangeLog 2011-10-26 03:21:00 UTC (rev 53594) @@ -1,3 +1,15 @@ + 2011-10-25 15:04 asfernandes + M src/dsql/WinNodes.cpp + M src/dsql/WinNodes.h + M src/dsql/parse.y + M src/yvalve/keywords.cpp +Feature CORE-3620 - Window function LAST_VALUE. +Feature CORE-3621 - Window function NTH_VALUE. + + 2011-10-25 08:45 alexpeshkoff + M src/yvalve/why.cpp +Diag + 2011-10-23 21:27 asfernandes M src/dsql/WinNodes.cpp M src/dsql/WinNodes.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-25 15:04:17 UTC (rev 53593) +++ firebird/trunk/src/jrd/build_no.h 2011-10-26 03:21:00 UTC (rev 53594) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29596 + FORMAL BUILD NUMBER:29598 */ -#define PRODUCT_VER_STRING "3.0.0.29596" -#define FILE_VER_STRING "WI-T3.0.0.29596" -#define LICENSE_VER_STRING "WI-T3.0.0.29596" -#define FILE_VER_NUMBER 3, 0, 0, 29596 +#define PRODUCT_VER_STRING "3.0.0.29598" +#define FILE_VER_STRING "WI-T3.0.0.29598" +#define LICENSE_VER_STRING "WI-T3.0.0.29598" +#define FILE_VER_NUMBER 3, 0, 0, 29598 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29596" +#define FB_BUILD_NO "29598" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-25 15:04:17 UTC (rev 53593) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-26 03:21:00 UTC (rev 53594) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29596 +BuildNum=29598 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-10-27 01:04:22
|
Revision: 53598 http://firebird.svn.sourceforge.net/firebird/?rev=53598&view=rev Author: asfernandes Date: 2011-10-27 01:04:14 +0000 (Thu, 27 Oct 2011) Log Message: ----------- Misc. Modified Paths: -------------- firebird/trunk/doc/sql.extensions/README.merge.txt firebird/trunk/src/auth/AuthDbg.cpp firebird/trunk/src/common/cvt.cpp firebird/trunk/src/common/isc_sync.cpp firebird/trunk/src/common/os/posix/isc_ipc.cpp firebird/trunk/src/common/unicode_util.cpp firebird/trunk/src/dbs/metadata.sql firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/jrd/btr.cpp firebird/trunk/src/jrd/shut.cpp firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp firebird/trunk/src/jrd/trace/TraceConfigStorage.h firebird/trunk/src/jrd/vio.cpp firebird/trunk/src/lock/lock.cpp firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/yvalve/why.cpp Modified: firebird/trunk/doc/sql.extensions/README.merge.txt =================================================================== --- firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-27 01:04:14 UTC (rev 53598) @@ -32,7 +32,7 @@ VALUES <left paren> <value list> <right paren> Syntax rules: - 1. At least one of <merge when matched> and <merge when not matched> should be specified. + 1. At least one of <merge when matched> or <merge when not matched> should be specified. Scope: DSQL, PSQL Modified: firebird/trunk/src/auth/AuthDbg.cpp =================================================================== --- firebird/trunk/src/auth/AuthDbg.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/auth/AuthDbg.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -65,21 +65,21 @@ str.erase(); #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugServerInstance::startAuthentication: tA-tag=%d dpb=%p\n", tags->trustedAuth, dpb); + fprintf(stderr, "DebugServer::startAuthentication: tA-tag=%d dpb=%p\n", tags->trustedAuth, dpb); #endif if (tags->trustedAuth && dpb && dpb->find(tags->trustedAuth)) { unsigned int len; const UCHAR* s = dpb->get(&len); #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugServerInstance::startAuthentication: get()=%.*s\n", len, s); + fprintf(stderr, "DebugServer::startAuthentication: get()=%.*s\n", len, s); #endif str.assign(s, len); } str += '_'; #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugServerInstance::startAuthentication: %s\n", str.c_str()); + fprintf(stderr, "DebugServer::startAuthentication: %s\n", str.c_str()); #endif return AUTH_MORE_DATA; } @@ -96,7 +96,7 @@ try { #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugServerInstance::contAuthentication: %.*s\n", size, data); + fprintf(stderr, "DebugServer::contAuthentication: %.*s\n", size, data); #endif Firebird::MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo); writerInterface->add(Firebird::string((const char*) data, size).c_str()); @@ -114,7 +114,7 @@ *data = reinterpret_cast<const unsigned char*>(str.c_str()); *dataSize = str.length(); #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugServerInstance::getData: %.*s\n", *dataSize, *data); + fprintf(stderr, "DebugServer::getData: %.*s\n", *dataSize, *data); #endif } @@ -139,14 +139,14 @@ { str = "HAND"; #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugClientInstance::startAuthentication: %s\n", str.c_str()); + fprintf(stderr, "DebugClient::startAuthentication: %s\n", str.c_str()); #endif if (dpb && tags->trustedAuth) { Firebird::MasterInterfacePtr()->upgradeInterface(dpb, FB_AUTH_CLUMPLETS_VERSION, upInfo); dpb->add(tags->trustedAuth, str.c_str(), str.length()); #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugClientInstance::startAuthentication: DPB filled\n"); + fprintf(stderr, "DebugClient::startAuthentication: DPB filled\n"); #endif return AUTH_SUCCESS; } @@ -164,7 +164,7 @@ try { #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugClientInstance::contAuthentication: %.*s\n", size, data); + fprintf(stderr, "DebugClient::contAuthentication: %.*s\n", size, data); #endif str.assign(data, size); const char* env = getenv("ISC_DEBUG_AUTH"); @@ -186,7 +186,7 @@ *data = reinterpret_cast<const unsigned char*>(str.c_str()); *dataSize = str.length(); #ifdef AUTH_VERBOSE - fprintf(stderr, "DebugClientInstance::getData: %.*s\n", *dataSize, *data); + fprintf(stderr, "DebugClient::getData: %.*s\n", *dataSize, *data); #endif } Modified: firebird/trunk/src/common/cvt.cpp =================================================================== --- firebird/trunk/src/common/cvt.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/common/cvt.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -1741,7 +1741,7 @@ * A data conversion error occurred. Complain. * **************************************/ - Firebird::string message; + string message; if (desc->dsc_dtype == dtype_blob) message = "BLOB"; Modified: firebird/trunk/src/common/isc_sync.cpp =================================================================== --- firebird/trunk/src/common/isc_sync.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/common/isc_sync.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -534,30 +534,35 @@ #ifdef DEB_EVNT struct AbsPtr { - SLONG offset; - int fn; - bool bad() - { - return offset < 0 || fn < 0; - } AbsPtr() : offset(-1), fn(-1) { } + bool operator==(const AbsPtr& sec) const { return offset == sec.offset && fn == sec.fn; } + + bool bad() + { + return offset < 0 || fn < 0; + } + + SLONG offset; + int fn; }; static AbsPtr absPtr(const void* s) { const int n = getByAddress((UCHAR*) s); AbsPtr rc; + if (n >= 0) { - rc.offset = (IPTR)s - (IPTR)(sharedFiles[n].from); + rc.offset = (IPTR) s - (IPTR) (sharedFiles[n].from); rc.fn = sharedFiles[n].fileNum; } + return rc; } #endif // DEB_EVNT @@ -726,6 +731,7 @@ } state; int code; }; + GlobalPtr<Array<Dump> > dump; GlobalPtr<Mutex> dMutex; Modified: firebird/trunk/src/common/os/posix/isc_ipc.cpp =================================================================== --- firebird/trunk/src/common/os/posix/isc_ipc.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/common/os/posix/isc_ipc.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -149,7 +149,7 @@ #endif #ifdef SA_SIGINFO -static void CLIB_ROUTINE signal_action(int number, siginfo_t *siginfo, void *context); +static void CLIB_ROUTINE signal_action(int number, siginfo_t* siginfo, void* context); #else static void CLIB_ROUTINE signal_action(int number); #endif @@ -346,7 +346,7 @@ #ifdef SA_SIGINFO -static void CLIB_ROUTINE signal_action(int number, siginfo_t *siginfo, void *context) +static void CLIB_ROUTINE signal_action(int number, siginfo_t* siginfo, void* context) #else static void CLIB_ROUTINE signal_action(int number) #endif Modified: firebird/trunk/src/common/unicode_util.cpp =================================================================== --- firebird/trunk/src/common/unicode_util.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/common/unicode_util.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -1031,6 +1031,7 @@ LocalStatus lastError; string version; const int majorArray[] = {4, 3, 5, 6, 0}; + for (const int* major = majorArray; *major; ++major) { for (int minor = 20; minor--; ) // from 19 down to 0 @@ -1054,9 +1055,7 @@ << Arg::StatusVector(lastError.get())).raise(); } else - { (Arg::Gds(isc_random) << "Could not find acceptable ICU library").raise(); - } // compiler warning silencer return *convIcu; Modified: firebird/trunk/src/dbs/metadata.sql =================================================================== --- firebird/trunk/src/dbs/metadata.sql 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/dbs/metadata.sql 2011-10-27 01:04:14 UTC (rev 53598) @@ -32,4 +32,3 @@ /* Index definitions for all user tables */ CREATE UNIQUE INDEX QLI$PROCEDURES_IDX1 ON QLI$PROCEDURES(QLI$PROCEDURE_NAME); - Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -218,7 +218,6 @@ dsql_ctx* oldContext; string oldAlias, oldInternalAlias; AutoSetRestore<USHORT> autoFlags; - bool hasModContext; }; } // namespace Modified: firebird/trunk/src/jrd/btr.cpp =================================================================== --- firebird/trunk/src/jrd/btr.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/jrd/btr.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -2376,9 +2376,9 @@ UCHAR* ptr; size_t length; - if (isNull) { + + if (isNull) length = 0; - } else if (itype >= idx_first_intl_string || itype == idx_metadata) { DSC to; @@ -2394,24 +2394,23 @@ length = INTL_string_to_key(tdbb, itype, desc, &to, key_type); } else - { length = MOV_get_string(desc, &ptr, &buffer, MAX_KEY); - } if (length) { // clear key_empty flag, because length is >= 1 key->key_flags &= ~key_empty; - if (length > sizeof(key->key_data)) { + + if (length > sizeof(key->key_data)) length = sizeof(key->key_data); - } + if (descending && ((*ptr == desc_end_value_prefix) || (*ptr == desc_end_value_check))) { *p++ = desc_end_value_prefix; - if ((length + 1) > sizeof(key->key_data)) { + if ((length + 1) > sizeof(key->key_data)) length = sizeof(key->key_data) - 1; - } } + memcpy(p, ptr, length); p += length; } @@ -2419,19 +2418,18 @@ { // Leave key_empty flag, because the string is an empty string if (descending && ((pad == desc_end_value_prefix) || (pad == desc_end_value_check))) - { *p++ = desc_end_value_prefix; - } + *p++ = pad; } + while (p > key->key_data) { - if (*--p != pad) { + if (*--p != pad) break; - } } - key->key_length = p + 1 - key->key_data; + key->key_length = p + 1 - key->key_data; return; } Modified: firebird/trunk/src/jrd/shut.cpp =================================================================== --- firebird/trunk/src/jrd/shut.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/jrd/shut.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -244,7 +244,8 @@ } } - if (!exclusive && !successful && (timeout > 0 || flag & (isc_dpb_shut_attachment | isc_dpb_shut_transaction))) + if (!exclusive && !successful && + (timeout > 0 || flag & (isc_dpb_shut_attachment | isc_dpb_shut_transaction))) { notify_shutdown(tdbb, 0, -1); // Tell everyone we're giving up attachment->att_flags &= ~ATT_shutdown_manager; Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp =================================================================== --- firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -306,10 +306,8 @@ void ConfigStorage::release() { fb_assert(m_recursive > 0); + fb_assert(m_mutexTID == getThreadId()); - const FB_THREAD_ID currTID = getThreadId(); - fb_assert(m_mutexTID == currTID); - if (--m_recursive == 0) { checkDirty(); Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.h =================================================================== --- firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2011-10-27 01:04:14 UTC (rev 53598) @@ -116,9 +116,9 @@ void putItem(ITEM tag, ULONG len, const void* data); bool getItemLength(ITEM& tag, ULONG& len); - int m_recursive; + int m_recursive; FB_THREAD_ID m_mutexTID; - int m_cfg_file; + int m_cfg_file; bool m_dirty; }; Modified: firebird/trunk/src/jrd/vio.cpp =================================================================== --- firebird/trunk/src/jrd/vio.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/jrd/vio.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -4264,7 +4264,8 @@ jrd_rel* relation = NULL; jrd_tra* transaction = NULL; - AutoPtr<GarbageCollector> gc(FB_NEW(*attachment->att_pool) GarbageCollector(*attachment->att_pool, dbb)); + AutoPtr<GarbageCollector> gc(FB_NEW(*attachment->att_pool) GarbageCollector( + *attachment->att_pool, dbb)); try { Modified: firebird/trunk/src/lock/lock.cpp =================================================================== --- firebird/trunk/src/lock/lock.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/lock/lock.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -2307,7 +2307,8 @@ } -bool LockManager::init_owner_block(Arg::StatusVector& statusVector, own* owner, UCHAR owner_type, LOCK_OWNER_T owner_id) +bool LockManager::init_owner_block(Arg::StatusVector& statusVector, own* owner, UCHAR owner_type, + LOCK_OWNER_T owner_id) { /************************************** * Modified: firebird/trunk/src/remote/client/interface.cpp =================================================================== --- firebird/trunk/src/remote/client/interface.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/remote/client/interface.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -592,8 +592,7 @@ static bool get_new_dpb(ClumpletWriter&, const ParametersSet&); static void handle_error(ISC_STATUS); static void info(IStatus*, Rdb*, P_OP, USHORT, USHORT, USHORT, - const UCHAR*, USHORT, const UCHAR*, ULONG, UCHAR*, - AuthClientPlugins* authItr = NULL); + const UCHAR*, USHORT, const UCHAR*, ULONG, UCHAR*, AuthClientPlugins* authItr = NULL); static void init(IStatus*, rem_port*, P_OP, PathName&, ClumpletWriter&); static Rtr* make_transaction(Rdb*, USHORT); static void mov_dsql_message(const UCHAR*, const rem_fmt*, UCHAR*, const rem_fmt*); @@ -620,16 +619,10 @@ static void unsupported(); static void zap_packet(PACKET *); -static void authFillParametersBlock(AuthClientPlugins& authItr, - ClumpletWriter& dpb, - const Auth::AuthTags* tags, - rem_port* port); -static void authReceiveResponse(AuthClientPlugins& authItr, - rem_port* port, - Rdb* rdb, - const Auth::AuthTags* tags, - IStatus* status, - PACKET* packet); +static void authFillParametersBlock(AuthClientPlugins& authItr, ClumpletWriter& dpb, + const Auth::AuthTags* tags, rem_port* port); +static void authReceiveResponse(AuthClientPlugins& authItr, rem_port* port, Rdb* rdb, + const Auth::AuthTags* tags, IStatus* status, PACKET* packet); static AtomicCounter remote_event_id; @@ -5843,10 +5836,8 @@ } // Let plugins try to add data to DPB in order to avoid extra network roundtrip -static void authFillParametersBlock(AuthClientPlugins& authItr, - ClumpletWriter& dpb, - const Auth::AuthTags* tags, - rem_port* port) +static void authFillParametersBlock(AuthClientPlugins& authItr, ClumpletWriter& dpb, + const Auth::AuthTags* tags, rem_port* port) { LocalStatus s; Auth::DpbImplementation di(dpb); @@ -5879,12 +5870,8 @@ } } -static void authReceiveResponse(AuthClientPlugins& authItr, - rem_port* port, - Rdb* rdb, - const Auth::AuthTags* tags, - IStatus* status, - PACKET* packet) +static void authReceiveResponse(AuthClientPlugins& authItr, rem_port* port, Rdb* rdb, + const Auth::AuthTags* tags, IStatus* status, PACKET* packet) { LocalStatus s; @@ -5985,11 +5972,8 @@ (Arg::Gds(isc_login) << Arg::StatusVector(s.get())).raise(); } -static void init(IStatus* status, - rem_port* port, - P_OP op, - PathName& file_name, - ClumpletWriter& dpb) +static void init(IStatus* status, rem_port* port, P_OP op, PathName& file_name, + ClumpletWriter& dpb) { /************************************** * @@ -6012,8 +5996,8 @@ AuthClientPlugins authItr(PluginType::AuthClient, FB_AUTH_CLIENT_VERSION, upInfo); authFillParametersBlock(authItr, dpb, - op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST, - port); + op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST, + port); if (port->port_protocol < PROTOCOL_VERSION12) { @@ -6061,8 +6045,8 @@ send_packet(port, packet); authReceiveResponse(authItr, port, rdb, - op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST, - status, packet); + op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST, + status, packet); } catch (const Exception&) { Modified: firebird/trunk/src/yvalve/why.cpp =================================================================== --- firebird/trunk/src/yvalve/why.cpp 2011-10-27 00:22:23 UTC (rev 53597) +++ firebird/trunk/src/yvalve/why.cpp 2011-10-27 01:04:14 UTC (rev 53598) @@ -4754,15 +4754,13 @@ { ClumpletWriter spb(ClumpletReader::SpbSendItems, MAX_DPB_SIZE, sendItems, sendLength); if (!regular.next) - { populateSpb(spb, isc_info_svc_auth_block); - } checkSpbLen = receiveLength; checkSpbPresent = receiveItems; YEntry<YService> entry(status, this, SERV_QUERY); - entry.next()->query(status, spb.getBufferLength(), spb.getBuffer(), receiveLength, receiveItems, - bufferLength, buffer); + entry.next()->query(status, spb.getBufferLength(), spb.getBuffer(), + receiveLength, receiveItems, bufferLength, buffer); checkSpbLen = 0; checkSpbPresent = NULL; } @@ -4780,9 +4778,7 @@ { ClumpletWriter spb(ClumpletReader::SpbStart, MAX_DPB_SIZE, spbItems, spbLength); if (!regular.next) - { populateSpb(spb, isc_spb_auth_block); - } YEntry<YService> entry(status, this, SERV_START); entry.next()->start(status, spb.getBufferLength(), spb.getBuffer()); @@ -5081,7 +5077,8 @@ svcName.trim(); ClumpletReader spbReader(ClumpletReader::SpbAttach, spb, spbLength); - if ((spbReader.find(isc_spb_auth_block) && spbReader.getClumpLength() > 0) || ISC_check_if_remote(svcName, false)) + if ((spbReader.find(isc_spb_auth_block) && spbReader.getClumpLength() > 0) || + ISC_check_if_remote(svcName, false)) { IProvider* provider = NULL; service = getServiceManagerByName(&provider, status, svcName.c_str(), spbLength, spb); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-27 03:19:24
|
Revision: 53599 http://firebird.svn.sourceforge.net/firebird/?rev=53599&view=rev Author: firebirds Date: 2011-10-27 03:19:17 +0000 (Thu, 27 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-27 01:04:14 UTC (rev 53598) +++ firebird/trunk/ChangeLog 2011-10-27 03:19:17 UTC (rev 53599) @@ -1,3 +1,26 @@ + 2011-10-27 01:04 asfernandes + M doc/sql.extensions/README.merge.txt + M src/auth/AuthDbg.cpp + M src/common/cvt.cpp + M src/common/isc_sync.cpp + M src/common/os/posix/isc_ipc.cpp + M src/common/unicode_util.cpp + M src/dbs/metadata.sql + M src/dsql/StmtNodes.cpp + M src/jrd/btr.cpp + M src/jrd/shut.cpp + M src/jrd/trace/TraceConfigStorage.cpp + M src/jrd/trace/TraceConfigStorage.h + M src/jrd/vio.cpp + M src/lock/lock.cpp + M src/remote/client/interface.cpp + M src/yvalve/why.cpp +Misc. + + 2011-10-27 00:22 asfernandes + M src/dsql/parse.y +Correction. + 2011-10-25 15:04 asfernandes M src/dsql/WinNodes.cpp M src/dsql/WinNodes.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-27 01:04:14 UTC (rev 53598) +++ firebird/trunk/src/jrd/build_no.h 2011-10-27 03:19:17 UTC (rev 53599) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29598 + FORMAL BUILD NUMBER:29600 */ -#define PRODUCT_VER_STRING "3.0.0.29598" -#define FILE_VER_STRING "WI-T3.0.0.29598" -#define LICENSE_VER_STRING "WI-T3.0.0.29598" -#define FILE_VER_NUMBER 3, 0, 0, 29598 +#define PRODUCT_VER_STRING "3.0.0.29600" +#define FILE_VER_STRING "WI-T3.0.0.29600" +#define LICENSE_VER_STRING "WI-T3.0.0.29600" +#define FILE_VER_NUMBER 3, 0, 0, 29600 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29598" +#define FB_BUILD_NO "29600" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-27 01:04:14 UTC (rev 53598) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-27 03:19:17 UTC (rev 53599) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29598 +BuildNum=29600 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-10-28 03:18:51
|
Revision: 53601 http://firebird.svn.sourceforge.net/firebird/?rev=53601&view=rev Author: firebirds Date: 2011-10-28 03:18:44 +0000 (Fri, 28 Oct 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-10-27 23:53:15 UTC (rev 53600) +++ firebird/trunk/ChangeLog 2011-10-28 03:18:44 UTC (rev 53601) @@ -1,3 +1,7 @@ + 2011-10-27 23:53 asfernandes + M src/dsql/pass1.cpp +Fixed CORE-3611 - Wrong data while retrieving from CTEs (or derived tables) with same column names. + 2011-10-27 01:04 asfernandes M doc/sql.extensions/README.merge.txt M src/auth/AuthDbg.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-10-27 23:53:15 UTC (rev 53600) +++ firebird/trunk/src/jrd/build_no.h 2011-10-28 03:18:44 UTC (rev 53601) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29600 + FORMAL BUILD NUMBER:29601 */ -#define PRODUCT_VER_STRING "3.0.0.29600" -#define FILE_VER_STRING "WI-T3.0.0.29600" -#define LICENSE_VER_STRING "WI-T3.0.0.29600" -#define FILE_VER_NUMBER 3, 0, 0, 29600 +#define PRODUCT_VER_STRING "3.0.0.29601" +#define FILE_VER_STRING "WI-T3.0.0.29601" +#define LICENSE_VER_STRING "WI-T3.0.0.29601" +#define FILE_VER_NUMBER 3, 0, 0, 29601 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29600" +#define FB_BUILD_NO "29601" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-10-27 23:53:15 UTC (rev 53600) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-10-28 03:18:44 UTC (rev 53601) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29600 +BuildNum=29601 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-11-02 03:20:16
|
Revision: 53605 http://firebird.svn.sourceforge.net/firebird/?rev=53605&view=rev Author: firebirds Date: 2011-11-02 03:20:10 +0000 (Wed, 02 Nov 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-11-01 04:02:59 UTC (rev 53604) +++ firebird/trunk/ChangeLog 2011-11-02 03:20:10 UTC (rev 53605) @@ -1,3 +1,8 @@ + 2011-11-01 04:02 dimitr + M src/jrd/cch.cpp + M src/jrd/vio.cpp +Fixed the races leading to a crash during dbb finalization. Thanks to Adriano for assistance. + 2011-10-27 23:53 asfernandes M src/dsql/pass1.cpp Fixed CORE-3611 - Wrong data while retrieving from CTEs (or derived tables) with same column names. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-11-01 04:02:59 UTC (rev 53604) +++ firebird/trunk/src/jrd/build_no.h 2011-11-02 03:20:10 UTC (rev 53605) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29601 + FORMAL BUILD NUMBER:29602 */ -#define PRODUCT_VER_STRING "3.0.0.29601" -#define FILE_VER_STRING "WI-T3.0.0.29601" -#define LICENSE_VER_STRING "WI-T3.0.0.29601" -#define FILE_VER_NUMBER 3, 0, 0, 29601 +#define PRODUCT_VER_STRING "3.0.0.29602" +#define FILE_VER_STRING "WI-T3.0.0.29602" +#define LICENSE_VER_STRING "WI-T3.0.0.29602" +#define FILE_VER_NUMBER 3, 0, 0, 29602 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29601" +#define FB_BUILD_NO "29602" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-11-01 04:02:59 UTC (rev 53604) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-11-02 03:20:10 UTC (rev 53605) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29601 +BuildNum=29602 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-11-08 03:21:27
|
Revision: 53610 http://firebird.svn.sourceforge.net/firebird/?rev=53610&view=rev Author: firebirds Date: 2011-11-08 03:21:20 +0000 (Tue, 08 Nov 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-11-06 23:38:28 UTC (rev 53609) +++ firebird/trunk/ChangeLog 2011-11-08 03:21:20 UTC (rev 53610) @@ -1,3 +1,12 @@ + 2011-11-05 20:51 asfernandes + M src/jrd/intl.cpp +Fixed CORE-3650 - Recreation of collation leads to FB "death". + + 2011-11-05 18:07 dimitr + M src/common/cvt.cpp + M src/jrd/cvt2.cpp +Small optimizations in the mover/converter code. + 2011-11-01 04:02 dimitr M src/jrd/cch.cpp M src/jrd/vio.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-11-06 23:38:28 UTC (rev 53609) +++ firebird/trunk/src/jrd/build_no.h 2011-11-08 03:21:20 UTC (rev 53610) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29602 + FORMAL BUILD NUMBER:29604 */ -#define PRODUCT_VER_STRING "3.0.0.29602" -#define FILE_VER_STRING "WI-T3.0.0.29602" -#define LICENSE_VER_STRING "WI-T3.0.0.29602" -#define FILE_VER_NUMBER 3, 0, 0, 29602 +#define PRODUCT_VER_STRING "3.0.0.29604" +#define FILE_VER_STRING "WI-T3.0.0.29604" +#define LICENSE_VER_STRING "WI-T3.0.0.29604" +#define FILE_VER_NUMBER 3, 0, 0, 29604 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29602" +#define FB_BUILD_NO "29604" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-11-06 23:38:28 UTC (rev 53609) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-11-08 03:21:20 UTC (rev 53610) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29602 +BuildNum=29604 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-11-09 03:20:10
|
Revision: 53616 http://firebird.svn.sourceforge.net/firebird/?rev=53616&view=rev Author: firebirds Date: 2011-11-09 03:20:04 +0000 (Wed, 09 Nov 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-11-08 16:48:50 UTC (rev 53615) +++ firebird/trunk/ChangeLog 2011-11-09 03:20:04 UTC (rev 53616) @@ -1,3 +1,23 @@ + 2011-11-08 16:46 hvlad + M src/dsql/DdlNodes.epp +Additional fix for CORE-3557 : AV in engine when preparing query against dropping table +Also fixed CORE-3579 : Can't drop table when computed field depends on later created another field + + 2011-11-08 14:54 asfernandes + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/ddl.cpp + M src/dsql/node.h + M src/dsql/parse.y + M src/dsql/pass1.cpp + M src/isql/show.epp + M src/jrd/drq.h + M src/jrd/dyn.epp + M src/jrd/dyn_def.epp + M src/jrd/dyn_df_proto.h +1) Refactored legacy (UDF) function creation. +2) Extend ISQL' SHOW FUNCTION to take packages and parameter's datatype of non-legacy functions into account. + 2011-11-05 20:51 asfernandes M src/jrd/intl.cpp Fixed CORE-3650 - Recreation of collation leads to FB "death". Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-11-08 16:48:50 UTC (rev 53615) +++ firebird/trunk/src/jrd/build_no.h 2011-11-09 03:20:04 UTC (rev 53616) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29604 + FORMAL BUILD NUMBER:29606 */ -#define PRODUCT_VER_STRING "3.0.0.29604" -#define FILE_VER_STRING "WI-T3.0.0.29604" -#define LICENSE_VER_STRING "WI-T3.0.0.29604" -#define FILE_VER_NUMBER 3, 0, 0, 29604 +#define PRODUCT_VER_STRING "3.0.0.29606" +#define FILE_VER_STRING "WI-T3.0.0.29606" +#define LICENSE_VER_STRING "WI-T3.0.0.29606" +#define FILE_VER_NUMBER 3, 0, 0, 29606 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29604" +#define FB_BUILD_NO "29606" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-11-08 16:48:50 UTC (rev 53615) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-11-09 03:20:04 UTC (rev 53616) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29604 +BuildNum=29606 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-11-09 15:30:12
|
Revision: 53620 http://firebird.svn.sourceforge.net/firebird/?rev=53620&view=rev Author: asfernandes Date: 2011-11-09 15:30:00 +0000 (Wed, 09 Nov 2011) Log Message: ----------- Apply CORE-3114 patch (Attempt to drop non-existing generator produces bad error) with some modifications. Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/ddl.cpp firebird/trunk/src/dsql/node.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/dsql/pass1.cpp firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/dyn.epp firebird/trunk/src/jrd/dyn_del.epp firebird/trunk/src/jrd/dyn_dl_proto.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-09 15:30:00 UTC (rev 53620) @@ -2114,6 +2114,8 @@ PARAMETER (GDS__dsql_recreate_view_failed = 336397301) INTEGER*4 GDS__dsql_drop_view_failed PARAMETER (GDS__dsql_drop_view_failed = 336397302) + INTEGER*4 GDS__dsql_drop_sequence_failed + PARAMETER (GDS__dsql_drop_sequence_failed = 336397303) INTEGER*4 GDS__gsec_cant_open_db PARAMETER (GDS__gsec_cant_open_db = 336723983) INTEGER*4 GDS__gsec_switches_error Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/lang_helpers/gds_codes.pas 2011-11-09 15:30:00 UTC (rev 53620) @@ -1064,6 +1064,7 @@ gds_dsql_create_alter_view_failed = 336397300; gds_dsql_recreate_view_failed = 336397301; gds_dsql_drop_view_failed = 336397302; + gds_dsql_drop_sequence_failed = 336397303; gds_gsec_cant_open_db = 336723983; gds_gsec_switches_error = 336723984; gds_gsec_no_op_spec = 336723985; Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/DdlNodes.epp 2011-11-09 15:30:00 UTC (rev 53620) @@ -4716,26 +4716,59 @@ //---------------------- +void DropSequenceNode::print(string& text, Array<dsql_nod*>& nodes) const +{ + text.printf( + "DropSequenceNode\n" + " name: %s\n", + name.c_str()); +} -// Delete a record from RDB$GENERATORS. Return true if succeeded. -bool DropSequenceNode::deleteGenerator(thread_db* tdbb, jrd_tra* transaction, const MetaName& name) +void DropSequenceNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) { - AutoCacheRequest request(tdbb, drq_e_ident_gens, DYN_REQUESTS); + AutoCacheRequest request(tdbb, drq_e_gens, DYN_REQUESTS); bool found = false; FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction) GEN IN RDB$GENERATORS WITH GEN.RDB$GENERATOR_NAME EQ name.c_str() { + if (!GEN.RDB$SYSTEM_FLAG.NULL && GEN.RDB$SYSTEM_FLAG != 0) + { + // msg 272: "Cannot delete system generator @1" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(272, DYN_MSG_FAC)) << name); + } + + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, + DDL_TRIGGER_DROP_SEQUENCE, name); + ERASE GEN; found = true; } END_FOR - return found; + if (found) + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_SEQUENCE, name); + else + status_exception::raise(Arg::Gds(isc_gennotdef) << Arg::Str(name)); } +// Delete a record from RDB$GENERATORS, without verifying RDB$SYSTEM_FLAG. +void DropSequenceNode::deleteIdentity(thread_db* tdbb, jrd_tra* transaction, const MetaName& name) +{ + AutoCacheRequest request(tdbb, drq_e_ident_gens, DYN_REQUESTS); + + FOR (REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + GEN IN RDB$GENERATORS + WITH GEN.RDB$GENERATOR_NAME EQ name.c_str() + { + ERASE GEN; + } + END_FOR +} + + //---------------------- @@ -5036,7 +5069,7 @@ RFR.RDB$RELATION_NAME EQ relationName.c_str() { if (!RFR.RDB$GENERATOR_NAME.NULL) - DropSequenceNode::deleteGenerator(tdbb, transaction, RFR.RDB$GENERATOR_NAME); + DropSequenceNode::deleteIdentity(tdbb, transaction, RFR.RDB$GENERATOR_NAME); ERASE RFR; @@ -7230,7 +7263,7 @@ WITH RFR.RDB$RELATION_NAME EQ name.c_str() { if (!RFR.RDB$GENERATOR_NAME.NULL) - DropSequenceNode::deleteGenerator(tdbb, transaction, RFR.RDB$GENERATOR_NAME); + DropSequenceNode::deleteIdentity(tdbb, transaction, RFR.RDB$GENERATOR_NAME); ERASE RFR; Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/DdlNodes.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -893,11 +893,30 @@ }; -class DropSequenceNode +class DropSequenceNode : public DdlNode { public: - static bool deleteGenerator(thread_db* tdbb, jrd_tra* transaction, + DropSequenceNode(MemoryPool& pool, const Firebird::MetaName&aName) + : DdlNode(pool), + name(pool, aName) + { + } + + static void deleteIdentity(thread_db* tdbb, jrd_tra* transaction, const Firebird::MetaName& name); + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_sequence_failed) << name; + } + +private: + Firebird::MetaName name; }; Modified: firebird/trunk/src/dsql/ddl.cpp =================================================================== --- firebird/trunk/src/dsql/ddl.cpp 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/ddl.cpp 2011-11-09 15:30:00 UTC (rev 53620) @@ -1041,12 +1041,6 @@ define_filter(dsqlScratch); break; - case nod_del_generator: - string = (dsql_str*) node->nod_arg[0]; - dsqlScratch->appendNullString(isc_dyn_delete_generator, string->str_data); - dsqlScratch->appendUChar(isc_dyn_end); - break; - case nod_del_filter: string = (dsql_str*) node->nod_arg[0]; dsqlScratch->appendNullString(isc_dyn_delete_filter, string->str_data); Modified: firebird/trunk/src/dsql/node.h =================================================================== --- firebird/trunk/src/dsql/node.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/node.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -69,7 +69,6 @@ nod_def_index, nod_del_index, nod_def_constraint, - nod_del_generator, nod_def_filter, nod_del_filter, nod_def_shadow, Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/parse.y 2011-11-09 15:30:00 UTC (rev 53620) @@ -3528,9 +3528,9 @@ | ROLE symbol_role_name { $$ = make_node (nod_del_role, (int) 1, $2); } | GENERATOR symbol_generator_name - { $$ = make_node (nod_del_generator, (int) 1, $2); } + { $$ = makeClassNode(FB_NEW(getPool()) DropSequenceNode(getPool(), toName($2))); } | SEQUENCE symbol_generator_name - { $$ = make_node (nod_del_generator, (int) 1, $2); } + { $$ = makeClassNode(FB_NEW(getPool()) DropSequenceNode(getPool(), toName($2))); } | COLLATION symbol_collation_name { $$ = makeClassNode(newNode<DropCollationNode>(toName($2))); } | USER drop_user_clause Modified: firebird/trunk/src/dsql/pass1.cpp =================================================================== --- firebird/trunk/src/dsql/pass1.cpp 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/dsql/pass1.cpp 2011-11-09 15:30:00 UTC (rev 53620) @@ -902,7 +902,6 @@ case nod_grant: case nod_revoke: case nod_mod_database: - case nod_del_generator: case nod_def_role: case nod_del_role: case nod_def_filter: @@ -4777,9 +4776,6 @@ case nod_del_filter: verb = "delete filter"; break; - case nod_del_generator: - verb = "delete generator"; - break; case nod_del_index: verb = "delete index"; break; Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/include/gen/codetext.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -1053,6 +1053,7 @@ {"dsql_create_alter_view_failed", 336397300}, {"dsql_recreate_view_failed", 336397301}, {"dsql_drop_view_failed", 336397302}, + {"dsql_drop_sequence_failed", 336397303}, {"gsec_cant_open_db", 336723983}, {"gsec_switches_error", 336723984}, {"gsec_no_op_spec", 336723985}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/include/gen/iberror.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -1087,6 +1087,7 @@ const ISC_STATUS isc_dsql_create_alter_view_failed = 336397300L; const ISC_STATUS isc_dsql_recreate_view_failed = 336397301L; const ISC_STATUS isc_dsql_drop_view_failed = 336397302L; +const ISC_STATUS isc_dsql_drop_sequence_failed = 336397303L; const ISC_STATUS isc_gsec_cant_open_db = 336723983L; const ISC_STATUS isc_gsec_switches_error = 336723984L; const ISC_STATUS isc_gsec_no_op_spec = 336723985L; @@ -1188,7 +1189,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1132; +const ISC_STATUS isc_err_max = 1133; #else /* c definitions */ @@ -2245,6 +2246,7 @@ #define isc_dsql_create_alter_view_failed 336397300L #define isc_dsql_recreate_view_failed 336397301L #define isc_dsql_drop_view_failed 336397302L +#define isc_dsql_drop_sequence_failed 336397303L #define isc_gsec_cant_open_db 336723983L #define isc_gsec_switches_error 336723984L #define isc_gsec_no_op_spec 336723985L @@ -2346,7 +2348,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1132 +#define isc_err_max 1133 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/include/gen/msgs.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -1056,6 +1056,7 @@ {336397300, "CREATE OR ALTER VIEW @1 failed"}, /* dsql_create_alter_view_failed */ {336397301, "RECREATE VIEW @1 failed"}, /* dsql_recreate_view_failed */ {336397302, "DROP VIEW @1 failed"}, /* dsql_drop_view_failed */ + {336397303, "DROP SEQUENCE @1 failed"}, /* dsql_drop_sequence_failed */ {336723983, "unable to open database"}, /* gsec_cant_open_db */ {336723984, "error in switch specifications"}, /* gsec_switches_error */ {336723985, "no operation specified"}, /* gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/include/gen/sql_code.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -1052,6 +1052,7 @@ {336397300, -901}, /* 1012 dsql_create_alter_view_failed */ {336397301, -901}, /* 1013 dsql_recreate_view_failed */ {336397302, -901}, /* 1014 dsql_drop_view_failed */ + {336397303, -901}, /* 1015 dsql_drop_sequence_failed */ {336723983, -901}, /* 15 gsec_cant_open_db */ {336723984, -901}, /* 16 gsec_switches_error */ {336723985, -901}, /* 17 gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/include/gen/sql_state.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -1052,6 +1052,7 @@ {336397300, "42000"}, // 1012 dsql_create_alter_view_failed {336397301, "42000"}, // 1013 dsql_recreate_view_failed {336397302, "42000"}, // 1014 dsql_drop_view_failed + {336397303, "42000"}, // 1015 dsql_drop_sequence_failed {336723983, "00000"}, // 15 gsec_cant_open_db {336723984, "00000"}, // 16 gsec_switches_error {336723985, "00000"}, // 17 gsec_no_op_spec Modified: firebird/trunk/src/jrd/dyn.epp =================================================================== --- firebird/trunk/src/jrd/dyn.epp 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/jrd/dyn.epp 2011-11-09 15:30:00 UTC (rev 53620) @@ -392,10 +392,6 @@ DYN_modify_function(gbl, ptr); break; - case isc_dyn_delete_generator: - DYN_delete_generator(gbl, ptr); - break; - case isc_dyn_def_sql_role: DYN_define_role(gbl, ptr); break; Modified: firebird/trunk/src/jrd/dyn_del.epp =================================================================== --- firebird/trunk/src/jrd/dyn_del.epp 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/jrd/dyn_del.epp 2011-11-09 15:30:00 UTC (rev 53620) @@ -121,67 +121,6 @@ } -void DYN_delete_generator(Global* gbl, const UCHAR**ptr) -{ -/************************************** - * - * D Y N _ d e l e t e _ g e n e r a t o r - * - ************************************** - * - * Functional description - * Execute a dynamic ddl statement that - * deletes a generator from rdb$generator but the - * space allocated in the page won't be released. - * - **************************************/ - thread_db* tdbb = JRD_get_thread_data(); - - bool found = false; - Firebird::MetaName t; - GET_STRING(ptr, t); - - try - { - AutoCacheRequest request(tdbb, drq_e_gens, DYN_REQUESTS); - - found = false; - FOR (REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - X IN RDB$GENERATORS - WITH X.RDB$GENERATOR_NAME EQ t.c_str() - { - if (X.RDB$SYSTEM_FLAG != 0) - DYN_error_punt(false, 272); // msg 272: "Cannot delete system generator" - - found = true; - - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_BEFORE, - DDL_TRIGGER_DROP_SEQUENCE, t, gbl->sqlText); - - ERASE X; - } - END_FOR - } - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - DYN_error_punt(true, 213); - // msg 213: "ERASE GENERATOR failed" - } - - if (found) - { - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_AFTER, - DDL_TRIGGER_DROP_SEQUENCE, t, gbl->sqlText); - } - else - { - DYN_error_punt(false, 214, t.c_str()); - // msg 214: "Generator %s not found" - } -} - - void DYN_delete_index( Global* gbl, const UCHAR** ptr) { /************************************** Modified: firebird/trunk/src/jrd/dyn_dl_proto.h =================================================================== --- firebird/trunk/src/jrd/dyn_dl_proto.h 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/jrd/dyn_dl_proto.h 2011-11-09 15:30:00 UTC (rev 53620) @@ -25,7 +25,6 @@ #define JRD_DYN_DL_PROTO_H void DYN_delete_filter(Jrd::Global*, const UCHAR**); -void DYN_delete_generator(Jrd::Global*, const UCHAR**); void DYN_delete_index(Jrd::Global*, const UCHAR**); void DYN_delete_role(Jrd::Global*, const UCHAR**); void DYN_delete_shadow(Jrd::Global*, const UCHAR**); Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/msgs/facilities2.sql 2011-11-09 15:30:00 UTC (rev 53620) @@ -20,7 +20,7 @@ ('1996-11-07 13:39:40', 'INSTALL', 10, 1) ('1996-11-07 13:38:41', 'TEST', 11, 4) ('2011-06-01 12:57:44', 'GBAK', 12, 351) -('2010-08-01 13:05:00', 'SQLERR', 13, 1015) +('2010-08-01 13:05:00', 'SQLERR', 13, 1016) ('1996-11-07 13:38:42', 'SQLWARN', 14, 613) ('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307) -- Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/msgs/messages2.sql 2011-11-09 15:30:00 UTC (rev 53620) @@ -1846,7 +1846,7 @@ ('dyn_package_body_exists', NULL, 'DdlNodes.epp/PackageNodes.epp', NULL, 8, 269, NULL, 'Package body @1 already exists', NULL, NULL); ('dyn_invalid_ddl_func', 'CreateAlterFunctionNode::compile', 'DdlNodes.epp', NULL, 8, 270, NULL, 'Invalid DDL statement for function @1', NULL, NULL); ('dyn_newfc_oldsyntax', 'DYN_modify_function', 'dyn_mod.epp', NULL, 8, 271, NULL, 'Cannot alter new style function @1 with ALTER EXTERNAL FUNCTION. Use ALTER FUNCTION instead.', NULL, NULL); -(NULL, 'DYN_delete_generator', 'dyn_del.epp', NULL, 8, 272, NULL, 'Cannot delete system generator', NULL, NULL); +(NULL, 'DYN_delete_generator', 'dyn_del.epp', NULL, 8, 272, NULL, 'Cannot delete system generator @1', NULL, NULL); (NULL, 'DYN_define_sql_field', 'dyn_def.epp', NULL, 8, 273, NULL, 'Identity column @1 of table @2 must be of exact number type with zero scale', NULL, NULL); (NULL, 'DYN_modify_local_field', 'dyn_mod.epp', NULL, 8, 274, NULL, 'Identity column @1 of table @2 cannot be changed to NULLable', NULL, NULL); (NULL, 'DYN_modify_sql_field', 'dyn_mod.epp', NULL, 8, 275, NULL, 'Identity column @1 of table @2 cannot have default value', NULL, NULL); @@ -2482,6 +2482,7 @@ ('dsql_create_alter_view_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1012, NULL, 'CREATE OR ALTER VIEW @1 failed', NULL, NULL); ('dsql_recreate_view_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1013, NULL, 'RECREATE VIEW @1 failed', NULL, NULL); ('dsql_drop_view_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1014, NULL, 'DROP VIEW @1 failed', NULL, NULL); +('dsql_drop_sequence_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1015, NULL, 'DROP SEQUENCE @1 failed', NULL, NULL); -- SQLWARN (NULL, NULL, NULL, NULL, 14, 100, NULL, 'Row not found for fetch, update or delete, or the result of a query is an empty table.', NULL, NULL); (NULL, NULL, NULL, NULL, 14, 101, NULL, 'segment buffer length shorter than expected', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2011-11-09 13:31:27 UTC (rev 53619) +++ firebird/trunk/src/msgs/system_errors2.sql 2011-11-09 15:30:00 UTC (rev 53620) @@ -1045,6 +1045,7 @@ (-901, '42', '000', 13, 1012, 'dsql_create_alter_view_failed', NULL, NULL); (-901, '42', '000', 13, 1013, 'dsql_recreate_view_failed', NULL, NULL); (-901, '42', '000', 13, 1014, 'dsql_drop_view_failed', NULL, NULL); +(-901, '42', '000', 13, 1015, 'dsql_drop_sequence_failed', NULL, NULL); -- GSEC (-901, '00', '000', 18, 15, 'gsec_cant_open_db', NULL, NULL) (-901, '00', '000', 18, 16, 'gsec_switches_error', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-11-10 03:19:50
|
Revision: 53621 http://firebird.svn.sourceforge.net/firebird/?rev=53621&view=rev Author: firebirds Date: 2011-11-10 03:19:44 +0000 (Thu, 10 Nov 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-11-09 15:30:00 UTC (rev 53620) +++ firebird/trunk/ChangeLog 2011-11-10 03:19:44 UTC (rev 53621) @@ -1,3 +1,30 @@ + 2011-11-09 15:30 asfernandes + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/ddl.cpp + M src/dsql/node.h + M src/dsql/parse.y + M src/dsql/pass1.cpp + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/jrd/dyn.epp + M src/jrd/dyn_del.epp + M src/jrd/dyn_dl_proto.h + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Apply CORE-3114 patch (Attempt to drop non-existing generator produces bad error) with some modifications. + + 2011-11-09 13:31 dimitr + M src/jrd/jrd.cpp + M src/jrd/tra.cpp +A little bit of safety doesn't hurt. + 2011-11-08 16:46 hvlad M src/dsql/DdlNodes.epp Additional fix for CORE-3557 : AV in engine when preparing query against dropping table Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-11-09 15:30:00 UTC (rev 53620) +++ firebird/trunk/src/jrd/build_no.h 2011-11-10 03:19:44 UTC (rev 53621) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29606 + FORMAL BUILD NUMBER:29608 */ -#define PRODUCT_VER_STRING "3.0.0.29606" -#define FILE_VER_STRING "WI-T3.0.0.29606" -#define LICENSE_VER_STRING "WI-T3.0.0.29606" -#define FILE_VER_NUMBER 3, 0, 0, 29606 +#define PRODUCT_VER_STRING "3.0.0.29608" +#define FILE_VER_STRING "WI-T3.0.0.29608" +#define LICENSE_VER_STRING "WI-T3.0.0.29608" +#define FILE_VER_NUMBER 3, 0, 0, 29608 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29606" +#define FB_BUILD_NO "29608" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-11-09 15:30:00 UTC (rev 53620) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-11-10 03:19:44 UTC (rev 53621) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29606 +BuildNum=29608 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-11-10 14:55:13
|
Revision: 53623 http://firebird.svn.sourceforge.net/firebird/?rev=53623&view=rev Author: asfernandes Date: 2011-11-10 14:55:06 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Feature CORE-3018 - RECREATE SEQUENCE/GENERATOR. Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-10 14:55:06 UTC (rev 53623) @@ -2116,6 +2116,8 @@ PARAMETER (GDS__dsql_drop_view_failed = 336397302) INTEGER*4 GDS__dsql_drop_sequence_failed PARAMETER (GDS__dsql_drop_sequence_failed = 336397303) + INTEGER*4 GDS__dsql_recreate_sequence_failed + PARAMETER (GDS__dsql_recreate_sequence_failed = 336397304) INTEGER*4 GDS__gsec_cant_open_db PARAMETER (GDS__gsec_cant_open_db = 336723983) INTEGER*4 GDS__gsec_switches_error Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/lang_helpers/gds_codes.pas 2011-11-10 14:55:06 UTC (rev 53623) @@ -1065,6 +1065,7 @@ gds_dsql_recreate_view_failed = 336397301; gds_dsql_drop_view_failed = 336397302; gds_dsql_drop_sequence_failed = 336397303; + gds_dsql_recreate_sequence_failed = 336397304; gds_gsec_cant_open_db = 336723983; gds_gsec_switches_error = 336723984; gds_gsec_no_op_spec = 336723985; Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/dsql/DdlNodes.epp 2011-11-10 14:55:06 UTC (rev 53623) @@ -4749,7 +4749,7 @@ if (found) executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_SEQUENCE, name); - else + else if (!silent) status_exception::raise(Arg::Gds(isc_gennotdef) << Arg::Str(name)); } Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/dsql/DdlNodes.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -888,7 +888,7 @@ statusVector << Firebird::Arg::Gds(isc_dsql_create_sequence_failed) << name; } -private: +public: Firebird::MetaName name; }; @@ -898,7 +898,8 @@ public: DropSequenceNode(MemoryPool& pool, const Firebird::MetaName&aName) : DdlNode(pool), - name(pool, aName) + name(pool, aName), + silent(false) { } @@ -915,11 +916,16 @@ statusVector << Firebird::Arg::Gds(isc_dsql_drop_sequence_failed) << name; } -private: +public: Firebird::MetaName name; + bool silent; }; +typedef RecreateNode<CreateSequenceNode, DropSequenceNode, isc_dsql_recreate_sequence_failed> + RecreateSequenceNode; + + class RelationNode : public DdlNode { public: Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/dsql/parse.y 2011-11-10 14:55:06 UTC (rev 53623) @@ -646,6 +646,7 @@ Jrd::CreateAlterProcedureNode* createAlterProcedureNode; Jrd::CreateAlterTriggerNode* createAlterTriggerNode; Jrd::CreateAlterPackageNode* createAlterPackageNode; + Jrd::CreateSequenceNode* createSequenceNode; Firebird::Array<Jrd::CreateAlterPackageNode::Item>* packageItems; Jrd::ExceptionArray* exceptionArray; Jrd::CreateAlterPackageNode::Item packageItem; @@ -881,7 +882,8 @@ %type <boolVal> release_only_opt -%type <ddlNode> alter_charset_clause comment generator_clause +%type <ddlNode> alter_charset_clause comment +%type <createSequenceNode> generator_clause %type <stmtNode> if_then_else in_autonomous_transaction excp_statement raise_statement %type <execBlockNode> exec_block @@ -1342,6 +1344,10 @@ { $$ = makeClassNode(newNode<RecreatePackageBodyNode>($3)); } | EXCEPTION rexception_clause { $$ = $2; } + | GENERATOR generator_clause + { $$ = makeClassNode(newNode<RecreateSequenceNode>($2)); } + | SEQUENCE generator_clause + { $$ = makeClassNode(newNode<RecreateSequenceNode>($2)); } ; create_or_alter Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/include/gen/codetext.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -1054,6 +1054,7 @@ {"dsql_recreate_view_failed", 336397301}, {"dsql_drop_view_failed", 336397302}, {"dsql_drop_sequence_failed", 336397303}, + {"dsql_recreate_sequence_failed", 336397304}, {"gsec_cant_open_db", 336723983}, {"gsec_switches_error", 336723984}, {"gsec_no_op_spec", 336723985}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/include/gen/iberror.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -1088,6 +1088,7 @@ const ISC_STATUS isc_dsql_recreate_view_failed = 336397301L; const ISC_STATUS isc_dsql_drop_view_failed = 336397302L; const ISC_STATUS isc_dsql_drop_sequence_failed = 336397303L; +const ISC_STATUS isc_dsql_recreate_sequence_failed = 336397304L; const ISC_STATUS isc_gsec_cant_open_db = 336723983L; const ISC_STATUS isc_gsec_switches_error = 336723984L; const ISC_STATUS isc_gsec_no_op_spec = 336723985L; @@ -1189,7 +1190,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1133; +const ISC_STATUS isc_err_max = 1134; #else /* c definitions */ @@ -2247,6 +2248,7 @@ #define isc_dsql_recreate_view_failed 336397301L #define isc_dsql_drop_view_failed 336397302L #define isc_dsql_drop_sequence_failed 336397303L +#define isc_dsql_recreate_sequence_failed 336397304L #define isc_gsec_cant_open_db 336723983L #define isc_gsec_switches_error 336723984L #define isc_gsec_no_op_spec 336723985L @@ -2348,7 +2350,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1133 +#define isc_err_max 1134 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/include/gen/msgs.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -1057,6 +1057,7 @@ {336397301, "RECREATE VIEW @1 failed"}, /* dsql_recreate_view_failed */ {336397302, "DROP VIEW @1 failed"}, /* dsql_drop_view_failed */ {336397303, "DROP SEQUENCE @1 failed"}, /* dsql_drop_sequence_failed */ + {336397304, "RECREATE SEQUENCE @1 failed"}, /* dsql_recreate_sequence_failed */ {336723983, "unable to open database"}, /* gsec_cant_open_db */ {336723984, "error in switch specifications"}, /* gsec_switches_error */ {336723985, "no operation specified"}, /* gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/include/gen/sql_code.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -1053,6 +1053,7 @@ {336397301, -901}, /* 1013 dsql_recreate_view_failed */ {336397302, -901}, /* 1014 dsql_drop_view_failed */ {336397303, -901}, /* 1015 dsql_drop_sequence_failed */ + {336397304, -901}, /* 1016 dsql_recreate_sequence_failed */ {336723983, -901}, /* 15 gsec_cant_open_db */ {336723984, -901}, /* 16 gsec_switches_error */ {336723985, -901}, /* 17 gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/include/gen/sql_state.h 2011-11-10 14:55:06 UTC (rev 53623) @@ -1053,6 +1053,7 @@ {336397301, "42000"}, // 1013 dsql_recreate_view_failed {336397302, "42000"}, // 1014 dsql_drop_view_failed {336397303, "42000"}, // 1015 dsql_drop_sequence_failed + {336397304, "42000"}, // 1016 dsql_recreate_sequence_failed {336723983, "00000"}, // 15 gsec_cant_open_db {336723984, "00000"}, // 16 gsec_switches_error {336723985, "00000"}, // 17 gsec_no_op_spec Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/msgs/facilities2.sql 2011-11-10 14:55:06 UTC (rev 53623) @@ -20,7 +20,7 @@ ('1996-11-07 13:39:40', 'INSTALL', 10, 1) ('1996-11-07 13:38:41', 'TEST', 11, 4) ('2011-06-01 12:57:44', 'GBAK', 12, 351) -('2010-08-01 13:05:00', 'SQLERR', 13, 1016) +('2010-11-10 12:40:00', 'SQLERR', 13, 1017) ('1996-11-07 13:38:42', 'SQLWARN', 14, 613) ('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307) -- Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/msgs/messages2.sql 2011-11-10 14:55:06 UTC (rev 53623) @@ -2483,6 +2483,7 @@ ('dsql_recreate_view_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1013, NULL, 'RECREATE VIEW @1 failed', NULL, NULL); ('dsql_drop_view_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1014, NULL, 'DROP VIEW @1 failed', NULL, NULL); ('dsql_drop_sequence_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1015, NULL, 'DROP SEQUENCE @1 failed', NULL, NULL); +('dsql_recreate_sequence_failed', 'getMainErrorCode', 'DdlNodes.h', NULL, 13, 1016, NULL, 'RECREATE SEQUENCE @1 failed', NULL, NULL); -- SQLWARN (NULL, NULL, NULL, NULL, 14, 100, NULL, 'Row not found for fetch, update or delete, or the result of a query is an empty table.', NULL, NULL); (NULL, NULL, NULL, NULL, 14, 101, NULL, 'segment buffer length shorter than expected', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2011-11-10 14:35:40 UTC (rev 53622) +++ firebird/trunk/src/msgs/system_errors2.sql 2011-11-10 14:55:06 UTC (rev 53623) @@ -1046,6 +1046,7 @@ (-901, '42', '000', 13, 1013, 'dsql_recreate_view_failed', NULL, NULL); (-901, '42', '000', 13, 1014, 'dsql_drop_view_failed', NULL, NULL); (-901, '42', '000', 13, 1015, 'dsql_drop_sequence_failed', NULL, NULL); +(-901, '42', '000', 13, 1016, 'dsql_recreate_sequence_failed', NULL, NULL); -- GSEC (-901, '00', '000', 18, 15, 'gsec_cant_open_db', NULL, NULL) (-901, '00', '000', 18, 16, 'gsec_switches_error', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2011-11-11 03:18:40
|
Revision: 53625 http://firebird.svn.sourceforge.net/firebird/?rev=53625&view=rev Author: firebirds Date: 2011-11-11 03:18:33 +0000 (Fri, 11 Nov 2011) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2011-11-10 15:03:12 UTC (rev 53624) +++ firebird/trunk/ChangeLog 2011-11-11 03:18:33 UTC (rev 53625) @@ -1,3 +1,32 @@ + 2011-11-10 15:03 asfernandes + M src/dsql/parse.y +Cleanup for RECREATE commands. + + 2011-11-10 14:55 asfernandes + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/parse.y + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Feature CORE-3018 - RECREATE SEQUENCE/GENERATOR. + + 2011-11-10 14:35 asfernandes + M src/dsql/ExprNodes.cpp + M src/dsql/StmtNodes.cpp + M src/jrd/Function.epp + M src/jrd/Routine.h + M src/jrd/exe.cpp + M src/jrd/met.epp +Rename methods to match error constants as per Claudio request. + 2011-11-09 15:30 asfernandes M lang_helpers/gds_codes.ftn M lang_helpers/gds_codes.pas Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2011-11-10 15:03:12 UTC (rev 53624) +++ firebird/trunk/src/jrd/build_no.h 2011-11-11 03:18:33 UTC (rev 53625) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:29608 + FORMAL BUILD NUMBER:29611 */ -#define PRODUCT_VER_STRING "3.0.0.29608" -#define FILE_VER_STRING "WI-T3.0.0.29608" -#define LICENSE_VER_STRING "WI-T3.0.0.29608" -#define FILE_VER_NUMBER 3, 0, 0, 29608 +#define PRODUCT_VER_STRING "3.0.0.29611" +#define FILE_VER_STRING "WI-T3.0.0.29611" +#define LICENSE_VER_STRING "WI-T3.0.0.29611" +#define FILE_VER_NUMBER 3, 0, 0, 29611 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "29608" +#define FB_BUILD_NO "29611" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2011-11-10 15:03:12 UTC (rev 53624) +++ firebird/trunk/src/misc/writeBuildNum.sh 2011-11-11 03:18:33 UTC (rev 53625) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=29608 +BuildNum=29611 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2011-11-13 21:32:21
|
Revision: 53627 http://firebird.svn.sourceforge.net/firebird/?rev=53627&view=rev Author: asfernandes Date: 2011-11-13 21:32:12 +0000 (Sun, 13 Nov 2011) Log Message: ----------- Refactor DDL commands: DROP INDEX, DROP FILTER, DROP SHADOW, CREATE/DROP ROLE and DROP USER. Modified Paths: -------------- firebird/trunk/builds/win32/msvc10/engine.vcxproj firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters firebird/trunk/builds/win32/msvc9/engine.vcproj firebird/trunk/builds/win32/preprocess.bat firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/ddl.cpp firebird/trunk/src/dsql/node.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/dsql/pass1.cpp firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/jrd/dyn.epp firebird/trunk/src/jrd/dyn.h firebird/trunk/src/jrd/dyn_def.epp firebird/trunk/src/jrd/dyn_df_proto.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Removed Paths: ------------- firebird/trunk/src/jrd/dyn_del.epp firebird/trunk/src/jrd/dyn_dl_proto.h Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj 2011-11-13 21:32:12 UTC (rev 53627) @@ -26,7 +26,6 @@ <ClCompile Include="..\..\..\gen\jrd\dpm.cpp" /> <ClCompile Include="..\..\..\gen\jrd\dyn.cpp" /> <ClCompile Include="..\..\..\gen\jrd\dyn_def.cpp" /> - <ClCompile Include="..\..\..\gen\jrd\dyn_del.cpp" /> <ClCompile Include="..\..\..\gen\jrd\dyn_mod.cpp" /> <ClCompile Include="..\..\..\gen\jrd\dyn_util.cpp" /> <ClCompile Include="..\..\..\gen\jrd\fun.cpp" /> @@ -220,7 +219,6 @@ <ClInclude Include="..\..\..\src\jrd\drq.h" /> <ClInclude Include="..\..\..\src\jrd\dyn.h" /> <ClInclude Include="..\..\..\src\jrd\dyn_df_proto.h" /> - <ClInclude Include="..\..\..\src\jrd\dyn_dl_proto.h" /> <ClInclude Include="..\..\..\src\jrd\dyn_md_proto.h" /> <ClInclude Include="..\..\..\src\jrd\dyn_proto.h" /> <ClInclude Include="..\..\..\src\jrd\dyn_ut_proto.h" /> @@ -353,7 +351,6 @@ <None Include="..\..\..\src\jrd\dpm.epp" /> <None Include="..\..\..\src\jrd\dyn.epp" /> <None Include="..\..\..\src\jrd\dyn_def.epp" /> - <None Include="..\..\..\src\jrd\dyn_del.epp" /> <None Include="..\..\..\src\jrd\dyn_mod.epp" /> <None Include="..\..\..\src\jrd\dyn_util.epp" /> <None Include="..\..\..\src\jrd\fun.epp" /> Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2011-11-13 21:32:12 UTC (rev 53627) @@ -417,9 +417,6 @@ <ClCompile Include="..\..\..\gen\jrd\dyn_def.cpp"> <Filter>JRD files\GPRE cpp</Filter> </ClCompile> - <ClCompile Include="..\..\..\gen\jrd\dyn_del.cpp"> - <Filter>JRD files\GPRE cpp</Filter> - </ClCompile> <ClCompile Include="..\..\..\gen\jrd\dyn_mod.cpp"> <Filter>JRD files\GPRE cpp</Filter> </ClCompile> @@ -686,9 +683,6 @@ <ClInclude Include="..\..\..\src\jrd\dyn_df_proto.h"> <Filter>Header files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\jrd\dyn_dl_proto.h"> - <Filter>Header files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\jrd\dyn_md_proto.h"> <Filter>Header files</Filter> </ClInclude> @@ -1027,9 +1021,6 @@ <None Include="..\..\..\src\jrd\dyn_def.epp"> <Filter>JRD files\GPRE files</Filter> </None> - <None Include="..\..\..\src\jrd\dyn_del.epp"> - <Filter>JRD files\GPRE files</Filter> - </None> <None Include="..\..\..\src\jrd\dyn_mod.epp"> <Filter>JRD files\GPRE files</Filter> </None> Modified: firebird/trunk/builds/win32/msvc9/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/builds/win32/msvc9/engine.vcproj 2011-11-13 21:32:12 UTC (rev 53627) @@ -731,10 +731,6 @@ > </File> <File - RelativePath="..\..\..\gen\jrd\dyn_del.cpp" - > - </File> - <File RelativePath="..\..\..\gen\jrd\dyn_mod.cpp" > </File> @@ -791,10 +787,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\dyn_del.epp" - > - </File> - <File RelativePath="..\..\..\src\jrd\dyn_mod.epp" > </File> @@ -1044,10 +1036,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\dyn_dl_proto.h" - > - </File> - <File RelativePath="..\..\..\src\jrd\dyn_md_proto.h" > </File> Modified: firebird/trunk/builds/win32/preprocess.bat =================================================================== --- firebird/trunk/builds/win32/preprocess.bat 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/builds/win32/preprocess.bat 2011-11-13 21:32:12 UTC (rev 53627) @@ -67,7 +67,7 @@ @for %%i in (array, blob) do @call :PREPROCESS yvalve %%i @for %%i in (metd, DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i -@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx +@for %%i in (dfw, dpm, dyn, dyn_def, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (stats) do @call :PREPROCESS utilities %%i @goto :EOF @@ -81,7 +81,7 @@ @for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx @for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i -@for %%i in (dfw, dpm, dyn, dyn_def, dyn_del, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx +@for %%i in (dfw, dpm, dyn, dyn_def, dyn_mod, dyn_util, fun, grant, ini, met, pcmet, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx @for %%i in (codes) do @call :PREPROCESS misc %%i @for %%i in (build_file) do @call :PREPROCESS msgs %%i @for %%i in (help, meta, proc, show) do @call :PREPROCESS qli %%i Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2011-11-13 21:32:12 UTC (rev 53627) @@ -2118,6 +2118,18 @@ PARAMETER (GDS__dsql_drop_sequence_failed = 336397303) INTEGER*4 GDS__dsql_recreate_sequence_failed PARAMETER (GDS__dsql_recreate_sequence_failed = 336397304) + INTEGER*4 GDS__dsql_drop_index_failed + PARAMETER (GDS__dsql_drop_index_failed = 336397305) + INTEGER*4 GDS__dsql_drop_filter_failed + PARAMETER (GDS__dsql_drop_filter_failed = 336397306) + INTEGER*4 GDS__dsql_drop_shadow_failed + PARAMETER (GDS__dsql_drop_shadow_failed = 336397307) + INTEGER*4 GDS__dsql_drop_role_failed + PARAMETER (GDS__dsql_drop_role_failed = 336397308) + INTEGER*4 GDS__dsql_drop_user_failed + PARAMETER (GDS__dsql_drop_user_failed = 336397309) + INTEGER*4 GDS__dsql_create_role_failed + PARAMETER (GDS__dsql_create_role_failed = 336397310) INTEGER*4 GDS__gsec_cant_open_db PARAMETER (GDS__gsec_cant_open_db = 336723983) INTEGER*4 GDS__gsec_switches_error Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/lang_helpers/gds_codes.pas 2011-11-13 21:32:12 UTC (rev 53627) @@ -1066,6 +1066,12 @@ gds_dsql_drop_view_failed = 336397302; gds_dsql_drop_sequence_failed = 336397303; gds_dsql_recreate_sequence_failed = 336397304; + gds_dsql_drop_index_failed = 336397305; + gds_dsql_drop_filter_failed = 336397306; + gds_dsql_drop_shadow_failed = 336397307; + gds_dsql_drop_role_failed = 336397308; + gds_dsql_drop_user_failed = 336397309; + gds_dsql_create_role_failed = 336397310; gds_gsec_cant_open_db = 336723983; gds_gsec_switches_error = 336723984; gds_gsec_no_op_spec = 336723985; Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/DdlNodes.epp 2011-11-13 21:32:12 UTC (rev 53627) @@ -39,9 +39,10 @@ #include "../jrd/IntlManager.h" #include "../jrd/PreparedStatement.h" #include "../jrd/ResultSet.h" +#include "../jrd/UserManagement.h" #include "../jrd/blb_proto.h" #include "../jrd/cmp_proto.h" -#include "../common/dsc_proto.h" +#include "../jrd/dfw_proto.h" #include "../jrd/dyn_dl_proto.h" #include "../jrd/dyn_ut_proto.h" #include "../jrd/exe_proto.h" @@ -56,8 +57,30 @@ #include "../dsql/make_proto.h" #include "../dsql/metd_proto.h" #include "../dsql/pass1_proto.h" +#include "../utilities/gsec/gsec.h" +#include "../common/dsc_proto.h" #include "../common/StatusArg.h" +namespace +{ + class DynamicUserData : public Firebird::VersionedIface<Auth::UserData, FB_AUTH_USER_VERSION> + { + public: + +#ifdef DEBUG_GDS_ALLOC + void* operator new(size_t size, Firebird::MemoryPool& pool, const char* fileName, int line) + { + return pool.allocate(size, fileName, line); + } +#else // DEBUG_GDS_ALLOC + void* operator new(size_t size, Firebird::MemoryPool& pool) + { + return pool.allocate(size); + } +#endif // DEBUG_GDS_ALLOC + }; +} // namespace + namespace Jrd { using namespace Firebird; @@ -8734,5 +8757,336 @@ return found; } +void DropIndexNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "DropIndexNode\n" + " name: '%s'\n", + name.c_str()); +} +void DropIndexNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + AutoCacheRequest request(tdbb, drq_e_indices, DYN_REQUESTS); + bool found = false; + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + IDX IN RDB$INDICES + WITH IDX.RDB$INDEX_NAME EQ name.c_str() + { + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, + DDL_TRIGGER_DROP_INDEX, name); + + ERASE IDX; + + if (IDX.RDB$EXPRESSION_BLR.NULL && !deleteSegmentRecords(tdbb, transaction, name)) + { + // msg 50: "No segments found for index" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(50, DYN_MSG_FAC))); + } + + found = true; + } + END_FOR + + if (found) + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_INDEX, name); + else + { + // msg 48: "Index not found" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(48, DYN_MSG_FAC))); + } + + savePoint.release(); // everything is ok +} + + +//---------------------- + + +void DropFilterNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "DropFilterNode\n" + " name: '%s'\n", + name.c_str()); +} + +void DropFilterNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + AutoCacheRequest request(tdbb, drq_e_filters, DYN_REQUESTS); + bool found = false; + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + X IN RDB$FILTERS + WITH X.RDB$FUNCTION_NAME EQ name.c_str() + { + ERASE X; + found = true; + } + END_FOR + + if (!found) + { + // msg 37: "Blob Filter %s not found" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(37, DYN_MSG_FAC)) << name); + } + + savePoint.release(); // everything is ok +} + + +//---------------------- + + +void DropShadowNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "DropShadowNode\n" + " number: '%d'\n", + number); +} + +void DropShadowNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + if (!tdbb->getAttachment()->locksmith()) + status_exception::raise(Arg::Gds(isc_adm_task_denied)); + + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + AutoCacheRequest request(tdbb, drq_e_shadow, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + FIL IN RDB$FILES + WITH FIL.RDB$SHADOW_NUMBER EQ number + { + ERASE FIL; + } + END_FOR + + // ASF: No error is raised if the shadow is not found. + + savePoint.release(); // everything is ok +} + + +//---------------------- + + +void CreateRoleNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "CreateRoleNode\n" + " name: '%s'\n", + name.c_str()); +} + +void CreateRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + MetaName ownerName(tdbb->getAttachment()->att_user->usr_user_name); + ownerName.upper7(); + + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, + DDL_TRIGGER_CREATE_ROLE, name); + + if (name == ownerName) + { + // msg 193: "user name could not be used for SQL role" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(193, DYN_MSG_FAC)) << ownerName); + } + + if (name == NULL_ROLE) + { + // msg 195: "keyword NONE could not be used as SQL role name" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(195, DYN_MSG_FAC)) << name); + } + + if (isItUserName(tdbb, transaction)) + { + // msg 193: "user name could not be used for SQL role" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(193, DYN_MSG_FAC)) << name); + } + + MetaName dummyName; + if (DYN_is_it_sql_role(transaction, name, dummyName, tdbb)) + { + // msg 194: "SQL role @1 already exists" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(194, DYN_MSG_FAC)) << name); + } + + AutoCacheRequest request(tdbb, drq_role_gens, DYN_REQUESTS); + + STORE(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + X IN RDB$ROLES + { + strcpy(X.RDB$ROLE_NAME, name.c_str()); + strcpy(X.RDB$OWNER_NAME, ownerName.c_str()); + X.RDB$SYSTEM_FLAG = 0; + } + END_STORE + + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, + DDL_TRIGGER_CREATE_ROLE, name); + + savePoint.release(); // everything is ok +} + +// If role name is user name returns true. Otherwise returns false. +bool CreateRoleNode::isItUserName(thread_db* tdbb, jrd_tra* transaction) +{ + bool found = false; + + // If there is a user with privilege or a grantor on a relation we + // can infer there is a user with this name + + AutoCacheRequest request(tdbb, drq_get_user_priv, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + PRIV IN RDB$USER_PRIVILEGES + WITH (PRIV.RDB$USER EQ name.c_str() AND PRIV.RDB$USER_TYPE = obj_user) OR + (PRIV.RDB$GRANTOR EQ name.c_str() AND PRIV.RDB$OBJECT_TYPE = obj_relation) + { + found = true; + } + END_FOR + + if (found) + return found; + + // We can infer that 'role name' is a user name if it owns any relations + // Note we can only get here if a user creates a table and revokes all + // his privileges on the table + + request.reset(tdbb, drq_get_rel_owner, DYN_REQUESTS); + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + REL IN RDB$RELATIONS + WITH REL.RDB$OWNER_NAME EQ name.c_str() + { + found = true; + } + END_FOR + + return found; +} + + +//---------------------- + + +void DropRoleNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "DropRoleNode\n" + " name: '%s'\n", + name.c_str()); +} + +void DropRoleNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + MetaName user(tdbb->getAttachment()->att_user->usr_user_name); + user.upper7(); + + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + AutoCacheRequest request(tdbb, drq_drop_role, DYN_REQUESTS); + bool found = false; + + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) + ROL IN RDB$ROLES + WITH ROL.RDB$ROLE_NAME EQ name.c_str() + { + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, + DDL_TRIGGER_DROP_ROLE, name); + + const MetaName roleOwner(ROL.RDB$OWNER_NAME); + + if (tdbb->getAttachment()->locksmith() || roleOwner == user) + { + AutoCacheRequest request2(tdbb, drq_del_role_1, DYN_REQUESTS); + + // The first OR clause finds all members of the role. + // The 2nd OR clause finds all privileges granted to the role + FOR(REQUEST_HANDLE request2 TRANSACTION_HANDLE transaction) + PRIV IN RDB$USER_PRIVILEGES + WITH (PRIV.RDB$RELATION_NAME EQ name.c_str() AND PRIV.RDB$OBJECT_TYPE = obj_sql_role) OR + (PRIV.RDB$USER EQ name.c_str() AND PRIV.RDB$USER_TYPE = obj_sql_role) + { + ERASE PRIV; + } + END_FOR + + ERASE ROL; + } + else + { + // msg 191: "only owner of SQL role or USR_locksmith could drop SQL role" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(191, DYN_MSG_FAC))); + } + + found = true; + } + END_FOR + + if (found) + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_ROLE, name); + else + { + // msg 155: "Role %s not found" + status_exception::raise(Arg::Gds(ENCODE_ISC_MSG(155, DYN_MSG_FAC)) << name); + } + + savePoint.release(); // everything is ok +} + + +//---------------------- + + +void DropUserNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text.printf( + "DropUserNode\n" + " name: '%s'\n", + name.c_str()); +} + +void DropUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction) +{ + // run all statements under savepoint control + AutoSavePoint savePoint(tdbb, transaction); + + DynamicUserData* userData = FB_NEW(*transaction->tra_pool) DynamicUserData; + + string text = name.c_str(); + text.upper(); + + userData->op = DEL_OPER; + userData->user.set(text.c_str()); + userData->user.setEntered(1); + + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_DROP_USER, + userData->user.get()); + + USHORT id = transaction->getUserManagement()->put(userData); + DFW_post_work(transaction, dfw_user_management, NULL, id); + + executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_DROP_USER, + userData->user.get()); + + savePoint.release(); // everything is ok +} + + } // namespace Jrd Modified: firebird/trunk/src/dsql/DdlNodes.h =================================================================== --- firebird/trunk/src/dsql/DdlNodes.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/DdlNodes.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1245,14 +1245,156 @@ }; -class DropIndexNode +class DropIndexNode : public DdlNode { public: + DropIndexNode(MemoryPool& p, const Firebird::MetaName& aName) + : DdlNode(p), + name(p, aName) + { + } + static bool deleteSegmentRecords(thread_db* tdbb, jrd_tra* transaction, const Firebird::MetaName& name); + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_index_failed) << name; + } + +public: + Firebird::MetaName name; }; +class DropFilterNode : public DdlNode +{ +public: + DropFilterNode(MemoryPool& p, const Firebird::MetaName& aName) + : DdlNode(p), + name(p, aName) + { + } + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_filter_failed) << name; + } + +public: + Firebird::MetaName name; +}; + + +class DropShadowNode : public DdlNode +{ +public: + DropShadowNode(MemoryPool& p, const SSHORT aNumber) + : DdlNode(p), + number(aNumber) + { + } + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_shadow_failed) << Firebird::Arg::Num(number); + } + +public: + SSHORT number; +}; + + +class CreateRoleNode : public DdlNode +{ +public: + CreateRoleNode(MemoryPool& p, const Firebird::MetaName& aName) + : DdlNode(p), + name(p, aName) + { + } + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_create_role_failed) << name; + } + +private: + bool isItUserName(thread_db* tdbb, jrd_tra* transaction); + +public: + Firebird::MetaName name; +}; + + +class DropRoleNode : public DdlNode +{ +public: + DropRoleNode(MemoryPool& p, const Firebird::MetaName& aName) + : DdlNode(p), + name(p, aName) + { + } + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_role_failed) << name; + } + +public: + Firebird::MetaName name; +}; + + +class DropUserNode : public DdlNode +{ +public: + DropUserNode(MemoryPool& p, const Firebird::MetaName& aName) + : DdlNode(p), + name(p, aName) + { + } + +public: + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual void execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch, jrd_tra* transaction); + +protected: + virtual void putErrorPrefix(Firebird::Arg::StatusVector& statusVector) + { + statusVector << Firebird::Arg::Gds(isc_dsql_drop_user_failed) << name; + } + +public: + Firebird::MetaName name; +}; + + } // namespace #endif // DSQL_DDL_NODES_H Modified: firebird/trunk/src/dsql/ddl.cpp =================================================================== --- firebird/trunk/src/dsql/ddl.cpp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/ddl.cpp 2011-11-13 21:32:12 UTC (rev 53627) @@ -119,7 +119,6 @@ static void define_database(DsqlCompilerScratch*); static void define_filter(DsqlCompilerScratch*); static SSHORT getBlobFilterSubType(DsqlCompilerScratch* dsqlScratch, const dsql_nod* node); -static void define_role(DsqlCompilerScratch*); static void define_index(DsqlCompilerScratch*); static void define_shadow(DsqlCompilerScratch*); static void generate_dyn(DsqlCompilerScratch*, dsql_nod*); @@ -925,22 +924,7 @@ } -// ****************************** -// d e f i n e _ r o l e -// ****************************** -// Create a SQL role. // -static void define_role(DsqlCompilerScratch* dsqlScratch) -{ - DsqlCompiledStatement* statement = dsqlScratch->getStatement(); - const dsql_str* role_name = (dsql_str*) statement->getDdlNode()->nod_arg[0]; - - dsqlScratch->appendNullString(isc_dyn_def_sql_role, role_name->str_data); - dsqlScratch->appendUChar(isc_dyn_end); -} - - -// // create a shadow for the database // static void define_shadow(DsqlCompilerScratch* dsqlScratch) @@ -1016,37 +1000,15 @@ define_index(dsqlScratch); break; - case nod_del_index: - string = (dsql_str*) node->nod_arg[0]; - dsqlScratch->appendNullString(isc_dyn_delete_idx, string->str_data); - dsqlScratch->appendUChar(isc_dyn_end); - break; - - case nod_del_role: - string = (dsql_str*) node->nod_arg[0]; - dsqlScratch->appendNullString(isc_dyn_del_sql_role, string->str_data); - dsqlScratch->appendUChar(isc_dyn_end); - break; - case nod_grant: case nod_revoke: grant_revoke(dsqlScratch); break; - case nod_def_role: - define_role(dsqlScratch); - break; - case nod_def_filter: define_filter(dsqlScratch); break; - case nod_del_filter: - string = (dsql_str*) node->nod_arg[0]; - dsqlScratch->appendNullString(isc_dyn_delete_filter, string->str_data); - dsqlScratch->appendUChar(isc_dyn_end); - break; - case nod_del_udf: string = (dsql_str*) node->nod_arg[0]; dsqlScratch->appendNullString(isc_dyn_delete_function, string->str_data); @@ -1057,11 +1019,6 @@ define_shadow(dsqlScratch); break; - case nod_del_shadow: - dsqlScratch->appendNumber(isc_dyn_delete_shadow, (SSHORT) (IPTR) node->nod_arg[0]); - dsqlScratch->appendUChar(isc_dyn_end); - break; - case nod_mod_database: modify_database(dsqlScratch); break; @@ -1094,10 +1051,6 @@ define_user(dsqlScratch, isc_dyn_user_mod); break; - case nod_del_user: - define_user(dsqlScratch, isc_dyn_user_del); - break; - default: // CVC: Shouldn't we complain here? break; } @@ -1640,7 +1593,7 @@ } } - if (argCount < 2 && op != isc_dyn_user_del) + if (argCount < 2) { ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << // Unexpected end of command Modified: firebird/trunk/src/dsql/node.h =================================================================== --- firebird/trunk/src/dsql/node.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/node.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -67,12 +67,9 @@ nod_mod_field, nod_del_field, nod_def_index, - nod_del_index, nod_def_constraint, nod_def_filter, - nod_del_filter, nod_def_shadow, - nod_del_shadow, nod_del_udf, nod_grant, nod_revoke, @@ -134,10 +131,8 @@ nod_set_statistics, // set statistics nod_ref_upd_del, // referential integrity actions nod_ref_trig_action, - nod_def_role, // SQL role support nod_role_name, nod_grant_admin, - nod_del_role, nod_mod_field_name, nod_mod_field_type, nod_mod_field_pos, @@ -156,7 +151,6 @@ nod_mod_role, nod_add_user, nod_mod_user, - nod_del_user, nod_dfl_collate, nod_trg_act, nod_trg_ext, Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/parse.y 2011-11-13 21:32:12 UTC (rev 53627) @@ -714,8 +714,8 @@ %type <legacyNode> delete_rule delimiter_opt derived_column_list derived_table %type <legacyNode> deterministic_opt distinct_clause %type <legacyNode> domain_default domain_default_opt domain_or_non_array_type -%type <legacyNode> domain_or_non_array_type_name domain_type drop drop_behaviour -%type <legacyNode> drop_clause drop_user_clause +%type <legacyNode> domain_or_non_array_type_name domain_type drop_behaviour +%type <ddlNode> drop drop_clause %type <legacyStr> db_name ddl_desc %type <legacyNode> event_argument_opt exception_clause @@ -972,6 +972,7 @@ | delete { $$ = makeClassNode($1); } | drop + { $$ = makeClassNode($1); } | grant | insert { $$ = makeClassNode($1); } @@ -1532,7 +1533,7 @@ // CREATE ROLE role_clause - : symbol_role_name { $$ = make_node (nod_def_role, (int) 1, $1); } + : symbol_role_name { $$ = makeClassNode(newNode<CreateRoleNode>(toName($1))); } ; @@ -3509,47 +3510,48 @@ // DROP metadata operations -drop : DROP drop_clause - { $$ = $2; } - ; +drop + : DROP drop_clause + { $$ = $2; } + ; drop_clause : EXCEPTION symbol_exception_name - { $$ = makeClassNode(newNode<DropExceptionNode>(toName($2))); } + { $$ = newNode<DropExceptionNode>(toName($2)); } | INDEX symbol_index_name - { $$ = make_node (nod_del_index, (int) 1, $2); } + { $$ = newNode<DropIndexNode>(toName($2)); } | PROCEDURE symbol_procedure_name - { $$ = makeClassNode(newNode<DropProcedureNode>(toName($2))); } + { $$ = newNode<DropProcedureNode>(toName($2)); } | TABLE symbol_table_name - { $$ = makeClassNode(newNode<DropRelationNode>(toName($2), false)); } + { $$ = newNode<DropRelationNode>(toName($2), false); } | TRIGGER symbol_trigger_name - { $$ = makeClassNode(newNode<DropTriggerNode>(toName($2))); } + { $$ = newNode<DropTriggerNode>(toName($2)); } | VIEW symbol_view_name - { $$ = makeClassNode(newNode<DropRelationNode>(toName($2), true)); } + { $$ = newNode<DropRelationNode>(toName($2), true); } | FILTER symbol_filter_name - { $$ = make_node (nod_del_filter, (int) 1, $2); } + { $$ = newNode<DropFilterNode>(toName($2)); } | DOMAIN symbol_domain_name - { $$ = makeClassNode(newNode<DropDomainNode>(toName($2))); } + { $$ = newNode<DropDomainNode>(toName($2)); } | EXTERNAL FUNCTION symbol_UDF_name - { $$ = makeClassNode(newNode<DropFunctionNode>(toName($3))); } + { $$ = newNode<DropFunctionNode>(toName($3)); } | FUNCTION symbol_UDF_name - { $$ = makeClassNode(newNode<DropFunctionNode>(toName($2))); } + { $$ = newNode<DropFunctionNode>(toName($2)); } | SHADOW pos_short_integer - { $$ = make_node (nod_del_shadow, (int) 1, (dsql_nod*)(IPTR) $2); } + { $$ = newNode<DropShadowNode>($2); } | ROLE symbol_role_name - { $$ = make_node (nod_del_role, (int) 1, $2); } + { $$ = newNode<DropRoleNode>(toName($2)); } | GENERATOR symbol_generator_name - { $$ = makeClassNode(FB_NEW(getPool()) DropSequenceNode(getPool(), toName($2))); } + { $$ = newNode<DropSequenceNode>(toName($2)); } | SEQUENCE symbol_generator_name - { $$ = makeClassNode(FB_NEW(getPool()) DropSequenceNode(getPool(), toName($2))); } + { $$ = newNode<DropSequenceNode>(toName($2)); } | COLLATION symbol_collation_name - { $$ = makeClassNode(newNode<DropCollationNode>(toName($2))); } - | USER drop_user_clause - { $$ = $2; } + { $$ = newNode<DropCollationNode>(toName($2)); } + | USER symbol_user_name + { $$ = newNode<DropUserNode>(toName($2)); } | PACKAGE symbol_package_name - { $$ = makeClassNode(newNode<DropPackageNode>(toName($2))); } + { $$ = newNode<DropPackageNode>(toName($2)); } | PACKAGE BODY symbol_package_name - { $$ = makeClassNode(newNode<DropPackageBodyNode>(toName($3))); } + { $$ = newNode<DropPackageBodyNode>(toName($3)); } ; @@ -5329,10 +5331,6 @@ { $$ = make_node(nod_mod_user, (int) e_user_count, $1, $3, $4, $5, $6, $7); } ; -drop_user_clause - : symbol_user_name { $$ = make_node(nod_del_user, (int) e_del_user_count, $1); } - ; - passwd_clause : PASSWORD sql_string { $$ = $2; } ; Modified: firebird/trunk/src/dsql/pass1.cpp =================================================================== --- firebird/trunk/src/dsql/pass1.cpp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/dsql/pass1.cpp 2011-11-13 21:32:12 UTC (rev 53627) @@ -897,25 +897,19 @@ case nod_def_index: case nod_mod_index: - case nod_del_index: case nod_def_constraint: case nod_grant: case nod_revoke: case nod_mod_database: - case nod_def_role: - case nod_del_role: case nod_def_filter: - case nod_del_filter: case nod_def_domain: case nod_del_udf: case nod_def_shadow: - case nod_del_shadow: case nod_set_statistics: case nod_mod_udf: case nod_mod_role: case nod_add_user: case nod_mod_user: - case nod_del_user: dsqlScratch->getStatement()->setType(DsqlCompiledStatement::TYPE_DDL); return input; @@ -4773,12 +4767,6 @@ case nod_del_field: verb = "delete field"; break; - case nod_del_filter: - verb = "delete filter"; - break; - case nod_del_index: - verb = "delete index"; - break; case nod_execute: verb = "execute"; break; @@ -4884,9 +4872,6 @@ case nod_def_shadow: verb = "def_shadow"; break; - case nod_del_shadow: - verb = "del_shadow"; - break; case nod_del_udf: verb = "del_udf"; break; @@ -4986,18 +4971,12 @@ case nod_ref_trig_action: verb = "ref_trig_action"; break; - case nod_def_role: - verb = "def_role"; - break; case nod_role_name: verb = "role_name"; break; case nod_grant_admin: verb = "grant_admin"; break; - case nod_del_role: - verb = "del_role"; - break; case nod_mod_field_name: verb = "mod_field_name"; break; @@ -5081,10 +5060,6 @@ verb = "mod_user"; break; - case nod_del_user: - verb = "del_user"; - break; - case nod_class_exprnode: case nod_class_stmtnode: reinterpret_cast<Node*>(node->nod_arg[0])->print(verb, subNodes); Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/include/gen/codetext.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1055,6 +1055,12 @@ {"dsql_drop_view_failed", 336397302}, {"dsql_drop_sequence_failed", 336397303}, {"dsql_recreate_sequence_failed", 336397304}, + {"dsql_drop_index_failed", 336397305}, + {"dsql_drop_filter_failed", 336397306}, + {"dsql_drop_shadow_failed", 336397307}, + {"dsql_drop_role_failed", 336397308}, + {"dsql_drop_user_failed", 336397309}, + {"dsql_create_role_failed", 336397310}, {"gsec_cant_open_db", 336723983}, {"gsec_switches_error", 336723984}, {"gsec_no_op_spec", 336723985}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/include/gen/iberror.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1089,6 +1089,12 @@ const ISC_STATUS isc_dsql_drop_view_failed = 336397302L; const ISC_STATUS isc_dsql_drop_sequence_failed = 336397303L; const ISC_STATUS isc_dsql_recreate_sequence_failed = 336397304L; +const ISC_STATUS isc_dsql_drop_index_failed = 336397305L; +const ISC_STATUS isc_dsql_drop_filter_failed = 336397306L; +const ISC_STATUS isc_dsql_drop_shadow_failed = 336397307L; +const ISC_STATUS isc_dsql_drop_role_failed = 336397308L; +const ISC_STATUS isc_dsql_drop_user_failed = 336397309L; +const ISC_STATUS isc_dsql_create_role_failed = 336397310L; const ISC_STATUS isc_gsec_cant_open_db = 336723983L; const ISC_STATUS isc_gsec_switches_error = 336723984L; const ISC_STATUS isc_gsec_no_op_spec = 336723985L; @@ -1190,7 +1196,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1134; +const ISC_STATUS isc_err_max = 1140; #else /* c definitions */ @@ -2249,6 +2255,12 @@ #define isc_dsql_drop_view_failed 336397302L #define isc_dsql_drop_sequence_failed 336397303L #define isc_dsql_recreate_sequence_failed 336397304L +#define isc_dsql_drop_index_failed 336397305L +#define isc_dsql_drop_filter_failed 336397306L +#define isc_dsql_drop_shadow_failed 336397307L +#define isc_dsql_drop_role_failed 336397308L +#define isc_dsql_drop_user_failed 336397309L +#define isc_dsql_create_role_failed 336397310L #define isc_gsec_cant_open_db 336723983L #define isc_gsec_switches_error 336723984L #define isc_gsec_no_op_spec 336723985L @@ -2350,7 +2362,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1134 +#define isc_err_max 1140 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/include/gen/msgs.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1058,6 +1058,12 @@ {336397302, "DROP VIEW @1 failed"}, /* dsql_drop_view_failed */ {336397303, "DROP SEQUENCE @1 failed"}, /* dsql_drop_sequence_failed */ {336397304, "RECREATE SEQUENCE @1 failed"}, /* dsql_recreate_sequence_failed */ + {336397305, "DROP INDEX @1 failed"}, /* dsql_drop_index_failed */ + {336397306, "DROP FILTER @1 failed"}, /* dsql_drop_filter_failed */ + {336397307, "DROP SHADOW @1 failed"}, /* dsql_drop_shadow_failed */ + {336397308, "DROP ROLE @1 failed"}, /* dsql_drop_role_failed */ + {336397309, "DROP USER @1 failed"}, /* dsql_drop_user_failed */ + {336397310, "CREATE ROLE @1 failed"}, /* dsql_create_role_failed */ {336723983, "unable to open database"}, /* gsec_cant_open_db */ {336723984, "error in switch specifications"}, /* gsec_switches_error */ {336723985, "no operation specified"}, /* gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/include/gen/sql_code.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1054,6 +1054,12 @@ {336397302, -901}, /* 1014 dsql_drop_view_failed */ {336397303, -901}, /* 1015 dsql_drop_sequence_failed */ {336397304, -901}, /* 1016 dsql_recreate_sequence_failed */ + {336397305, -901}, /* 1017 dsql_drop_index_failed */ + {336397306, -901}, /* 1018 dsql_drop_filter_failed */ + {336397307, -901}, /* 1019 dsql_drop_shadow_failed */ + {336397308, -901}, /* 1020 dsql_drop_role_failed */ + {336397309, -901}, /* 1021 dsql_drop_user_failed */ + {336397310, -901}, /* 1022 dsql_create_role_failed */ {336723983, -901}, /* 15 gsec_cant_open_db */ {336723984, -901}, /* 16 gsec_switches_error */ {336723985, -901}, /* 17 gsec_no_op_spec */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/include/gen/sql_state.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1054,6 +1054,12 @@ {336397302, "42000"}, // 1014 dsql_drop_view_failed {336397303, "42000"}, // 1015 dsql_drop_sequence_failed {336397304, "42000"}, // 1016 dsql_recreate_sequence_failed + {336397305, "42000"}, // 1017 dsql_drop_index_failed + {336397306, "42000"}, // 1018 dsql_drop_filter_failed + {336397307, "42000"}, // 1019 dsql_drop_shadow_failed + {336397308, "42000"}, // 1020 dsql_drop_role_failed + {336397309, "42000"}, // 1021 dsql_drop_user_failed + {336397310, "42000"}, // 1022 dsql_create_role_failed {336723983, "00000"}, // 15 gsec_cant_open_db {336723984, "00000"}, // 16 gsec_switches_error {336723985, "00000"}, // 17 gsec_no_op_spec Modified: firebird/trunk/src/jrd/dyn.epp =================================================================== --- firebird/trunk/src/jrd/dyn.epp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn.epp 2011-11-13 21:32:12 UTC (rev 53627) @@ -270,7 +270,7 @@ } -bool DYN_is_it_sql_role(Global* gbl, +bool DYN_is_it_sql_role(jrd_tra* transaction, const MetaName& input_name, MetaName& output_name, thread_db* tdbb) @@ -293,7 +293,7 @@ AutoCacheRequest request(tdbb, drq_get_role_nm, DYN_REQUESTS); - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) + FOR(REQUEST_HANDLE request TRANSACTION_HANDLE transaction) X IN RDB$ROLES WITH X.RDB$ROLE_NAME EQ input_name.c_str() { @@ -384,30 +384,14 @@ DYN_define_filter(gbl, ptr); break; - case isc_dyn_delete_filter: - DYN_delete_filter(gbl, ptr); - break; - case isc_dyn_mod_function: DYN_modify_function(gbl, ptr); break; - case isc_dyn_def_sql_role: - DYN_define_role(gbl, ptr); - break; - - case isc_dyn_del_sql_role: - DYN_delete_role(gbl, ptr); - break; - case isc_dyn_def_shadow: DYN_define_shadow(gbl, ptr); break; - case isc_dyn_delete_shadow: - DYN_delete_shadow(gbl, ptr); - break; - case isc_dyn_def_idx: DYN_define_index(gbl, ptr, relation_name); break; @@ -416,10 +400,6 @@ DYN_modify_index(gbl, ptr); break; - case isc_dyn_delete_idx: - DYN_delete_index(gbl, ptr); - break; - case isc_dyn_mapping: DYN_modify_mapping(gbl, ptr); break; @@ -720,28 +700,6 @@ } -USHORT DYN_skip_attribute(const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ s k i p _ a t t r i b u t e - * - ************************************** - * - * Functional description - * Skip over attribute returning length (excluding - * size of count bytes). - * - **************************************/ - const UCHAR* p = *ptr; - USHORT length = *p++; - length |= (*p++) << 8; - *ptr = p + length; - - return length; -} - - static void grant( Global* gbl, const UCHAR** ptr) { /************************************** @@ -813,7 +771,7 @@ case isc_dyn_grant_user: GET_STRING(ptr, user); // This test may become obsolete as we now allow explicit ROLE keyword. - if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) + if (DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { user_type = obj_sql_role; if (user == NULL_ROLE) @@ -838,7 +796,7 @@ case isc_dyn_grant_role: user_type = obj_sql_role; GET_STRING(ptr, user); - if (!DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) + if (!DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { DYN_error_punt(false, 188, user.c_str()); // msg 188: Role doesn't exist. @@ -1351,7 +1309,7 @@ // Fetch the name of the owner of the ROLE MetaName owner; - if (DYN_is_it_sql_role(gbl, role_name, owner, tdbb)) + if (DYN_is_it_sql_role(gbl->gbl_transaction, role_name, owner, tdbb)) { // Both SYSDBA and the owner of this ROLE can grant membership if (tdbb->getAttachment()->locksmith() || owner == grantor) @@ -1502,7 +1460,7 @@ case isc_dyn_grant_user: GET_STRING(ptr, user); // This test may become obsolete as we now allow explicit ROLE keyword. - if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) + if (DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { user_type = obj_sql_role; if (user == NULL_ROLE) @@ -1527,7 +1485,7 @@ case isc_dyn_grant_role: user_type = obj_sql_role; GET_STRING(ptr, user); - if (!DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) + if (!DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { DYN_error_punt(false, 188, user.c_str()); // msg 188: Role doesn't exist. @@ -1741,7 +1699,7 @@ case isc_dyn_grant_user: GET_STRING(ptr, user); // This test may become obsolete as we now allow explicit ROLE keyword. - if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) + if (DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { user_type = obj_sql_role; if (user == NULL_ROLE) @@ -1766,7 +1724,7 @@ case isc_dyn_grant_role: GET_STRING(ptr, user); user_type = obj_sql_role; - if (!DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) { + if (!DYN_is_it_sql_role(gbl->gbl_transaction, user, dummy_name, tdbb)) { DYN_error_punt(false, 188, user.c_str()); // msg 188: Role doesn't exist. } if (user == NULL_ROLE) @@ -1948,7 +1906,7 @@ ************************************** * * Functional description - * Implements CREATE/ALTER/DROP USER + * Implements CREATE/ALTER USER * **************************************/ thread_db* tdbb = JRD_get_thread_data(); @@ -1997,13 +1955,6 @@ userData->user.setEntered(1); break; - case isc_dyn_user_del: - text.upper(); - userData->op = DEL_OPER; - userData->user.set(text.c_str()); - userData->user.setEntered(1); - break; - case isc_dyn_user_passwd: if (text.isEmpty()) { @@ -2072,10 +2023,6 @@ case MOD_OPER: ddlAction = DDL_TRIGGER_ALTER_USER; break; - - case DEL_OPER: - ddlAction = DDL_TRIGGER_DROP_USER; - break; } if (ddlAction != 0) Modified: firebird/trunk/src/jrd/dyn.h =================================================================== --- firebird/trunk/src/jrd/dyn.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -113,12 +113,10 @@ USHORT DYN_get_string(const UCHAR**, Firebird::UCharBuffer&, size_t); USHORT DYN_get_string(const UCHAR**, TEXT*, size_t); -bool DYN_is_it_sql_role(Jrd::Global*, const Firebird::MetaName&, Firebird::MetaName&, Jrd::thread_db*); +bool DYN_is_it_sql_role(Jrd::jrd_tra*, const Firebird::MetaName&, Firebird::MetaName&, Jrd::thread_db*); USHORT DYN_put_blr_blob(Jrd::Global*, const UCHAR**, Jrd::bid*); USHORT DYN_put_text_blob(Jrd::Global*, const UCHAR**, Jrd::bid*); -USHORT DYN_skip_attribute(const UCHAR**); - void DYN_unsupported_verb(); #endif // JRD_DYN_H Modified: firebird/trunk/src/jrd/dyn_def.epp =================================================================== --- firebird/trunk/src/jrd/dyn_def.epp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn_def.epp 2011-11-13 21:32:12 UTC (rev 53627) @@ -100,9 +100,7 @@ DATABASE DB = STATIC "ODS.RDB"; -static bool is_it_user_name(Global*, const Firebird::MetaName&, thread_db*); - void DYN_define_file(Global* gbl, const UCHAR** ptr, SLONG shadow_number, @@ -463,99 +461,6 @@ } -void DYN_define_role( Global* gbl, const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ d e f i n e _ r o l e - * - ************************************** - * - * Functional description - * - * Define a SQL role. - * ROLES cannot be named the same as any existing user name - * - **************************************/ - thread_db* tdbb = JRD_get_thread_data(); - - Firebird::MetaName owner_name(tdbb->getAttachment()->att_user->usr_user_name); - owner_name.upper7(); - - Firebird::MetaName role_name; - GET_STRING(ptr, role_name); - - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_BEFORE, - DDL_TRIGGER_CREATE_ROLE, role_name, gbl->sqlText); - - if (role_name == owner_name) - { - // user name could not be used for SQL role - DYN_error(false, 193, SafeArg() << owner_name.c_str()); - ERR_punt(); - } - - if (role_name == NULL_ROLE) - { - // keyword NONE could not be used as SQL role name - DYN_error(false, 195, SafeArg() << role_name.c_str()); - ERR_punt(); - } - - try { - - if (is_it_user_name(gbl, role_name, tdbb)) - { - // user name could not be used for SQL role - DYN_error(false, 193, SafeArg() << role_name.c_str()); - goto do_err_punt; - } - - Firebird::MetaName dummy_name; - if (DYN_is_it_sql_role(gbl, role_name, dummy_name, tdbb)) - { - // SQL role @1 already exists - DYN_error(false, 194, SafeArg() << role_name.c_str()); - goto do_err_punt; - } - - AutoCacheRequest request(tdbb, drq_role_gens, DYN_REQUESTS); - - STORE(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - X IN RDB$ROLES - { - strcpy(X.RDB$ROLE_NAME, role_name.c_str()); - strcpy(X.RDB$OWNER_NAME, owner_name.c_str()); - X.RDB$SYSTEM_FLAG = 0; - X.RDB$SYSTEM_FLAG.NULL = FALSE; - } - END_STORE - - if (*(*ptr)++ != isc_dyn_end) - goto do_error_punt_9; - } - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - DYN_error_punt(true, 8); - // msg 8: "DEFINE ROLE failed" - } - - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_AFTER, - DDL_TRIGGER_CREATE_ROLE, role_name, gbl->sqlText); - - return; - -do_err_punt: - ERR_punt(); - return; - -do_error_punt_9: - DYN_error_punt(true, 9); - // msg 9: "DEFINE ROLE unexpected dyn verb" -} - - void DYN_define_shadow( Global* gbl, const UCHAR** ptr) { /************************************** @@ -616,69 +521,3 @@ } } } - - -bool is_it_user_name(Global* gbl, const Firebird::MetaName& role_name, thread_db* tdbb) -{ -/************************************** - * - * i s _ i t _ u s e r _ n a m e - * - ************************************** - * - * Functional description - * - * if role_name is user name returns true. Otherwise returns false. - * - **************************************/ - - USHORT request_id; - - SET_TDBB(tdbb); - bool found = false; - - try { - - // If there is a user with privilege or a grantor on a relation we - // can infer there is a user with this name - - request_id = drq_get_user_priv; - AutoCacheRequest request(tdbb, request_id, DYN_REQUESTS); - - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - PRIV IN RDB$USER_PRIVILEGES WITH - (PRIV.RDB$USER EQ role_name.c_str() AND - PRIV.RDB$USER_TYPE = obj_user) OR - (PRIV.RDB$GRANTOR EQ role_name.c_str() AND - PRIV.RDB$OBJECT_TYPE = obj_relation) - { - found = true; - } - END_FOR - - if (found) - return found; - - // We can infer that 'role_name' is a user name if it owns any relations - // Note we can only get here if a user creates a table and revokes all - // his privileges on the table - - request_id = drq_get_rel_owner; - request.reset(tdbb, request_id, DYN_REQUESTS); - - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - REL IN RDB$RELATIONS WITH - REL.RDB$OWNER_NAME EQ role_name.c_str() - { - found = true; - } - END_FOR - } - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - ERR_punt(); - } - - return found; -} Deleted: firebird/trunk/src/jrd/dyn_del.epp =================================================================== --- firebird/trunk/src/jrd/dyn_del.epp 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn_del.epp 2011-11-13 21:32:12 UTC (rev 53627) @@ -1,346 +0,0 @@ -/* - * PROGRAM: JRD Data Definition Utility - * MODULE: dyn_delete.epp - * DESCRIPTION: Dynamic data definition - DYN_delete_<x> - * - * The contents of this file are subject to the Interbase Public - * License Version 1.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy - * of the License at http://www.Inprise.com/IPL.html - * - * Software distributed under the License is distributed on an - * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express - * or implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code was created by Inprise Corporation - * and its predecessors. Portions created by Inprise Corporation are - * Copyright (C) Inprise Corporation. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * - * 24-May-2001 Claudio Valderrama - Forbid zero length identifiers, - * they are not ANSI SQL compliant. - * 23-May-2001 Claudio Valderrama - Move here DYN_delete_role. - * 20-Jun-2001 Claudio Valderrama - Make available DYN_delete_generator. - */ - -#include "firebird.h" -#include "dyn_consts.h" -#include <stdio.h> -#include <string.h> - -#include "../common/common.h" -#include "../dsql/DdlNodes.h" -#include "../jrd/jrd.h" -#include "../jrd/ods.h" -#include "../jrd/tra.h" -#include "../jrd/scl.h" -#include "../jrd/drq.h" -#include "../jrd/flags.h" -#include "../jrd/ibase.h" -#include "../jrd/lls.h" -#include "../jrd/met.h" -#include "../jrd/btr.h" -#include "../jrd/intl.h" -#include "../jrd/dyn.h" -#include "../jrd/blb_proto.h" -#include "../jrd/cmp_proto.h" -#include "../jrd/dyn_proto.h" -#include "../jrd/dyn_proto.h" -#include "../jrd/dyn_dl_proto.h" -#include "../jrd/err_proto.h" -#include "../jrd/exe_proto.h" -#include "../yvalve/gds_proto.h" -#include "../jrd/inf_proto.h" -#include "../jrd/intl_proto.h" -#include "../common/isc_f_proto.h" -#include "../jrd/met_proto.h" -#include "../jrd/vio_proto.h" -#include "../common/utils_proto.h" - -using MsgFormat::SafeArg; - -using namespace Jrd; -using namespace Firebird; - - -DATABASE DB = STATIC "ODS.RDB"; - - -void DYN_delete_filter( Global* gbl, const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ d e l e t e _ f i l t e r - * - ************************************** - * - * Functional description - * Execute a dynamic ddl statement that - * deletes a blob filter. - * - **************************************/ - thread_db* tdbb = JRD_get_thread_data(); - - AutoCacheRequest request(tdbb, drq_e_filters, DYN_REQUESTS); - - bool found = false; - - Firebird::MetaName f; - GET_STRING(ptr, f); - - try - { - found = false; - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - X IN RDB$FILTERS WITH X.RDB$FUNCTION_NAME = f.c_str() - { - ERASE X; - found = true; - } - END_FOR - } - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - DYN_error_punt(true, 36); - // msg 36: "ERASE BLOB FILTER failed" - } - - if (!found) - { - DYN_error_punt(false, 37, f.c_str()); - // msg 37: "Blob Filter %s not found" - } - - if (*(*ptr)++ != isc_dyn_end) { - DYN_unsupported_verb(); - } -} - - -void DYN_delete_index( Global* gbl, const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ d e l e t e _ i n d e x - * - ************************************** - * - * Functional description - * Execute a dynamic ddl statement that - * deletes an index. - * - **************************************/ - Firebird::MetaName idx_name, rel_name; - - thread_db* tdbb = JRD_get_thread_data(); - - AutoCacheRequest request(tdbb, drq_e_indices, DYN_REQUESTS); - - bool found = false; - bool is_expression = false; - - try - { - GET_STRING(ptr, idx_name); - - found = false; - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ idx_name.c_str() - { - rel_name = IDX.RDB$RELATION_NAME; - found = true; - - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_BEFORE, - DDL_TRIGGER_DROP_INDEX, idx_name, gbl->sqlText); - - is_expression = !IDX.RDB$EXPRESSION_BLR.NULL; - ERASE IDX; - } - END_FOR - } //try - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - DYN_error_punt(true, 47); - // msg 47: "ERASE RDB$INDICES failed" - } - - if (found) - { - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_AFTER, - DDL_TRIGGER_DROP_INDEX, idx_name, gbl->sqlText); - } - else - { - DYN_error_punt(false, 48); - // msg 48: "Index not found" - } - - if (!is_expression) - if (!DropIndexNode::deleteSegmentRecords(tdbb, gbl->gbl_transaction, idx_name)) - { - DYN_error_punt(false, 50); - // msg 50: "No segments found for index" - } - - while (*(*ptr)++ != isc_dyn_end) - { - --(*ptr); - DYN_execute(gbl, ptr, &rel_name, NULL, NULL, NULL, NULL); - } -} - - -void DYN_delete_role( Global* gbl, const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ d e l e t e _ r o l e - * - ************************************** - * - * Functional description - * - * Execute a dynamic ddl statement that deletes a role with all its - * members of the role. - * - **************************************/ - int id = -1; - Firebird::MetaName role_name; - - thread_db* tdbb = JRD_get_thread_data(); - - bool found = false; - - try - { - Firebird::MetaName user(tdbb->getAttachment()->att_user->usr_user_name); - user.upper7(); - - GET_STRING(ptr, role_name); - - AutoCacheRequest request(tdbb, drq_drop_role, DYN_REQUESTS); - id = drq_drop_role; - - bool del_role_ok = true; - - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - XX IN RDB$ROLES WITH - XX.RDB$ROLE_NAME EQ role_name.c_str() - { - found = true; - - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_BEFORE, - DDL_TRIGGER_DROP_ROLE, role_name, gbl->sqlText); - - const Firebird::MetaName role_owner(XX.RDB$OWNER_NAME); - - if (tdbb->getAttachment()->locksmith() || role_owner == user) - { - ERASE XX; - } - else - { - del_role_ok = false; - } - } - END_FOR - - if (del_role_ok) - { - request.reset(tdbb, drq_del_role_1, DYN_REQUESTS); - id = drq_del_role_1; - - // The first OR clause finds all members of the role. - // The 2nd OR clause finds all privileges granted to the role - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - PRIV IN RDB$USER_PRIVILEGES WITH - (PRIV.RDB$RELATION_NAME EQ role_name.c_str() AND - PRIV.RDB$OBJECT_TYPE = obj_sql_role) - OR (PRIV.RDB$USER EQ role_name.c_str() AND - PRIV.RDB$USER_TYPE = obj_sql_role) - { - ERASE PRIV; - } - END_FOR - } - else - { - DYN_error(false, 191, SafeArg() << user.c_str() << role_name.c_str()); - // only owner of SQL role or USR_locksmith could drop SQL role - goto do_punt; - } - } // try - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - const USHORT number = (id == drq_drop_role ? 191 : 62); - // msg 191: "ERASE RDB$ROLES failed" - // msg 62: "ERASE RDB$USER_PRIVILEGES failed" - DYN_error_punt(true, number); - } - - if (found) - { - DdlNode::executeDdlTrigger(tdbb, gbl->gbl_transaction, DdlNode::DTW_AFTER, - DDL_TRIGGER_DROP_ROLE, role_name, gbl->sqlText); - } - else - { - DYN_error_punt(false, 155, role_name.c_str()); - // msg 155: "Role %s not found" - } - - return; - -do_punt: // ugly, rethink logic of this function - ERR_punt(); -} - - -void DYN_delete_shadow( Global* gbl, const UCHAR** ptr) -{ -/************************************** - * - * D Y N _ d e l e t e _ s h a d o w - * - ************************************** - * - * Functional description - * Delete a shadow. - * - **************************************/ - thread_db* tdbb = JRD_get_thread_data(); - - if (!tdbb->getAttachment()->locksmith()) - { - ERR_post(Arg::Gds(isc_adm_task_denied)); - } - - AutoCacheRequest request(tdbb, drq_e_shadow, DYN_REQUESTS); - - try - { - const int shadow_number = DYN_get_number(ptr); - FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) - FIL IN RDB$FILES WITH FIL.RDB$SHADOW_NUMBER EQ shadow_number - { - ERASE FIL; - } - END_FOR - } - catch (const Firebird::Exception& ex) - { - Firebird::stuff_exception(tdbb->tdbb_status_vector, ex); - DYN_error_punt(true, 63); - // msg 63: "ERASE RDB$FILES failed" - } - - if (*(*ptr)++ != isc_dyn_end) { - DYN_unsupported_verb(); - } -} Modified: firebird/trunk/src/jrd/dyn_df_proto.h =================================================================== --- firebird/trunk/src/jrd/dyn_df_proto.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn_df_proto.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -27,7 +27,6 @@ void DYN_define_file(Jrd::Global*, const UCHAR**, SLONG, SLONG*, USHORT); void DYN_define_filter(Jrd::Global*, const UCHAR**); void DYN_define_index(Jrd::Global*, const UCHAR**, const Firebird::MetaName*); -void DYN_define_role(Jrd::Global*, const UCHAR**); void DYN_define_shadow(Jrd::Global*, const UCHAR**); void DYN_define_difference(Jrd::Global*, const UCHAR**); Deleted: firebird/trunk/src/jrd/dyn_dl_proto.h =================================================================== --- firebird/trunk/src/jrd/dyn_dl_proto.h 2011-11-11 11:05:49 UTC (rev 53626) +++ firebird/trunk/src/jrd/dyn_dl_proto.h 2011-11-13 21:32:12 UTC (rev 53627) @@ -1,32 +0,0 @@ -/* - * PROGRAM: JRD Access method - * MODULE: dyn_dl_proto.h - * DESCRIPTION: Prototype Header file for dyn_del.epp - * - * The contents of this file are subject to the Interbase Public - * License Version 1.0 (the "License"); you may not use this file - *... [truncated message content] |