From: <fir...@us...> - 2010-11-16 03:16:05
|
Revision: 51921 http://firebird.svn.sourceforge.net/firebird/?rev=51921&view=rev Author: firebirds Date: 2010-11-16 03:15:58 +0000 (Tue, 16 Nov 2010) 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 2010-11-15 17:03:30 UTC (rev 51920) +++ firebird/trunk/ChangeLog 2010-11-16 03:15:58 UTC (rev 51921) @@ -1,3 +1,7 @@ + 2010-11-15 17:03 alexpeshkoff + M src/burp/burp.cpp +Fixed assertion + 2010-11-14 22:31 asfernandes M src/dsql/AggNodes.cpp M src/dsql/BoolNodes.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-15 17:03:30 UTC (rev 51920) +++ firebird/trunk/src/jrd/build_no.h 2010-11-16 03:15:58 UTC (rev 51921) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28893 + FORMAL BUILD NUMBER:28894 */ -#define PRODUCT_VER_STRING "3.0.0.28893" -#define FILE_VER_STRING "WI-T3.0.0.28893" -#define LICENSE_VER_STRING "WI-T3.0.0.28893" -#define FILE_VER_NUMBER 3, 0, 0, 28893 +#define PRODUCT_VER_STRING "3.0.0.28894" +#define FILE_VER_STRING "WI-T3.0.0.28894" +#define LICENSE_VER_STRING "WI-T3.0.0.28894" +#define FILE_VER_NUMBER 3, 0, 0, 28894 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28893" +#define FB_BUILD_NO "28894" #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 2010-11-15 17:03:30 UTC (rev 51920) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-16 03:15:58 UTC (rev 51921) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28893 +BuildNum=28894 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...> - 2010-11-19 03:14:47
|
Revision: 51931 http://firebird.svn.sourceforge.net/firebird/?rev=51931&view=rev Author: firebirds Date: 2010-11-19 03:14:40 +0000 (Fri, 19 Nov 2010) 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 2010-11-18 16:19:35 UTC (rev 51930) +++ firebird/trunk/ChangeLog 2010-11-19 03:14:40 UTC (rev 51931) @@ -1,3 +1,19 @@ + 2010-11-18 15:06 asfernandes + M src/jrd/SysFunction.cpp +Fixed CORE-3227 - ASCII_VAL() fails if argument contains multi-byte character anywhere + + 2010-11-18 14:53 asfernandes + M src/jrd/SysFunction.cpp +Fixed CORE-3228 - RIGHT() fails with multibyte text blobs > 1024 chars + + 2010-11-18 14:26 asfernandes + M src/jrd/SysFunction.cpp +Fixed CORE-3244 - POSITION: Wrong result with '' if third argument present + + 2010-11-18 11:40 dimitr + M src/common/isc_file.cpp +Front ported CORE-3059: RemoteFileOpenAbility fails on Windows. + 2010-11-15 17:03 alexpeshkoff M src/burp/burp.cpp Fixed assertion Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-18 16:19:35 UTC (rev 51930) +++ firebird/trunk/src/jrd/build_no.h 2010-11-19 03:14:40 UTC (rev 51931) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28894 + FORMAL BUILD NUMBER:28898 */ -#define PRODUCT_VER_STRING "3.0.0.28894" -#define FILE_VER_STRING "WI-T3.0.0.28894" -#define LICENSE_VER_STRING "WI-T3.0.0.28894" -#define FILE_VER_NUMBER 3, 0, 0, 28894 +#define PRODUCT_VER_STRING "3.0.0.28898" +#define FILE_VER_STRING "WI-T3.0.0.28898" +#define LICENSE_VER_STRING "WI-T3.0.0.28898" +#define FILE_VER_NUMBER 3, 0, 0, 28898 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28894" +#define FB_BUILD_NO "28898" #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 2010-11-18 16:19:35 UTC (rev 51930) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-19 03:14:40 UTC (rev 51931) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28894 +BuildNum=28898 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...> - 2010-11-20 03:15:39
|
Revision: 51946 http://firebird.svn.sourceforge.net/firebird/?rev=51946&view=rev Author: firebirds Date: 2010-11-20 03:15:32 +0000 (Sat, 20 Nov 2010) 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 2010-11-20 00:43:16 UTC (rev 51945) +++ firebird/trunk/ChangeLog 2010-11-20 03:15:32 UTC (rev 51946) @@ -1,3 +1,36 @@ + 2010-11-20 00:43 asfernandes + M src/jrd/SysFunction.cpp +Correction for CORE-3244 + + 2010-11-19 17:35 alexpeshkoff + M src/common/cvt.cpp +Correction for improvement CORE-3248: Set unused bytes of varchar values in message buffer to 0 + + 2010-11-19 17:32 alexpeshkoff + M src/jrd/jrd.cpp +cleanup + + 2010-11-19 17:09 alexpeshkoff + M src/common/config/config_file.cpp +misc + + 2010-11-19 15:47 hvlad + M src/dsql/ExprNodes.cpp +Fixed compiler errors + + 2010-11-19 15:12 alexpeshkoff + M src/burp/burp.cpp + M src/burp/burp.h +Fixed CORE-3249: gbak file is not truncated during backup operation + + 2010-11-19 15:11 alexpeshkoff + M src/remote/protocol.cpp +Improvement CORE-3248: Set unused bytes of varchar values in message buffer to 0 + + 2010-11-19 14:37 hvlad + M src/dsql/dsql.cpp +Fixed bug CORE-3219 : trace manager crash server with DSQL_unprepare + 2010-11-18 15:06 asfernandes M src/jrd/SysFunction.cpp Fixed CORE-3227 - ASCII_VAL() fails if argument contains multi-byte character anywhere Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-20 00:43:16 UTC (rev 51945) +++ firebird/trunk/src/jrd/build_no.h 2010-11-20 03:15:32 UTC (rev 51946) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28898 + FORMAL BUILD NUMBER:28906 */ -#define PRODUCT_VER_STRING "3.0.0.28898" -#define FILE_VER_STRING "WI-T3.0.0.28898" -#define LICENSE_VER_STRING "WI-T3.0.0.28898" -#define FILE_VER_NUMBER 3, 0, 0, 28898 +#define PRODUCT_VER_STRING "3.0.0.28906" +#define FILE_VER_STRING "WI-T3.0.0.28906" +#define LICENSE_VER_STRING "WI-T3.0.0.28906" +#define FILE_VER_NUMBER 3, 0, 0, 28906 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28898" +#define FB_BUILD_NO "28906" #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 2010-11-20 00:43:16 UTC (rev 51945) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-20 03:15:32 UTC (rev 51946) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28898 +BuildNum=28906 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...> - 2010-11-21 03:13:35
|
Revision: 51949 http://firebird.svn.sourceforge.net/firebird/?rev=51949&view=rev Author: firebirds Date: 2010-11-21 03:13:28 +0000 (Sun, 21 Nov 2010) 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 2010-11-21 02:36:57 UTC (rev 51948) +++ firebird/trunk/ChangeLog 2010-11-21 03:13:28 UTC (rev 51949) @@ -1,3 +1,8 @@ + 2010-11-21 02:36 asfernandes + M src/burp/burp.cpp + M src/common/config/config_file.cpp +Misc + 2010-11-20 00:43 asfernandes M src/jrd/SysFunction.cpp Correction for CORE-3244 Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-21 02:36:57 UTC (rev 51948) +++ firebird/trunk/src/jrd/build_no.h 2010-11-21 03:13:28 UTC (rev 51949) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28906 + FORMAL BUILD NUMBER:28907 */ -#define PRODUCT_VER_STRING "3.0.0.28906" -#define FILE_VER_STRING "WI-T3.0.0.28906" -#define LICENSE_VER_STRING "WI-T3.0.0.28906" -#define FILE_VER_NUMBER 3, 0, 0, 28906 +#define PRODUCT_VER_STRING "3.0.0.28907" +#define FILE_VER_STRING "WI-T3.0.0.28907" +#define LICENSE_VER_STRING "WI-T3.0.0.28907" +#define FILE_VER_NUMBER 3, 0, 0, 28907 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28906" +#define FB_BUILD_NO "28907" #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 2010-11-21 02:36:57 UTC (rev 51948) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-21 03:13:28 UTC (rev 51949) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28906 +BuildNum=28907 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...> - 2010-11-22 03:14:21
|
Revision: 51956 http://firebird.svn.sourceforge.net/firebird/?rev=51956&view=rev Author: firebirds Date: 2010-11-22 03:14:14 +0000 (Mon, 22 Nov 2010) 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 2010-11-21 21:22:20 UTC (rev 51955) +++ firebird/trunk/ChangeLog 2010-11-22 03:14:14 UTC (rev 51956) @@ -1,3 +1,82 @@ + 2010-11-21 21:22 asfernandes + M src/common/os/guid.h +Fixed a source of many warnings when using clang + + 2010-11-21 21:21 asfernandes + M src/misc/writeBuildNum.sh +Make clang build work + + 2010-11-21 03:47 asfernandes + M src/dsql/AggNodes.cpp + M src/dsql/AggNodes.h + M src/dsql/BoolNodes.cpp + M src/dsql/BoolNodes.h + M src/dsql/ExprNodes.cpp + M src/dsql/ExprNodes.h + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/Visitors.h + M src/dsql/WinNodes.cpp + M src/dsql/WinNodes.h + M src/dsql/pass1.cpp + M src/jrd/ExtEngineManager.cpp + M src/jrd/ExtEngineManager.h + M src/jrd/Function.epp + M src/jrd/Function.h + M src/jrd/JrdStatement.cpp + M src/jrd/Optimizer.cpp + M src/jrd/Optimizer.h + M src/jrd/RecordSourceNodes.cpp + M src/jrd/RecordSourceNodes.h + M src/jrd/Relation.h + M src/jrd/SysFunction.cpp + M src/jrd/SysFunction.h + M src/jrd/blb.cpp + M src/jrd/blb_proto.h + M src/jrd/btr.cpp + M src/jrd/btr.h + M src/jrd/btr_proto.h + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/dfw.epp + M src/jrd/evl.cpp + M src/jrd/evl_proto.h + M src/jrd/exe.cpp + M src/jrd/exe.h + M src/jrd/exe_proto.h + M src/jrd/execute_statement.cpp + M src/jrd/extds/ExtDS.cpp + M src/jrd/fun.epp + M src/jrd/fun_proto.h + M src/jrd/jrd.h + M src/jrd/met.epp + M src/jrd/opt.cpp + M src/jrd/par.cpp + M src/jrd/par_proto.h + M src/jrd/pcmet.epp + M src/jrd/recsrc/AggregatedStream.cpp + M src/jrd/recsrc/FirstRowsStream.cpp + M src/jrd/recsrc/HashJoin.cpp + M src/jrd/recsrc/MergeJoin.cpp + M src/jrd/recsrc/ProcedureScan.cpp + M src/jrd/recsrc/RecordSource.h + M src/jrd/recsrc/RecursiveStream.cpp + M src/jrd/recsrc/SkipRowsStream.cpp + M src/jrd/recsrc/SortedStream.cpp + M src/jrd/recsrc/Union.cpp + M src/jrd/recsrc/WindowedStream.cpp + M src/jrd/req.h + M src/jrd/trace/TraceJrdHelpers.h + M src/jrd/trace/TraceObjects.cpp + M src/jrd/trace/TraceObjects.h + M src/misc/blrtable.cpp +Make ExprNodes and RecordSourceNodes reference others directly instead of via jrd_nod. +Store ValueExprNodes instead of jrd_nod in the metadata cache. +Make RecordSourceNode child of ExprNode as they share most operations. +Get rid of the JRD visitors in favor of direct calls. +Convert assignments statement lists created inside expressions to separate source and targets ValuesExprNodes. + 2010-11-21 02:36 asfernandes M src/burp/burp.cpp M src/common/config/config_file.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-21 21:22:20 UTC (rev 51955) +++ firebird/trunk/src/jrd/build_no.h 2010-11-22 03:14:14 UTC (rev 51956) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28907 + FORMAL BUILD NUMBER:28910 */ -#define PRODUCT_VER_STRING "3.0.0.28907" -#define FILE_VER_STRING "WI-T3.0.0.28907" -#define LICENSE_VER_STRING "WI-T3.0.0.28907" -#define FILE_VER_NUMBER 3, 0, 0, 28907 +#define PRODUCT_VER_STRING "3.0.0.28910" +#define FILE_VER_STRING "WI-T3.0.0.28910" +#define LICENSE_VER_STRING "WI-T3.0.0.28910" +#define FILE_VER_NUMBER 3, 0, 0, 28910 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28907" +#define FB_BUILD_NO "28910" #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 2010-11-21 21:22:20 UTC (rev 51955) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-22 03:14:14 UTC (rev 51956) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28907 +BuildNum=28910 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...> - 2010-11-23 03:14:42
|
Revision: 51962 http://firebird.svn.sourceforge.net/firebird/?rev=51962&view=rev Author: firebirds Date: 2010-11-23 03:14:35 +0000 (Tue, 23 Nov 2010) 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 2010-11-22 23:47:16 UTC (rev 51961) +++ firebird/trunk/ChangeLog 2010-11-23 03:14:35 UTC (rev 51962) @@ -1,3 +1,15 @@ + 2010-11-22 23:47 asfernandes + M src/dsql/ExprNodes.cpp +Misc + + 2010-11-22 15:44 alexpeshkoff + M src/common/common.h +Damyan's patch for MIPSEB + + 2010-11-22 08:23 alexpeshkoff + M src/common/isc_sync.cpp +This should fix first problem in BSD build + 2010-11-21 21:22 asfernandes M src/common/os/guid.h Fixed a source of many warnings when using clang Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-22 23:47:16 UTC (rev 51961) +++ firebird/trunk/src/jrd/build_no.h 2010-11-23 03:14:35 UTC (rev 51962) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28910 + FORMAL BUILD NUMBER:28913 */ -#define PRODUCT_VER_STRING "3.0.0.28910" -#define FILE_VER_STRING "WI-T3.0.0.28910" -#define LICENSE_VER_STRING "WI-T3.0.0.28910" -#define FILE_VER_NUMBER 3, 0, 0, 28910 +#define PRODUCT_VER_STRING "3.0.0.28913" +#define FILE_VER_STRING "WI-T3.0.0.28913" +#define LICENSE_VER_STRING "WI-T3.0.0.28913" +#define FILE_VER_NUMBER 3, 0, 0, 28913 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28910" +#define FB_BUILD_NO "28913" #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 2010-11-22 23:47:16 UTC (rev 51961) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-23 03:14:35 UTC (rev 51962) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28910 +BuildNum=28913 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...> - 2010-11-24 03:15:44
|
Revision: 51967 http://firebird.svn.sourceforge.net/firebird/?rev=51967&view=rev Author: firebirds Date: 2010-11-24 03:15:37 +0000 (Wed, 24 Nov 2010) 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 2010-11-23 14:30:39 UTC (rev 51966) +++ firebird/trunk/ChangeLog 2010-11-24 03:15:37 UTC (rev 51967) @@ -1,3 +1,16 @@ + 2010-11-23 14:30 asfernandes + M src/dsql/ExprNodes.h +Correction + + 2010-11-23 12:56 alexpeshkoff + M src/remote/server/os/posix/inet_server.cpp +Remove restriction on username, as it was discussed in devel + + 2010-11-23 09:43 alexpeshkoff + M builds/posix/Makefile.in + M builds/posix/make.defaults +Better handling of absolute and relative paths + 2010-11-22 23:47 asfernandes M src/dsql/ExprNodes.cpp Misc Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-23 14:30:39 UTC (rev 51966) +++ firebird/trunk/src/jrd/build_no.h 2010-11-24 03:15:37 UTC (rev 51967) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28913 + FORMAL BUILD NUMBER:28916 */ -#define PRODUCT_VER_STRING "3.0.0.28913" -#define FILE_VER_STRING "WI-T3.0.0.28913" -#define LICENSE_VER_STRING "WI-T3.0.0.28913" -#define FILE_VER_NUMBER 3, 0, 0, 28913 +#define PRODUCT_VER_STRING "3.0.0.28916" +#define FILE_VER_STRING "WI-T3.0.0.28916" +#define LICENSE_VER_STRING "WI-T3.0.0.28916" +#define FILE_VER_NUMBER 3, 0, 0, 28916 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28913" +#define FB_BUILD_NO "28916" #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 2010-11-23 14:30:39 UTC (rev 51966) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-24 03:15:37 UTC (rev 51967) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28913 +BuildNum=28916 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...> - 2010-11-25 15:48:45
|
Revision: 51978 http://firebird.svn.sourceforge.net/firebird/?rev=51978&view=rev Author: alexpeshkoff Date: 2010-11-25 15:48:37 +0000 (Thu, 25 Nov 2010) Log Message: ----------- Check for presence of sync functions Modified Paths: -------------- firebird/trunk/configure.in firebird/trunk/src/burp/burp.h Modified: firebird/trunk/configure.in =================================================================== --- firebird/trunk/configure.in 2010-11-25 12:23:46 UTC (rev 51977) +++ firebird/trunk/configure.in 2010-11-25 15:48:37 UTC (rev 51978) @@ -794,6 +794,7 @@ AC_CHECK_FUNCS(semtimedop) AC_CHECK_FUNCS(fegetenv) AC_CHECK_FUNCS(strerror_r) +AC_CHECK_FUNCS(fdatasync fsync) dnl AC_CHECK_FUNCS(AO_compare_and_swap_full) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <atomic_ops.h>]], [[AO_T x; AO_compare_and_swap_full(&x, 0, 0); return 0;]])], Modified: firebird/trunk/src/burp/burp.h =================================================================== --- firebird/trunk/src/burp/burp.h 2010-11-25 12:23:46 UTC (rev 51977) +++ firebird/trunk/src/burp/burp.h 2010-11-25 15:48:37 UTC (rev 51978) @@ -782,7 +782,11 @@ inline static void flush_platf(DESC file) { +#if defined(HAVE_FDATASYNC) fdatasync(file); +#elif defined(HAVE_FSYNC) + fsync(file); +#endif } #endif // WIN_NT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2010-11-26 03:41:51
|
Revision: 51980 http://firebird.svn.sourceforge.net/firebird/?rev=51980&view=rev Author: firebirds Date: 2010-11-26 03:41:43 +0000 (Fri, 26 Nov 2010) 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 2010-11-25 15:50:13 UTC (rev 51979) +++ firebird/trunk/ChangeLog 2010-11-26 03:41:43 UTC (rev 51980) @@ -1,3 +1,26 @@ + 2010-11-25 15:48 alexpeshkoff + M configure.in + M src/burp/burp.h +Check for presence of sync functions + + 2010-11-25 12:22 alexpeshkoff + M src/auth/SecurityDatabase/pwd.cpp + M src/jrd/cvt.cpp + M src/jrd/cvt_proto.h +Fixed CORE-3259: Deadlock and sefgault when processing ctrl-C in user code + + 2010-11-25 10:53 hvlad + M src/jrd/idx.cpp +Frontport fix for bug CORE-3188 : page 0 is of wrong type (expected 6, found 1) + + 2010-11-24 16:00 dimitr + M src/jrd/Function.epp +Fixed assertion when restoring a database having expression insides referencing non-existent UDFs. + + 2010-11-24 15:55 dimitr + M src/jrd/grant.epp +Fixed inability to restore privileges granted to roles. + 2010-11-23 14:30 asfernandes M src/dsql/ExprNodes.h Correction Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-25 15:50:13 UTC (rev 51979) +++ firebird/trunk/src/jrd/build_no.h 2010-11-26 03:41:43 UTC (rev 51980) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28916 + FORMAL BUILD NUMBER:28921 */ -#define PRODUCT_VER_STRING "3.0.0.28916" -#define FILE_VER_STRING "WI-T3.0.0.28916" -#define LICENSE_VER_STRING "WI-T3.0.0.28916" -#define FILE_VER_NUMBER 3, 0, 0, 28916 +#define PRODUCT_VER_STRING "3.0.0.28921" +#define FILE_VER_STRING "WI-T3.0.0.28921" +#define LICENSE_VER_STRING "WI-T3.0.0.28921" +#define FILE_VER_NUMBER 3, 0, 0, 28921 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28916" +#define FB_BUILD_NO "28921" #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 2010-11-25 15:50:13 UTC (rev 51979) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-26 03:41:43 UTC (rev 51980) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28916 +BuildNum=28921 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...> - 2010-11-27 03:48:00
|
Revision: 51987 http://firebird.svn.sourceforge.net/firebird/?rev=51987&view=rev Author: firebirds Date: 2010-11-27 03:47:52 +0000 (Sat, 27 Nov 2010) 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 2010-11-26 16:56:26 UTC (rev 51986) +++ firebird/trunk/ChangeLog 2010-11-27 03:47:52 UTC (rev 51987) @@ -1,3 +1,11 @@ + 2010-11-26 16:54 alexpeshkoff + M src/burp/OdsDetection.epp + M src/burp/backup.epp + M src/burp/burp.cpp + M src/burp/burp_proto.h + M src/burp/restore.epp +Fixed CORE-3261: Assertion when running restore service + 2010-11-25 15:48 alexpeshkoff M configure.in M src/burp/burp.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-26 16:56:26 UTC (rev 51986) +++ firebird/trunk/src/jrd/build_no.h 2010-11-27 03:47:52 UTC (rev 51987) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28921 + FORMAL BUILD NUMBER:28922 */ -#define PRODUCT_VER_STRING "3.0.0.28921" -#define FILE_VER_STRING "WI-T3.0.0.28921" -#define LICENSE_VER_STRING "WI-T3.0.0.28921" -#define FILE_VER_NUMBER 3, 0, 0, 28921 +#define PRODUCT_VER_STRING "3.0.0.28922" +#define FILE_VER_STRING "WI-T3.0.0.28922" +#define LICENSE_VER_STRING "WI-T3.0.0.28922" +#define FILE_VER_NUMBER 3, 0, 0, 28922 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28921" +#define FB_BUILD_NO "28922" #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 2010-11-26 16:56:26 UTC (rev 51986) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-27 03:47:52 UTC (rev 51987) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28921 +BuildNum=28922 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...> - 2010-11-28 03:45:58
|
Revision: 51990 http://firebird.svn.sourceforge.net/firebird/?rev=51990&view=rev Author: firebirds Date: 2010-11-28 03:45:52 +0000 (Sun, 28 Nov 2010) 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 2010-11-27 13:54:57 UTC (rev 51989) +++ firebird/trunk/ChangeLog 2010-11-28 03:45:52 UTC (rev 51990) @@ -1,3 +1,7 @@ + 2010-11-27 13:54 asfernandes + M src/auth/SecurityDatabase/pwd.cpp +Misc + 2010-11-26 16:54 alexpeshkoff M src/burp/OdsDetection.epp M src/burp/backup.epp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-27 13:54:57 UTC (rev 51989) +++ firebird/trunk/src/jrd/build_no.h 2010-11-28 03:45:52 UTC (rev 51990) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28922 + FORMAL BUILD NUMBER:28923 */ -#define PRODUCT_VER_STRING "3.0.0.28922" -#define FILE_VER_STRING "WI-T3.0.0.28922" -#define LICENSE_VER_STRING "WI-T3.0.0.28922" -#define FILE_VER_NUMBER 3, 0, 0, 28922 +#define PRODUCT_VER_STRING "3.0.0.28923" +#define FILE_VER_STRING "WI-T3.0.0.28923" +#define LICENSE_VER_STRING "WI-T3.0.0.28923" +#define FILE_VER_NUMBER 3, 0, 0, 28923 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28922" +#define FB_BUILD_NO "28923" #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 2010-11-27 13:54:57 UTC (rev 51989) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-28 03:45:52 UTC (rev 51990) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28922 +BuildNum=28923 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...> - 2010-11-29 02:17:13
|
Revision: 51995 http://firebird.svn.sourceforge.net/firebird/?rev=51995&view=rev Author: asfernandes Date: 2010-11-29 02:17:04 +0000 (Mon, 29 Nov 2010) Log Message: ----------- Refactored the support for blr_handler, blr_loop, blr_exec_sql, blr_exec_into, blr_exec_stmt, blr_start_savepoint, blr_end_savepoint, blr_store, blr_store2, blr_erase, blr_modify, blr_modify2, blr_exec_proc, blr_exec_proc2, blr_exec_pid, blr_dcl_cursor, blr_cursor_stmt, blr_set_generator, blr_receive, blr_stall, blr_select, blr_block, blr_error_handler, blr_label, blr_leave, blr_continue and the source info node. Modified Paths: -------------- firebird/trunk/builds/win32/msvc10/engine.vcxproj firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters firebird/trunk/builds/win32/msvc7/engine.vcproj firebird/trunk/builds/win32/msvc7/engine_classic.vcproj firebird/trunk/builds/win32/msvc7/engine_embed.vcproj firebird/trunk/builds/win32/msvc8/engine.vcproj firebird/trunk/builds/win32/msvc9/engine.vcproj firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/dsql/StmtNodes.h firebird/trunk/src/dsql/Visitors.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/dsql/pass1.cpp firebird/trunk/src/jrd/JrdStatement.cpp firebird/trunk/src/jrd/JrdStatement.h firebird/trunk/src/jrd/cmp.cpp firebird/trunk/src/jrd/cmp_proto.h firebird/trunk/src/jrd/exe.cpp firebird/trunk/src/jrd/exe.h firebird/trunk/src/jrd/exe_proto.h firebird/trunk/src/jrd/extds/ExtDS.cpp firebird/trunk/src/jrd/extds/ExtDS.h firebird/trunk/src/jrd/extds/IscDS.cpp firebird/trunk/src/jrd/extds/IscDS.h firebird/trunk/src/jrd/inf.cpp firebird/trunk/src/jrd/nod.h firebird/trunk/src/jrd/par.cpp firebird/trunk/src/jrd/par_proto.h firebird/trunk/src/misc/blrtable.cpp Removed Paths: ------------- firebird/trunk/src/jrd/execute_statement.cpp firebird/trunk/src/jrd/execute_statement.h Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -76,7 +76,6 @@ <ClCompile Include="..\..\..\src\jrd\event.cpp" /> <ClCompile Include="..\..\..\src\jrd\evl.cpp" /> <ClCompile Include="..\..\..\src\jrd\exe.cpp" /> - <ClCompile Include="..\..\..\src\jrd\execute_statement.cpp" /> <ClCompile Include="..\..\..\src\jrd\ext.cpp" /> <ClCompile Include="..\..\..\src\jrd\extds\ExtDS.cpp" /> <ClCompile Include="..\..\..\src\jrd\extds\InternalDS.cpp" /> @@ -237,7 +236,6 @@ <ClInclude Include="..\..\..\src\jrd\evl_proto.h" /> <ClInclude Include="..\..\..\src\jrd\evl_string.h" /> <ClInclude Include="..\..\..\src\jrd\exe.h" /> - <ClInclude Include="..\..\..\src\jrd\execute_statement.h" /> <ClInclude Include="..\..\..\src\jrd\exe_proto.h" /> <ClInclude Include="..\..\..\src\jrd\ext.h" /> <ClInclude Include="..\..\..\src\jrd\extds\ExtDS.h" /> @@ -562,4 +560,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> \ No newline at end of file +</Project> Modified: firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters =================================================================== --- firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc10/engine.vcxproj.filters 2010-11-29 02:17:04 UTC (rev 51995) @@ -258,9 +258,6 @@ <ClCompile Include="..\..\..\src\jrd\exe.cpp"> <Filter>JRD files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\jrd\execute_statement.cpp"> - <Filter>JRD files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\jrd\ext.cpp"> <Filter>JRD files</Filter> </ClCompile> @@ -740,9 +737,6 @@ <ClInclude Include="..\..\..\src\jrd\exe_proto.h"> <Filter>Header files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\jrd\execute_statement.h"> - <Filter>Header files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\jrd\ext.h"> <Filter>Header files</Filter> </ClInclude> @@ -1096,4 +1090,4 @@ <Filter>Resource files</Filter> </ResourceCompile> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: firebird/trunk/builds/win32/msvc7/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine.vcproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc7/engine.vcproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -107,8 +107,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe.cpp"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.cpp"> - </File> <File RelativePath="..\..\..\src\jrd\ext.cpp"> </File> <File RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"> @@ -371,8 +369,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe_proto.h"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.h"> - </File> <File RelativePath="..\..\..\src\jrd\ext.h"> </File> <File RelativePath="..\..\..\src\jrd\ext_proto.h"> @@ -649,4 +645,4 @@ </Files> <Globals> </Globals> -</VisualStudioProject> \ No newline at end of file +</VisualStudioProject> Modified: firebird/trunk/builds/win32/msvc7/engine_classic.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine_classic.vcproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc7/engine_classic.vcproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -107,8 +107,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe.cpp"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.cpp"> - </File> <File RelativePath="..\..\..\src\jrd\ext.cpp"> </File> <File RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"> @@ -371,8 +369,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe_proto.h"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.h"> - </File> <File RelativePath="..\..\..\src\jrd\ext.h"> </File> <File RelativePath="..\..\..\src\jrd\ext_proto.h"> @@ -647,4 +643,4 @@ </Files> <Globals> </Globals> -</VisualStudioProject> \ No newline at end of file +</VisualStudioProject> Modified: firebird/trunk/builds/win32/msvc7/engine_embed.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine_embed.vcproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc7/engine_embed.vcproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -107,8 +107,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe.cpp"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.cpp"> - </File> <File RelativePath="..\..\..\src\jrd\ext.cpp"> </File> <File RelativePath="..\..\..\src\jrd\extds\ExtDS.cpp"> @@ -371,8 +369,6 @@ </File> <File RelativePath="..\..\..\src\jrd\exe_proto.h"> </File> - <File RelativePath="..\..\..\src\jrd\execute_statement.h"> - </File> <File RelativePath="..\..\..\src\jrd\ext.h"> </File> <File RelativePath="..\..\..\src\jrd\ext_proto.h"> @@ -647,4 +643,4 @@ </Files> <Globals> </Globals> -</VisualStudioProject> \ No newline at end of file +</VisualStudioProject> Modified: firebird/trunk/builds/win32/msvc8/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/engine.vcproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc8/engine.vcproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -400,10 +400,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\execute_statement.cpp" - > - </File> - <File RelativePath="..\..\..\src\jrd\ext.cpp" > </File> @@ -1108,10 +1104,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\execute_statement.h" - > - </File> - <File RelativePath="..\..\..\src\dsql\ExprNodes.h" > </File> Modified: firebird/trunk/builds/win32/msvc9/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/engine.vcproj 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/builds/win32/msvc9/engine.vcproj 2010-11-29 02:17:04 UTC (rev 51995) @@ -400,10 +400,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\execute_statement.cpp" - > - </File> - <File RelativePath="..\..\..\src\jrd\ext.cpp" > </File> @@ -1108,10 +1104,6 @@ > </File> <File - RelativePath="..\..\..\src\jrd\execute_statement.h" - > - </File> - <File RelativePath="..\..\..\src\dsql\ExprNodes.h" > </File> Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/src/dsql/DdlNodes.epp 2010-11-29 02:17:04 UTC (rev 51995) @@ -8058,7 +8058,7 @@ bool found = false; - for (; search < end; ++search, replaceFields ? ++replace : NULL) + for (; search < end; ++search, replace += (replaceFields ? 1 : 0)) { const dsql_str* replaceName = NULL; if (replaceFields) Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/src/dsql/Nodes.h 2010-11-29 02:17:04 UTC (rev 51995) @@ -24,6 +24,7 @@ #define DSQL_NODES_H #include "../common/common.h" +#include "../jrd/jrd.h" #include "../dsql/DsqlCompilerScratch.h" #include "../dsql/node.h" #include "../dsql/Visitors.h" @@ -799,13 +800,129 @@ class StmtNode : public DmlNode { public: - explicit StmtNode(MemoryPool& pool) + enum Type + { + TYPE_BLOCK, + TYPE_CONTINUE_LEAVE, + TYPE_CURSOR_STMT, + TYPE_DECLARE_CURSOR, + TYPE_ERASE, + TYPE_ERROR_HANDLER, + TYPE_EXCEPTION, + TYPE_EXEC_BLOCK, + TYPE_EXEC_PROCEDURE, + TYPE_EXEC_STATEMENT, + TYPE_EXIT, + TYPE_IF, + TYPE_IN_AUTO_TRANS, + TYPE_FOR, + TYPE_HANDLER, + TYPE_LABEL, + TYPE_LOOP, + TYPE_MERGE, + TYPE_MODIFY, + TYPE_POST_EVENT, + TYPE_RECEIVE, + TYPE_RETURN, + TYPE_SAVEPOINT, + TYPE_SAVEPOINT_ENCLOSE, + TYPE_SELECT, + TYPE_SET_GENERATOR, + TYPE_SOURCE_INFO, + TYPE_STALL, + TYPE_STORE, + TYPE_SUSPEND, + TYPE_USER_SAVEPOINT + }; + + enum WhichTrigger + { + ALL_TRIGS = 0, + PRE_TRIG = 1, + POST_TRIG = 2 + }; + + struct ExeState + { + ExeState(thread_db* tdbb) + : oldPool(tdbb->getDefaultPool()), + oldRequest(tdbb->getRequest()), + errorPending(false), + catchDisabled(false), + whichEraseTrig(ALL_TRIGS), + whichStoTrig(ALL_TRIGS), + whichModTrig(ALL_TRIGS), + topNode(NULL), + prevNode(NULL) + { + } + + MemoryPool* oldPool; // Save the old pool to restore on exit. + jrd_req* oldRequest; // Save the old request to restore on exit. + bool errorPending; // Is there an error pending to be handled? + bool catchDisabled; // Catch errors so we can unwind cleanly. + WhichTrigger whichEraseTrig; + WhichTrigger whichStoTrig; + WhichTrigger whichModTrig; + const jrd_nod* topNode; + const jrd_nod* prevNode; + }; + +public: + explicit StmtNode(Type aType, MemoryPool& pool) : DmlNode(pool), + type(aType), node(NULL) { } -public: + template <typename T> T* as() + { + return type == T::TYPE ? static_cast<T*>(this) : NULL; + } + + template <typename T> const T* as() const + { + return type == T::TYPE ? static_cast<const T*>(this) : NULL; + } + + template <typename T> bool is() const + { + return type == T::TYPE; + } + + template <typename T, typename LegacyType> static T* as(LegacyType* node) + { + StmtNode* obj = T::fromLegacy(node); + return obj ? obj->as<T>() : NULL; + } + + template <typename T, typename LegacyType> static const T* as(const LegacyType* node) + { + const StmtNode* obj = T::fromLegacy(node); + return obj ? obj->as<T>() : NULL; + } + + template <typename T, typename LegacyType> static bool is(const LegacyType* node) + { + const StmtNode* obj = T::fromLegacy(node); + return obj ? obj->is<T>() : false; + } + + static const StmtNode* fromLegacy(const StmtNode* node) + { + return node; + } + + static StmtNode* fromLegacy(StmtNode* node) + { + return node; + } + + static StmtNode* fromLegacy(const dsql_nod* node); + static const StmtNode* fromLegacy(const jrd_nod* node); + static StmtNode* fromLegacy(jrd_nod* node); + jrd_nod* getNode() { return node; @@ -820,8 +937,11 @@ { } - virtual const jrd_nod* execute(thread_db* tdbb, jrd_req* request) const = 0; + virtual const jrd_nod* execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const = 0; +public: + const Type type; + protected: NestConst<jrd_nod> node; }; @@ -832,8 +952,8 @@ class DsqlOnlyStmtNode : public StmtNode { public: - explicit DsqlOnlyStmtNode(MemoryPool& pool) - : StmtNode(pool) + explicit DsqlOnlyStmtNode(Type aType, MemoryPool& pool) + : StmtNode(aType, pool) { } @@ -850,7 +970,7 @@ return this; } - const jrd_nod* execute(thread_db* /*tdbb*/, jrd_req* /*request*/) const + const jrd_nod* execute(thread_db* /*tdbb*/, jrd_req* /*request*/, ExeState* /*exeState*/) const { fb_assert(false); return NULL; @@ -859,11 +979,11 @@ // This class (via the make method) does the job that pass1_savepoint does for the legacy nodes. -class SavepointEncloseNode : public DsqlOnlyStmtNode +class SavepointEncloseNode : public TypedNode<DsqlOnlyStmtNode, StmtNode::TYPE_SAVEPOINT_ENCLOSE> { public: explicit SavepointEncloseNode(MemoryPool& pool, StmtNode* aStmt) - : DsqlOnlyStmtNode(pool), + : TypedNode<DsqlOnlyStmtNode, StmtNode::TYPE_SAVEPOINT_ENCLOSE>(pool), stmt(aStmt) { } Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2010-11-28 19:51:03 UTC (rev 51994) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2010-11-29 02:17:04 UTC (rev 51995) @@ -28,14 +28,23 @@ #include "../jrd/blr.h" #include "../jrd/tra.h" #include "../jrd/RecordSourceNodes.h" +#include "../jrd/VirtualTable.h" +#include "../jrd/extds/ExtDS.h" +#include "../jrd/recsrc/RecordSource.h" #include "../jrd/recsrc/Cursor.h" +#include "../jrd/trace/TraceManager.h" +#include "../jrd/trace/TraceJrdHelpers.h" #include "../jrd/cmp_proto.h" #include "../jrd/dfw_proto.h" +#include "../jrd/dpm_proto.h" #include "../jrd/evl_proto.h" #include "../jrd/exe_proto.h" +#include "../jrd/ext_proto.h" +#include "../jrd/idx_proto.h" #include "../jrd/met_proto.h" #include "../jrd/mov_proto.h" #include "../jrd/par_proto.h" +#include "../jrd/rlck_proto.h" #include "../jrd/tra_proto.h" #include "../dsql/ddl_proto.h" #include "../jrd/vio_proto.h" @@ -53,6 +62,28 @@ namespace Jrd { +StmtNode* StmtNode::fromLegacy(const dsql_nod* node) +{ + return node && node->nod_type == Dsql::nod_class_stmtnode ? + reinterpret_cast<StmtNode*>(node->nod_arg[0]) : NULL; +} + +const StmtNode* StmtNode::fromLegacy(const jrd_nod* node) +{ + return node && node->nod_type == nod_class_stmtnode_jrd ? + reinterpret_cast<const StmtNode*>(node->nod_arg[0]) : NULL; +} + +StmtNode* StmtNode::fromLegacy(jrd_nod* node) +{ + return node && node->nod_type == nod_class_stmtnode_jrd ? + reinterpret_cast<StmtNode*>(node->nod_arg[0]) : NULL; +} + + +//-------------------- + + StmtNode* SavepointEncloseNode::make(MemoryPool& pool, DsqlCompilerScratch* dsqlScratch, StmtNode* node) { if (dsqlScratch->errorHandlers) @@ -87,6 +118,1490 @@ //-------------------- +static RegisterNode<BlockNode> regBlockNode(blr_block); + +DmlNode* BlockNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + BlockNode* node = FB_NEW(pool) BlockNode(pool); + node->action = PAR_parse_node(tdbb, csb, STATEMENT); + + NodeStack stack; + + while (csb->csb_blr_reader.peekByte() != blr_end) + stack.push(PAR_parse_node(tdbb, csb, STATEMENT)); + + csb->csb_blr_reader.getByte(); // skip blr_end + + node->handlers = PAR_make_list(tdbb, stack); + + return node; +} + +BlockNode* BlockNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void BlockNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "BlockNode"; +} + +void BlockNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +BlockNode* BlockNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + action = CMP_pass1(tdbb, csb, action); + handlers = CMP_pass1(tdbb, csb, handlers); + return this; +} + +BlockNode* BlockNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + action = CMP_pass2(tdbb, csb, action, node); + handlers = CMP_pass2(tdbb, csb, handlers, node); + + node->nod_impure = CMP_impure(csb, sizeof(SLONG)); + + return this; +} + +const jrd_nod* BlockNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const +{ + jrd_tra* transaction = request->req_transaction; + jrd_tra* sysTransaction = request->req_attachment->getSysTransaction(); + SLONG count; + + switch (request->req_operation) + { + case jrd_req::req_evaluate: + if (transaction != sysTransaction) + { + VIO_start_save_point(tdbb, transaction); + const Savepoint* save_point = transaction->tra_save_point; + count = save_point->sav_number; + *request->getImpure<SLONG>(node->nod_impure) = count; + } + return action; + + case jrd_req::req_unwind: + { + if (request->req_flags & (req_leave | req_continue_loop)) + { + // Although the req_operation is set to req_unwind, + // it's not an error case if req_leave/req_continue_loop bit is set. + // req_leave/req_continue_loop bit indicates that we hit an EXIT or + // BREAK/LEAVE/CONTINUE statement in the SP/trigger code. + // Do not perform the error handling stuff. + + if (transaction != sysTransaction) + { + count = *request->getImpure<SLONG>(node->nod_impure); + + for (const Savepoint* save_point = transaction->tra_save_point; + save_point && count <= save_point->sav_number; + save_point = transaction->tra_save_point) + { + EXE_verb_cleanup(tdbb, transaction); + } + } + + return node->nod_parent; + } + + if (transaction != sysTransaction) + { + count = *request->getImpure<SLONG>(node->nod_impure); + + // Since there occurred an error (req_unwind), undo all savepoints + // up to, but not including, the savepoint of this block. The + // savepoint of this block will be dealt with below. + + for (const Savepoint* save_point = transaction->tra_save_point; + save_point && count < save_point->sav_number; + save_point = transaction->tra_save_point) + { + ++transaction->tra_save_point->sav_verb_count; + EXE_verb_cleanup(tdbb, transaction); + } + } + + const jrd_nod* temp; + + if (handlers) + { + temp = node->nod_parent; + const jrd_nod* const* ptr = handlers->nod_arg; + + for (const jrd_nod* const* const end = ptr + handlers->nod_count; ptr < end; ++ptr) + { + const ErrorHandlerNode* handlerNode = StmtNode::as<ErrorHandlerNode>(*ptr); + const PsqlException* xcpNode = handlerNode->conditions; + + if (testAndFixupError(tdbb, request, xcpNode)) + { + request->req_operation = jrd_req::req_evaluate; + temp = handlerNode->action; + exeState->errorPending = false; + + // On entering looper exeState->oldRequest etc. are saved. + // On recursive calling we will loose the actual old + // request for that invocation of looper. Avoid this. + + { + Jrd::ContextPoolHolder contextLooper(tdbb, exeState->oldPool); + tdbb->setRequest(exeState->oldRequest); + fb_assert(request->req_caller == exeState->oldRequest); + request->req_caller = NULL; + + // Save the previous state of req_error_handler + // bit. We need to restore it later. This is + // necessary if the error handler is deeply nested. + + const ULONG prev_req_error_handler = + request->req_flags & req_error_handler; + request->req_flags |= req_error_handler; + temp = EXE_looper(tdbb, request, temp); + request->req_flags &= ~req_error_handler; + request->req_flags |= prev_req_error_handler; + + // Note: Previously the above call "temp = looper (tdbb, request, temp);" + // never returned back till the tree was executed completely. Now that + // the looper has changed its behaviour such that it returns back after + // handling error. This makes it necessary that the jmpbuf be reset + // so that looper can proceede with the processing of execution tree. + // If this is not done then anymore errors will take the engine out of + // looper there by abruptly terminating the processing. + + exeState->catchDisabled = false; + tdbb->setRequest(request); + fb_assert(request->req_caller == NULL); + request->req_caller = exeState->oldRequest; + } + + // The error is dealt with by the application, cleanup + // this block's savepoint. + + if (transaction != sysTransaction) + { + for (const Savepoint* save_point = transaction->tra_save_point; + save_point && count <= save_point->sav_number; + save_point = transaction->tra_save_point) + { + EXE_verb_cleanup(tdbb, transaction); + } + } + } + } + } + else + temp = node->nod_parent; + + // If the application didn't have an error handler, then + // the error will still be pending. Undo the block by + // using its savepoint. + + if (exeState->errorPending && transaction != sysTransaction) + { + for (const Savepoint* save_point = transaction->tra_save_point; + save_point && count <= save_point->sav_number; + save_point = transaction->tra_save_point) + { + ++transaction->tra_save_point->sav_verb_count; + EXE_verb_cleanup(tdbb, transaction); + } + } + + return temp; + } + + case jrd_req::req_return: + if (transaction != sysTransaction) + { + count = *request->getImpure<SLONG>(node->nod_impure); + + for (const Savepoint* save_point = transaction->tra_save_point; + save_point && count <= save_point->sav_number; + save_point = transaction->tra_save_point) + { + EXE_verb_cleanup(tdbb, transaction); + } + } + + default: + return node->nod_parent; + } + + fb_assert(false); + return NULL; +} + +// Test for match of current state with list of error conditions. Fix type and code of the exception. +bool BlockNode::testAndFixupError(thread_db* tdbb, jrd_req* request, const PsqlException* conditions) +{ + if (tdbb->tdbb_flags & TDBB_sys_error) + return false; + + ISC_STATUS* statusVector = tdbb->tdbb_status_vector; + const SSHORT sqlcode = gds__sqlcode(statusVector); + + bool found = false; + + for (USHORT i = 0; i < conditions->xcp_count; i++) + { + switch (conditions->xcp_rpt[i].xcp_type) + { + case xcp_sql_code: + if (sqlcode == conditions->xcp_rpt[i].xcp_code) + found = true; + break; + + case xcp_gds_code: + if (statusVector[1] == conditions->xcp_rpt[i].xcp_code) + found = true; + break; + + case xcp_xcp_code: + // Look at set_error() routine to understand how the + // exception ID info is encoded inside the status vector. + if ((statusVector[1] == isc_except) && + (statusVector[3] == conditions->xcp_rpt[i].xcp_code)) + { + found = true; + } + + break; + + case xcp_default: + found = true; + break; + + default: + fb_assert(false); + } + + if (found) + { + request->req_last_xcp.init(statusVector); + fb_utils::init_status(statusVector); + break; + } + } + + return found; +} + + +//-------------------- + + +static RegisterNode<ContinueLeaveNode> regContinueLeaveNodeContinue(blr_continue_loop); +static RegisterNode<ContinueLeaveNode> regContinueLeaveNodeLeave(blr_leave); + +DmlNode* ContinueLeaveNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +{ + ContinueLeaveNode* node = FB_NEW(pool) ContinueLeaveNode(pool, blrOp); + node->labelNumber = csb->csb_blr_reader.getByte(); + return node; +} + +ContinueLeaveNode* ContinueLeaveNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void ContinueLeaveNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "ContinueLeaveNode"; +} + +void ContinueLeaveNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +const jrd_nod* ContinueLeaveNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const +{ + request->req_operation = jrd_req::req_unwind; + request->req_label = labelNumber; + request->req_flags |= (blrOp == blr_continue_loop ? req_continue_loop : req_leave); + return node->nod_parent; +} + + +//-------------------- + + +static RegisterNode<CursorStmtNode> regCursorStmtNode(blr_cursor_stmt); + +DmlNode* CursorStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + CursorStmtNode* node = FB_NEW(pool) CursorStmtNode(pool); + + node->cursorOp = csb->csb_blr_reader.getByte(); + node->cursorNumber = csb->csb_blr_reader.getWord(); + + switch (node->cursorOp) + { + case blr_cursor_open: + case blr_cursor_close: + break; + + case blr_cursor_fetch_scroll: + node->scrollOp = csb->csb_blr_reader.getByte(); + node->scrollExpr = PAR_parse_value(tdbb, csb); + // fall into + + case blr_cursor_fetch: + csb->csb_g_flags |= csb_reuse_context; + node->intoStmt = PAR_parse_node(tdbb, csb, STATEMENT); + csb->csb_g_flags &= ~csb_reuse_context; + break; + + default: + PAR_syntax_error(csb, "cursor operation clause"); + } + + return node; +} + +CursorStmtNode* CursorStmtNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void CursorStmtNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "CursorStmtNode"; +} + +void CursorStmtNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +CursorStmtNode* CursorStmtNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + scrollExpr = CMP_pass1(tdbb, csb, scrollExpr); + intoStmt = CMP_pass1(tdbb, csb, intoStmt); + return this; +} + +CursorStmtNode* CursorStmtNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + scrollExpr = CMP_pass2(tdbb, csb, scrollExpr); + intoStmt = CMP_pass2(tdbb, csb, intoStmt, node); + return this; +} + +const jrd_nod* CursorStmtNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + fb_assert(cursorNumber < request->req_cursors.getCount()); + const Cursor* const cursor = request->req_cursors[cursorNumber]; + bool fetched = false; + + switch (cursorOp) + { + case blr_cursor_open: + if (request->req_operation == jrd_req::req_evaluate) + { + cursor->open(tdbb); + request->req_operation = jrd_req::req_return; + } + return node->nod_parent; + + case blr_cursor_close: + if (request->req_operation == jrd_req::req_evaluate) + { + cursor->close(tdbb); + request->req_operation = jrd_req::req_return; + } + return node->nod_parent; + + case blr_cursor_fetch: + case blr_cursor_fetch_scroll: + switch (request->req_operation) + { + case jrd_req::req_evaluate: + request->req_records_affected.clear(); + + if (cursorOp == blr_cursor_fetch) + fetched = cursor->fetchNext(tdbb); + else + { + fb_assert(cursorOp == blr_cursor_fetch_scroll); + + const dsc* desc = EVL_expr(tdbb, request, scrollExpr); + const bool unknown = !desc || (request->req_flags & req_null); + const SINT64 offset = unknown ? 0 : MOV_get_int64(desc, 0); + + switch (scrollOp) + { + case blr_scroll_forward: + fetched = cursor->fetchNext(tdbb); + break; + case blr_scroll_backward: + fetched = cursor->fetchPrior(tdbb); + break; + case blr_scroll_bof: + fetched = cursor->fetchFirst(tdbb); + break; + case blr_scroll_eof: + fetched = cursor->fetchLast(tdbb); + break; + case blr_scroll_absolute: + fetched = unknown ? false : cursor->fetchAbsolute(tdbb, offset); + break; + case blr_scroll_relative: + fetched = unknown ? false : cursor->fetchRelative(tdbb, offset); + break; + default: + fb_assert(false); + fetched = false; + } + } + + if (fetched) + { + request->req_operation = jrd_req::req_evaluate; + return intoStmt; + } + + request->req_operation = jrd_req::req_return; + + default: + return node->nod_parent; + } + break; + } + + fb_assert(false); + return NULL; +} + + +//-------------------- + + +static RegisterNode<DeclareCursorNode> regDeclareCursorNode(blr_dcl_cursor); + +DmlNode* DeclareCursorNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + DeclareCursorNode* node = FB_NEW(pool) DeclareCursorNode(pool); + + node->cursorNumber = csb->csb_blr_reader.getWord(); + node->rse = PAR_rse(tdbb, csb); + + USHORT count = csb->csb_blr_reader.getWord(); + node->refs = PAR_args(tdbb, csb, count, count); + + return node; +} + +DeclareCursorNode* DeclareCursorNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void DeclareCursorNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "DeclareCursorNode"; +} + +void DeclareCursorNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +DeclareCursorNode* DeclareCursorNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + rse = rse->pass1(tdbb, csb); + refs = refs->pass1(tdbb, csb); + return this; +} + +DeclareCursorNode* DeclareCursorNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + rse = rse->pass2(tdbb, csb); + refs = refs->pass2(tdbb, csb); + return this; +} + +const jrd_nod* DeclareCursorNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const +{ + if (request->req_operation == jrd_req::req_evaluate) + { + // Set up the cursors array... + if (cursorNumber >= request->req_cursors.getCount()) + request->req_cursors.grow(cursorNumber + 1); + + // And store cursor there. + request->req_cursors[cursorNumber] = cursor; + request->req_operation = jrd_req::req_return; + } + + return node->nod_parent; +} + + +//-------------------- + + +static RegisterNode<EraseNode> regEraseNode(blr_erase); + +DmlNode* EraseNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + USHORT n = csb->csb_blr_reader.getByte(); + + if (n >= csb->csb_rpt.getCount() || !(csb->csb_rpt[n].csb_flags & csb_used)) + PAR_error(csb, Arg::Gds(isc_ctxnotdef)); + + EraseNode* node = FB_NEW(pool) EraseNode(pool); + node->stream = csb->csb_rpt[n].csb_stream; + + return node; +} + +EraseNode* EraseNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void EraseNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "EraseNode"; +} + +void EraseNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +EraseNode* EraseNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + pass1Erase(tdbb, csb, this); + + statement = CMP_pass1(tdbb, csb, statement); + subStatement = CMP_pass1(tdbb, csb, subStatement); + + return this; +} + +// Checkout an erase statement. If it references a view, and is kosher, fix it up. +void EraseNode::pass1Erase(thread_db* tdbb, CompilerScratch* csb, EraseNode* node) +{ + // If updateable views with triggers are involved, there maybe a recursive call to be ignored. + + if (node->subStatement) + return; + + // To support nested views, loop until we hit a table or a view with user-defined triggers + // (which means no update). + + jrd_rel* parent = NULL; + jrd_rel* view = NULL; + USHORT parentStream = 0; + + for (;;) + { + USHORT newStream = node->stream; + const USHORT stream = newStream; + + CompilerScratch::csb_repeat* tail = &csb->csb_rpt[stream]; + tail->csb_flags |= csb_erase; + + jrd_rel* relation = csb->csb_rpt[stream].csb_relation; + view = relation->rel_view_rse ? relation : view; + + if (!parent) + parent = tail->csb_view; + + CMP_post_trigger_access(csb, relation, ExternalAccess::exa_delete, view); + + // Check out delete. If this is a delete thru a view, verify the view by checking for read + // access on the base table. If field-level select privileges are implemented, this needs + // to be enhanced. + + SecurityClass::flags_t priv = SCL_sql_delete; + + if (parent) + priv |= SCL_read; + + const trig_vec* trigger = relation->rel_pre_erase ? + relation->rel_pre_erase : relation->rel_post_erase; + + // If we have a view with triggers, let's expand it. + + if (relation->rel_view_rse && trigger) + { + newStream = csb->nextStream(); + node->stream = newStream; + CMP_csb_element(csb, newStream)->csb_relation = relation; + + node->statement = CMP_pass1_expand_view(tdbb, csb, stream, newStream, false); + } + + // Get the source relation, either a table or yet another view. + + RelationSourceNode* source = CMP_pass1_update(tdbb, csb, relation, trigger, stream, + newStream, priv, parent, parentStream); + + if (!source) + return; // no source means we're done + + parent = relation; + parentStream = stream; + + // Remap the source stream. + + UCHAR* map = csb->csb_rpt[stream].csb_map; + + if (trigger) + { + // ASF: This code is responsible to make view's WITH CHECK OPTION to work as constraints. + // I don't see how it could run for delete statements under normal conditions. + + // Set up the new target stream. + + EraseNode* viewNode = FB_NEW(*tdbb->getDefaultPool()) EraseNode(*tdbb->getDefaultPool()); + viewNode->stream = node->stream; + + node->subStatement = PAR_make_node(tdbb, 1); + node->subStatement->nod_type = nod_class_stmtnode_jrd; + node->subStatement->nod_count = 0; + node->subStatement->nod_arg[0] = reinterpret_cast<jrd_nod*>(viewNode); + + // Substitute the original delete node with the newly created one. + node = viewNode; + } + else + { + // This relation is not actually being updated as this operation + // goes deeper (we have a naturally updatable view). + csb->csb_rpt[newStream].csb_flags &= ~csb_view_update; + } + + // Let's reset the target stream. + newStream = source->getStream(); + node->stream = map[newStream]; + } +} + +EraseNode* EraseNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + statement = CMP_pass2(tdbb, csb, statement, node); + subStatement = CMP_pass2(tdbb, csb, subStatement, node); + + node->nod_impure = CMP_impure(csb, sizeof(SLONG)); + csb->csb_rpt[stream].csb_flags |= csb_update; + + return this; +} + +const jrd_nod* EraseNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const +{ + const jrd_nod* retNode; + + if (request->req_operation == jrd_req::req_unwind) + retNode = node->nod_parent; + else if (request->req_operation == jrd_req::req_return && subStatement) + { + if (!exeState->topNode) + { + exeState->topNode = node; + exeState->whichEraseTrig = PRE_TRIG; + } + + exeState->prevNode = node; + retNode = erase(tdbb, request, exeState->whichEraseTrig); + + if (exeState->whichEraseTrig == PRE_TRIG) + { + retNode = subStatement; + fb_assert(retNode->nod_parent == node); + ///retNode->nod_parent = exeState->prevNode; + } + + if (exeState->topNode == node && exeState->whichEraseTrig == POST_TRIG) + { + exeState->topNode = NULL; + exeState->whichEraseTrig = ALL_TRIGS; + } + else + request->req_operation = jrd_req::req_evaluate; + } + else + { + exeState->prevNode = node; + retNode = erase(tdbb, request, ALL_TRIGS); + + if (!subStatement && exeState->whichEraseTrig == PRE_TRIG) + exeState->whichEraseTrig = POST_TRIG; + } + + return retNode; +} + +// Perform erase operation. +const jrd_nod* EraseNode::erase(thread_db* tdbb, jrd_req* request, WhichTrigger whichTrig) const +{ + Jrd::Attachment* attachment = tdbb->getAttachment(); + jrd_tra* transaction = request->req_transaction; + record_param* rpb = &request->req_rpb[stream]; + jrd_rel* relation = rpb->rpb_relation; + + if (rpb->rpb_number.isBof() || (!relation->rel_view_rse && !rpb->rpb_number.isValid())) + ERR_post(Arg::Gds(isc_no_cur_rec)); + + switch (request->req_operation) + { + case jrd_req::req_evaluate: + { + request->req_records_affected.bumpModified(false); + + if (!statement) + break; + + const Format* format = MET_current(tdbb, rpb->rpb_relation); + Record* record = VIO_record(tdbb, rpb, format, tdbb->getDefaultPool()); + + rpb->rpb_address = record->rec_data; + rpb->rpb_length = format->fmt_length; + rpb->rpb_format_number = format->fmt_version; + + return statement; + } + + case jrd_req::req_return: + break; + + default: + return node->nod_parent; + } + + request->req_operation = jrd_req::req_return; + RLCK_reserve_relation(tdbb, transaction, relation, true); + + // If the stream was sorted, the various fields in the rpb are probably junk. + // Just to make sure that everything is cool, refetch and release the record. + + if (rpb->rpb_stream_flags & RPB_s_refetch) + { + VIO_refetch_record(tdbb, rpb, transaction); + rpb->rpb_stream_flags &= ~RPB_s_refetch; + } + + if (transaction != attachment->getSysTransaction()) + ++transaction->tra_save_point->sav_verb_count; + + // Handle pre-operation trigger. + EXE_PreModifyEraseTriggers(tdbb, &relation->rel_pre_erase, whichTrig, rpb, NULL, + jrd_req::req_trigger_delete); + + if (relation->rel_file) + EXT_erase(rpb, transaction); + else if (relation->isVirtual()) + VirtualTable::erase(tdbb, rpb); + else if (!relation->rel_view_rse) + VIO_erase(tdbb, rpb, transaction); + + // Handle post operation trigger. + if (relation->rel_post_erase && whichTrig != PRE_TRIG) + { + EXE_execute_triggers(tdbb, &relation->rel_post_erase, rpb, NULL, + jrd_req::req_trigger_delete, POST_TRIG); + } + + // Call IDX_erase (which checks constraints) after all post erase triggers have fired. + // This is required for cascading referential integrity, which can be implemented as + // post_erase triggers. + + if (!relation->rel_file && !relation->rel_view_rse && !relation->isVirtual()) + { + jrd_rel* badRelation = NULL; + USHORT badIndex; + + const idx_e errorCode = IDX_erase(tdbb, rpb, transaction, &badRelation, &badIndex); + + if (errorCode) + ERR_duplicate_error(errorCode, badRelation, badIndex); + } + + // CVC: Increment the counter only if we called VIO/EXT_erase() and we were successful. + if (!(request->req_view_flags & req_first_erase_return)) + { + request->req_view_flags |= req_first_erase_return; + if (relation->rel_view_rse) + request->req_top_view_erase = relation; + } + + if (relation == request->req_top_view_erase) + { + if (whichTrig == ALL_TRIGS || whichTrig == POST_TRIG) + { + request->req_records_deleted++; + request->req_records_affected.bumpModified(true); + } + } + else if (relation->rel_file || !relation->rel_view_rse) + { + request->req_records_deleted++; + request->req_records_affected.bumpModified(true); + } + + if (transaction != attachment->getSysTransaction()) + --transaction->tra_save_point->sav_verb_count; + + rpb->rpb_number.setValid(false); + + return node->nod_parent; +} + + +//-------------------- + + +static RegisterNode<ErrorHandlerNode> regErrorHandlerNode(blr_error_handler); + +DmlNode* ErrorHandlerNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + ErrorHandlerNode* node = FB_NEW(pool) ErrorHandlerNode(pool); + + const USHORT n = csb->csb_blr_reader.getWord(); + node->conditions = FB_NEW_RPT(*tdbb->getDefaultPool(), n) PsqlException(); + node->conditions->xcp_count = n; + + for (unsigned i = 0; i < n; i++) + { + const USHORT codeType = csb->csb_blr_reader.getByte(); + xcp_repeat& item = node->conditions->xcp_rpt[i]; + + switch (codeType) + { + case blr_sql_code: + item.xcp_type = xcp_sql_code; + item.xcp_code = (SSHORT) csb->csb_blr_reader.getWord(); + break; + + case blr_gds_code: + { + string name; + item.xcp_type = xcp_gds_code; + PAR_name(csb, name); + name.lower(); + SLONG codeNumber = PAR_symbol_to_gdscode(name); + if (codeNumber) + item.xcp_code = codeNumber; + else + PAR_error(csb, Arg::Gds(isc_codnotdef) << Arg::Str(name)); + break; + } + + case blr_exception: + { + MetaName name; + item.xcp_type = xcp_xcp_code; + PAR_name(csb, name); + if (!(item.xcp_code = MET_lookup_exception_number(tdbb, name))) + PAR_error(csb, Arg::Gds(isc_xcpnotdef) << Arg::Str(name)); + + CompilerScratch::Dependency dependency(obj_exception); + dependency.number = item.xcp_code; + csb->csb_dependencies.push(dependency); + break; + } + + case blr_default_code: + item.xcp_type = xcp_default; + item.xcp_code = 0; + break; + + default: + fb_assert(FALSE); + break; + } + } + + node->action = PAR_parse_node(tdbb, csb, STATEMENT); + + return node; +} + +ErrorHandlerNode* ErrorHandlerNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void ErrorHandlerNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "ErrorHandlerNode"; +} + +void ErrorHandlerNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +ErrorHandlerNode* ErrorHandlerNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + action = CMP_pass1(tdbb, csb, action); + return this; +} + +ErrorHandlerNode* ErrorHandlerNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + action = CMP_pass2(tdbb, csb, action, node); + return this; +} + +const jrd_nod* ErrorHandlerNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* exeState) const +{ + if ((request->req_flags & req_error_handler) && !exeState->errorPending) + { + fb_assert(request->req_caller == exeState->oldRequest); + request->req_caller = NULL; + return node; + } + + const jrd_nod* retNode = node->nod_parent; + retNode = retNode->nod_parent; + + if (request->req_operation == jrd_req::req_unwind) + retNode = retNode->nod_parent; + + request->req_last_xcp.clear(); + + return retNode; +} + + +//-------------------- + + +static RegisterNode<ExecProcedureNode> regExecProcedureNodeProc(blr_exec_proc); +static RegisterNode<ExecProcedureNode> regExecProcedureNodeProc2(blr_exec_proc2); +static RegisterNode<ExecProcedureNode> regExecProcedureNodePid(blr_exec_pid); + +// Parse an execute procedure reference. +DmlNode* ExecProcedureNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +{ + SET_TDBB(tdbb); + + jrd_prc* procedure = NULL; + QualifiedName name; + + if (blrOp == blr_exec_pid) + { + const USHORT pid = csb->csb_blr_reader.getWord(); + if (!(procedure = MET_lookup_procedure_id(tdbb, pid, false, false, 0))) + name.identifier.printf("id %d", pid); + } + else + { + if (blrOp == blr_exec_proc2) + PAR_name(csb, name.package); + PAR_name(csb, name.identifier); + procedure = MET_lookup_procedure(tdbb, name, false); + } + + if (!procedure) + PAR_error(csb, Arg::Gds(isc_prcnotdef) << Arg::Str(name.toString())); + + ExecProcedureNode* node = FB_NEW(pool) ExecProcedureNode(pool); + node->procedure = procedure; + + PAR_procedure_parms(tdbb, csb, procedure, node->inputMessage.getAddress(), + node->inputSources.getAddress(), node->inputTargets.getAddress(), true); + PAR_procedure_parms(tdbb, csb, procedure, node->outputMessage.getAddress(), + node->outputSources.getAddress(), node->outputTargets.getAddress(), false); + + CompilerScratch::Dependency dependency(obj_procedure); + dependency.procedure = procedure; + csb->csb_dependencies.push(dependency); + + return node; +} + +ExecProcedureNode* ExecProcedureNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void ExecProcedureNode::print(string& text, Array<dsql_nod*>& nodes) const +{ + text = "ExecProcedureNode"; +} + +void ExecProcedureNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +ExecProcedureNode* ExecProcedureNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + // Post access to procedure + CMP_post_procedure_access(tdbb, csb, procedure); + CMP_post_resource(&csb->csb_resources, procedure, Resource::rsc_procedure, procedure->getId()); + + if (inputSources) + inputSources = inputSources->pass1(tdbb, csb); + + if (inputTargets) + inputTargets = inputTargets->pass1(tdbb, csb); + + inputMessage = CMP_pass1(tdbb, csb, inputMessage); + + if (outputSources) + outputSources = outputSources->pass1(tdbb, csb); + + if (outputTargets) + outputTargets = outputTargets->pass1(tdbb, csb); + + outputMessage = CMP_pass1(tdbb, csb, outputMessage); + + return this; +} + +ExecProcedureNode* ExecProcedureNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + if (inputSources) + inputSources = inputSources->pass2(tdbb, csb); + + if (inputTargets) + inputTargets = inputTargets->pass2(tdbb, csb); + + inputMessage = CMP_pass2(tdbb, csb, inputMessage, node); + + if (outputSources) + outputSources = outputSources->pass2(tdbb, csb); + + if (outputTargets) + outputTargets = outputTargets->pass2(tdbb, csb); + + outputMessage = CMP_pass2(tdbb, csb, outputMessage, node); + + return this; +} + +const jrd_nod* ExecProcedureNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + if (request->req_operation == jrd_req::req_unwind) + return node->nod_parent; + + executeProcedure(tdbb, request); + + request->req_operation = jrd_req::req_return; + return node->nod_parent; +} + +// Execute a stored procedure. Begin by assigning the input parameters. +// End by assigning the output parameters. +void ExecProcedureNode::executeProcedure(thread_db* tdbb, jrd_req* request) const +{ + Jrd::Attachment* attachment = tdbb->getAttachment(); + + if (inputSources) + { + const NestConst<ValueExprNode>* const sourceEnd = inputSources->args.end(); + const NestConst<ValueExprNode>* sourcePtr = inputSources->args.begin(); + const NestConst<ValueExprNode>* targetPtr = inputTargets->args.begin(); + + for (; sourcePtr != sourceEnd; ++sourcePtr, ++targetPtr) + EXE_assignment(tdbb, *sourcePtr, *targetPtr); + } + + ULONG inMsgLength = 0; + UCHAR* inMsg = NULL; + + if (inputMessage) + { + const Format* format = (Format*) inputMessage->nod_arg[e_msg_format]; + inMsgLength = format->fmt_length; + inMsg = request->getImpure<UCHAR>(inputMessage->nod_impure); + } + + const Format* format = NULL; + ULONG outMsgLength = 0; + UCHAR* outMsg = NULL; + + if (outputMessage) + { + format = (Format*) outputMessage->nod_arg[e_msg_format]; + outMsgLength = format->fmt_length; + outMsg = request->getImpure<UCHAR>(outputMessage->nod_impure); + } + + jrd_req* procRequest = procedure->getStatement()->findRequest(tdbb); + + // trace procedure execution start + TraceProcExecute trace(tdbb, procRequest, request, inputTargets); + + Array<UCHAR> temp_buffer; + + if (!outputMessage) + { + format = (Format*) procedure->prc_output_msg->nod_arg[e_msg_format]; + outMsgLength = format->fmt_length; + outMsg = temp_buffer.getBuffer(outMsgLength + FB_DOUBLE_ALIGN - 1); + outMsg = (UCHAR*) FB_ALIGN((U_IPTR) outMsg, FB_DOUBLE_ALIGN); + } + + // Catch errors so we can unwind cleanly. + + try + { + Jrd::ContextPoolHolder context(tdbb, procRequest->req_pool); // Save the old pool. + + jrd_tra* transaction = request->req_transaction; + const SLONG savePointNumber = transaction->tra_save_point ? + transaction->tra_save_point->sav_number : 0; + + procRequest->req_timestamp = request->req_timestamp; + + EXE_start(tdbb, procRequest, transaction); + + if (inputMessage) + EXE_send(tdbb, procRequest, 0, inMsgLength, inMsg); + + EXE_receive(tdbb, procRequest, 1, outMsgLength, outMsg); + + // Clean up all savepoints started during execution of the procedure. + + if (transaction != attachment->getSysTransaction()) + { + for (const Savepoint* savePoint = transaction->tra_save_point; + savePoint && savePointNumber < savePoint->sav_number; + savePoint = transaction->tra_save_point) + { + VIO_verb_cleanup(tdbb, transaction); + } + } + } + catch (const Exception& ex) + { + const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv); + trace.finish(false, noPriv ? res_unauthorized : res_failed); + + tdbb->setRequest(request); + EXE_unwind(tdbb, procRequest); + procRequest->req_attachment = NULL; + procRequest->req_flags &= ~(req_in_use | req_proc_fetch); + procRequest->req_timestamp.invalidate(); + throw; + } + + // trace procedure execution finish + trace.finish(false, res_successful); + + EXE_unwind(tdbb, procRequest); + tdbb->setRequest(request); + + if (outputSources) + { + const NestConst<ValueExprNode>* const sourceEnd = outputSources->args.end(); + const NestConst<ValueExprNode>* sourcePtr = outputSources->args.begin(); + const NestConst<ValueExprNode>* targetPtr = outputTargets->args.begin(); + + for (; sourcePtr != sourceEnd; ++sourcePtr, ++targetPtr) + EXE_assignment(tdbb, *sourcePtr, *targetPtr); + } + + procRequest->req_attachment = NULL; + procRequest->req_flags &= ~(req_in_use | req_proc_fetch); + procRequest->req_timestamp.invalidate(); +} + + +//-------------------- + + +static RegisterNode<ExecStatementNode> regExecStatementSql(blr_exec_sql); +static RegisterNode<ExecStatementNode> regExecStatementInto(blr_exec_into); +static RegisterNode<ExecStatementNode> regExecStatementStmt(blr_exec_stmt); + +DmlNode* ExecStatementNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +{ + ExecStatementNode* node = FB_NEW(pool) ExecStatementNode(pool); + + switch (blrOp) + { + case blr_exec_sql: + node->sql = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_into: + { + const unsigned outputs = csb->csb_blr_reader.getWord(); + + node->sql = PAR_parse_value(tdbb, csb); + + if (csb->csb_blr_reader.getByte() == 0) // not singleton flag + node->innerStmt = PAR_parse_node(tdbb, csb, STATEMENT); + + node->outputs = PAR_args(tdbb, csb, outputs, outputs); + break; + } + + case blr_exec_stmt: + { + unsigned inputs = 0; + unsigned outputs = 0; + + while (true) + { + const UCHAR code = csb->csb_blr_reader.getByte(); + + switch (code) + { + case blr_exec_stmt_inputs: + inputs = csb->csb_blr_reader.getWord(); + break; + + case blr_exec_stmt_outputs: + outputs = csb->csb_blr_reader.getWord(); + break; + + case blr_exec_stmt_sql: + node->sql = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_stmt_proc_block: + node->innerStmt = PAR_parse_node(tdbb, csb, STATEMENT); + break; + + case blr_exec_stmt_data_src: + node->dataSource = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_stmt_user: + node->userName = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_stmt_pwd: + node->password = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_stmt_role: + node->role = PAR_parse_value(tdbb, csb); + break; + + case blr_exec_stmt_tran: + PAR_syntax_error(csb, "external transaction parameters"); + break; + + case blr_exec_stmt_tran_clone: + node->traScope = static_cast<EDS::TraScope>(csb->csb_blr_reader.getByte()); + break; + + case blr_exec_stmt_privs: + node->useCallerPrivs = true; + break; + + case blr_exec_stmt_in_params: + case blr_exec_stmt_in_params2: + { + node->inputs = FB_NEW(pool) ValueListNode(pool, inputs); + NestConst<ValueExprNode>* const end = node->inputs->args.end(); + + for (NestConst<ValueExprNode>* ptr = node->inputs->args.begin(); + ptr != end; + ++ptr) + { + if (code == blr_exec_stmt_in_params2) + { + string name; + + if (PAR_name(csb, name)) + { + MemoryPool& pool = csb->csb_pool; + + if (!node->inputNames) + node->inputNames = FB_NEW (pool) EDS::ParamNames(pool); + + string* newName = FB_NEW (pool) string(pool, name); + node->inputNames->add(newName); + } + } + + *ptr = PAR_parse_value(tdbb, csb); + } + + break; + } + + case blr_exec_stmt_out_params: + node->outputs = PAR_args(tdbb, csb, outputs, outputs); + break; + + case blr_end: + break; + + default: + PAR_syntax_error(csb, "unknown EXECUTE STATEMENT option"); + } + + if (code == blr_end) + break; + } + + break; + } + + default: + fb_assert(false); + } + + return node; +} + +ExecStatementNode* ExecStatementNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void ExecStatementNode::print(string& text, Array<dsql_nod*>& nodes) const +{ + text = "ExecStatementNode"; +} + +void ExecStatementNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +ExecStatementNode* ExecStatementNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + sql = CMP_pass1(tdbb, csb, sql); + dataSource = CMP_pass1(tdbb, csb, dataSource); + userName = CMP_pass1(tdbb, csb, userName); + password = CMP_pass1(tdbb, csb, password); + role = CMP_pass1(tdbb, csb, role); + + innerStmt = CMP_pass1(tdbb, csb, innerStmt); + + if (inputs) + inputs = inputs->pass1(tdbb, csb); + + if (outputs) + outputs = outputs->pass1(tdbb, csb); + + return this; +} + +ExecStatementNode* ExecStatementNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + sql = CMP_pass2(tdbb, csb, sql); + dataSource = CMP_pass2(tdbb, csb, dataSource); + userName = CMP_pass2(tdbb, csb, userName); + password = CMP_pass2(tdbb, csb, password); + role = CMP_pass2(tdbb, csb, role); + + innerStmt = CMP_pass2(tdbb, csb, innerStmt, node); + + if (inputs) + inputs = inputs->pass2(tdbb, csb); + + if (outputs) + outputs = outputs->pass2(tdbb, csb); + + node->nod_impure = CMP_impure(csb, sizeof(void**)); + + return this; +} + +const jrd_nod* ExecStatementNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + EDS::Statement** stmtPtr = request->getImpure<EDS::Statement*>(node->nod_impure); + EDS::Statement* stmt = *stmtPtr; + + if (request->req_operation == jrd_req::req_evaluate) + { + fb_assert(!*stmtPtr); + + string sSql; + getString(tdbb, request, sql, sSql); + + string sDataSrc; + getString(tdbb, request, dataSource, sDataSrc); + + string sUser; + getString(tdbb, request, userName, sUser); + + string sPwd; + getString(tdbb, request, password, sPwd); + + string sRole; + getString(tdbb, request, role, sRole); + + EDS::Connection* conn = EDS::Manager::getConnection(tdbb, sDataSrc, sUser, sPwd, sRole, traScope); + + stmt = conn->createStatement(sSql); + + EDS::Transaction* tran = EDS::Transaction::getTransaction(tdbb, stmt->getConnection(), traScope); + + stmt->bindToRequest(request, stmtPtr); + stmt->setCallerPrivileges(useCallerPrivs); + + const string* const* inpNames = inputNames ? inputNames->begin() : NULL; + stmt->prepare(tdbb, tran, sSql, inputNames != NULL); + + if (stmt->isSelectable()) + stmt->open(tdbb, tran, inpNames, inputs, !innerStmt); + else + stmt->execute(tdbb, tran, inpNames, inputs, outputs); + + request->req_operation = jrd_req::req_return; + } // jrd_req::req_evaluate + + if (request->req_operation == jrd_req::req_return || request->req_operation == jrd_req::req_sync) + { + fb_assert(stmt); + + if (stmt->isSelectable()) + { + if (stmt->fetch(tdbb, outputs)) + { + request->req_operation = jrd_req::req_evaluate; + return innerStmt; + } + + request->req_operation = jrd_req::req_return; + } + } + + if (request->req_operation == jrd_req::req_unwind) + { + const LabelNode* label = StmtNode::as<LabelNode>(node->nod_parent.getObject()); + + if (label && request->req_label == label->labelNumber && + (request->req_flags & req_continue_loop)) + { + request->req_flags &= ~req_continue_loop; + request->req_operation = jrd_req::req_sync; + return node; + } + } + + if (stmt) + stmt->close(tdbb); + + return node->nod_parent; +} + +void ExecStatementNode::getString(thread_db* tdbb, jrd_req* request, const ValueExprNode* node, + string& str) const +{ + MoveBuffer buffer; + UCHAR* p = NULL; + int len = 0; + const dsc* dsc = node ? EVL_expr(tdbb, request, node) : NULL; + + if (dsc && !(request->req_flags & req_null)) + len = MOV_make_string2(tdbb, dsc, dsc->getTextType(), &p, buffer); + + str = string((char*) p, len); + str.trim(); +} + + +//-------------------- + + static RegisterNode<IfNode> regIfNode(blr_if); @@ -155,7 +1670,7 @@ } -const jrd_nod* IfNode::execute(thread_db* tdbb, jrd_req* request) const +const jrd_nod* IfNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const { if (request->req_operation == jrd_req::req_evaluate) { @@ -243,7 +1758,7 @@ } -const jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request) const +const jrd_nod* InAutonomousTransactionNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const { Jrd::Attachment* attachment = request->req_attachment; SLONG* savNumber = request->getImpure<SLONG>(savNumberOffset); @@ -715,7 +2230,7 @@ node->parameters = PAR_args(tdbb, csb, count, count); } else if (type == blr_exception_msg) - node->messageExpr = PAR_parse_node(tdbb, csb, VALUE)->asValue(); + node->messageExpr = PAR_parse_value(tdbb, csb); return node; } @@ -802,7 +2317,7 @@ } -const jrd_nod* ExceptionNode::execute(thread_db* tdbb, jrd_req* request) const +const jrd_nod* ExceptionNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const { if (request->req_operation == jrd_req::req_evaluate) { @@ -1141,7 +2656,7 @@ return this; } -const jrd_nod* ForNode::execute(thread_db* tdbb, jrd_req* request) const +const jrd_nod* ForNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const { switch (request->req_operation) { @@ -1166,10 +2681,9 @@ case jrd_req::req_unwind: { - const jrd_nod* parent = node->nod_parent; + const LabelNode* label = StmtNode::as<LabelNode>(node->nod_parent.getObject()); - if (parent && parent->nod_type == nod_label && - request->req_label == (USHORT)(IPTR) parent->nod_arg[e_lbl_label] && + if (label && request->req_label == label->labelNumber && (request->req_flags & req_continue_loop)) { request->req_flags &= ~req_continue_loop; @@ -1193,22 +2707,695 @@ //-------------------- +static RegisterNode<HandlerNode> regHandlerNode(blr_handler); + +DmlNode* HandlerNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + HandlerNode* node = FB_NEW(pool) HandlerNode(pool); + node->statement = PAR_parse_node(tdbb, csb, STATEMENT); + return node; +} + +HandlerNode* HandlerNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void HandlerNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "HandlerNode"; +} + +void HandlerNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +HandlerNode* HandlerNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + statement = CMP_pass1(tdbb, csb, statement); + return this; +} + +HandlerNode* HandlerNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + statement = CMP_pass2(tdbb, csb, statement, node); + return this; +} + +const jrd_nod* HandlerNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const +{ + switch (request->req_operation) + { + case jrd_req::req_evaluate: + return statement; + + case jrd_req::req_unwind: + if (!request->req_label) + request->req_operation = jrd_req::req_return; + + default: + return node->nod_parent; + } +} + + +//-------------------- + + +static RegisterNode<LabelNode> regLabelNode(blr_label); + +DmlNode* LabelNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + LabelNode* node = FB_NEW(pool) LabelNode(pool); + + node->labelNumber = csb->csb_blr_reader.getByte(); + node->statement = PAR_parse_node(tdbb, csb, STATEMENT); + + return node; +} + +LabelNode* LabelNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void LabelNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "LabelNode"; +} + +void L... [truncated message content] |
From: <fir...@us...> - 2010-11-29 04:01:27
|
Revision: 51996 http://firebird.svn.sourceforge.net/firebird/?rev=51996&view=rev Author: firebirds Date: 2010-11-29 04:01:21 +0000 (Mon, 29 Nov 2010) 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 2010-11-29 02:17:04 UTC (rev 51995) +++ firebird/trunk/ChangeLog 2010-11-29 04:01:21 UTC (rev 51996) @@ -1,3 +1,50 @@ + 2010-11-29 02:17 asfernandes + M builds/win32/msvc10/engine.vcxproj + M builds/win32/msvc10/engine.vcxproj.filters + M builds/win32/msvc7/engine.vcproj + M builds/win32/msvc7/engine_classic.vcproj + M builds/win32/msvc7/engine_embed.vcproj + M builds/win32/msvc8/engine.vcproj + M builds/win32/msvc9/engine.vcproj + M src/dsql/DdlNodes.epp + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/Visitors.h + M src/dsql/parse.y + M src/dsql/pass1.cpp + M src/jrd/JrdStatement.cpp + M src/jrd/JrdStatement.h + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/exe.cpp + M src/jrd/exe.h + M src/jrd/exe_proto.h + D src/jrd/execute_statement.cpp + D src/jrd/execute_statement.h + M src/jrd/extds/ExtDS.cpp + M src/jrd/extds/ExtDS.h + M src/jrd/extds/IscDS.cpp + M src/jrd/extds/IscDS.h + M src/jrd/inf.cpp + M src/jrd/nod.h + M src/jrd/par.cpp + M src/jrd/par_proto.h + M src/misc/blrtable.cpp +Refactored the support for blr_handler, blr_loop, blr_exec_sql, blr_exec_into, blr_exec_stmt, +blr_start_savepoint, blr_end_savepoint, blr_store, blr_store2, blr_erase, blr_modify, +blr_modify2, blr_exec_proc, blr_exec_proc2, blr_exec_pid, blr_dcl_cursor, blr_cursor_stmt, +blr_set_generator, blr_receive, blr_stall, blr_select, blr_block, blr_error_handler, +blr_label, blr_leave, blr_continue and the source info node. + + 2010-11-28 18:53 skidder + M src/jrd/pag.cpp +Port fix for frequent random lock conflict errors from RDB 2.1 + + 2010-11-28 14:56 asfernandes + M src/jrd/extds/InternalDS.cpp +Fixed segfault after EXECUTE STATEMENT with invalid SQL + 2010-11-27 13:54 asfernandes M src/auth/SecurityDatabase/pwd.cpp Misc Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-29 02:17:04 UTC (rev 51995) +++ firebird/trunk/src/jrd/build_no.h 2010-11-29 04:01:21 UTC (rev 51996) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28923 + FORMAL BUILD NUMBER:28926 */ -#define PRODUCT_VER_STRING "3.0.0.28923" -#define FILE_VER_STRING "WI-T3.0.0.28923" -#define LICENSE_VER_STRING "WI-T3.0.0.28923" -#define FILE_VER_NUMBER 3, 0, 0, 28923 +#define PRODUCT_VER_STRING "3.0.0.28926" +#define FILE_VER_STRING "WI-T3.0.0.28926" +#define LICENSE_VER_STRING "WI-T3.0.0.28926" +#define FILE_VER_NUMBER 3, 0, 0, 28926 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28923" +#define FB_BUILD_NO "28926" #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 2010-11-29 02:17:04 UTC (rev 51995) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-29 04:01:21 UTC (rev 51996) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28923 +BuildNum=28926 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...> - 2010-11-30 04:06:12
|
Revision: 52004 http://firebird.svn.sourceforge.net/firebird/?rev=52004&view=rev Author: firebirds Date: 2010-11-30 04:06:03 +0000 (Tue, 30 Nov 2010) 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 2010-11-29 16:02:13 UTC (rev 52003) +++ firebird/trunk/ChangeLog 2010-11-30 04:06:03 UTC (rev 52004) @@ -1,3 +1,17 @@ + 2010-11-29 15:06 hvlad + M src/remote/server/os/win32/srvr_w32.cpp + M src/remote/server/os/win32/window.cpp +Fixed bug CORE-3266 : Race condition between async service detach request and running user trace service + + 2010-11-29 14:54 asfernandes + M src/dsql/StmtNodes.cpp + M src/dsql/Visitors.h + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/exe.cpp + M src/jrd/exe_proto.h +Move some previously static functions to StmtNodes.cpp + 2010-11-29 02:17 asfernandes M builds/win32/msvc10/engine.vcxproj M builds/win32/msvc10/engine.vcxproj.filters Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-29 16:02:13 UTC (rev 52003) +++ firebird/trunk/src/jrd/build_no.h 2010-11-30 04:06:03 UTC (rev 52004) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28926 + FORMAL BUILD NUMBER:28928 */ -#define PRODUCT_VER_STRING "3.0.0.28926" -#define FILE_VER_STRING "WI-T3.0.0.28926" -#define LICENSE_VER_STRING "WI-T3.0.0.28926" -#define FILE_VER_NUMBER 3, 0, 0, 28926 +#define PRODUCT_VER_STRING "3.0.0.28928" +#define FILE_VER_STRING "WI-T3.0.0.28928" +#define LICENSE_VER_STRING "WI-T3.0.0.28928" +#define FILE_VER_NUMBER 3, 0, 0, 28928 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28926" +#define FB_BUILD_NO "28928" #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 2010-11-29 16:02:13 UTC (rev 52003) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-11-30 04:06:03 UTC (rev 52004) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28926 +BuildNum=28928 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...> - 2010-12-01 03:53:56
|
Revision: 52010 http://firebird.svn.sourceforge.net/firebird/?rev=52010&view=rev Author: firebirds Date: 2010-12-01 03:53:48 +0000 (Wed, 01 Dec 2010) 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 2010-11-30 15:11:42 UTC (rev 52009) +++ firebird/trunk/ChangeLog 2010-12-01 03:53:48 UTC (rev 52010) @@ -1,3 +1,15 @@ + 2010-11-30 15:11 asfernandes + M src/dsql/ExprNodes.cpp +Improvement CORE-3234 - Support for text BLOBs >= 32K as first argument for TRIM() + + 2010-11-30 09:16 alexpeshkoff + M src/yvalve/why.cpp +Use huge timeout instead none as suggested by Vlad + + 2010-11-30 08:57 alexpeshkoff + M builds/posix/make.rules +Make it work with long paths, when ":" is placed on the second line of file + 2010-11-29 15:06 hvlad M src/remote/server/os/win32/srvr_w32.cpp M src/remote/server/os/win32/window.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-11-30 15:11:42 UTC (rev 52009) +++ firebird/trunk/src/jrd/build_no.h 2010-12-01 03:53:48 UTC (rev 52010) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28928 + FORMAL BUILD NUMBER:28931 */ -#define PRODUCT_VER_STRING "3.0.0.28928" -#define FILE_VER_STRING "WI-T3.0.0.28928" -#define LICENSE_VER_STRING "WI-T3.0.0.28928" -#define FILE_VER_NUMBER 3, 0, 0, 28928 +#define PRODUCT_VER_STRING "3.0.0.28931" +#define FILE_VER_STRING "WI-T3.0.0.28931" +#define LICENSE_VER_STRING "WI-T3.0.0.28931" +#define FILE_VER_NUMBER 3, 0, 0, 28931 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28928" +#define FB_BUILD_NO "28931" #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 2010-11-30 15:11:42 UTC (rev 52009) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-01 03:53:48 UTC (rev 52010) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28928 +BuildNum=28931 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...> - 2010-12-03 03:36:07
|
Revision: 52019 http://firebird.svn.sourceforge.net/firebird/?rev=52019&view=rev Author: firebirds Date: 2010-12-03 03:36:00 +0000 (Fri, 03 Dec 2010) 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 2010-12-02 19:54:33 UTC (rev 52018) +++ firebird/trunk/ChangeLog 2010-12-03 03:36:00 UTC (rev 52019) @@ -1,3 +1,11 @@ + 2010-12-02 19:54 dimitr + M src/yvalve/gds.cpp +InitPrefix::init() should never throw, it leads to the infinite recursion with a stack overflow. + + 2010-12-01 16:20 alexpeshkoff + M builds/posix/Makefile.in +Fixed build without --with-system-editline switch + 2010-11-30 15:11 asfernandes M src/dsql/ExprNodes.cpp Improvement CORE-3234 - Support for text BLOBs >= 32K as first argument for TRIM() Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-02 19:54:33 UTC (rev 52018) +++ firebird/trunk/src/jrd/build_no.h 2010-12-03 03:36:00 UTC (rev 52019) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28931 + FORMAL BUILD NUMBER:28933 */ -#define PRODUCT_VER_STRING "3.0.0.28931" -#define FILE_VER_STRING "WI-T3.0.0.28931" -#define LICENSE_VER_STRING "WI-T3.0.0.28931" -#define FILE_VER_NUMBER 3, 0, 0, 28931 +#define PRODUCT_VER_STRING "3.0.0.28933" +#define FILE_VER_STRING "WI-T3.0.0.28933" +#define LICENSE_VER_STRING "WI-T3.0.0.28933" +#define FILE_VER_NUMBER 3, 0, 0, 28933 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28931" +#define FB_BUILD_NO "28933" #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 2010-12-02 19:54:33 UTC (rev 52018) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-03 03:36:00 UTC (rev 52019) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28931 +BuildNum=28933 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...> - 2010-12-04 22:15:15
|
Revision: 52024 http://firebird.svn.sourceforge.net/firebird/?rev=52024&view=rev Author: asfernandes Date: 2010-12-04 22:15:03 +0000 (Sat, 04 Dec 2010) Log Message: ----------- Finish the statements refactor in the engine. Get rid of jrd_nod. Modified Paths: -------------- firebird/trunk/builds/mac_os_x/CS/CS.pbproj/project.pbxproj firebird/trunk/builds/posix/Makefile.in firebird/trunk/builds/posix/make.defaults firebird/trunk/builds/posix/make.shared.targets firebird/trunk/builds/posix/make.shared.variables firebird/trunk/builds/win32/clean_all.bat firebird/trunk/builds/win32/make_boot.bat firebird/trunk/builds/win32/msvc7/engine.vcproj firebird/trunk/builds/win32/msvc7/engine_classic.vcproj firebird/trunk/builds/win32/msvc7/engine_embed.vcproj firebird/trunk/builds/win32/msvc8/engine.vcproj firebird/trunk/builds/win32/msvc9/engine.vcproj firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/AggNodes.cpp firebird/trunk/src/dsql/BoolNodes.cpp firebird/trunk/src/dsql/BoolNodes.h firebird/trunk/src/dsql/ExprNodes.cpp firebird/trunk/src/dsql/ExprNodes.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/dsql/StmtNodes.h firebird/trunk/src/dsql/Visitors.h firebird/trunk/src/dsql/WinNodes.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/Attachment.h firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/Function.epp firebird/trunk/src/jrd/JrdStatement.cpp firebird/trunk/src/jrd/JrdStatement.h firebird/trunk/src/jrd/RecordSourceNodes.cpp firebird/trunk/src/jrd/RecordSourceNodes.h firebird/trunk/src/jrd/Relation.h firebird/trunk/src/jrd/btr.h firebird/trunk/src/jrd/cmp.cpp firebird/trunk/src/jrd/cmp_proto.h firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/evl.cpp firebird/trunk/src/jrd/exe.cpp firebird/trunk/src/jrd/exe.h firebird/trunk/src/jrd/exe_proto.h firebird/trunk/src/jrd/ext_proto.h firebird/trunk/src/jrd/extds/ExtDS.cpp firebird/trunk/src/jrd/extds/ExtDS.h firebird/trunk/src/jrd/inf.cpp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/jrd.h firebird/trunk/src/jrd/lls.h firebird/trunk/src/jrd/met.epp firebird/trunk/src/jrd/met_proto.h firebird/trunk/src/jrd/opt_proto.h firebird/trunk/src/jrd/par.cpp firebird/trunk/src/jrd/par_proto.h firebird/trunk/src/jrd/pcmet.epp firebird/trunk/src/jrd/recsrc/ProcedureScan.cpp firebird/trunk/src/jrd/recsrc/RecordSource.h firebird/trunk/src/jrd/req.h firebird/trunk/src/jrd/rse.h firebird/trunk/src/jrd/trace/TraceObjects.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Removed Paths: ------------- firebird/trunk/builds/win32/blrtable.bat firebird/trunk/src/jrd/nod.h firebird/trunk/src/misc/blrtable.cpp Modified: firebird/trunk/builds/mac_os_x/CS/CS.pbproj/project.pbxproj =================================================================== --- firebird/trunk/builds/mac_os_x/CS/CS.pbproj/project.pbxproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/mac_os_x/CS/CS.pbproj/project.pbxproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -1951,11 +1951,6 @@ path = autoconfig_msvc.h; refType = 4; }; - F616C4560200B0CF01EF0ADE = { - isa = PBXFileReference; - path = blrtable.h; - refType = 4; - }; F616C4580200B0CF01EF0ADE = { isa = PBXFileReference; path = codetext.h; @@ -3801,16 +3796,6 @@ path = blr.h; refType = 4; }; - F616C5820200B0CF01EF0ADE = { - isa = PBXFileReference; - path = blrtable.cpp; - refType = 4; - }; - F616C5830200B0CF01EF0ADE = { - isa = PBXFileReference; - path = blrtable.h; - refType = 4; - }; F616C5860200B0CF01EF0ADE = { children = ( F616C5870200B0CF01EF0ADE, Modified: firebird/trunk/builds/posix/Makefile.in =================================================================== --- firebird/trunk/builds/posix/Makefile.in 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/posix/Makefile.in 2010-12-04 22:15:03 UTC (rev 52024) @@ -145,7 +145,7 @@ # gpre_boot # -boot: $(GPRE_BOOT) $(SRC_ROOT)/include/gen/blrtable.h +boot: $(GPRE_BOOT) $(GPRE_BOOT): $(GPRE_Boot_Objects) $(COMMON_LIB) $(STATICEXE_LINK) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(LINK_LIBS) @@ -554,7 +554,6 @@ -$(RM) $(GEN_ROOT)/examples/Make* $(RM) $(ROOT)/Makefile $(RM) $(SRC_ROOT)/include/gen/autoconfig.h - $(RM) $(SRC_ROOT)/include/gen/blrtable.h clean_gpre_gen: -$(RM) -f `find $(TMP_ROOT)/ -type f -name '*.cpp' -print` Modified: firebird/trunk/builds/posix/make.defaults =================================================================== --- firebird/trunk/builds/posix/make.defaults 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/posix/make.defaults 2010-12-04 22:15:03 UTC (rev 52024) @@ -200,9 +200,7 @@ # From jrd -BLRTABLE = $(BIN)/blrtable$(EXEC_EXT) - # The firebird shared library name # SD: This name is also hard-coded in builds/install/.../linux/classic scripts. # Scold me, but I don't want library names to be in configure.in Modified: firebird/trunk/builds/posix/make.shared.targets =================================================================== --- firebird/trunk/builds/posix/make.shared.targets 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/posix/make.shared.targets 2010-12-04 22:15:03 UTC (rev 52024) @@ -57,17 +57,9 @@ #$(SRC_ROOT)/qli/meta.cpp $(SRC_ROOT)/qli/proc.cpp $(SRC_ROOT)/qli/show.cpp: yachts.lnk #$(SRC_ROOT)/qli/help.cpp: help.fdb -# Explicit dependencies on generated header -$(OBJ)/jrd/par.o: $(SRC_ROOT)/include/gen/blrtable.h - # Explicit dependence on generated header (parser) $(OBJ)/dsql/Parser.o $(OBJ)/yvalve/keywords.o $(OBJ)/dsql/dsql.o: $(SRC_ROOT)/include/gen/parse.h -$(OBJ)/dsql/AggNodes.o: $(SRC_ROOT)/include/gen/blrtable.h -$(OBJ)/dsql/ExprNodes.o: $(SRC_ROOT)/include/gen/blrtable.h -$(OBJ)/dsql/StmtNodes.o: $(SRC_ROOT)/include/gen/blrtable.h -$(OBJ)/dsql/WinNodes.o: $(SRC_ROOT)/include/gen/blrtable.h - # Special cases for building cpp from epp $(OBJ)/dsql/metd.cpp: $(SRC_ROOT)/dsql/metd.epp $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ @@ -78,13 +70,6 @@ $(OBJ)/dsql/PackageNodes.cpp: $(SRC_ROOT)/dsql/PackageNodes.epp $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ -# Rebuild blrtable.h -$(SRC_ROOT)/include/gen/blrtable.h: $(BLRTABLE) - $(BLRTABLE) > $(SRC_ROOT)/include/gen/blrtable.h - -$(BLRTABLE): $(BLRTABLE_Objects) - $(STATICEXE_LINK) $(LINK_OPTS) $^ -o $@ -L$(LIB) $(LINK_LIBS) - # Adding resources as prerequisite for some files $(FilesToAddVersionInfo): $(GEN_ROOT)/jrd/version.res Modified: firebird/trunk/builds/posix/make.shared.variables =================================================================== --- firebird/trunk/builds/posix/make.shared.variables 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/posix/make.shared.variables 2010-12-04 22:15:03 UTC (rev 52024) @@ -192,9 +192,3 @@ BUILD_Objects:= $(call makeObjects,msgs,build_file.epp) AllObjects += $(BUILD_Objects) - - -# BLR -BLRTABLE_Objects = $(call makeObjects,misc,blrtable.cpp) - -AllObjects += $(BLRTABLE_Objects) Deleted: firebird/trunk/builds/win32/blrtable.bat =================================================================== --- firebird/trunk/builds/win32/blrtable.bat 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/blrtable.bat 2010-12-04 22:15:03 UTC (rev 52024) @@ -1,19 +0,0 @@ -@echo off - -@cl -Ob2iytp -Gs -DWIN95 -W3 -G4 -Gd -MD -I..\..\src\include -I..\..\src\include\gen -DSUPERSERVER -DNOMSG -D_X86_=1 -DWIN32 -DI386 ..\..\src\misc\blrtable.cpp > blrtable_%FB_TARGET_PLATFORM%.log 2>&1 -@if errorlevel 1 goto :ERROR -@blrtable.exe > blrtable.h -@copy blrtable.h ..\..\src\include\gen\blrtable.h > nul -@del blrtable.exe -@del blrtable.obj -@del blrtable.h - -goto :EOF - - -:ERROR -@echo. -@echo A compiler error occurred. -@echo. -goto :EOF - Modified: firebird/trunk/builds/win32/clean_all.bat =================================================================== --- firebird/trunk/builds/win32/clean_all.bat 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/clean_all.bat 2010-12-04 22:15:03 UTC (rev 52024) @@ -45,7 +45,6 @@ if defined FB_CLEAN_SHARED ( @echo Cleaning shared gen and dsql files... @del %FB_ROOT_PATH%\src\include\gen\autoconfig.h 2>nul -@del %FB_ROOT_PATH%\src\include\gen\blrtable.h 2>nul @del %FB_ROOT_PATH%\src\dsql\dsql.tab.h 2>nul @del %FB_ROOT_PATH%\src\dsql\parse.cpp 2>nul ) Modified: firebird/trunk/builds/win32/make_boot.bat =================================================================== --- firebird/trunk/builds/win32/make_boot.bat 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/make_boot.bat 2010-12-04 22:15:03 UTC (rev 52024) @@ -44,11 +44,6 @@ if "%ERRLEV%"=="1" goto :END ::======= -@echo. -@echo Building BLR Table -@call blrtable.bat - -::======= call :gpre_boot if "%ERRLEV%"=="1" goto :END Modified: firebird/trunk/builds/win32/msvc7/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine.vcproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/msvc7/engine.vcproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -279,8 +279,6 @@ </File> <File RelativePath="..\..\..\src\jrd\BlrReader.h"> </File> - <File RelativePath="..\..\..\src\include\gen\blrtable.h"> - </File> <File RelativePath="..\..\..\src\jrd\btn.h"> </File> <File RelativePath="..\..\..\src\jrd\btr.h"> Modified: firebird/trunk/builds/win32/msvc7/engine_classic.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine_classic.vcproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/msvc7/engine_classic.vcproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -279,8 +279,6 @@ </File> <File RelativePath="..\..\..\src\jrd\BlrReader.h"> </File> - <File RelativePath="..\..\..\src\include\gen\blrtable.h"> - </File> <File RelativePath="..\..\..\src\jrd\btn.h"> </File> <File RelativePath="..\..\..\src\jrd\btr.h"> Modified: firebird/trunk/builds/win32/msvc7/engine_embed.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc7/engine_embed.vcproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/msvc7/engine_embed.vcproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -279,8 +279,6 @@ </File> <File RelativePath="..\..\..\src\jrd\BlrReader.h"> </File> - <File RelativePath="..\..\..\src\include\gen\blrtable.h"> - </File> <File RelativePath="..\..\..\src\jrd\btn.h"> </File> <File RelativePath="..\..\..\src\jrd\btr.h"> Modified: firebird/trunk/builds/win32/msvc8/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/engine.vcproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/msvc8/engine.vcproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -912,10 +912,6 @@ > </File> <File - RelativePath="..\..\..\src\include\gen\blrtable.h" - > - </File> - <File RelativePath="..\..\..\src\dsql\BlrWriter.h" > </File> Modified: firebird/trunk/builds/win32/msvc9/engine.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/engine.vcproj 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/builds/win32/msvc9/engine.vcproj 2010-12-04 22:15:03 UTC (rev 52024) @@ -912,10 +912,6 @@ > </File> <File - RelativePath="..\..\..\src\include\gen\blrtable.h" - > - </File> - <File RelativePath="..\..\..\src\dsql\BlrWriter.h" > </File> Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2010-12-04 22:15:03 UTC (rev 52024) @@ -1454,6 +1454,8 @@ PARAMETER (GDS__request_outdated = 335545020) INTEGER*4 GDS__bad_events_handle PARAMETER (GDS__bad_events_handle = 335545021) + INTEGER*4 GDS__cannot_copy_stmt + PARAMETER (GDS__cannot_copy_stmt = 335545022) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/lang_helpers/gds_codes.pas 2010-12-04 22:15:03 UTC (rev 52024) @@ -734,6 +734,7 @@ gds_private_procedure = 335545019; gds_request_outdated = 335545020; gds_bad_events_handle = 335545021; + gds_cannot_copy_stmt = 335545022; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/dsql/AggNodes.cpp =================================================================== --- firebird/trunk/src/dsql/AggNodes.cpp 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/AggNodes.cpp 2010-12-04 22:15:03 UTC (rev 52024) @@ -46,8 +46,6 @@ using namespace Firebird; using namespace Jrd; -#include "gen/blrtable.h" - namespace Jrd { Modified: firebird/trunk/src/dsql/BoolNodes.cpp =================================================================== --- firebird/trunk/src/dsql/BoolNodes.cpp 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/BoolNodes.cpp 2010-12-04 22:15:03 UTC (rev 52024) @@ -45,8 +45,6 @@ using namespace Firebird; using namespace Jrd; -#include "gen/blrtable.h" - namespace Jrd { @@ -140,7 +138,7 @@ addChildNode(dsqlArg2, arg2); } -BoolExprNode* BinaryBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +DmlNode* BinaryBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) { BinaryBoolNode* node = FB_NEW(pool) BinaryBoolNode(pool, blrOp); node->arg1 = PAR_parse_boolean(tdbb, csb); @@ -351,7 +349,7 @@ addChildNode(dsqlArg3, arg3); } -BoolExprNode* ComparativeBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +DmlNode* ComparativeBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) { ComparativeBoolNode* node = FB_NEW(pool) ComparativeBoolNode(pool, blrOp); @@ -586,7 +584,7 @@ break; } - arg1 = CMP_pass1(tdbb, csb, arg1); + doPass1(tdbb, csb, arg1.getAddress()); if (invariantCheck) { @@ -595,11 +593,9 @@ csb->csb_current_nodes.push(this); } - arg2 = CMP_pass1(tdbb, csb, arg2); + doPass1(tdbb, csb, arg2.getAddress()); + doPass1(tdbb, csb, arg3.getAddress()); - if (arg3) - arg3 = CMP_pass1(tdbb, csb, arg3); - if (invariantCheck) { csb->csb_current_nodes.pop(); @@ -1347,7 +1343,7 @@ addChildNode(dsqlArg, arg); } -BoolExprNode* MissingBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +DmlNode* MissingBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) { MissingBoolNode* node = FB_NEW(pool) MissingBoolNode(pool); node->arg = PAR_parse_value(tdbb, csb); @@ -1429,7 +1425,7 @@ addChildNode(dsqlArg, arg); } -BoolExprNode* NotBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +DmlNode* NotBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) { NotBoolNode* node = FB_NEW(pool) NotBoolNode(pool); node->arg = PAR_parse_boolean(tdbb, csb); @@ -1625,7 +1621,7 @@ addChildNode(dsqlRse, rse); } -BoolExprNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +DmlNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) { RseBoolNode* node = FB_NEW(pool) RseBoolNode(pool, blrOp); node->rse = PAR_rse(tdbb, csb); @@ -1698,7 +1694,10 @@ { BoolExprNode* newNode = convertNeqAllToNotAny(tdbb, csb); if (newNode) - return CMP_pass1(tdbb, csb, newNode); + { + doPass1(tdbb, csb, &newNode); + return newNode; + } nodFlags |= FLAG_DEOPTIMIZE; } Modified: firebird/trunk/src/dsql/BoolNodes.h =================================================================== --- firebird/trunk/src/dsql/BoolNodes.h 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/BoolNodes.h 2010-12-04 22:15:03 UTC (rev 52024) @@ -37,7 +37,7 @@ public: BinaryBoolNode(MemoryPool& pool, UCHAR aBlrOp, dsql_nod* aArg1 = NULL, dsql_nod* aArg2 = NULL); - static BoolExprNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); @@ -75,7 +75,7 @@ ComparativeBoolNode(MemoryPool& pool, UCHAR aBlrOp, dsql_nod* aArg1 = NULL, dsql_nod* aArg2 = NULL, dsql_nod* aArg3 = NULL); - static BoolExprNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); @@ -122,7 +122,7 @@ public: MissingBoolNode(MemoryPool& pool, dsql_nod* aArg = NULL); - static BoolExprNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); @@ -149,7 +149,7 @@ public: NotBoolNode(MemoryPool& pool, dsql_nod* aArg = NULL); - static BoolExprNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); @@ -178,7 +178,7 @@ public: RseBoolNode(MemoryPool& pool, UCHAR aBlrOp, dsql_nod* aDsqlRse = NULL); - static BoolExprNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); Modified: firebird/trunk/src/dsql/ExprNodes.cpp =================================================================== --- firebird/trunk/src/dsql/ExprNodes.cpp 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/ExprNodes.cpp 2010-12-04 22:15:03 UTC (rev 52024) @@ -25,6 +25,7 @@ #include "../common/classes/VaryStr.h" #include "../dsql/ExprNodes.h" #include "../dsql/BoolNodes.h" +#include "../dsql/StmtNodes.h" #include "../dsql/node.h" #include "../jrd/align.h" #include "../jrd/blr.h" @@ -59,8 +60,6 @@ using namespace Firebird; using namespace Jrd; -#include "gen/blrtable.h" - namespace Jrd { @@ -115,18 +114,6 @@ reinterpret_cast<ExprNode*>(node->nod_arg[0]) : NULL; } -const ExprNode* ExprNode::fromLegacy(const jrd_nod* node) -{ - return node && node->nod_type == nod_class_exprnode_jrd ? - reinterpret_cast<const ExprNode*>(node->nod_arg[0]) : NULL; -} - -ExprNode* ExprNode::fromLegacy(jrd_nod* node) -{ - return node && node->nod_type == nod_class_exprnode_jrd ? - reinterpret_cast<ExprNode*>(node->nod_arg[0]) : NULL; -} - bool ExprNode::dsqlVisit(ConstDsqlNodeVisitor& visitor) { bool ret = false; @@ -149,7 +136,6 @@ void ExprNode::print(string& text, Array<dsql_nod*>& nodes) const { - text = "ExprNode"; // needed or not? for (dsql_nod* const* const* i = dsqlChildNodes.begin(); i != dsqlChildNodes.end(); ++i) nodes.add(**i); } @@ -2613,11 +2599,11 @@ { // ASF: Commented out code here appears correct and makes the expression // "1 + NULLIF(NULL, 0)" (failing since v2.1) to work. While this is natural as others - // nodes calling CMP_get_desc on sub nodes, it's causing some problem with contexts of + // nodes calling getDesc on sub nodes, it's causing some problem with contexts of // views. dsc desc1; - ////CMP_get_desc(tdbb, csb, source, &desc1); + ////source->getDesc(tdbb, csb, source, &desc1); *desc = format->fmt_desc[0]; @@ -4566,10 +4552,12 @@ } } - return CMP_pass1(tdbb, csb, sub); // note: scope of AutoSetRestore + doPass1(tdbb, csb, &sub); // note: scope of AutoSetRestore } + else + doPass1(tdbb, csb, &sub); - return CMP_pass1(tdbb, csb, sub); + return sub; } ValueExprNode* FieldNode::pass2(thread_db* tdbb, CompilerScratch* csb) @@ -6302,8 +6290,8 @@ DmlNode* ParameterNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) { - jrd_nod* message = NULL; - USHORT n = (USHORT) csb->csb_blr_reader.getByte(); + MessageNode* message = NULL; + USHORT n = csb->csb_blr_reader.getByte(); if (n >= csb->csb_rpt.getCount() || !(message = csb->csb_rpt[n].csb_message)) PAR_error(csb, Arg::Gds(isc_badmsgnum)); @@ -6313,7 +6301,7 @@ node->message = message; node->argNumber = csb->csb_blr_reader.getWord(); - const Format* format = (Format*) message->nod_arg[e_msg_format]; + const Format* format = message->format; if (node->argNumber >= format->fmt_count) PAR_error(csb, Arg::Gds(isc_badparnum)); @@ -6522,8 +6510,7 @@ void ParameterNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc) { - const Format* format = (Format*) message->nod_arg[e_msg_format]; - *desc = format->fmt_desc[argNumber]; + *desc = message->format->fmt_desc[argNumber]; } ValueExprNode* ParameterNode::copy(thread_db* tdbb, NodeCopier& copier) @@ -6547,11 +6534,8 @@ // in nod_argument. If it don't, it may be an input parameter cloned // in RseBoolNode::convertNeqAllToNotAny - see CORE-3094. - if (copier.message && - (IPTR) copier.message->nod_arg[e_msg_number] == (IPTR) message->nod_arg[e_msg_number]) - { + if (copier.message && copier.message->messageNumber == message->messageNumber) node->message = copier.message; - } else node->message = message; @@ -6564,7 +6548,7 @@ ValueExprNode* ParameterNode::pass2(thread_db* tdbb, CompilerScratch* csb) { argInfo = CMP_pass2_validation(tdbb, csb, - Item(Item::TYPE_PARAMETER, (IPTR) message->nod_arg[e_msg_number], argNumber)); + Item(Item::TYPE_PARAMETER, message->messageNumber, argNumber)); ValueExprNode::pass2(tdbb, csb); @@ -6589,11 +6573,10 @@ request->req_flags |= req_null; } - const Format* format = (Format*) message->nod_arg[e_msg_format]; - desc = &format->fmt_desc[argNumber]; + desc = &message->format->fmt_desc[argNumber]; impure->vlu_desc.dsc_address = request->getImpure<UCHAR>( - message->nod_impure + (IPTR) desc->dsc_address); + message->impureOffset + (IPTR) desc->dsc_address); impure->vlu_desc.dsc_dtype = desc->dsc_dtype; impure->vlu_desc.dsc_length = desc->dsc_length; impure->vlu_desc.dsc_scale = desc->dsc_scale; @@ -6603,15 +6586,13 @@ INTL_adjust_text_descriptor(tdbb, &impure->vlu_desc); USHORT* impure_flags = request->getImpure<USHORT>( - (IPTR) message->nod_arg[e_msg_impure_flags] + - (sizeof(USHORT) * argNumber)); + message->impureFlags + (sizeof(USHORT) * argNumber)); if (!(*impure_flags & VLU_checked)) { if (argInfo) { - EVL_validate(tdbb, - Item(Item::TYPE_PARAMETER, (IPTR) message->nod_arg[e_msg_number], argNumber), + EVL_validate(tdbb, Item(Item::TYPE_PARAMETER, message->messageNumber, argNumber), argInfo, &impure->vlu_desc, request->req_flags & req_null); } @@ -7266,7 +7247,7 @@ { StmtExprNode* node = FB_NEW(pool) StmtExprNode(pool); - node->stmt = PAR_parse_node(tdbb, csb, STATEMENT); + node->stmt = PAR_parse_stmt(tdbb, csb); node->expr = PAR_parse_value(tdbb, csb); return node; @@ -7287,13 +7268,13 @@ ValueExprNode* StmtExprNode::pass1(thread_db* tdbb, CompilerScratch* csb) { - stmt = CMP_pass1(tdbb, csb, stmt); + doPass1(tdbb, csb, stmt.getAddress()); return ValueExprNode::pass1(tdbb, csb); } ValueExprNode* StmtExprNode::pass2(thread_db* tdbb, CompilerScratch* csb) { - stmt = CMP_pass2(tdbb, csb, stmt, NULL); + StmtNode::doPass2(tdbb, csb, stmt.getAddress(), NULL); ValueExprNode::pass2(tdbb, csb); @@ -7306,7 +7287,7 @@ dsc* StmtExprNode::execute(thread_db* tdbb, jrd_req* request) const { - EXE_looper(tdbb, request, stmt, true); + EXE_looper(tdbb, request, stmt.getObject(), true); dsc* desc = EVL_expr(tdbb, request, expr); @@ -8009,16 +7990,13 @@ ValueExprNode* SubQueryNode::pass1(thread_db* tdbb, CompilerScratch* csb) { rse->ignoreDbKey(tdbb, csb); - rse->pass1(tdbb, csb); + doPass1(tdbb, csb, rse.getAddress()); csb->csb_current_nodes.push(rse.getObject()); - if (value1) - value1 = CMP_pass1(tdbb, csb, value1); + doPass1(tdbb, csb, value1.getAddress()); + doPass1(tdbb, csb, value2.getAddress()); - if (value2) - value2 = CMP_pass1(tdbb, csb, value2); - csb->csb_current_nodes.pop(); return this; @@ -8639,14 +8617,14 @@ ValueExprNode* SubstringSimilarNode::pass1(thread_db* tdbb, CompilerScratch* csb) { - expr = CMP_pass1(tdbb, csb, expr); + doPass1(tdbb, csb, expr.getAddress()); // We need to take care of invariantness expressions to be able to pre-compile the pattern. nodFlags |= FLAG_INVARIANT; csb->csb_current_nodes.push(this); - pattern = CMP_pass1(tdbb, csb, pattern); - escape = CMP_pass1(tdbb, csb, escape); + doPass1(tdbb, csb, pattern.getAddress()); + doPass1(tdbb, csb, escape.getAddress()); csb->csb_current_nodes.pop(); @@ -9727,7 +9705,7 @@ DmlNode* VariableNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) { USHORT n = csb->csb_blr_reader.getWord(); - vec<jrd_nod*>* vector = csb->csb_variables; + vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || n >= vector->count()) PAR_syntax_error(csb, "variable identifier"); @@ -9799,7 +9777,7 @@ void VariableNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc) { - *desc = *(DSC*) (varDecl->nod_arg + e_dcl_desc); + *desc = varDecl->varDesc; } ValueExprNode* VariableNode::copy(thread_db* tdbb, NodeCopier& copier) @@ -9821,7 +9799,7 @@ { ValueExprNode::pass1(tdbb, csb); - vec<jrd_nod*>* vector = csb->csb_variables; + vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || varId >= vector->count() || !(varDecl = (*vector)[varId])) PAR_syntax_error(csb, "variable identifier"); @@ -9843,7 +9821,7 @@ dsc* VariableNode::execute(thread_db* tdbb, jrd_req* request) const { impure_value* const impure = request->getImpure<impure_value>(impureOffset); - impure_value* impure2 = request->getImpure<impure_value>(varDecl->nod_impure); + impure_value* impure2 = request->getImpure<impure_value>(varDecl->impureOffset); request->req_flags &= ~req_null; Modified: firebird/trunk/src/dsql/ExprNodes.h =================================================================== --- firebird/trunk/src/dsql/ExprNodes.h 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/ExprNodes.h 2010-12-04 22:15:03 UTC (rev 52024) @@ -32,6 +32,7 @@ namespace Jrd { struct ItemInfo; +class DeclareVariableNode; class RecordSource; class ValueListNode; @@ -783,7 +784,7 @@ public: USHORT dsqlParameterIndex; dsql_par* dsqlParameter; - NestConst<jrd_nod> message; + NestConst<MessageNode> message; USHORT argNumber; NestConst<ValueExprNode> argFlag; NestConst<ValueExprNode> argIndicator; @@ -936,7 +937,7 @@ virtual dsc* execute(thread_db* tdbb, jrd_req* request) const; public: - NestConst<jrd_nod> stmt; + NestConst<StmtNode> stmt; NestConst<ValueExprNode> expr; }; @@ -1348,7 +1349,7 @@ dsql_var* dsqlVar; dsc varDesc; USHORT varId; - NestConst<jrd_nod> varDecl; + NestConst<DeclareVariableNode> varDecl; NestConst<ItemInfo> varInfo; }; Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/Nodes.h 2010-12-04 22:15:03 UTC (rev 52024) @@ -38,7 +38,6 @@ class Cursor; class dsql_nod; class ExprNode; -class jrd_nod; class OptimizerRetrieval; class RseNode; class SlidingWindow; @@ -74,72 +73,6 @@ typedef Firebird::Array<NestConst<ValueExprNode> > NestValueArray; -// Stores a reference to a specialized ExprNode. -// This class and NodeRefImpl exists to nodes replace themselfs (eg. pass1) in a type-safe way. -class NodeRef -{ -public: - virtual ~NodeRef() - { - } - - bool operator !() const - { - return !getExpr(); - } - - operator bool() const - { - return getExpr() != NULL; - } - - virtual ExprNode* getExpr() = 0; - virtual const ExprNode* getExpr() const = 0; - - virtual void pass1(thread_db* tdbb, CompilerScratch* csb) = 0; - void pass2(thread_db* tdbb, CompilerScratch* csb); - -protected: - virtual void internalPass2(thread_db* tdbb, CompilerScratch* csb) = 0; -}; - -template <typename T> class NodeRefImpl : public NodeRef -{ -public: - NodeRefImpl(T** aPtr) - : ptr(aPtr) - { - fb_assert(aPtr); - } - - virtual ExprNode* getExpr() - { - return *ptr; - } - - virtual const ExprNode* getExpr() const - { - return *ptr; - } - - virtual void pass1(thread_db* tdbb, CompilerScratch* csb) - { - if (*ptr) - *ptr = (*ptr)->pass1(tdbb, csb); - } - -protected: - virtual void internalPass2(thread_db* tdbb, CompilerScratch* csb) - { - if (*ptr) - *ptr = (*ptr)->pass2(tdbb, csb); - } - -private: - T** ptr; -}; - - template <typename T> class RegisterNode { @@ -275,15 +208,38 @@ class DmlNode : public Node { public: - explicit DmlNode(MemoryPool& pool) - : Node(pool) + // DML node kinds + enum Kind { + KIND_STATEMENT, + KIND_VALUE, + KIND_BOOLEAN, + KIND_REC_SOURCE + }; + + explicit DmlNode(MemoryPool& pool, Kind aKind) + : Node(pool), + kind(aKind) + { } + // Merge missing values, computed values, validation expressions, and views into a parsed request. + template <typename T> static void doPass1(thread_db* tdbb, CompilerScratch* csb, T** node) + { + if (!*node) + return; + + *node = (*node)->pass1(tdbb, csb); + } + public: virtual void genBlr(DsqlCompilerScratch* dsqlScratch) = 0; virtual DmlNode* pass1(thread_db* tdbb, CompilerScratch* csb) = 0; virtual DmlNode* pass2(thread_db* tdbb, CompilerScratch* csb) = 0; + virtual DmlNode* copy(thread_db* tdbb, NodeCopier& copier) = 0; + +public: + const Kind kind; }; @@ -301,6 +257,67 @@ }; +// Stores a reference to a specialized ExprNode. +// This class and NodeRefImpl exists to nodes replace themselfs (eg. pass1) in a type-safe way. +class NodeRef +{ +public: + virtual ~NodeRef() + { + } + + bool operator !() const + { + return !getExpr(); + } + + operator bool() const + { + return getExpr() != NULL; + } + + virtual ExprNode* getExpr() = 0; + virtual const ExprNode* getExpr() const = 0; + + virtual void pass1(thread_db* tdbb, CompilerScratch* csb) = 0; + void pass2(thread_db* tdbb, CompilerScratch* csb); + +protected: + virtual void internalPass2(thread_db* tdbb, CompilerScratch* csb) = 0; +}; + +template <typename T> class NodeRefImpl : public NodeRef +{ +public: + NodeRefImpl(T** aPtr) + : ptr(aPtr) + { + fb_assert(aPtr); + } + + virtual ExprNode* getExpr() + { + return *ptr; + } + + virtual const ExprNode* getExpr() const + { + return *ptr; + } + + virtual void pass1(thread_db* tdbb, CompilerScratch* csb) + { + DmlNode::doPass1(tdbb, csb, ptr); + } + +protected: + virtual inline void internalPass2(thread_db* tdbb, CompilerScratch* csb); + +private: + T** ptr; +}; + + class ExprNode : public DmlNode { public: @@ -373,8 +390,8 @@ static const unsigned FLAG_DATE = 0x20; static const unsigned FLAG_VALUE = 0x40; // Full value area required in impure space. - explicit ExprNode(Type aType, MemoryPool& pool) - : DmlNode(pool), + explicit ExprNode(Type aType, MemoryPool& pool, Kind aKind) + : DmlNode(pool, aKind), type(aType), nodFlags(0), impureOffset(0), @@ -428,9 +445,16 @@ } static ExprNode* fromLegacy(const dsql_nod* node); - static const ExprNode* fromLegacy(const jrd_nod* node); - static ExprNode* fromLegacy(jrd_nod* node); + // Allocate and assign impure space for various nodes. + template <typename T> static void doPass2(thread_db* tdbb, CompilerScratch* csb, T** node) + { + if (!*node) + return; + + *node = (*node)->pass2(tdbb, csb); + } + virtual bool dsqlAggregateFinder(AggregateFinder& visitor) { return dsqlVisit(visitor); @@ -537,11 +561,19 @@ Firebird::Array<NodeRef*> jrdChildNodes; }; + +template <typename T> +inline void NodeRefImpl<T>::internalPass2(thread_db* tdbb, CompilerScratch* csb) +{ + ExprNode::doPass2(tdbb, csb, ptr); +} + + class BoolExprNode : public ExprNode { public: BoolExprNode(Type aType, MemoryPool& pool) - : ExprNode(aType, pool) + : ExprNode(aType, pool, KIND_BOOLEAN) { } @@ -578,7 +610,7 @@ { public: ValueExprNode(Type aType, MemoryPool& pool) - : ExprNode(aType, pool), + : ExprNode(aType, pool, KIND_VALUE), nodScale(0) { } @@ -610,7 +642,9 @@ return this; } + // Compute descriptor for value expression. virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc) = 0; + virtual ValueExprNode* copy(thread_db* tdbb, NodeCopier& copier) = 0; virtual dsc* execute(thread_db* tdbb, jrd_req* request) const = 0; @@ -802,10 +836,13 @@ public: enum Type { + TYPE_ASSIGNMENT, TYPE_BLOCK, + TYPE_COMPOUND_STMT, TYPE_CONTINUE_LEAVE, TYPE_CURSOR_STMT, TYPE_DECLARE_CURSOR, + TYPE_DECLARE_VARIABLE, TYPE_ERASE, TYPE_ERROR_HANDLER, TYPE_EXCEPTION, @@ -815,11 +852,13 @@ TYPE_EXIT, TYPE_IF, TYPE_IN_AUTO_TRANS, + TYPE_INIT_VARIABLE, TYPE_FOR, TYPE_HANDLER, TYPE_LABEL, TYPE_LOOP, TYPE_MERGE, + TYPE_MESSAGE, TYPE_MODIFY, TYPE_POST_EVENT, TYPE_RECEIVE, @@ -864,15 +903,16 @@ WhichTrigger whichEraseTrig; WhichTrigger whichStoTrig; WhichTrigger whichModTrig; - const jrd_nod* topNode; - const jrd_nod* prevNode; + const StmtNode* topNode; + const StmtNode* prevNode; }; public: explicit StmtNode(Type aType, MemoryPool& pool) - : DmlNode(pool), + : DmlNode(pool, KIND_STATEMENT), type(aType), - node(NULL) + parentStmt(NULL), + impureOffset(0) { } @@ -920,30 +960,39 @@ } static StmtNode* fromLegacy(const dsql_nod* node); - static const StmtNode* fromLegacy(const jrd_nod* node); - static StmtNode* fromLegacy(jrd_nod* node); - jrd_nod* getNode() + // Allocate and assign impure space for various nodes. + template <typename T> static void doPass2(thread_db* tdbb, CompilerScratch* csb, T** node, + StmtNode* parentStmt) { - return node; + if (!*node) + return; + + if (parentStmt) + (*node)->parentStmt = parentStmt; + + *node = (*node)->pass2(tdbb, csb); } - void setNode(jrd_nod* value) + virtual StmtNode* pass1(thread_db* tdbb, CompilerScratch* csb) = 0; + virtual StmtNode* pass2(thread_db* tdbb, CompilerScratch* csb) = 0; + + virtual StmtNode* copy(thread_db* tdbb, NodeCopier& copier) { - node = value; - } + fb_assert(false); + Firebird::status_exception::raise( + Firebird::Arg::Gds(isc_cannot_copy_stmt) << + Firebird::Arg::Num(int(type))); - virtual void pass2Cursor(RseNode*& /*rsePtr*/, Cursor**& /*cursorPtr*/) - { + return NULL; } - virtual const jrd_nod* execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const = 0; + virtual const StmtNode* execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const = 0; public: const Type type; - -protected: - NestConst<jrd_nod> node; + NestConst<StmtNode> parentStmt; + ULONG impureOffset; // Inpure offset from request block. }; @@ -958,21 +1007,27 @@ } public: - DsqlOnlyStmtNode* pass1(thread_db* /*tdbb*/, CompilerScratch* /*csb*/) + virtual DsqlOnlyStmtNode* pass1(thread_db* /*tdbb*/, CompilerScratch* /*csb*/) { fb_assert(false); return this; } - DsqlOnlyStmtNode* pass2(thread_db* /*tdbb*/, CompilerScratch* /*csb*/) + virtual DsqlOnlyStmtNode* pass2(thread_db* /*tdbb*/, CompilerScratch* /*csb*/) { fb_assert(false); return this; } - const jrd_nod* execute(thread_db* /*tdbb*/, jrd_req* /*request*/, ExeState* /*exeState*/) const + virtual DsqlOnlyStmtNode* copy(thread_db* /*tdbb*/, NodeCopier& /*copier*/) { fb_assert(false); + return this; + } + + const StmtNode* execute(thread_db* /*tdbb*/, jrd_req* /*request*/, ExeState* /*exeState*/) const + { + fb_assert(false); return NULL; } }; Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2010-12-04 17:19:48 UTC (rev 52023) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2010-12-04 22:15:03 UTC (rev 52024) @@ -57,9 +57,7 @@ using namespace Firebird; using namespace Jrd; -#include "gen/blrtable.h" - namespace { // Node copier that remaps the field id 0 of stream 0 to a given field id. @@ -91,17 +89,19 @@ static void cleanupRpb(thread_db* tdbb, record_param* rpb); -static jrd_nod* makeValidation(thread_db* tdbb, CompilerScratch* csb, USHORT stream); -static jrd_nod* pass1ExpandView(thread_db* tdbb, CompilerScratch* csb, USHORT orgStream, +static void makeValidation(thread_db* tdbb, CompilerScratch* csb, USHORT stream, + Array<ValidateInfo>& validations); +static StmtNode* pass1ExpandView(thread_db* tdbb, CompilerScratch* csb, USHORT orgStream, USHORT newStream, bool remap); static RelationSourceNode* pass1Update(thread_db* tdbb, CompilerScratch* csb, jrd_rel* relation, const trig_vec* trigger, USHORT stream, USHORT updateStream, SecurityClass::flags_t priv, jrd_rel* view, USHORT viewStream); +static void pass1Validations(thread_db* tdbb, CompilerScratch* csb, Array<ValidateInfo>& validations); static void postTriggerAccess(CompilerScratch* csb, jrd_rel* ownerRelation, ExternalAccess::exa_act operation, jrd_rel* view); static void preModifyEraseTriggers(thread_db* tdbb, trig_vec** trigs, StmtNode::WhichTrigger whichTrig, record_param* rpb, record_param* rec, jrd_req::req_ta op); -static void validateExpressions(thread_db* tdbb, const jrd_nod* list); +static void validateExpressions(thread_db* tdbb, const Array<ValidateInfo>& validations); //-------------------- @@ -113,19 +113,7 @@ reinterpret_cast<StmtNode*>(node->nod_arg[0]) : NULL; } -const StmtNode* StmtNode::fromLegacy(const jrd_nod* node) -{ - return node && node->nod_type == nod_class_stmtnode_jrd ? - reinterpret_cast<const StmtNode*>(node->nod_arg[0]) : NULL; -} -StmtNode* StmtNode::fromLegacy(jrd_nod* node) -{ - return node && node->nod_type == nod_class_stmtnode_jrd ? - reinterpret_cast<StmtNode*>(node->nod_arg[0]) : NULL; -} - - //-------------------- @@ -140,7 +128,6 @@ return node; } - void SavepointEncloseNode::print(string& text, Array<dsql_nod*>& nodes) const { text = "SavepointEncloseNode\n"; @@ -149,7 +136,6 @@ text += s; } - void SavepointEncloseNode::genBlr(DsqlCompilerScratch* dsqlScratch) { dsqlScratch->appendUChar(blr_begin); @@ -163,17 +149,131 @@ //-------------------- +static RegisterNode<AssignmentNode> regAssignmentNode(blr_assignment); + +DmlNode* AssignmentNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp) +{ + AssignmentNode* node = FB_NEW(pool) AssignmentNode(pool); + node->asgnFrom = PAR_parse_value(tdbb, csb); + node->asgnTo = PAR_parse_value(tdbb, csb); + return node; +} + +AssignmentNode* AssignmentNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void AssignmentNode::print(string& text, Array<dsql_nod*>& nodes) const +{ + text = "AssignmentNode"; +} + +void AssignmentNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +AssignmentNode* AssignmentNode::copy(thread_db* tdbb, NodeCopier& copier) +{ + AssignmentNode* node = FB_NEW(*tdbb->getDefaultPool()) AssignmentNode(*tdbb->getDefaultPool()); + node->asgnFrom = copier.copy(tdbb, asgnFrom); + node->asgnTo = copier.copy(tdbb, asgnTo); + node->missing = copier.copy(tdbb, missing); + node->missing2 = copier.copy(tdbb, missing2); + return node; +} + +AssignmentNode* AssignmentNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + ValueExprNode* sub = asgnFrom; + FieldNode* fieldNode; + USHORT stream; + CompilerScratch::csb_repeat* tail; + + if ((fieldNode = sub->as<FieldNode>())) + { + stream = fieldNode->fieldStream; + jrd_fld* field = MET_get_field(csb->csb_rpt[stream].csb_relation, fieldNode->fieldId); + + if (field) + missing2 = field->fld_missing_value; + } + + sub = asgnTo; + + if ((fieldNode = sub->as<FieldNode>())) + { + stream = fieldNode->fieldStream; + tail = &csb->csb_rpt[stream]; + jrd_fld* field = MET_get_field(tail->csb_relation, fieldNode->fieldId); + + if (field && field->fld_missing_value) + missing = field->fld_missing_value; + } + + doPass1(tdbb, csb, asgnFrom.getAddress()); + doPass1(tdbb, csb, asgnTo.getAddress()); + doPass1(tdbb, csb, missing.getAddress()); + // ASF: No idea why we do not call pass1 for missing2. + + // Perform any post-processing here. + + sub = asgnTo; + + if ((fieldNode = sub->as<FieldNode>())) + { + stream = fieldNode->fieldStream; + tail = &csb->csb_rpt[stream]; + + // Assignments to the OLD context are prohibited for all trigger types. + if ((tail->csb_flags & csb_trigger) && stream == 0) + ERR_post(Arg::Gds(isc_read_only_field)); + + // Assignments to the NEW context are prohibited for post-action triggers. + if ((tail->csb_flags & csb_trigger) && stream == 1 && + (csb->csb_g_flags & csb_post_trigger)) + { + ERR_post(Arg::Gds(isc_read_only_field)); + } + } + else if (!(sub->is<ParameterNode>() || sub->is<VariableNode>() || sub->is<NullNode>())) + ERR_post(Arg::Gds(isc_read_only_field)); + + return this; +} + +AssignmentNode* AssignmentNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + ExprNode::doPass2(tdbb, csb, asgnFrom.getAddress()); + ExprNode::doPass2(tdbb, csb, asgnTo.getAddress()); + ExprNode::doPass2(tdbb, csb, missing.getAddress()); + ExprNode::doPass2(tdbb, csb, missing2.getAddress()); + return this; +} + +const StmtNode* AssignmentNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + if (request->req_operation == jrd_req::req_evaluate) + EXE_assignment(tdbb, this); + + return parentStmt; +} + + +//-------------------- + + static RegisterNode<BlockNode> regBlockNode(blr_block); DmlNode* BlockNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) { BlockNode* node = FB_NEW(pool) BlockNode(pool); - node->action = PAR_parse_node(tdbb, csb, STATEMENT); + node->action = PAR_parse_stmt(tdbb, csb); - NodeStack stack; + StmtNodeStack stack; while (csb->csb_blr_reader.peekByte() != blr_end) - stack.push(PAR_parse_node(tdbb, csb, STATEMENT)); + stack.push(PAR_parse_stmt(tdbb, csb)); csb->csb_blr_reader.getByte(); // skip blr_end @@ -198,22 +298,22 @@ BlockNode* BlockNode::pass1(thread_db* tdbb, CompilerScratch* csb) { - action = CMP_pass1(tdbb, csb, action); - handlers = CMP_pass1(tdbb, csb, handlers); + doPass1(tdbb, csb, action.getAddress()); + doPass1(tdbb, csb, handlers.getAddress()); return this; } BlockNode* BlockNode::pass2(thread_db* tdbb, CompilerScratch* csb) { - action = CMP_pass2(tdbb, csb, action, node); - handlers = CMP_pass2(tdbb, csb, handlers, node); + doPass2(tdbb, csb, action.getAddress(), this); + doPass2(tdbb, csb, handlers.getAddress(), this); - node->nod_impure = CMP_impure(csb, sizeof(SLONG)); + impureOffset = CMP_impure(csb, sizeof(SLONG)); return this; } -const jrd_nod* BlockNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const +const StmtNode* BlockNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const { jrd_tra* transaction = request->req_transaction; jrd_tra* sysTransaction = request->req_attachment->getSysTransaction(); @@ -227,7 +327,7 @@ VIO_start_save_point(tdbb, transaction); const Savepoint* save_point = transaction->tra_save_point; count = save_point->sav_number; - *request->getImpure<SLONG>(node->nod_impure) = count; + *request->getImpure<SLONG>(impureOffset) = count; } return action; @@ -243,7 +343,7 @@ if (transaction != sysTransaction) { - count = *request->getImpure<SLONG>(node->nod_impure); + count = *request->getImpure<SLONG>(impureOffset); for (const Savepoint* save_point = transaction->tra_save_point; save_point && count <= save_point->sav_number; @@ -253,12 +353,12 @@ } } - return node->nod_parent; + return parentStmt; } if (transaction != sysTransaction) { - count = *request->getImpure<SLONG>(node->nod_impure); + count = *request->getImpure<SLONG>(impureOffset); // Since there occurred an error (req_unwind), undo all savepoints // up to, but not including, the savepoint of this block. The @@ -273,16 +373,18 @@ } } - const jrd_nod* temp; + const StmtNode* temp; if (handlers) { - temp = node->nod_parent; - const jrd_nod* const* ptr = handlers->nod_arg; + temp = parentStmt; + const NestConst<StmtNode>* ptr = handlers->statements.begin(); - for (const jrd_nod* const* const end = ptr + handlers->nod_count; ptr < end; ++ptr) + for (const NestConst<StmtNode>* const end = handlers->statements.end(); + ptr != end; + ++ptr) { - const ErrorHandlerNode* handlerNode = StmtNode::as<ErrorHandlerNode>(*ptr); + const ErrorHandlerNode* handlerNode = (*ptr)->as<ErrorHandlerNode>(); const PsqlException* xcpNode = handlerNode->conditions; if (testAndFixupError(tdbb, request, xcpNode)) @@ -342,7 +444,7 @@ } } else - temp = node->nod_parent; + temp = parentStmt; // If the application didn't have an error handler, then // the error will still be pending. Undo the block by @@ -365,7 +467,7 @@ case jrd_req::req_return: if (transaction != sysTransaction) { - count = *request->getImpure<SLONG>(node->nod_impure); + count = *request->getImpure<SLONG>(impureOffset); for (const Savepoint* save_point = transaction->tra_save_point; save_point && count <= save_point->sav_number; @@ -376,7 +478,7 @@ } default: - return node->nod_parent; + return parentStmt; } fb_assert(false); @@ -442,6 +544,116 @@ //-------------------- +static RegisterNode<CompoundStmtNode> regCompoundStmtNode(blr_begin); + +DmlNode* CompoundStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + CompoundStmtNode* node = FB_NEW(pool) CompoundStmtNode(pool); + + while (csb->csb_blr_reader.peekByte() != blr_end) + node->statements.add(PAR_parse_stmt(tdbb, csb)); + + csb->csb_blr_reader.getByte(); // skip blr_end + + return node; +} + +CompoundStmtNode* CompoundStmtNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void CompoundStmtNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "CompoundStmtNode"; +} + +void CompoundStmtNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +CompoundStmtNode* CompoundStmtNode::copy(thread_db* tdbb, NodeCopier& copier) +{ + CompoundStmtNode* node = FB_NEW(*tdbb->getDefaultPool()) CompoundStmtNode(*tdbb->getDefaultPool()); + node->onlyAssignments = onlyAssignments; + + NestConst<StmtNode>* j = node->statements.getBuffer(statements.getCount()); + + for (NestConst<StmtNode>* i = statements.begin(); i != statements.end(); ++i, ++j) + *j = copier.copy(tdbb, *i); + + return node; +} + +CompoundStmtNode* CompoundStmtNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + for (NestConst<StmtNode>* i = statements.begin(); i != statements.end(); ++i) + doPass1(tdbb, csb, i->getAddress()); + return this; +} + +CompoundStmtNode* CompoundStmtNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + for (NestConst<StmtNode>* i = statements.begin(); i != statements.end(); ++i) + doPass2(tdbb, csb, i->getAddress(), this); + + impureOffset = CMP_impure(csb, sizeof(impure_state)); + + for (NestConst<StmtNode>* i = statements.begin(); i != statements.end(); ++i) + { + if (!StmtNode::is<AssignmentNode>(i->getObject())) + return this; + } + + onlyAssignments = true; + + return this; +} + +const StmtNode* CompoundStmtNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + const NestConst<StmtNode>* end = statements.end(); + + if (onlyAssignments) + { + if (request->req_operation == jrd_req::req_evaluate) + { + for (const NestConst<StmtNode>* i = statements.begin(); i != end; ++i) + EXE_assignment(tdbb, static_cast<const AssignmentNode*>(i->getObject())); + + request->req_operation = jrd_req::req_return; + } + + return parentStmt; + } + + impure_state* impure = request->getImpure<impure_state>(impureOffset); + + switch (request->req_operation) + { + case jrd_req::req_evaluate: + impure->sta_state = 0; + // fall into + + case jrd_req::req_return: + case jrd_req::req_sync: + if (impure->sta_state < int(statements.getCount())) + { + request->req_operation = jrd_req::req_evaluate; + return statements[impure->sta_state++]; + } + request->req_operation = jrd_req::req_return; + // fall into + + default: + return parentStmt; + } +} + + +//-------------------- + + static RegisterNode<ContinueLeaveNode> regContinueLeaveNodeContinue(blr_continue_loop); static RegisterNode<ContinueLeaveNode> regContinueLeaveNodeLeave(blr_leave); @@ -466,12 +678,12 @@ { } -const jrd_nod* ContinueLeaveNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const +const StmtNode* ContinueLeaveNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const { request->req_operation = jrd_req::req_unwind; request->req_label = labelNumber; request->req_flags |= (blrOp == blr_continue_loop ? req_continue_loop : req_leave); - return node->nod_parent; + return parentStmt; } @@ -500,7 +712,7 @@ case blr_cursor_fetch: csb->csb_g_flags |= csb_reuse_context; - node->intoStmt = PAR_parse_node(tdbb, csb, STATEMENT); + node->intoStmt = PAR_parse_stmt(tdbb, csb); csb->csb_g_flags &= ~csb_reuse_context; break; @@ -527,19 +739,19 @@ CursorStmtNode* CursorStmtNode::pass1(thread_db* tdbb, CompilerScratch* csb) { - scrollExpr = CMP_pass1(tdbb, csb, scrollExpr); - intoStmt = CMP_pass1(tdbb, csb, intoStmt); + doPass1(tdbb, csb, scrollExpr.getAddress()); + doPass1(tdbb, csb, intoStmt.getAddress()); return this; } CursorStmtNode* CursorStmtNode::pass2(thread_db* tdbb, CompilerScratch* csb) { - scrollExpr = CMP_pass2(tdbb, csb, scrollExpr); - intoStmt = CMP_pass2(tdbb, csb, intoStmt, node); + ExprNode::doPass2(tdbb, csb, scrollExpr.getAddress()); + doPass2(tdbb, csb, intoStmt.getAddress(), this); return this; } -const jrd_nod* CursorStmtNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +const StmtNode* CursorStmtNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const { fb_assert(cursorNumber < request->req_cursors.getCount()); const Cursor* const cursor = request->req_cursors[cursorNumber]; @@ -553,7 +765,7 @@ cursor->open(tdbb); request->req_operation = jrd_req::req_return; } - return node->nod_parent; + return parentStmt; case blr_cursor_close: if (request->req_operation == jrd_req::req_evaluate) @@ -561,7 +773,7 @@ cursor->close(tdbb); request->req_operation = jrd_req::req_return; } - return node->nod_parent; + return parentStmt; case blr_cursor_fetch: case blr_cursor_fetch_scroll: @@ -615,7 +827,7 @@ request->req_operation = jrd_req::req_return; default: - return node->nod_parent; + return parentStmt; } break; } @@ -659,19 +871,30 @@ DeclareCursorNode* DeclareCursorNode::pass1(thread_db* tdbb, CompilerScratch* csb) { - rse = rse->pass1(tdbb, csb); - refs = refs->pass1(tdbb, csb); + doPass1(tdbb, csb, rse.getAddress()); + doPass1(tdbb, csb, refs.getAddress()); return this; } DeclareCursorNode* DeclareCursorNode::pass2(thread_db* tdbb, CompilerScratch* csb) { - rse = rse->pass2(tdbb, csb); - refs = refs->pass2(tdbb, csb); + rse->pass2Rse(tdbb, csb); + + ExprNode::doPass2(tdbb, csb, rse.getAddress()); + ExprNode::doPass2(tdbb, csb, refs.getAddress()); + + // Finish up processing of record selection expressions. + + RecordSource* const rsb = CMP_post_rse(tdbb, csb, rse.getObject()); + csb->csb_fors.add(rsb); + + cursor = FB_NEW(*tdbb->getDefaultPool()) Cursor(csb, rsb, rse->rse_invariants, + (rse->flags & RseNode::FLAG_SCROLLABLE)); + return this; } -const jrd_nod* DeclareCursorNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const +const StmtNode* DeclareCursorNode::execute(thread_db* /*tdbb*/, jrd_req* request, ExeState* /*exeState*/) const { if (request->req_operation == jrd_req::req_evaluate) { @@ -684,13 +907,112 @@ request->req_operation = jrd_req::req_return; } - return node->nod_parent; + return parentStmt; } //-------------------- +static RegisterNode<DeclareVariableNode> regDeclareVariableNode(blr_dcl_variable); + +DmlNode* DeclareVariableNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + DeclareVariableNode* node = FB_NEW(pool) DeclareVariableNode(pool); + + node->varId = csb->csb_blr_reader.getWord(); + + ItemInfo itemInfo; + PAR_desc(tdbb, csb, &node->varDesc, &itemInfo); + + csb->csb_variables = vec<DeclareVariableNode*>::newVector( + *tdbb->getDefaultPool(), csb->csb_variables, node->varId + 1); + + if (itemInfo.isSpecial()) + { + csb->csb_dbg_info.varIndexToName.get(node->varId, itemInfo.name); + csb->csb_map_item_info.put(Item(Item::TYPE_VARIABLE, node->varId), itemInfo); + } + + if (itemInfo.explicitCollation) + { + CompilerScratch::Dependency dependency(obj_collation); + dependency.number = INTL_TEXT_TYPE(node->varDesc); + csb->csb_dependencies.push(dependency); + } + + return node; +} + +DeclareVariableNode* DeclareVariableNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + return this; +} + +void DeclareVariableNode::print(string& text, Array<dsql_nod*>& /*nodes*/) const +{ + text = "DeclareVariableNode"; +} + +void DeclareVariableNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ +} + +DeclareVariableNode* DeclareVariableNode::copy(thread_db* tdbb, NodeCopier& copier) +{ + if (copier.csb->csb_remap_variable == 0) + return this; + + DeclareVariableNode* node = FB_NEW(*tdbb->getDefaultPool()) DeclareVariableNode(*tdbb->getDefaultPool()); + node->varId = varId + copier.csb->csb_remap_variable; + node->varDesc = varDesc; + + copier.csb->csb_variables = vec<DeclareVariableNode*>::newVector(*tdbb->getDefaultPool(), + copier.csb->csb_variables, node->varId + 1); + + return node; +} + +DeclareVariableNode* DeclareVariableNode::pass1(thread_db* tdbb, CompilerScratch* csb) +{ + vec<DeclareVariableNode*>* vector = csb->csb_variables = vec<DeclareVariableNode*>::newVector( + *tdbb->getDefaultPool(), csb->csb_variables, varId + 1); + fb_assert(!(*vector)[varId]); + (*vector)[varId] = this; + + return this; +} + +DeclareVariableNode* DeclareVariableNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + impureOffset = CMP_impure(csb, sizeof(impure_value) + varDesc.dsc_length); + return this; +} + +const StmtNode* DeclareVariableNode::execute(thread_db* tdbb, jrd_req* request, ExeState* /*exeState*/) const +{ + impure_value* variable = request->getImpure<impure_value>(impureOffset); + variable->vlu_desc = varDesc; + variable->vlu_desc.dsc_flags = 0; + variable->vlu_desc.dsc_address = (UCHAR*) &variable->vlu_misc; + + if (variable->vlu_desc.dsc_dtype <= dtype_varying && !variable->vlu_string) + { + const USHORT len = variable->vlu_desc.dsc_length; + variable->vlu_string = FB_NEW_RPT(*tdbb->getDefaultPool(), len) VaryingString(); + variable->vlu_string->str_length = len; + variable->vlu_desc.dsc_address = variable->vlu_string->str_data; + } + + request->req_operation = jrd_req::req_return; + + return parentStmt; +} + + +//-------------------- + + static RegisterNode<EraseNode> regEraseNode(blr_erase); DmlNode* EraseNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) @@ -724,8 +1046,8 @@ { pass1Erase(tdbb, csb, this); - statement = CMP_pass1(tdbb, csb, statement); - subStatement = CMP_pass1(tdbb, csb, subStatement); + doPass1(tdbb, csb, statement.getAddress()); + doPass1(tdbb, csb, subStatement.getAddress()); return this; } @@ -809,10 +1131,7 @@ EraseNode* viewNode = FB_NEW(*tdbb->getDefaultPool()) EraseNode(*tdbb->getDefaultPool()); viewNode->stream = node->stream; - node->subStatement = PAR_make_node(tdbb, 1); - node->subStatement->nod_type = nod_class_stmtnode_jrd; - node->subStatement->nod_count = 0; - node->subStatement->nod_arg[0] = reinterpret_cast<jrd_nod*>(viewNode); + node->subStatement = viewNode; // Substitute the original delete node with the newly created one. node = viewNode; @@ -832,40 +1151,40 @@ EraseNode* EraseNode::pass2(thread_db* tdbb, CompilerScratch* csb) { - statement = CMP_pass2(tdbb, csb, statement, node); - subStatement = CMP_pass2(tdbb, csb, subStatement, node); + doPass2(tdbb, csb, statement.getAddress(), this); + doPass2(tdbb, csb, subStatement.getAddress(), this); - node->nod_impure = CMP_impure(csb, sizeof(SLONG)); + impureOffset = CMP_impure(csb, sizeof(SLONG)); csb->csb_rpt[stream].csb_flags |= csb_update; return this; } -const jrd_nod* EraseNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const +const StmtNode* EraseNode::execute(thread_db* tdbb, jrd_req* request, ExeState* exeState) const { - const jrd_nod* retNode; + const StmtNode* retNode; if (request->req_operation == jrd_req::req_unwind) - retNode = node->nod_parent; + retNode = parentStmt; else if (request->req_operation == jrd_req::req_return && subStatement) { if (!exeState->topNode) { - exeState->topNode = node; + exeState->topNode = this; exeState->whichEraseTrig = PRE_TRIG; } - exeState->prevNode = node; + exeState->prevNode = this; retNode = erase(tdbb, request, exeState->whichEraseTrig); if (exeState->whichEraseTrig == PRE_TRIG) { retNode = subStatement; - fb_assert(retNode->nod_parent == node); - ///retNode->nod_parent = exeState->prevNode; + fb_assert(retNode->parentStmt == this); + ///retNode->parentStmt = exeState->prevNode; } - if (exeState->topNode == node && exeState->whichEraseTrig == POST_TRIG) + if (exeState->topNode == this && exeState->whichEraseTrig == POST_TRIG) { exeState->topNode = NULL; exeState->whichEraseTrig = ALL_TRIGS; @@ -875,7 +1194,7 @@ } else { - exeState->prevNode = node; + exeState->prevNode = this; retNode = erase(tdbb, request, ALL_TRIGS); if (!subStatement && exeState->whichEraseTrig == PRE_TRIG) @@ -886,7 +1205,7 @@ } // Perform erase operation. -const jrd_nod* EraseNode::erase(thread_db* tdbb, jrd_req* request, WhichTrigger whichTrig) const +const StmtNode* EraseNode::erase(thread_db* tdbb, jrd_req* request, WhichTrigger whichTrig) const { Jrd::Attachment* attachment = tdbb->... [truncated message content] |
From: <fir...@us...> - 2010-12-05 03:20:27
|
Revision: 52027 http://firebird.svn.sourceforge.net/firebird/?rev=52027&view=rev Author: firebirds Date: 2010-12-05 03:20:20 +0000 (Sun, 05 Dec 2010) 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 2010-12-05 00:55:54 UTC (rev 52026) +++ firebird/trunk/ChangeLog 2010-12-05 03:20:20 UTC (rev 52027) @@ -1,3 +1,96 @@ + 2010-12-05 00:55 asfernandes + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/jrd/exe.cpp + M src/jrd/par.cpp +Rework on line/column info support to make it faster + + 2010-12-05 00:54 asfernandes + M src/jrd/evl.cpp + M src/jrd/evl_proto.h +Make expression evaluation faster + + 2010-12-04 22:15 asfernandes + M builds/mac_os_x/CS/CS.pbproj/project.pbxproj + M builds/posix/Makefile.in + M builds/posix/make.defaults + M builds/posix/make.shared.targets + M builds/posix/make.shared.variables + D builds/win32/blrtable.bat + M builds/win32/clean_all.bat + M builds/win32/make_boot.bat + M builds/win32/msvc7/engine.vcproj + M builds/win32/msvc7/engine_classic.vcproj + M builds/win32/msvc7/engine_embed.vcproj + M builds/win32/msvc8/engine.vcproj + M builds/win32/msvc9/engine.vcproj + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/dsql/AggNodes.cpp + M src/dsql/BoolNodes.cpp + M src/dsql/BoolNodes.h + M src/dsql/ExprNodes.cpp + M src/dsql/ExprNodes.h + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/Visitors.h + M src/dsql/WinNodes.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/Attachment.h + M src/jrd/ExtEngineManager.h + M src/jrd/Function.epp + M src/jrd/JrdStatement.cpp + M src/jrd/JrdStatement.h + M src/jrd/RecordSourceNodes.cpp + M src/jrd/RecordSourceNodes.h + M src/jrd/Relation.h + M src/jrd/btr.h + M src/jrd/cmp.cpp + M src/jrd/cmp_proto.h + M src/jrd/dfw.epp + M src/jrd/evl.cpp + M src/jrd/exe.cpp + M src/jrd/exe.h + M src/jrd/exe_proto.h + M src/jrd/ext_proto.h + M src/jrd/extds/ExtDS.cpp + M src/jrd/extds/ExtDS.h + M src/jrd/inf.cpp + M src/jrd/jrd.cpp + M src/jrd/jrd.h + M src/jrd/lls.h + M src/jrd/met.epp + M src/jrd/met_proto.h + D src/jrd/nod.h + M src/jrd/opt_proto.h + M src/jrd/par.cpp + M src/jrd/par_proto.h + M src/jrd/pcmet.epp + M src/jrd/recsrc/ProcedureScan.cpp + M src/jrd/recsrc/RecordSource.h + M src/jrd/req.h + M src/jrd/rse.h + M src/jrd/trace/TraceObjects.cpp + D src/misc/blrtable.cpp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Finish the statements refactor in the engine. Get rid of jrd_nod. + + 2010-12-04 17:19 asfernandes + M src/remote/server/os/win32/srvr_w32.cpp +Misc + + 2010-12-04 11:16 alexpeshkoff + M src/auth/SecurityDatabase/pwd.cpp +Simplified code - thanks to Claudio + 2010-12-02 19:54 dimitr M src/yvalve/gds.cpp InitPrefix::init() should never throw, it leads to the infinite recursion with a stack overflow. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-05 00:55:54 UTC (rev 52026) +++ firebird/trunk/src/jrd/build_no.h 2010-12-05 03:20:20 UTC (rev 52027) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28933 + FORMAL BUILD NUMBER:28938 */ -#define PRODUCT_VER_STRING "3.0.0.28933" -#define FILE_VER_STRING "WI-T3.0.0.28933" -#define LICENSE_VER_STRING "WI-T3.0.0.28933" -#define FILE_VER_NUMBER 3, 0, 0, 28933 +#define PRODUCT_VER_STRING "3.0.0.28938" +#define FILE_VER_STRING "WI-T3.0.0.28938" +#define LICENSE_VER_STRING "WI-T3.0.0.28938" +#define FILE_VER_NUMBER 3, 0, 0, 28938 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28933" +#define FB_BUILD_NO "28938" #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 2010-12-05 00:55:54 UTC (rev 52026) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-05 03:20:20 UTC (rev 52027) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28933 +BuildNum=28938 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...> - 2010-12-06 03:26:53
|
Revision: 52030 http://firebird.svn.sourceforge.net/firebird/?rev=52030&view=rev Author: firebirds Date: 2010-12-06 03:26:47 +0000 (Mon, 06 Dec 2010) 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 2010-12-05 16:49:24 UTC (rev 52029) +++ firebird/trunk/ChangeLog 2010-12-06 03:26:47 UTC (rev 52030) @@ -1,3 +1,11 @@ + 2010-12-05 16:49 asfernandes + M src/dsql/StmtNodes.cpp +Fixed CORE-2204 - Constraints on SP output parameters are checked even when the SP returns zero rows + + 2010-12-05 14:44 asfernandes + M src/dsql/StmtNodes.cpp +Use the impure space of string variable in a consistently (first or subsequent request execution) and optimized (no double allocation) way + 2010-12-05 00:55 asfernandes M src/dsql/Nodes.h M src/dsql/StmtNodes.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-05 16:49:24 UTC (rev 52029) +++ firebird/trunk/src/jrd/build_no.h 2010-12-06 03:26:47 UTC (rev 52030) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28938 + FORMAL BUILD NUMBER:28940 */ -#define PRODUCT_VER_STRING "3.0.0.28938" -#define FILE_VER_STRING "WI-T3.0.0.28938" -#define LICENSE_VER_STRING "WI-T3.0.0.28938" -#define FILE_VER_NUMBER 3, 0, 0, 28938 +#define PRODUCT_VER_STRING "3.0.0.28940" +#define FILE_VER_STRING "WI-T3.0.0.28940" +#define LICENSE_VER_STRING "WI-T3.0.0.28940" +#define FILE_VER_NUMBER 3, 0, 0, 28940 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28938" +#define FB_BUILD_NO "28940" #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 2010-12-05 16:49:24 UTC (rev 52029) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-06 03:26:47 UTC (rev 52030) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28938 +BuildNum=28940 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...> - 2010-12-13 03:19:41
|
Revision: 52040 http://firebird.svn.sourceforge.net/firebird/?rev=52040&view=rev Author: firebirds Date: 2010-12-13 03:19:34 +0000 (Mon, 13 Dec 2010) 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 2010-12-12 20:45:52 UTC (rev 52039) +++ firebird/trunk/ChangeLog 2010-12-13 03:19:34 UTC (rev 52040) @@ -1,3 +1,22 @@ + 2010-12-12 20:45 asfernandes + M src/jrd/RecordSourceNodes.cpp +Missing pass1 on procedure message, seen by Claudio - not relevant currently, but do it as before. + + 2010-12-12 20:19 hvlad + M src/remote/inet.cpp + M src/remote/remote.cpp + M src/remote/remote.h + M src/remote/server/server.cpp +Port forward fix for bug CORE-3119 : 100% CPU USAGE with Unilimited Loop & Index corrupted + + 2010-12-12 19:53 asfernandes + M builds/posix/make.defaults +An attempt which seems to work to not lose cpp files generated from epp ones. + + 2010-12-12 14:22 alexpeshkoff + M src/gpre/c_cxx.cpp +Fixed gcc warnings + 2010-12-05 16:49 asfernandes M src/dsql/StmtNodes.cpp Fixed CORE-2204 - Constraints on SP output parameters are checked even when the SP returns zero rows Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-12 20:45:52 UTC (rev 52039) +++ firebird/trunk/src/jrd/build_no.h 2010-12-13 03:19:34 UTC (rev 52040) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28940 + FORMAL BUILD NUMBER:28944 */ -#define PRODUCT_VER_STRING "3.0.0.28940" -#define FILE_VER_STRING "WI-T3.0.0.28940" -#define LICENSE_VER_STRING "WI-T3.0.0.28940" -#define FILE_VER_NUMBER 3, 0, 0, 28940 +#define PRODUCT_VER_STRING "3.0.0.28944" +#define FILE_VER_STRING "WI-T3.0.0.28944" +#define LICENSE_VER_STRING "WI-T3.0.0.28944" +#define FILE_VER_NUMBER 3, 0, 0, 28944 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28940" +#define FB_BUILD_NO "28944" #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 2010-12-12 20:45:52 UTC (rev 52039) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-13 03:19:34 UTC (rev 52040) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28940 +BuildNum=28944 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...> - 2010-12-16 03:28:08
|
Revision: 52046 http://firebird.svn.sourceforge.net/firebird/?rev=52046&view=rev Author: firebirds Date: 2010-12-16 03:28:01 +0000 (Thu, 16 Dec 2010) 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 2010-12-16 00:14:50 UTC (rev 52045) +++ firebird/trunk/ChangeLog 2010-12-16 03:28:01 UTC (rev 52046) @@ -1,3 +1,7 @@ + 2010-12-16 00:06 asfernandes + M src/jrd/SysFunction.cpp +Fixed CORE-3277 - Wrong result for RIGHT(UTF8 varchar) + 2010-12-12 20:45 asfernandes M src/jrd/RecordSourceNodes.cpp Missing pass1 on procedure message, seen by Claudio - not relevant currently, but do it as before. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-16 00:14:50 UTC (rev 52045) +++ firebird/trunk/src/jrd/build_no.h 2010-12-16 03:28:01 UTC (rev 52046) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28944 + FORMAL BUILD NUMBER:28945 */ -#define PRODUCT_VER_STRING "3.0.0.28944" -#define FILE_VER_STRING "WI-T3.0.0.28944" -#define LICENSE_VER_STRING "WI-T3.0.0.28944" -#define FILE_VER_NUMBER 3, 0, 0, 28944 +#define PRODUCT_VER_STRING "3.0.0.28945" +#define FILE_VER_STRING "WI-T3.0.0.28945" +#define LICENSE_VER_STRING "WI-T3.0.0.28945" +#define FILE_VER_NUMBER 3, 0, 0, 28945 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28944" +#define FB_BUILD_NO "28945" #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 2010-12-16 00:14:50 UTC (rev 52045) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-16 03:28:01 UTC (rev 52046) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28944 +BuildNum=28945 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...> - 2010-12-17 03:37:05
|
Revision: 52049 http://firebird.svn.sourceforge.net/firebird/?rev=52049&view=rev Author: firebirds Date: 2010-12-17 03:36:58 +0000 (Fri, 17 Dec 2010) 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 2010-12-16 21:11:01 UTC (rev 52048) +++ firebird/trunk/ChangeLog 2010-12-17 03:36:58 UTC (rev 52049) @@ -1,3 +1,7 @@ + 2010-12-16 21:11 asfernandes + M src/dsql/parse.y +Fixed the crash about NEXT VALUE FOR reported in fb-devel + 2010-12-16 00:06 asfernandes M src/jrd/SysFunction.cpp Fixed CORE-3277 - Wrong result for RIGHT(UTF8 varchar) Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-16 21:11:01 UTC (rev 52048) +++ firebird/trunk/src/jrd/build_no.h 2010-12-17 03:36:58 UTC (rev 52049) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28945 + FORMAL BUILD NUMBER:28946 */ -#define PRODUCT_VER_STRING "3.0.0.28945" -#define FILE_VER_STRING "WI-T3.0.0.28945" -#define LICENSE_VER_STRING "WI-T3.0.0.28945" -#define FILE_VER_NUMBER 3, 0, 0, 28945 +#define PRODUCT_VER_STRING "3.0.0.28946" +#define FILE_VER_STRING "WI-T3.0.0.28946" +#define LICENSE_VER_STRING "WI-T3.0.0.28946" +#define FILE_VER_NUMBER 3, 0, 0, 28946 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28945" +#define FB_BUILD_NO "28946" #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 2010-12-16 21:11:01 UTC (rev 52048) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-17 03:36:58 UTC (rev 52049) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28945 +BuildNum=28946 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...> - 2010-12-18 02:17:15
|
Revision: 52054 http://firebird.svn.sourceforge.net/firebird/?rev=52054&view=rev Author: asfernandes Date: 2010-12-18 02:17:06 +0000 (Sat, 18 Dec 2010) Log Message: ----------- Feature CORE-726 - Boolean data type Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/common/cvt.cpp firebird/trunk/src/common/cvt.h firebird/trunk/src/common/dsc.cpp firebird/trunk/src/common/dsc.h firebird/trunk/src/common/dsc_pub.h firebird/trunk/src/dsql/BoolNodes.cpp firebird/trunk/src/dsql/BoolNodes.h firebird/trunk/src/dsql/ExprNodes.cpp firebird/trunk/src/dsql/ExprNodes.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/ddl_proto.h firebird/trunk/src/dsql/dsql.cpp firebird/trunk/src/dsql/gen.cpp firebird/trunk/src/dsql/make.cpp firebird/trunk/src/dsql/make_proto.h firebird/trunk/src/dsql/parse.y firebird/trunk/src/dsql/pass1.cpp firebird/trunk/src/dsql/sqlda_pub.h 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/isql/isql.epp firebird/trunk/src/isql/isql.h firebird/trunk/src/jrd/DataTypeUtil.cpp firebird/trunk/src/jrd/Optimizer.cpp firebird/trunk/src/jrd/align.h firebird/trunk/src/jrd/blp.h firebird/trunk/src/jrd/blr.h firebird/trunk/src/jrd/btr.cpp firebird/trunk/src/jrd/btr.h firebird/trunk/src/jrd/cvt2.cpp firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/evl.cpp firebird/trunk/src/jrd/extds/IscDS.cpp firebird/trunk/src/jrd/fun.epp firebird/trunk/src/jrd/mov.cpp firebird/trunk/src/jrd/mov_proto.h firebird/trunk/src/jrd/opt.cpp firebird/trunk/src/jrd/par.cpp firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql firebird/trunk/src/remote/parser.cpp firebird/trunk/src/remote/protocol.cpp firebird/trunk/src/utilities/ntrace/TracePluginImpl.cpp firebird/trunk/src/yvalve/array.epp firebird/trunk/src/yvalve/gds.cpp firebird/trunk/src/yvalve/keywords.cpp firebird/trunk/src/yvalve/utly.cpp Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2010-12-18 02:17:06 UTC (rev 52054) @@ -1456,6 +1456,8 @@ PARAMETER (GDS__bad_events_handle = 335545021) INTEGER*4 GDS__cannot_copy_stmt PARAMETER (GDS__cannot_copy_stmt = 335545022) + INTEGER*4 GDS__invalid_boolean_usage + PARAMETER (GDS__invalid_boolean_usage = 335545023) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/lang_helpers/gds_codes.pas 2010-12-18 02:17:06 UTC (rev 52054) @@ -735,6 +735,7 @@ gds_request_outdated = 335545020; gds_bad_events_handle = 335545021; gds_cannot_copy_stmt = 335545022; + gds_invalid_boolean_usage = 335545023; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/common/cvt.cpp =================================================================== --- firebird/trunk/src/common/cvt.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/common/cvt.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -1001,6 +1001,7 @@ case dtype_timestamp: case dtype_array: case dtype_dbkey: + case dtype_boolean: CVT_conversion_error(desc, err); break; @@ -1043,6 +1044,17 @@ } +// Get the value of a boolean descriptor. +bool CVT_get_boolean(const dsc* desc, ErrorFunction err) +{ + if (desc->dsc_dtype == dtype_boolean) + return *desc->dsc_address != '\0'; + + CVT_conversion_error(desc, err); + return false; // silence warning +} + + double CVT_get_double(const dsc* desc, ErrorFunction err) { /************************************** @@ -1241,6 +1253,7 @@ case dtype_blob: case dtype_array: case dtype_dbkey: + case dtype_boolean: CVT_conversion_error(desc, err); break; @@ -1340,6 +1353,7 @@ case dtype_quad: case dtype_real: case dtype_double: + case dtype_boolean: CVT_conversion_error(from, cb->err); break; } @@ -1372,6 +1386,7 @@ case dtype_quad: case dtype_real: case dtype_double: + case dtype_boolean: CVT_conversion_error(from, cb->err); break; } @@ -1404,6 +1419,7 @@ case dtype_quad: case dtype_real: case dtype_double: + case dtype_boolean: CVT_conversion_error(from, cb->err); break; } @@ -1608,6 +1624,8 @@ default: fb_assert(false); // Fall into ... + + case dtype_boolean: case dtype_blob: CVT_conversion_error(from, cb->err); return; @@ -1695,6 +1713,10 @@ *(double*) p = CVT_get_double(from, cb->err); #endif return; + + case dtype_boolean: + CVT_conversion_error(from, cb->err); + break; } if (from->dsc_dtype == dtype_array || from->dsc_dtype == dtype_blob) @@ -1726,6 +1748,8 @@ p = "BLOB"; else if (desc->dsc_dtype == dtype_array) p = "ARRAY"; + else if (desc->dsc_dtype == dtype_boolean) + p = "BOOLEAN"; else { // CVC: I don't have access here to JRD_get_thread_data())->tdbb_status_vector @@ -2401,6 +2425,7 @@ case dtype_timestamp: case dtype_array: case dtype_dbkey: + case dtype_boolean: CVT_conversion_error(desc, err); break; @@ -2547,6 +2572,7 @@ case dtype_timestamp: case dtype_array: case dtype_dbkey: + case dtype_boolean: CVT_conversion_error(desc, err); break; Modified: firebird/trunk/src/common/cvt.h =================================================================== --- firebird/trunk/src/common/cvt.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/common/cvt.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -69,6 +69,7 @@ void CVT_conversion_error(const dsc*, ErrorFunction); double CVT_power_of_ten(const int); SLONG CVT_get_long(const dsc*, SSHORT, ErrorFunction); +bool CVT_get_boolean(const dsc*, ErrorFunction); double CVT_get_double(const dsc*, ErrorFunction); USHORT CVT_make_string(const dsc*, USHORT, const char**, vary*, USHORT, ErrorFunction); void CVT_move_common(const dsc*, dsc*, Firebird::Callbacks*); Modified: firebird/trunk/src/common/dsc.cpp =================================================================== --- firebird/trunk/src/common/dsc.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/common/dsc.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -61,7 +61,8 @@ 9, // dtype_blob FFFF:FFFF 9, // dtype_array FFFF:FFFF 20, // dtype_int64 -9223372036854775808 - 0 // dtype_dbkey + 0, // dtype_dbkey + 5 // dtype_boolean }; // blr to dsc type conversions @@ -85,7 +86,8 @@ blr_blob, blr_blob, blr_int64, - blr_null + blr_null, + blr_bool }; // Unimplemented names are in lowercase & <brackets> @@ -112,7 +114,8 @@ "BLOB", "ARRAY", "BIGINT", - "DB_KEY" + "DB_KEY", + "BOOLEAN" }; @@ -130,7 +133,7 @@ dtype_short dtype_long dtype_quad dtype_real dtype_double dtype_d_float dtype_sql_date dtype_sql_time dtype_timestamp dtype_blob dtype_array dtype_int64 - dtype_dbkey + dtype_dbkey, dtype_boolean */ // dtype_unknown @@ -139,7 +142,7 @@ dtype_unknown, dtype_unknown, DTYPE_CANNOT, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, dtype_unknown, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_text {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -147,7 +150,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_cstring {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -155,7 +158,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_varying {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -163,7 +166,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 4 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -171,7 +174,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 5 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -179,7 +182,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_packed {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -187,7 +190,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_byte {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -195,7 +198,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_short {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -203,7 +206,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_long {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -211,7 +214,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_quad {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -219,7 +222,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_real {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -227,7 +230,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_double {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -235,7 +238,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_d_float -- VMS deprecated {dtype_unknown, dtype_d_float, dtype_d_float, dtype_d_float, @@ -243,7 +246,7 @@ dtype_d_float, dtype_d_float, DTYPE_CANNOT, dtype_d_float, dtype_d_float, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_d_float, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_date {dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -251,7 +254,7 @@ dtype_sql_date, dtype_sql_date, DTYPE_CANNOT, dtype_sql_date, dtype_sql_date, dtype_sql_date, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_sql_date, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_time {dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -259,7 +262,7 @@ dtype_sql_time, dtype_sql_time, DTYPE_CANNOT, dtype_sql_time, dtype_sql_time, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_sql_time, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_timestamp {dtype_unknown, dtype_timestamp, dtype_timestamp, dtype_timestamp, @@ -267,7 +270,7 @@ dtype_timestamp, dtype_timestamp, DTYPE_CANNOT, dtype_timestamp, dtype_timestamp, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_blob {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -275,7 +278,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_array {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -283,7 +286,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_int64 {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -291,7 +294,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, dtype_sql_date, dtype_sql_time, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_dbkey {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -299,8 +302,16 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT} + DTYPE_CANNOT, DTYPE_CANNOT}, + // dtype_boolean + {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT} + }; /* The result of subtracting two datatypes in blr_version5 semantics @@ -317,7 +328,7 @@ dtype_short dtype_long dtype_quad dtype_real dtype_double dtype_d_float dtype_sql_date dtype_sql_time dtype_timestamp dtype_blob dtype_array dtype_int64 - dtype_dbkey + dtype_dbkey, dtype_boolean */ // dtype_unknown @@ -326,7 +337,7 @@ dtype_unknown, dtype_unknown, DTYPE_CANNOT, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, dtype_unknown, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_text {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -334,7 +345,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_cstring {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -342,7 +353,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_varying {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -350,7 +361,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 4 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -358,7 +369,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 5 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -366,7 +377,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_packed {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -374,7 +385,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_byte {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -382,7 +393,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_short {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -390,7 +401,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_long {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -398,7 +409,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_quad {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -406,7 +417,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_real {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -414,7 +425,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_double {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -422,7 +433,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_d_float -- VMS deprecated {dtype_unknown, dtype_d_float, dtype_d_float, dtype_d_float, @@ -430,7 +441,7 @@ dtype_d_float, dtype_d_float, DTYPE_CANNOT, dtype_d_float, dtype_d_float, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_d_float, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_date {dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -438,7 +449,7 @@ dtype_sql_date, dtype_sql_date, DTYPE_CANNOT, dtype_sql_date, dtype_sql_date, dtype_sql_date, dtype_long, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_sql_date, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_time {dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -446,7 +457,7 @@ dtype_sql_time, dtype_sql_time, DTYPE_CANNOT, dtype_sql_time, dtype_sql_time, dtype_sql_time, DTYPE_CANNOT, dtype_long, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_sql_time, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_timestamp {dtype_unknown, dtype_timestamp, dtype_timestamp, dtype_timestamp, @@ -454,7 +465,7 @@ dtype_timestamp, dtype_timestamp, DTYPE_CANNOT, dtype_timestamp, dtype_timestamp, dtype_timestamp, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, DTYPE_CANNOT, DTYPE_CANNOT, dtype_timestamp, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_blob {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -462,7 +473,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_array {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -470,7 +481,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_int64 {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -478,7 +489,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_dbkey {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -486,7 +497,15 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT} + DTYPE_CANNOT, DTYPE_CANNOT}, + + // dtype_boolean + {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT} }; @@ -504,7 +523,7 @@ dtype_short dtype_long dtype_quad dtype_real dtype_double dtype_d_float dtype_sql_date dtype_sql_time dtype_timestamp dtype_blob dtype_array dtype_int64 - dtype_dbkey + dtype_dbkey, dtype_boolean */ // dtype_unknown @@ -513,7 +532,7 @@ dtype_unknown, dtype_unknown, DTYPE_CANNOT, dtype_unknown, dtype_unknown, dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_unknown, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_text {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -521,7 +540,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_cstring {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -529,7 +548,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_varying {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -537,7 +556,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 4 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -545,7 +564,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 5 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -553,7 +572,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_packed {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -561,7 +580,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_byte {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -569,7 +588,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_short {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -577,7 +596,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_long {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -585,7 +604,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_quad {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -593,7 +612,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_real {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -601,7 +620,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_double {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -609,7 +628,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_d_float -- VMS deprecated {dtype_unknown, dtype_d_float, dtype_d_float, dtype_d_float, @@ -617,7 +636,7 @@ dtype_d_float, dtype_d_float, DTYPE_CANNOT, dtype_d_float, dtype_d_float, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_d_float, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_date {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -625,7 +644,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_time {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -633,7 +652,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_timestamp {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -641,7 +660,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_blob {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -649,7 +668,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_array {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -657,7 +676,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_int64 {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -665,7 +684,7 @@ dtype_int64, dtype_int64, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_int64, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_dbkey {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -673,8 +692,16 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT} + DTYPE_CANNOT, DTYPE_CANNOT}, + // dtype_boolean + {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT} + }; /* The result of multiplying two datatypes in blr_version4 semantics. @@ -691,7 +718,7 @@ dtype_short dtype_long dtype_quad dtype_real dtype_double dtype_d_float dtype_sql_date dtype_sql_time dtype_timestamp dtype_blob dtype_array dtype_int64 - dtype_dbkey + dtype_dbkey, dtype_boolean */ // dtype_unknown @@ -700,7 +727,7 @@ dtype_unknown, dtype_unknown, DTYPE_CANNOT, dtype_unknown, dtype_unknown, dtype_unknown, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_unknown, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_text {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -708,7 +735,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_cstring {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -716,7 +743,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_varying {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -724,7 +751,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 4 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -732,7 +759,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // 5 (unused) {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -740,7 +767,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_packed {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -748,7 +775,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_byte {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -756,7 +783,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_short {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -764,7 +791,7 @@ dtype_long, dtype_long, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_long {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -772,7 +799,7 @@ dtype_long, dtype_long, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_quad {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -780,7 +807,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_real {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -788,7 +815,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_double {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -796,7 +823,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_d_float -- VMS deprecated {dtype_unknown, dtype_d_float, dtype_d_float, dtype_d_float, @@ -804,7 +831,7 @@ dtype_d_float, dtype_d_float, DTYPE_CANNOT, dtype_d_float, dtype_d_float, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_d_float, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_date {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -812,7 +839,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_sql_time {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -820,7 +847,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_timestamp {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -828,7 +855,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_blob {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -836,7 +863,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_array {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -844,7 +871,7 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_int64 {dtype_unknown, dtype_double, dtype_double, dtype_double, @@ -852,7 +879,7 @@ dtype_double, dtype_double, DTYPE_CANNOT, dtype_double, dtype_double, dtype_d_float, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, dtype_double, - DTYPE_CANNOT}, + DTYPE_CANNOT, DTYPE_CANNOT}, // dtype_dbkey {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, @@ -860,8 +887,16 @@ DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, - DTYPE_CANNOT} + DTYPE_CANNOT, DTYPE_CANNOT}, + // dtype_boolean + {DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, DTYPE_CANNOT, + DTYPE_CANNOT, DTYPE_CANNOT} + }; #ifdef DEV_BUILD @@ -997,6 +1032,11 @@ desc->setTextType(INTL_CS_COLL_TO_TTYPE(charset, collation)); break; + case blr_bool: + desc->dsc_length = sizeof(UCHAR); + desc->dsc_dtype = dtype_boolean; + break; + default: fb_assert(FALSE); desc->dsc_dtype = dtype_unknown; @@ -1123,6 +1163,8 @@ return "bigint"; case dtype_dbkey: return "dbkey"; + case dtype_boolean: + return "boolean"; default: return "out of range"; } Modified: firebird/trunk/src/common/dsc.h =================================================================== --- firebird/trunk/src/common/dsc.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/common/dsc.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -251,6 +251,14 @@ dsc_address = (UCHAR*) address; } + void makeBoolean(UCHAR* address = NULL) + { + clear(); + dsc_dtype = dtype_boolean; + dsc_length = sizeof(UCHAR); + dsc_address = address; + } + void makeNullString() { clear(); Modified: firebird/trunk/src/common/dsc_pub.h =================================================================== --- firebird/trunk/src/common/dsc_pub.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/common/dsc_pub.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -60,7 +60,8 @@ #define dtype_array 18 #define dtype_int64 19 #define dtype_dbkey 20 -#define DTYPE_TYPE_MAX 21 +#define dtype_boolean 21 +#define DTYPE_TYPE_MAX 22 #define ISC_TIME_SECONDS_PRECISION 10000 #define ISC_TIME_SECONDS_PRECISION_SCALE (-4) Modified: firebird/trunk/src/dsql/BoolNodes.cpp =================================================================== --- firebird/trunk/src/dsql/BoolNodes.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/BoolNodes.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -340,6 +340,7 @@ dsqlArg2(aArg2), dsqlArg3(aArg3), dsqlFlag(DFLAG_NONE), + dsqlWasValue(false), arg1(NULL), arg2(NULL), arg3(NULL) @@ -380,6 +381,40 @@ BoolExprNode* ComparativeBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) { + dsql_nod* procArg1 = dsqlArg1; + dsql_nod* procArg2 = dsqlArg2; + dsql_nod* procArg3 = dsqlArg3; + + // Make INSERTING/UPDATING/DELETING in booleans to read the trigger action. + + if (dsqlWasValue && procArg1->nod_type == Dsql::nod_field_name) + { + const char* fieldName = ((dsql_str*) procArg1->nod_arg[Dsql::e_fln_name])->str_data; + + static const char* const NAMES[] = { + "INSERTING", + "UPDATING", + "DELETING" + }; + + for (size_t i = 0; i < FB_NELEM(NAMES); ++i) + { + if (strcmp(fieldName, NAMES[i]) == 0) + { + thread_db* tdbb = JRD_get_thread_data(); + + InternalInfoNode* infoNode = FB_NEW(*tdbb->getDefaultPool()) InternalInfoNode( + *tdbb->getDefaultPool(), + MAKE_const_slong(SLONG(InternalInfoNode::INFO_TYPE_TRIGGER_ACTION))); + + procArg1 = MAKE_node(Dsql::nod_class_exprnode, 1); + procArg1->nod_arg[0] = reinterpret_cast<dsql_nod*>(infoNode); + + procArg2 = MAKE_const_slong(i + 1); + } + } + } + switch (blrOp) { case blr_eql: @@ -388,13 +423,13 @@ case blr_geq: case blr_lss: case blr_leq: - if (dsqlArg2->nod_type == Dsql::nod_list) + if (procArg2->nod_type == Dsql::nod_list) { int listItemCount = 0; BoolExprNode* resultNode = NULL; - dsql_nod** ptr = dsqlArg2->nod_arg; + dsql_nod** ptr = procArg2->nod_arg; - for (const dsql_nod* const* const end = ptr + dsqlArg2->nod_count; + for (const dsql_nod* const* const end = ptr + procArg2->nod_count; ptr != end; ++listItemCount, ++ptr) { if (listItemCount >= MAX_MEMBER_LIST) @@ -407,7 +442,7 @@ DEV_BLKCHK(*ptr, dsql_type_nod); ComparativeBoolNode* temp = FB_NEW(getPool()) ComparativeBoolNode(getPool(), - blrOp, dsqlArg1, *ptr); + blrOp, procArg1, *ptr); if (resultNode) { @@ -429,8 +464,8 @@ return resultNode->dsqlPass(dsqlScratch); } - if (dsqlArg2->nod_type == Dsql::nod_select_expr && - !(dsqlArg2->nod_flags & NOD_SELECT_EXPR_SINGLETON)) + if (procArg2->nod_type == Dsql::nod_select_expr && + !(procArg2->nod_flags & NOD_SELECT_EXPR_SINGLETON)) { UCHAR newBlrOp = blr_any; @@ -446,8 +481,8 @@ } ComparativeBoolNode* node = FB_NEW(getPool()) ComparativeBoolNode(getPool(), blrOp, - PASS1_node(dsqlScratch, dsqlArg1), PASS1_node(dsqlScratch, dsqlArg2), - PASS1_node(dsqlScratch, dsqlArg3)); + PASS1_node(dsqlScratch, procArg1), PASS1_node(dsqlScratch, procArg2), + PASS1_node(dsqlScratch, procArg3)); switch (blrOp) { @@ -459,6 +494,7 @@ case blr_leq: case blr_equiv: case blr_between: + { // Try to force arg1 to be same type as arg2 eg: ? = FIELD case PASS1_set_parameter_type(dsqlScratch, node->dsqlArg1, node->dsqlArg2, false); @@ -473,7 +509,21 @@ // ? BETWEEN Y AND ? case PASS1_set_parameter_type(dsqlScratch, node->dsqlArg3, node->dsqlArg2, false); } + + dsc desc1, desc2; + + MAKE_desc(dsqlScratch, &desc1, node->dsqlArg1); + MAKE_desc(dsqlScratch, &desc2, node->dsqlArg2); + + if ((desc1.dsc_dtype == dtype_boolean || desc2.dsc_dtype == dtype_boolean) && + desc1.dsc_dtype != desc2.dsc_dtype) + { + ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << + Arg::Gds(isc_invalid_boolean_usage)); + } + break; + } case blr_containing: case blr_like: @@ -1546,6 +1596,7 @@ ComparativeBoolNode* node = FB_NEW(getPool()) ComparativeBoolNode( getPool(), newBlrOp, cmpArg->dsqlArg1, cmpArg->dsqlArg2); + node->dsqlWasValue = cmpArg->dsqlWasValue; if (cmpArg->dsqlFlag == ComparativeBoolNode::DFLAG_ANSI_ANY) node->dsqlFlag = ComparativeBoolNode::DFLAG_ANSI_ALL; Modified: firebird/trunk/src/dsql/BoolNodes.h =================================================================== --- firebird/trunk/src/dsql/BoolNodes.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/BoolNodes.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -110,6 +110,7 @@ dsql_nod* dsqlArg2; dsql_nod* dsqlArg3; DsqlFlag dsqlFlag; + bool dsqlWasValue; NestConst<ValueExprNode> arg1; NestConst<ValueExprNode> arg2; NestConst<ValueExprNode> arg3; Modified: firebird/trunk/src/dsql/ExprNodes.cpp =================================================================== --- firebird/trunk/src/dsql/ExprNodes.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/ExprNodes.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -20,6 +20,7 @@ #include "firebird.h" #include <math.h> +#include <ctype.h> #include "../common/common.h" #include "../common/classes/FpeControl.h" #include "../common/classes/VaryStr.h" @@ -2490,6 +2491,93 @@ //-------------------- +static RegisterNode<BoolAsValueNode> regBoolAsValueNode(blr_bool_as_value); + +BoolAsValueNode::BoolAsValueNode(MemoryPool& pool, dsql_nod* aBoolean) + : TypedNode<ValueExprNode, ExprNode::TYPE_BOOL_AS_VALUE>(pool), + dsqlBoolean(aBoolean), + boolean(NULL) +{ + addChildNode(dsqlBoolean, boolean); +} + +DmlNode* BoolAsValueNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/) +{ + BoolAsValueNode* node = FB_NEW(pool) BoolAsValueNode(pool); + node->boolean = PAR_parse_boolean(tdbb, csb); + return node; +} + +void BoolAsValueNode::print(string& text, Array<dsql_nod*>& nodes) const +{ + text = "BoolAsValueNode"; + ExprNode::print(text, nodes); +} + +ValueExprNode* BoolAsValueNode::dsqlPass(DsqlCompilerScratch* dsqlScratch) +{ + BoolAsValueNode* node = FB_NEW(getPool()) BoolAsValueNode(getPool(), + PASS1_node(dsqlScratch, dsqlBoolean)); + + return node; +} + +void BoolAsValueNode::genBlr(DsqlCompilerScratch* dsqlScratch) +{ + dsqlScratch->appendUChar(blr_bool_as_value); + GEN_expr(dsqlScratch, dsqlBoolean); +} + +void BoolAsValueNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc) +{ + desc->makeBoolean(); + desc->setNullable(true); +} + +void BoolAsValueNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc) +{ + desc->makeBoolean(); + desc->setNullable(true); +} + +ValueExprNode* BoolAsValueNode::copy(thread_db* tdbb, NodeCopier& copier) +{ + BoolAsValueNode* node = FB_NEW(*tdbb->getDefaultPool()) BoolAsValueNode(*tdbb->getDefaultPool()); + node->boolean = copier.copy(tdbb, boolean); + return node; +} + +ValueExprNode* BoolAsValueNode::pass2(thread_db* tdbb, CompilerScratch* csb) +{ + ValueExprNode::pass2(tdbb, csb); + + dsc desc; + getDesc(tdbb, csb, &desc); + impureOffset = CMP_impure(csb, sizeof(impure_value)); + + return this; +} + +dsc* BoolAsValueNode::execute(thread_db* tdbb, jrd_req* request) const +{ + UCHAR booleanVal = (UCHAR) boolean->execute(tdbb, request); + + if (request->req_flags & req_null) + return NULL; + + impure_value* impure = request->getImpure<impure_value>(impureOffset); + + dsc desc; + desc.makeBoolean(&booleanVal); + EVL_make_value(tdbb, &desc, impure); + + return &impure->vlu_desc; +} + + +//-------------------- + + static RegisterNode<CastNode> regCastNode(blr_cast); CastNode::CastNode(MemoryPool& pool, dsql_nod* aDsqlSource, dsql_fld* aDsqlField) @@ -2749,6 +2837,49 @@ if (!value) return NULL; + dsc desc; + char* text; + UCHAR tempByte; + + if (value->dsc_dtype == dtype_boolean && + (DTYPE_IS_TEXT(impure->vlu_desc.dsc_dtype) || DTYPE_IS_BLOB(impure->vlu_desc.dsc_dtype))) + { + text = const_cast<char*>(MOV_get_boolean(value) ? "TRUE" : "FALSE"); + desc.makeText(strlen(text), CS_ASCII, reinterpret_cast<UCHAR*>(text)); + value = &desc; + } + else if (impure->vlu_desc.dsc_dtype == dtype_boolean && + (DTYPE_IS_TEXT(value->dsc_dtype) || DTYPE_IS_BLOB(value->dsc_dtype))) + { + desc.makeBoolean(&tempByte); + + MoveBuffer buffer; + UCHAR* address; + int len = MOV_make_string2(tdbb, value, CS_ASCII, &address, buffer); + + // Remove heading and trailing spaces. + + while (len > 0 && isspace(*address)) + { + ++address; + --len; + } + + while (len > 0 && isspace(address[len - 1])) + --len; + + if (len == 4 && fb_utils::strnicmp(reinterpret_cast<char*>(address), "TRUE", len) == 0) + { + tempByte = '\1'; + value = &desc; + } + else if (len == 5 && fb_utils::strnicmp(reinterpret_cast<char*>(address), "FALSE", len) == 0) + { + tempByte = '\0'; + value = &desc; + } + } + if (DTYPE_IS_BLOB(value->dsc_dtype) || DTYPE_IS_BLOB(impure->vlu_desc.dsc_dtype)) BLB_move(tdbb, value, &impure->vlu_desc, NULL); else @@ -5055,6 +5186,11 @@ memcpy(p, q, l); break; + case dtype_boolean: + l = 1; + *p = *q; + break; + default: fb_assert(FALSE); } @@ -5191,6 +5327,11 @@ break; } + case dtype_boolean: + GEN_descriptor(dsqlScratch, desc, false); + dsqlScratch->appendUChar(*p != 0); + break; + default: // gen_constant: datatype not understood ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-103) << Modified: firebird/trunk/src/dsql/ExprNodes.h =================================================================== --- firebird/trunk/src/dsql/ExprNodes.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/ExprNodes.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -92,6 +92,34 @@ }; +class BoolAsValueNode : public TypedNode<ValueExprNode, ExprNode::TYPE_BOOL_AS_VALUE> +{ +public: + explicit BoolAsValueNode(MemoryPool& pool, dsql_nod* aBoolean = NULL); + + static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp); + + virtual void print(Firebird::string& text, Firebird::Array<dsql_nod*>& nodes) const; + virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch); + + virtual void setParameterName(dsql_par* parameter) const + { + } + + virtual void genBlr(DsqlCompilerScratch* dsqlScratch); + virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc); + + virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc); + virtual ValueExprNode* copy(thread_db* tdbb, NodeCopier& copier); + virtual ValueExprNode* pass2(thread_db* tdbb, CompilerScratch* csb); + virtual dsc* execute(thread_db* tdbb, jrd_req* request) const; + +public: + dsql_nod* dsqlBoolean; + NestConst<BoolExprNode> boolean; +}; + + class CastNode : public TypedNode<ValueExprNode, ExprNode::TYPE_CAST> { public: Modified: firebird/trunk/src/dsql/Nodes.h =================================================================== --- firebird/trunk/src/dsql/Nodes.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/Nodes.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -326,6 +326,7 @@ // Value types TYPE_AGGREGATE, TYPE_ARITHMETIC, + TYPE_BOOL_AS_VALUE, TYPE_CAST, TYPE_CONCATENATE, TYPE_CURRENT_DATE, @@ -867,7 +868,6 @@ TYPE_SAVEPOINT_ENCLOSE, TYPE_SELECT, TYPE_SET_GENERATOR, - TYPE_SOURCE_INFO, TYPE_STALL, TYPE_STORE, TYPE_SUSPEND, Modified: firebird/trunk/src/dsql/ddl_proto.h =================================================================== --- firebird/trunk/src/dsql/ddl_proto.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/ddl_proto.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -58,7 +58,9 @@ blr_timestamp, // dtype_timestamp blr_blob, // dtype_blob // ASF: CAST use blr_blob2 because blr_blob doesn't fit in UCHAR blr_short, // dtype_array - blr_int64 // dtype_int64 + blr_int64, // dtype_int64 + 0, // DB_KEY + blr_bool // dtype_boolean }; void DDL_execute(Jrd::dsql_req*); Modified: firebird/trunk/src/dsql/dsql.cpp =================================================================== --- firebird/trunk/src/dsql/dsql.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/dsql.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -2405,6 +2405,11 @@ } break; + case blr_bool: + desc.dsc_dtype = dtype_boolean; + desc.dsc_length = sizeof(UCHAR); + break; + default: ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) << Arg::Gds(isc_dsql_sqlda_err)); @@ -3320,6 +3325,10 @@ sql_scale = param->par_desc.dsc_scale; break; + case dtype_boolean: + sql_type = SQL_BOOLEAN; + break; + default: ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) << Arg::Gds(isc_dsql_datatype_err)); Modified: firebird/trunk/src/dsql/gen.cpp =================================================================== --- firebird/trunk/src/dsql/gen.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/gen.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -1082,6 +1082,10 @@ dsqlScratch->appendUShort(desc->getTextType()); break; + case dtype_boolean: + dsqlScratch->appendUChar(blr_bool); + break; + default: // don't understand dtype ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) << Modified: firebird/trunk/src/dsql/make.cpp =================================================================== --- firebird/trunk/src/dsql/make.cpp 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/make.cpp 2010-12-18 02:17:06 UTC (rev 52054) @@ -266,6 +266,13 @@ break; } + case CONSTANT_BOOLEAN: + DEV_BLKCHK(constant, dsql_type_str); + + literal->litDesc.makeBoolean((UCHAR*) constant->str_data); + literal->dsqlStr = constant; + break; + default: fb_assert(numeric_flag == CONSTANT_STRING); DEV_BLKCHK(constant, dsql_type_str); @@ -368,7 +375,8 @@ case nod_class_exprnode: { ValueExprNode* exprNode = reinterpret_cast<ValueExprNode*>(node->nod_arg[0]); - exprNode->make(dsqlScratch, desc); + if (exprNode->kind == DmlNode::KIND_VALUE) + exprNode->make(dsqlScratch, desc); } return; @@ -873,7 +881,11 @@ switch (item->nod_type) { case nod_class_exprnode: - reinterpret_cast<ValueExprNode*>(item->nod_arg[0])->setParameterName(parameter); + { + ValueExprNode* exprNode = reinterpret_cast<ValueExprNode*>(item->nod_arg[0]); + if (exprNode->kind == DmlNode::KIND_VALUE) + exprNode->setParameterName(parameter); + } break; case nod_field: field = (dsql_fld*) item->nod_arg[e_fld_field]; Modified: firebird/trunk/src/dsql/make_proto.h =================================================================== --- firebird/trunk/src/dsql/make_proto.h 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/make_proto.h 2010-12-18 02:17:06 UTC (rev 52054) @@ -43,7 +43,8 @@ CONSTANT_DATE = 2, // stored as a SLONG CONSTANT_TIME = 3, // stored as a ULONG CONSTANT_TIMESTAMP = 4, // stored as a QUAD - CONSTANT_SINT64 = 5 // stored as a SINT64 + CONSTANT_SINT64 = 5, // stored as a SINT64 + CONSTANT_BOOLEAN = 6, // stored as a UCHAR }; // Parameters to MAKE_variable Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2010-12-17 22:32:35 UTC (rev 52053) +++ firebird/trunk/src/dsql/parse.y 2010-12-18 02:17:06 UTC (rev 52054) @@ -581,12 +581,17 @@ %token <legacyNode> ROW_NUMBER %token <legacyNode> SQLSTATE +%token <legacyNode> KW_BOOLEAN +%token <legacyNode> KW_FALSE +%token <legacyNode> KW_TRUE +%token <legacyNode> UNKNOWN + // precedence declarations for expression evaluation %left OR %left AND %left NOT -%left '=' '<' '>' LIKE EQL NEQ GTR LSS GEQ LEQ NOT_GTR NOT_LSS +%left '=' '<' '>' LIKE CONTAINING STARTING SIMILAR KW_IN EQL NEQ GTR LSS GEQ LEQ NOT_GTR NOT_LSS %left '+' '-' %left '*' '/' %left UMINUS UPLUS @@ -805,7 +810,7 @@ %type <legacyNode> update_searched user_grantee user_grantee_list %type <int32Val> unsigned_short_integer -%type <legacyNode> valid_symbol_name value value_list value_list_opt var_decl_opt var_declaration_item +%type <legacyNode> valid_symbol_name value common_value common_value_list common_value_list_opt value_list value_list_opt var_decl_opt var_declaration_item %type <legacyNode> variable variable_list varying_keyword version_mode %type <createAlterViewNode> view_clause @@ -816,6 +821,8 @@ %type <legacyField> alter_col_name column_def_name data_type_descriptor init_data_type simple_column_def_name +%type <legacyNode> boolean_literal + // New nodes %type <intVal> ddl_type0 ddl_type1 ddl_type2 @@ -877,13 +884,12 @@ // Predicates %type <boolExprNode> between_predicate comparison_predicate distinct_predicate %type <boolExprNode> exists_predicate in_predicate binary_pattern_predicate -%type <boolExprNode> null_predicate predicate quantified_predicate search_condition_impl -%type <boolExprNode> singular_predicate ternary_pattern_predicate trigger_action_predicate +%type <boolExprNode> null_predicate predicate quantified_predicate boolean_value_expression +%type <boolExprNode> singular_predicate ternary_pattern_predicate %type <blrOp> binary_pattern_operator ternary_pattern_operator comparison_operator %type <cmpBoolFlag> quantified_flag %type <legacyNode> escape_opt -%type <intVal> trigger_action_code %% @@ -3625,6 +3631,11 @@ lex.g_field->fld_dtype = dtype_timestamp; lex.g_field->fld_length = sizeof (GDS_TIMESTAMP); } + | KW_BOOLEAN + { + lex.g_field->fld_dtype = dtype_boolean; + lex.g_field->fld_length = sizeof(UCHAR); + } ; integer_keyword : INTEGER @@ -4876,11 +4887,22 @@ // boolean expressions search_condition - : search_condition_impl - { $$ = makeClassNode($1); } + : value + { + BoolAsValueNode* node = ExprNode::as<BoolAsValueNode>($1); + if (node) + $$ = node->dsqlBoolean; + else + { + ComparativeBoolNode* cmpNode = newNode<ComparativeBoolNode>( + blr_eql, $1, MAKE_constant(MAKE_string("1", 1), CONSTANT_BOOLEAN)); + cmpNode->dsqlWasValue = true; + $$ = makeClassNode(cmpNode); + } + } ; -search_condition_impl +boolean_value_expression : predicate | search_condition OR search_condition { $$ = newNode<BinaryBoolNode>(blr_or, $1, $3); } @@ -4888,6 +4910,8 @@ { $$ = newNode<BinaryBoolNode>(blr_and, $1, $3); } | NOT search_condition { $$ = newNode<NotBoolNode>($2); } + | '(' boolean_value_expression ')' + { $$ = $2; } ; predicate @@ -4901,16 +4925,20 @@ | quantified_predicate | exists_predicate | singular_predicate - | trigger_action_predicate - | '(' search_condition_impl ')' - { $$ = $2; } + | common_value IS boolean_literal + { $$ = newNode<ComparativeBoolNode>(blr_equiv, $1, $3); } + | common_value IS NOT boolean_literal + { + ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_equiv, $1, $4); + $$ = newNode<NotBoolNode>(makeClassNode(node)); + } ; // comparisons comparison_predicate - : value comparison_operator value + : common_value comparison_operator common_value { $$ = newNode<ComparativeBoolNode>($2, $1, $3); } ; @@ -4927,7 +4955,7 @@ // quantified comparisons quantified_predicate - : value comparison_operator quantified_flag '(' column_select ')' + : common_value comparison_operator quantified_flag '(' column_select ')' { ComparativeBoolNode* node = newNode<ComparativeBoolNode>($2, $1, $5); node->dsqlFlag = $3; @@ -4945,19 +4973,19 @@ // other predicates distinct_predicate - : value IS DISTINCT FROM value + : common_value IS DISTINCT FROM common_value { ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_equiv, $1, $5); $$ = newNode<NotBoolNode>(makeClassNode(node)); } - | value IS NOT DISTINCT FROM value + | common_value IS NOT DISTINCT FROM common_value { $$ = newNode<ComparativeBoolNode>(blr_equiv, $1, $6); } ; between_predicate - : value BETWEEN value AND value + : common_value BETWEEN common_value AND common_value { $$ = newNode<ComparativeBoolNode>(blr_between, $1, $3, $5); } - | value NOT BETWEEN value AND value + | common_value NOT BETWEEN common_value AND common_value { ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_between, $1, $4, $6); $$ = newNode<NotBoolNode>(makeClassNode(node)); @@ -4965,12 +4993,12 @@ ; binary_pattern_predicate - : value binary_pattern_operator value + : common_value binary_pattern_operator common_value { $$ = newNode<ComparativeBoolNode>($2, $1, $3); } - | value NOT binary_pattern_operator value + | common_value NOT binary_pattern_operator common_value { - ComparativeBoolNode* containingNode = newNode<ComparativeBoolNode>($3, $1, $4); - $$ = newNode<NotBoolNode>(makeClassNode(containingNode)); + ComparativeBoolNode* cmpNode = newNode<ComparativeBoolNode>($3, $1, $4); + $$ = newNode<NotBoolNode>(makeClassNode(cmpNode)); } ; @@ -4981,9 +5009,9 @@ ; ternary_pattern_predicate - : value ternary_pattern_operator value escape_opt + : common_value ternary_pattern_operator common_value escape_opt { $$ = newNode<ComparativeBoolNode>($2, $1, $3, $4); } - | value NOT ternary_pattern_operator value escape_opt + | common_value NOT ternary_pattern_operator common_value escape_opt { ComparativeBoolNode* likeNode = newNode<ComparativeBoolNode>($3, $1, $4, $5); $$ = newNode<NotBoolNode>(makeClassNode(likeNode)); @@ -4997,17 +5025,17 @@ escape_opt : { $$ = NULL; } - | ESCAPE value { $$ = $2; } + | ESCAPE common_value { $$ = $2; } ; in_predicate - : value KW_IN in_predicate_value + : common_value KW_IN in_predicate_value { ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_eql, $1, $3); node->ds... [truncated message content] |
From: <fir...@us...> - 2010-12-18 03:18:14
|
Revision: 52055 http://firebird.svn.sourceforge.net/firebird/?rev=52055&view=rev Author: firebirds Date: 2010-12-18 03:18:07 +0000 (Sat, 18 Dec 2010) 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 2010-12-18 02:17:06 UTC (rev 52054) +++ firebird/trunk/ChangeLog 2010-12-18 03:18:07 UTC (rev 52055) @@ -1,3 +1,65 @@ + 2010-12-18 02:17 asfernandes + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/common/cvt.cpp + M src/common/cvt.h + M src/common/dsc.cpp + M src/common/dsc.h + M src/common/dsc_pub.h + M src/dsql/BoolNodes.cpp + M src/dsql/BoolNodes.h + M src/dsql/ExprNodes.cpp + M src/dsql/ExprNodes.h + M src/dsql/Nodes.h + M src/dsql/ddl_proto.h + M src/dsql/dsql.cpp + M src/dsql/gen.cpp + M src/dsql/make.cpp + M src/dsql/make_proto.h + M src/dsql/parse.y + M src/dsql/pass1.cpp + M src/dsql/sqlda_pub.h + 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/isql/isql.epp + M src/isql/isql.h + M src/jrd/DataTypeUtil.cpp + M src/jrd/Optimizer.cpp + M src/jrd/align.h + M src/jrd/blp.h + M src/jrd/blr.h + M src/jrd/btr.cpp + M src/jrd/btr.h + M src/jrd/cvt2.cpp + M src/jrd/dfw.epp + M src/jrd/evl.cpp + M src/jrd/extds/IscDS.cpp + M src/jrd/fun.epp + M src/jrd/mov.cpp + M src/jrd/mov_proto.h + M src/jrd/opt.cpp + M src/jrd/par.cpp + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql + M src/remote/parser.cpp + M src/remote/protocol.cpp + M src/utilities/ntrace/TracePluginImpl.cpp + M src/yvalve/array.epp + M src/yvalve/gds.cpp + M src/yvalve/keywords.cpp + M src/yvalve/utly.cpp +Feature CORE-726 - Boolean data type + + 2010-12-17 22:32 hvlad + M src/jrd/svc.cpp + M src/jrd/svc.h + M src/jrd/trace/TraceService.cpp +Frontport better fix for bug CORE-3266 : Race condition between async service detach request and running user trace service + 2010-12-16 21:11 asfernandes M src/dsql/parse.y Fixed the crash about NEXT VALUE FOR reported in fb-devel Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2010-12-18 02:17:06 UTC (rev 52054) +++ firebird/trunk/src/jrd/build_no.h 2010-12-18 03:18:07 UTC (rev 52055) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28946 + FORMAL BUILD NUMBER:28948 */ -#define PRODUCT_VER_STRING "3.0.0.28946" -#define FILE_VER_STRING "WI-T3.0.0.28946" -#define LICENSE_VER_STRING "WI-T3.0.0.28946" -#define FILE_VER_NUMBER 3, 0, 0, 28946 +#define PRODUCT_VER_STRING "3.0.0.28948" +#define FILE_VER_STRING "WI-T3.0.0.28948" +#define LICENSE_VER_STRING "WI-T3.0.0.28948" +#define FILE_VER_NUMBER 3, 0, 0, 28948 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28946" +#define FB_BUILD_NO "28948" #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 2010-12-18 02:17:06 UTC (rev 52054) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-18 03:18:07 UTC (rev 52055) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28946 +BuildNum=28948 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...> - 2010-12-19 03:19:32
|
Revision: 52059 http://firebird.svn.sourceforge.net/firebird/?rev=52059&view=rev Author: firebirds Date: 2010-12-19 03:19:26 +0000 (Sun, 19 Dec 2010) 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 2010-12-18 19:13:33 UTC (rev 52058) +++ firebird/trunk/ChangeLog 2010-12-19 03:19:26 UTC (rev 52059) @@ -1,3 +1,9 @@ + 2010-12-18 19:13 dimitr + D src/lock/driver.cpp + D src/lock/reset.cpp + D src/lock/ulimit.cpp +Cleanup. + 2010-12-18 02:17 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 2010-12-18 19:13:33 UTC (rev 52058) +++ firebird/trunk/src/jrd/build_no.h 2010-12-19 03:19:26 UTC (rev 52059) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:28948 + FORMAL BUILD NUMBER:28949 */ -#define PRODUCT_VER_STRING "3.0.0.28948" -#define FILE_VER_STRING "WI-T3.0.0.28948" -#define LICENSE_VER_STRING "WI-T3.0.0.28948" -#define FILE_VER_NUMBER 3, 0, 0, 28948 +#define PRODUCT_VER_STRING "3.0.0.28949" +#define FILE_VER_STRING "WI-T3.0.0.28949" +#define LICENSE_VER_STRING "WI-T3.0.0.28949" +#define FILE_VER_NUMBER 3, 0, 0, 28949 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "28948" +#define FB_BUILD_NO "28949" #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 2010-12-18 19:13:33 UTC (rev 52058) +++ firebird/trunk/src/misc/writeBuildNum.sh 2010-12-19 03:19:26 UTC (rev 52059) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=28948 +BuildNum=28949 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |