|
From: <ro...@us...> - 2014-04-09 02:28:42
|
Revision: 59401
http://sourceforge.net/p/firebird/code/59401
Author: robocop
Date: 2014-04-09 02:28:38 +0000 (Wed, 09 Apr 2014)
Log Message:
-----------
Implemented STEP for generators/sequences and took the opportunity to make the blrOp param const. Please rebuild the databases.
Modified Paths:
--------------
firebird/trunk/lang_helpers/gds_codes.ftn
firebird/trunk/lang_helpers/gds_codes.pas
firebird/trunk/src/burp/backup.epp
firebird/trunk/src/burp/burp.h
firebird/trunk/src/burp/restore.epp
firebird/trunk/src/dsql/AggNodes.cpp
firebird/trunk/src/dsql/AggNodes.h
firebird/trunk/src/dsql/BoolNodes.cpp
firebird/trunk/src/dsql/BoolNodes.h
firebird/trunk/src/dsql/DdlNodes.epp
firebird/trunk/src/dsql/DdlNodes.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/WinNodes.cpp
firebird/trunk/src/dsql/parse.y
firebird/trunk/src/include/gen/codetext.h
firebird/trunk/src/include/gen/iberror.h
firebird/trunk/src/include/gen/ids.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/extract.epp
firebird/trunk/src/isql/show.epp
firebird/trunk/src/jrd/RecordSourceNodes.cpp
firebird/trunk/src/jrd/RecordSourceNodes.h
firebird/trunk/src/jrd/blp.h
firebird/trunk/src/jrd/blr.h
firebird/trunk/src/jrd/fields.h
firebird/trunk/src/jrd/ini.epp
firebird/trunk/src/jrd/irq.h
firebird/trunk/src/jrd/met.epp
firebird/trunk/src/jrd/met_proto.h
firebird/trunk/src/jrd/names.h
firebird/trunk/src/jrd/par_proto.h
firebird/trunk/src/jrd/relations.h
firebird/trunk/src/msgs/facilities2.sql
firebird/trunk/src/msgs/messages2.sql
firebird/trunk/src/msgs/system_errors2.sql
firebird/trunk/src/yvalve/gds.cpp
firebird/trunk/src/yvalve/keywords.cpp
Modified: firebird/trunk/lang_helpers/gds_codes.ftn
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.ftn 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/lang_helpers/gds_codes.ftn 2014-04-09 02:28:38 UTC (rev 59401)
@@ -1848,6 +1848,8 @@
PARAMETER (GDS__dyn_duplicate_package_item = 336068894)
INTEGER*4 GDS__dyn_cant_modify_sysobj
PARAMETER (GDS__dyn_cant_modify_sysobj = 336068895)
+ INTEGER*4 GDS__dyn_cant_use_zero_step
+ PARAMETER (GDS__dyn_cant_use_zero_step = 336068896)
INTEGER*4 GDS__gbak_unknown_switch
PARAMETER (GDS__gbak_unknown_switch = 336330753)
INTEGER*4 GDS__gbak_page_size_missing
Modified: firebird/trunk/lang_helpers/gds_codes.pas
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.pas 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/lang_helpers/gds_codes.pas 2014-04-09 02:28:38 UTC (rev 59401)
@@ -931,6 +931,7 @@
gds_dyn_alter_user_no_clause = 336068891;
gds_dyn_duplicate_package_item = 336068894;
gds_dyn_cant_modify_sysobj = 336068895;
+ gds_dyn_cant_use_zero_step = 336068896;
gds_gbak_unknown_switch = 336330753;
gds_gbak_page_size_missing = 336330754;
gds_gbak_page_size_toobig = 336330755;
Modified: firebird/trunk/src/burp/backup.epp
===================================================================
--- firebird/trunk/src/burp/backup.epp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/burp/backup.epp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -3171,6 +3171,8 @@
if (!X.RDB$INITIAL_VALUE.NULL)
put_int64(att_gen_init_val, X.RDB$INITIAL_VALUE);
+ put_int32(att_gen_id_step, X.RDB$GENERATOR_STEP);
+
put(tdgbl, att_end);
MISC_terminate (X.RDB$GENERATOR_NAME, temp, l, sizeof(temp));
BURP_verbose (165, SafeArg() << temp << value);
Modified: firebird/trunk/src/burp/burp.h
===================================================================
--- firebird/trunk/src/burp/burp.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/burp/burp.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -496,6 +496,7 @@
att_gen_owner_name,
att_gen_sysflag,
att_gen_init_val,
+ att_gen_id_step,
// Stored procedure attributes
Modified: firebird/trunk/src/burp/restore.epp
===================================================================
--- firebird/trunk/src/burp/restore.epp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/burp/restore.epp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -155,7 +155,8 @@
void restore_security_class(BurpGlobals* tdgbl, const TEXT*, const TEXT*);
USHORT get_view_base_relation_count(BurpGlobals* tdgbl, const TEXT*, USHORT, bool* error);
void store_blr_gen_id(BurpGlobals* tdgbl, const TEXT* gen_name, SINT64 value, SINT64 initial_value,
- const ISC_QUAD* gen_desc, const char* secclass, const char* ownername, fb_sysflag sysFlag);
+ const ISC_QUAD* gen_desc, const char* secclass, const char* ownername, fb_sysflag sysFlag,
+ SLONG step);
void update_global_field(BurpGlobals* tdgbl);
void update_view_dbkey_lengths(BurpGlobals* tdgbl);
void fix_missing_privileges(BurpGlobals* tdgbl);
@@ -5172,6 +5173,7 @@
**************************************/
SINT64 value = 0;
SINT64 initial_value = 0;
+ SLONG step = 1;
BASED_ON RDB$GENERATORS.RDB$GENERATOR_NAME name = "";
BASED_ON RDB$GENERATORS.RDB$SECURITY_CLASS secclass = "";
@@ -5247,6 +5249,13 @@
bad_attribute(scan_next_attr, attribute, 289);
break;
+ case att_gen_id_step:
+ if (tdgbl->RESTORE_format >= 10)
+ step = get_int32(tdgbl);
+ else
+ bad_attribute(scan_next_attr, attribute, 289);
+ break;
+
default:
bad_attribute(scan_next_attr, attribute, 289);
// msg 289 generator
@@ -5259,7 +5268,7 @@
value = 0;
}
- store_blr_gen_id(tdgbl, name, value, initial_value, descPtr, secPtr, ownerPtr, sysFlag);
+ store_blr_gen_id(tdgbl, name, value, initial_value, descPtr, secPtr, ownerPtr, sysFlag, step);
return true;
}
@@ -7791,7 +7800,7 @@
case rec_gen_id:
gen_id = get_int32(tdgbl);
- store_blr_gen_id(tdgbl, name, gen_id, 0, NULL, NULL, NULL, fb_sysflag_user);
+ store_blr_gen_id(tdgbl, name, gen_id, 0, NULL, NULL, NULL, fb_sysflag_user, 1);
get_record(&record, tdgbl);
break;
@@ -10288,7 +10297,8 @@
void store_blr_gen_id(BurpGlobals* tdgbl, const TEXT* gen_name, SINT64 value, SINT64 initial_value,
- const ISC_QUAD* gen_desc, const char* secclass, const char* ownername, fb_sysflag sysFlag)
+ const ISC_QUAD* gen_desc, const char* secclass, const char* ownername, fb_sysflag sysFlag,
+ SLONG step)
{
/**************************************
*
@@ -10327,6 +10337,7 @@
}
X.RDB$INITIAL_VALUE.NULL = FALSE;
X.RDB$INITIAL_VALUE = initial_value;
+ X.RDB$GENERATOR_STEP = step;
END_STORE;
ON_ERROR
general_on_error ();
Modified: firebird/trunk/src/dsql/AggNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/AggNodes.cpp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/AggNodes.cpp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -435,7 +435,7 @@
dsqlCompatDialectVerb = "avg";
}
-DmlNode* AvgAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* AvgAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
AvgAggNode* node = FB_NEW(pool) AvgAggNode(pool,
(blrOp == blr_agg_average_distinct),
@@ -651,7 +651,7 @@
addChildNode(delimiter, delimiter);
}
-DmlNode* ListAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* ListAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
ListAggNode* node = FB_NEW(pool) ListAggNode(pool,
(blrOp == blr_agg_list_distinct));
@@ -777,7 +777,7 @@
{
}
-DmlNode* CountAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* CountAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
CountAggNode* node = FB_NEW(pool) CountAggNode(pool,
(blrOp == blr_agg_count_distinct),
@@ -868,7 +868,7 @@
dsqlCompatDialectVerb = "sum";
}
-DmlNode* SumAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* SumAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
SumAggNode* node = FB_NEW(pool) SumAggNode(pool, (blrOp == blr_agg_total_distinct),
(csb->blrVersion == 4));
@@ -1100,7 +1100,7 @@
{
}
-DmlNode* MaxMinAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* MaxMinAggNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
MaxMinAggNode* node = FB_NEW(pool) MaxMinAggNode(pool,
(blrOp == blr_agg_max ? TYPE_MAX : TYPE_MIN));
Modified: firebird/trunk/src/dsql/AggNodes.h
===================================================================
--- firebird/trunk/src/dsql/AggNodes.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/AggNodes.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -34,7 +34,7 @@
public:
explicit AvgAggNode(MemoryPool& pool, bool aDistinct, bool aDialect1, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc);
@@ -59,7 +59,7 @@
explicit ListAggNode(MemoryPool& pool, bool aDistinct, ValueExprNode* aArg = NULL,
ValueExprNode* aDelimiter = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
virtual bool setParameterType(DsqlCompilerScratch* dsqlScratch,
@@ -91,7 +91,7 @@
public:
explicit CountAggNode(MemoryPool& pool, bool aDistinct, bool aDialect1, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
virtual void genBlr(DsqlCompilerScratch* dsqlScratch);
@@ -111,7 +111,7 @@
public:
explicit SumAggNode(MemoryPool& pool, bool aDistinct, bool aDialect1, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc);
@@ -136,7 +136,7 @@
explicit MaxMinAggNode(MemoryPool& pool, MaxMinType aType, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void make(DsqlCompilerScratch* dsqlScratch, dsc* desc);
virtual void getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc);
Modified: firebird/trunk/src/dsql/BoolNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/BoolNodes.cpp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/BoolNodes.cpp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -145,7 +145,7 @@
addChildNode(arg2, arg2);
}
-DmlNode* BinaryBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* BinaryBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
BinaryBoolNode* node = FB_NEW(pool) BinaryBoolNode(pool, blrOp);
node->arg1 = PAR_parse_boolean(tdbb, csb);
@@ -354,7 +354,7 @@
addChildNode(arg3, arg3);
}
-DmlNode* ComparativeBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* ComparativeBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
ComparativeBoolNode* node = FB_NEW(pool) ComparativeBoolNode(pool, blrOp);
@@ -1363,7 +1363,7 @@
addChildNode(arg, arg);
}
-DmlNode* MissingBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* MissingBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
MissingBoolNode* node = FB_NEW(pool) MissingBoolNode(pool);
node->arg = PAR_parse_value(tdbb, csb);
@@ -1453,7 +1453,7 @@
addChildNode(arg, arg);
}
-DmlNode* NotBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* NotBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
NotBoolNode* node = FB_NEW(pool) NotBoolNode(pool);
node->arg = PAR_parse_boolean(tdbb, csb);
@@ -1644,7 +1644,7 @@
addChildNode(dsqlRse, rse);
}
-DmlNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
RseBoolNode* node = FB_NEW(pool) RseBoolNode(pool, blrOp);
node->rse = PAR_rse(tdbb, csb);
Modified: firebird/trunk/src/dsql/BoolNodes.h
===================================================================
--- firebird/trunk/src/dsql/BoolNodes.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/BoolNodes.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -37,7 +37,7 @@
BinaryBoolNode(MemoryPool& pool, UCHAR aBlrOp, BoolExprNode* aArg1 = NULL,
BoolExprNode* aArg2 = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -72,7 +72,7 @@
ComparativeBoolNode(MemoryPool& pool, UCHAR aBlrOp, ValueExprNode* aArg1 = NULL,
ValueExprNode* aArg2 = NULL, ValueExprNode* aArg3 = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -116,7 +116,7 @@
public:
explicit MissingBoolNode(MemoryPool& pool, ValueExprNode* aArg = NULL, bool aDsqlUnknown = false);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -143,7 +143,7 @@
public:
explicit NotBoolNode(MemoryPool& pool, BoolExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -171,7 +171,7 @@
public:
RseBoolNode(MemoryPool& pool, UCHAR aBlrOp, RecordSourceNode* aDsqlRse = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual BoolExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
Modified: firebird/trunk/src/dsql/DdlNodes.epp
===================================================================
--- firebird/trunk/src/dsql/DdlNodes.epp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/DdlNodes.epp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -4906,7 +4906,14 @@
executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_CREATE_SEQUENCE, name);
const SINT64 val = value.specified ? value.value : 0;
- store(tdbb, transaction, name, fb_sysflag_user, val);
+ SLONG initialStep = 1;
+ if (step.specified)
+ {
+ initialStep = step.value;
+ if (initialStep == 0)
+ status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_step) << Arg::Str(name));
+ }
+ store(tdbb, transaction, name, fb_sysflag_user, val, initialStep);
executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_AFTER, DDL_TRIGGER_CREATE_SEQUENCE, name);
}
@@ -4924,7 +4931,8 @@
// that the generator created in another transaction can be found here. This is done
// using MET_lookup_generator() which works in the system transaction.
- const SLONG id = MET_lookup_generator(tdbb, name, &forbidden);
+ SLONG oldStep = 0;
+ const SLONG id = MET_lookup_generator(tdbb, name, &forbidden, &oldStep);
if (id < 0)
return false;
@@ -4935,7 +4943,17 @@
fb_assert(value.specified);
const SINT64 val = value.specified ? value.value : 0;
+ if (step.specified)
+ {
+ const SLONG newStep = step.value;
+ if (newStep == 0)
+ status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_step) << Arg::Str(name));
+ // Perhaps it's better to move this to DFW?
+ if (newStep != oldStep)
+ MET_update_generator_step(tdbb, id, newStep);
+ }
+
transaction->getGenIdCache()->put(id, val);
dsc desc;
desc.makeText((USHORT) name.length(), ttype_metadata, (UCHAR*) name.c_str());
@@ -4965,7 +4983,20 @@
const SLONG id = X.RDB$GENERATOR_ID;
const SINT64 val = value.specified ?
value.value : (!X.RDB$INITIAL_VALUE.NULL ? X.RDB$INITIAL_VALUE : 0);
+ if (step.specified)
+ {
+ const SLONG newStep = step.value;
+ if (newStep == 0)
+ status_exception::raise(Arg::Gds(isc_dyn_cant_use_zero_step) << Arg::Str(name));
+ if (newStep != X.RDB$GENERATOR_STEP)
+ {
+ MODIFY X
+ X.RDB$GENERATOR_STEP = newStep;
+ END_MODIFY
+ }
+ }
+
transaction->getGenIdCache()->put(id, val);
dsc desc;
desc.makeText((USHORT) name.length(), ttype_metadata, (UCHAR*) name.c_str());
@@ -4984,7 +5015,7 @@
}
SSHORT CreateAlterSequenceNode::store(thread_db* tdbb, jrd_tra* transaction, const MetaName& name,
- fb_sysflag sysFlag, SINT64 val)
+ fb_sysflag sysFlag, SINT64 val, SLONG step)
{
Attachment* const attachment = transaction->tra_attachment;
const string& userName = attachment->att_user->usr_user_name;
@@ -5017,6 +5048,8 @@
X.RDB$INITIAL_VALUE.NULL = FALSE;
X.RDB$INITIAL_VALUE = val;
+
+ X.RDB$GENERATOR_STEP = step;
}
END_STORE
@@ -5575,7 +5608,7 @@
DYN_UTIL_generate_generator_name(tdbb, fieldDefinition.identitySequence);
CreateAlterSequenceNode::store(tdbb, transaction, fieldDefinition.identitySequence,
- fb_sysflag_identity_generator, clause->identityStart);
+ fb_sysflag_identity_generator, clause->identityStart, 1);
}
BlrDebugWriter::BlrData defaultValue;
Modified: firebird/trunk/src/dsql/DdlNodes.h
===================================================================
--- firebird/trunk/src/dsql/DdlNodes.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/DdlNodes.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -911,17 +911,18 @@
{
public:
CreateAlterSequenceNode(MemoryPool& pool, const Firebird::MetaName& aName,
- BaseNullable<SINT64> aValue)
+ BaseNullable<SINT64> aValue, BaseNullable<SLONG> aStep)
: DdlNode(pool),
create(true),
alter(false),
legacy(false),
name(pool, aName),
- value(aValue)
+ value(aValue),
+ step(aStep)
{}
static SSHORT store(thread_db* tdbb, jrd_tra* transaction, const Firebird::MetaName& name,
- fb_sysflag sysFlag, SINT64 value);
+ fb_sysflag sysFlag, SINT64 value, SLONG step);
public:
virtual void print(Firebird::string& text) const;
@@ -946,7 +947,8 @@
bool alter;
bool legacy;
const Firebird::MetaName name;
- BaseNullable<SINT64> value;
+ const BaseNullable<SINT64> value;
+ const BaseNullable<SLONG> step;
};
Modified: firebird/trunk/src/dsql/ExprNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/ExprNodes.cpp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/ExprNodes.cpp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -250,7 +250,7 @@
addChildNode(arg2, arg2);
}
-DmlNode* ArithmeticNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* ArithmeticNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
ArithmeticNode* node = FB_NEW(pool) ArithmeticNode(
pool, blrOp, (csb->blrVersion == 4));
@@ -1457,7 +1457,7 @@
// Add (or subtract) the contents of a descriptor to value block, with dialect-1 semantics.
// This function can be removed when dialect-3 becomes the lowest supported dialect. (Version 7.0?)
-dsc* ArithmeticNode::add(const dsc* desc, impure_value* value, const ValueExprNode* node, UCHAR blrOp)
+dsc* ArithmeticNode::add(const dsc* desc, impure_value* value, const ValueExprNode* node, const UCHAR blrOp)
{
const ArithmeticNode* arithmeticNode = node->as<ArithmeticNode>();
@@ -1520,7 +1520,7 @@
// Add (or subtract) the contents of a descriptor to value block, with dialect-3 semantics, as in
// the blr_add, blr_subtract, and blr_agg_total verbs following a blr_version5.
-dsc* ArithmeticNode::add2(const dsc* desc, impure_value* value, const ValueExprNode* node, UCHAR blrOp)
+dsc* ArithmeticNode::add2(const dsc* desc, impure_value* value, const ValueExprNode* node, const UCHAR blrOp)
{
const ArithmeticNode* arithmeticNode = node->as<ArithmeticNode>();
@@ -2359,7 +2359,7 @@
addChildNode(boolean, boolean);
}
-DmlNode* BoolAsValueNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* BoolAsValueNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
BoolAsValueNode* node = FB_NEW(pool) BoolAsValueNode(pool);
node->boolean = PAR_parse_boolean(tdbb, csb);
@@ -2450,7 +2450,7 @@
}
// Parse a datatype cast.
-DmlNode* CastNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* CastNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
CastNode* node = FB_NEW(pool) CastNode(pool);
@@ -2745,7 +2745,7 @@
static RegisterNode<CoalesceNode> regCoalesceNode(blr_coalesce);
-DmlNode* CoalesceNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* CoalesceNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
CoalesceNode* node = FB_NEW(pool) CoalesceNode(pool);
node->args = PAR_args(tdbb, csb);
@@ -2951,7 +2951,7 @@
addChildNode(arg2, arg2);
}
-DmlNode* ConcatenateNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* ConcatenateNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
ConcatenateNode* node = FB_NEW(pool) ConcatenateNode(pool);
node->arg1 = PAR_parse_value(tdbb, csb);
@@ -3212,7 +3212,7 @@
static RegisterNode<CurrentDateNode> regCurrentDateNode(blr_current_date);
DmlNode* CurrentDateNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* /*csb*/,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
return FB_NEW(pool) CurrentDateNode(pool);
}
@@ -3293,7 +3293,7 @@
static RegisterNode<CurrentTimeNode> regCurrentTimeNode(blr_current_time);
static RegisterNode<CurrentTimeNode> regCurrentTimeNode2(blr_current_time2);
-DmlNode* CurrentTimeNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* CurrentTimeNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
unsigned precision = DEFAULT_TIME_PRECISION;
@@ -3403,7 +3403,7 @@
static RegisterNode<CurrentTimeStampNode> regCurrentTimeStampNode2(blr_current_timestamp2);
DmlNode* CurrentTimeStampNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb,
- UCHAR blrOp)
+ const UCHAR blrOp)
{
unsigned precision = DEFAULT_TIMESTAMP_PRECISION;
@@ -3512,7 +3512,7 @@
static RegisterNode<CurrentRoleNode> regCurrentRoleNode(blr_current_role);
DmlNode* CurrentRoleNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* /*csb*/,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
return FB_NEW(pool) CurrentRoleNode(pool);
}
@@ -3607,7 +3607,7 @@
static RegisterNode<CurrentUserNode> regCurrentUserNode(blr_user_name);
DmlNode* CurrentUserNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* /*csb*/,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
return FB_NEW(pool) CurrentUserNode(pool);
}
@@ -3700,7 +3700,7 @@
static RegisterNode<DecodeNode> regDecodeNode(blr_decode);
-DmlNode* DecodeNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* DecodeNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
DecodeNode* node = FB_NEW(pool) DecodeNode(pool);
node->test = PAR_parse_value(tdbb, csb);
@@ -3893,7 +3893,7 @@
static RegisterNode<DerivedExprNode> regDerivedExprNode(blr_derived_expr);
-DmlNode* DerivedExprNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* DerivedExprNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
DerivedExprNode* node = FB_NEW(pool) DerivedExprNode(pool);
@@ -4140,7 +4140,7 @@
addChildNode(arg, arg);
}
-DmlNode* ExtractNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* ExtractNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
UCHAR blrSubOp = csb->csb_blr_reader.getByte();
@@ -4511,7 +4511,7 @@
}
// Parse a field.
-DmlNode* FieldNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* FieldNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
const USHORT context = csb->csb_blr_reader.getByte();
@@ -5608,26 +5608,31 @@
static RegisterNode<GenIdNode> regGenIdNode(blr_gen_id);
+static RegisterNode<GenIdNode> regGenIdNode2(blr_gen_id2);
GenIdNode::GenIdNode(MemoryPool& pool, bool aDialect1,
const Firebird::MetaName& name,
- ValueExprNode* aArg)
+ ValueExprNode* aArg, bool aImplicit)
: TypedNode<ValueExprNode, ExprNode::TYPE_GEN_ID>(pool),
dialect1(aDialect1),
generator(pool, name),
arg(aArg),
- sysGen(false)
+ step(0),
+ sysGen(false),
+ implicit(aImplicit)
{
addChildNode(arg, arg);
}
-DmlNode* GenIdNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* GenIdNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
MetaName name;
PAR_name(csb, name);
+ ValueExprNode* explicitStep = (blrOp == blr_gen_id2) ? NULL : PAR_parse_value(tdbb, csb);
GenIdNode* const node =
- FB_NEW(pool) GenIdNode(pool, (csb->blrVersion == 4), name, PAR_parse_value(tdbb, csb));
+ FB_NEW(pool) GenIdNode(pool, (csb->blrVersion == 4), name, explicitStep,
+ (blrOp == blr_gen_id2));
// This check seems faster than ==, but assumes the special generator is named ""
if (name.length() == 0) //(name == MASTER_GENERATOR)
@@ -5638,7 +5643,7 @@
node->generator.id = 0;
}
- else if (!MET_load_generator(tdbb, node->generator, &node->sysGen))
+ else if (!MET_load_generator(tdbb, node->generator, &node->sysGen, &node->step))
PAR_error(csb, Arg::Gds(isc_gennotdef) << Arg::Str(name));
if (csb->csb_g_flags & csb_get_dependencies)
@@ -5660,15 +5665,16 @@
ValueExprNode* GenIdNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
{
GenIdNode* const node = FB_NEW(getPool())
- GenIdNode(getPool(), dialect1, generator.name, doDsqlPass(dsqlScratch, arg));
+ GenIdNode(getPool(), dialect1, generator.name, doDsqlPass(dsqlScratch, arg), implicit);
node->generator = generator;
+ node->step = step;
node->sysGen = sysGen;
return node;
}
void GenIdNode::setParameterName(dsql_par* parameter) const
{
- parameter->par_name = parameter->par_alias = "GEN_ID";
+ parameter->par_name = parameter->par_alias = (implicit ? "GEN_ID2" : "GEN_ID");
}
bool GenIdNode::setParameterType(DsqlCompilerScratch* dsqlScratch,
@@ -5679,22 +5685,33 @@
void GenIdNode::genBlr(DsqlCompilerScratch* dsqlScratch)
{
- dsqlScratch->appendUChar(blr_gen_id);
- dsqlScratch->appendNullString(generator.name.c_str());
- GEN_expr(dsqlScratch, arg);
+ if (implicit)
+ {
+ dsqlScratch->appendUChar(blr_gen_id2);
+ dsqlScratch->appendNullString(generator.name.c_str());
+ }
+ else
+ {
+ dsqlScratch->appendUChar(blr_gen_id);
+ dsqlScratch->appendNullString(generator.name.c_str());
+ GEN_expr(dsqlScratch, arg);
+ }
}
void GenIdNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc)
{
- dsc desc1;
- MAKE_desc(dsqlScratch, &desc1, arg);
+ if (!implicit)
+ {
+ dsc desc1;
+ MAKE_desc(dsqlScratch, &desc1, arg);
+ }
if (dialect1)
desc->makeLong(0);
else
desc->makeInt64(0);
- desc->setNullable(true);
+ desc->setNullable(!implicit); // blr_gen_id2 cannot return NULL
}
void GenIdNode::getDesc(thread_db* /*tdbb*/, CompilerScratch* /*csb*/, dsc* desc)
@@ -5708,8 +5725,9 @@
ValueExprNode* GenIdNode::copy(thread_db* tdbb, NodeCopier& copier) const
{
GenIdNode* const node = FB_NEW(*tdbb->getDefaultPool()) GenIdNode(
- *tdbb->getDefaultPool(), dialect1, generator.name, copier.copy(tdbb, arg));
+ *tdbb->getDefaultPool(), dialect1, generator.name, copier.copy(tdbb, arg), implicit);
node->generator = generator;
+ node->step = step;
node->sysGen = sysGen;
return node;
}
@@ -5722,7 +5740,10 @@
const GenIdNode* o = other->as<GenIdNode>();
fb_assert(o);
- return dialect1 == o->dialect1 && generator.name == o->generator.name;
+ // I'm not sure if I should include "implicit" in the comparison, but it means different BLR code
+ // and nullable v/s not nullable.
+ return dialect1 == o->dialect1 && generator.name == o->generator.name &&
+ implicit == o->implicit;
}
bool GenIdNode::sameAs(const ExprNode* other, bool ignoreStreams) const
@@ -5733,7 +5754,10 @@
const GenIdNode* const otherNode = other->as<GenIdNode>();
fb_assert(otherNode);
- return dialect1 == otherNode->dialect1 && generator.id == otherNode->generator.id;
+ // I'm not sure if I should include "implicit" in the comparison, but it means different BLR code
+ // and nullable v/s not nullable.
+ return dialect1 == otherNode->dialect1 && generator.id == otherNode->generator.id &&
+ implicit == otherNode->implicit;
}
ValueExprNode* GenIdNode::pass1(thread_db* tdbb, CompilerScratch* csb)
@@ -5762,13 +5786,17 @@
request->req_flags &= ~req_null;
impure_value* const impure = request->getImpure<impure_value>(impureOffset);
- const dsc* const value = EVL_expr(tdbb, request, arg);
+ SINT64 change = step;
+ if (!implicit)
+ {
+ const dsc* const value = EVL_expr(tdbb, request, arg);
- if (request->req_flags & req_null)
- return NULL;
+ if (request->req_flags & req_null)
+ return NULL;
- const SINT64 change = MOV_get_int64(value, 0);
- if (sysGen && change != 0)
+ change = MOV_get_int64(value, 0);
+ }
+ if (sysGen && change != 0 && generator.id != 9)
{
if (!request->hasInternalStatement() && !tdbb->getAttachment()->isRWGbak())
{
@@ -5812,7 +5840,7 @@
addChildNode(arg, arg);
}
-DmlNode* InternalInfoNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* InternalInfoNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
InternalInfoNode* node = FB_NEW(pool) InternalInfoNode(pool);
@@ -5984,7 +6012,7 @@
}
// Parse a literal value.
-DmlNode* LiteralNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* LiteralNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
LiteralNode* node = FB_NEW(pool) LiteralNode(pool);
@@ -6807,7 +6835,7 @@
addChildNode(arg, arg);
}
-DmlNode* NegateNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* NegateNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
NegateNode* node = FB_NEW(pool) NegateNode(pool);
node->arg = PAR_parse_value(tdbb, csb);
@@ -7001,7 +7029,7 @@
static RegisterNode<NullNode> regNullNode(blr_null);
DmlNode* NullNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* /*csb*/,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
return FB_NEW(pool) NullNode(pool);
}
@@ -7339,7 +7367,7 @@
addChildNode(argIndicator);
}
-DmlNode* ParameterNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* ParameterNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
MessageNode* message = NULL;
USHORT n = csb->csb_blr_reader.getByte();
@@ -7672,7 +7700,7 @@
addDsqlChildNode(dsqlRelation);
}
-DmlNode* RecordKeyNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* RecordKeyNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
RecordKeyNode* node = FB_NEW(pool) RecordKeyNode(pool, blrOp);
@@ -8230,7 +8258,7 @@
static RegisterNode<ScalarNode> regScalarNode1(blr_index);
-DmlNode* ScalarNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* ScalarNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
ScalarNode* node = FB_NEW(pool) ScalarNode(pool);
node->field = PAR_parse_value(tdbb, csb);
@@ -8319,7 +8347,7 @@
static RegisterNode<StmtExprNode> regStmtExprNode(blr_stmt_expr);
-DmlNode* StmtExprNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* StmtExprNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
StmtExprNode* node = FB_NEW(pool) StmtExprNode(pool);
@@ -8388,7 +8416,7 @@
addChildNode(arg, arg);
}
-DmlNode* StrCaseNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* StrCaseNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
StrCaseNode* node = FB_NEW(pool) StrCaseNode(pool, blrOp);
node->arg = PAR_parse_value(tdbb, csb);
@@ -8579,7 +8607,7 @@
addChildNode(arg, arg);
}
-DmlNode* StrLenNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* StrLenNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
UCHAR blrSubOp = csb->csb_blr_reader.getByte();
@@ -8831,7 +8859,7 @@
addChildNode(value2, value2);
}
-DmlNode* SubQueryNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* SubQueryNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
// We treat blr_from as blr_via after parse.
SubQueryNode* node = FB_NEW(pool) SubQueryNode(pool, (blrOp == blr_from ? blr_via : blrOp));
@@ -9296,7 +9324,7 @@
}
DmlNode* SubstringNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
SubstringNode* node = FB_NEW(pool) SubstringNode(pool);
node->expr = PAR_parse_value(tdbb, csb);
@@ -9635,7 +9663,7 @@
}
DmlNode* SubstringSimilarNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
SubstringSimilarNode* node = FB_NEW(pool) SubstringSimilarNode(pool);
node->expr = PAR_parse_value(tdbb, csb);
@@ -9867,7 +9895,7 @@
}
DmlNode* SysFuncCallNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
MetaName name;
const USHORT count = PAR_name(csb, name);
@@ -10059,7 +10087,7 @@
addChildNode(trimChars, trimChars);
}
-DmlNode* TrimNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* TrimNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
UCHAR where = csb->csb_blr_reader.getByte();
UCHAR what = csb->csb_blr_reader.getByte();
@@ -10397,7 +10425,7 @@
}
DmlNode* UdfCallNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR blrOp)
+ const UCHAR blrOp)
{
const UCHAR* savePos = csb->csb_blr_reader.getPos();
@@ -10885,7 +10913,7 @@
addChildNode(falseValue, falseValue);
}
-DmlNode* ValueIfNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* ValueIfNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
ValueIfNode* node = FB_NEW(pool) ValueIfNode(pool);
node->condition = PAR_parse_boolean(tdbb, csb);
@@ -11099,7 +11127,7 @@
{
}
-DmlNode* VariableNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* VariableNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
const USHORT n = csb->csb_blr_reader.getWord();
vec<DeclareVariableNode*>* vector = csb->csb_variables;
Modified: firebird/trunk/src/dsql/ExprNodes.h
===================================================================
--- firebird/trunk/src/dsql/ExprNodes.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/ExprNodes.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -44,7 +44,7 @@
ArithmeticNode(MemoryPool& pool, UCHAR aBlrOp, bool aDialect1,
ValueExprNode* aArg1 = NULL, ValueExprNode* aArg2 = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -62,8 +62,8 @@
virtual dsc* execute(thread_db* tdbb, jrd_req* request) const;
// add and add2 are used in somewhat obscure way in aggregation.
- static dsc* add(const dsc* desc, impure_value* value, const ValueExprNode* node, UCHAR blrOp);
- static dsc* add2(const dsc* desc, impure_value* value, const ValueExprNode* node, UCHAR blrOp);
+ static dsc* add(const dsc* desc, impure_value* value, const ValueExprNode* node, const UCHAR blrOp);
+ static dsc* add2(const dsc* desc, impure_value* value, const ValueExprNode* node, const UCHAR blrOp);
private:
dsc* multiply(const dsc* desc, impure_value* value) const;
@@ -82,7 +82,7 @@
void getDescDialect3(thread_db* tdbb, dsc* desc, dsc& desc1, dsc& desc2);
public:
- UCHAR blrOp;
+ const UCHAR blrOp;
bool dialect1;
Firebird::string label;
NestConst<ValueExprNode> arg1;
@@ -142,7 +142,7 @@
public:
explicit BoolAsValueNode(MemoryPool& pool, BoolExprNode* aBoolean = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -169,7 +169,7 @@
public:
explicit CastNode(MemoryPool& pool, ValueExprNode* aSource = NULL, dsql_fld* aDsqlField = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -206,7 +206,7 @@
addChildNode(args, args);
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -285,7 +285,7 @@
public:
explicit ConcatenateNode(MemoryPool& pool, ValueExprNode* aArg1 = NULL, ValueExprNode* aArg2 = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -314,7 +314,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual void setParameterName(dsql_par* parameter) const;
@@ -337,7 +337,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -364,7 +364,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -390,7 +390,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -413,7 +413,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -446,7 +446,7 @@
label = "DECODE";
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -480,7 +480,7 @@
addChildNode(arg);
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
// This is a non-DSQL node.
@@ -556,7 +556,7 @@
public:
ExtractNode(MemoryPool& pool, UCHAR aBlrSubOp, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -585,7 +585,7 @@
FieldNode(MemoryPool& pool, dsql_ctx* context = NULL, dsql_fld* field = NULL, ValueListNode* indices = NULL);
FieldNode(MemoryPool& pool, StreamType stream, USHORT id, bool aById);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -655,9 +655,9 @@
public:
GenIdNode(MemoryPool& pool, bool aDialect1,
const Firebird::MetaName& name,
- ValueExprNode* aArg = NULL);
+ ValueExprNode* aArg, bool aImplicit);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -676,11 +676,13 @@
virtual dsc* execute(thread_db* tdbb, jrd_req* request) const;
public:
- bool dialect1;
+ const bool dialect1;
GeneratorItem generator;
NestConst<ValueExprNode> arg;
private:
+ SLONG step;
bool sysGen;
+ const bool implicit;
};
@@ -697,7 +699,7 @@
explicit InternalInfoNode(MemoryPool& pool, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -720,7 +722,7 @@
public:
explicit LiteralNode(MemoryPool& pool);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
static void genConstant(DsqlCompilerScratch* dsqlScratch, const dsc* desc, bool negateValue);
virtual void print(Firebird::string& text) const;
@@ -886,7 +888,7 @@
public:
explicit NegateNode(MemoryPool& pool, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -914,7 +916,7 @@
{
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual void setParameterName(dsql_par* parameter) const;
@@ -1025,7 +1027,7 @@
public:
explicit ParameterNode(MemoryPool& pool);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1061,7 +1063,7 @@
public:
RecordKeyNode(MemoryPool& pool, UCHAR aBlrOp, const Firebird::MetaName& aDsqlQualifier = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1118,7 +1120,7 @@
void raiseError(dsql_ctx* context) const;
public:
- UCHAR blrOp;
+ const UCHAR blrOp;
Firebird::MetaName dsqlQualifier;
NestConst<RecordSourceNode> dsqlRelation;
StreamType recStream;
@@ -1138,7 +1140,7 @@
addChildNode(subscripts);
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
// This is a non-DSQL node.
@@ -1185,7 +1187,7 @@
addChildNode(expr);
}
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
// This is a non-DSQL node.
@@ -1226,7 +1228,7 @@
public:
StrCaseNode(MemoryPool& pool, UCHAR aBlrOp, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1244,7 +1246,7 @@
virtual dsc* execute(thread_db* tdbb, jrd_req* request) const;
public:
- UCHAR blrOp;
+ const UCHAR blrOp;
NestConst<ValueExprNode> arg;
};
@@ -1254,7 +1256,7 @@
public:
StrLenNode(MemoryPool& pool, UCHAR aBlrSubOp, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1284,7 +1286,7 @@
explicit SubQueryNode(MemoryPool& pool, UCHAR aBlrOp, RecordSourceNode* aDsqlRse = NULL,
ValueExprNode* aValue1 = NULL, ValueExprNode* aValue2 = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1324,7 +1326,7 @@
virtual dsc* execute(thread_db* tdbb, jrd_req* request) const;
public:
- UCHAR blrOp;
+ const UCHAR blrOp;
bool ownSavepoint;
NestConst<RecordSourceNode> dsqlRse;
NestConst<RseNode> rse;
@@ -1340,7 +1342,7 @@
explicit SubstringNode(MemoryPool& pool, ValueExprNode* aExpr = NULL,
ValueExprNode* aStart = NULL, ValueExprNode* aLength = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1371,7 +1373,7 @@
explicit SubstringSimilarNode(MemoryPool& pool, ValueExprNode* aExpr = NULL,
ValueExprNode* aPattern = NULL, ValueExprNode* aEscape = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1400,7 +1402,7 @@
explicit SysFuncCallNode(MemoryPool& pool, const Firebird::MetaName& aName,
ValueListNode* aArgs = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1429,7 +1431,7 @@
explicit TrimNode(MemoryPool& pool, UCHAR aWhere,
ValueExprNode* aValue = NULL, ValueExprNode* aTrimChars = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1459,7 +1461,7 @@
explicit UdfCallNode(MemoryPool& pool, const Firebird::QualifiedName& aName,
ValueListNode* aArgs = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1491,7 +1493,7 @@
explicit ValueIfNode(MemoryPool& pool, BoolExprNode* aCondition = NULL,
ValueExprNode* aTrueValue = NULL, ValueExprNode* aFalseValue = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
@@ -1523,7 +1525,7 @@
public:
explicit VariableNode(MemoryPool& pool);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
virtual void print(Firebird::string& text) const;
virtual ValueExprNode* dsqlPass(DsqlCompilerScratch* dsqlScratch);
Modified: firebird/trunk/src/dsql/Nodes.h
===================================================================
--- firebird/trunk/src/dsql/Nodes.h 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/Nodes.h 2014-04-09 02:28:38 UTC (rev 59401)
@@ -948,7 +948,7 @@
explicit WinFuncNode(MemoryPool& pool, const AggInfo& aAggInfo, ValueExprNode* aArg = NULL);
- static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp);
+ static DmlNode* parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp);
protected:
virtual void parseArgs(thread_db* /*tdbb*/, CompilerScratch* /*csb*/, unsigned count)
Modified: firebird/trunk/src/dsql/StmtNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/StmtNodes.cpp 2014-04-09 00:52:26 UTC (rev 59400)
+++ firebird/trunk/src/dsql/StmtNodes.cpp 2014-04-09 02:28:38 UTC (rev 59401)
@@ -262,7 +262,7 @@
static RegisterNode<AssignmentNode> regAssignmentNode(blr_assignment);
-DmlNode* AssignmentNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* AssignmentNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
AssignmentNode* node = FB_NEW(pool) AssignmentNode(pool);
node->asgnFrom = PAR_parse_value(tdbb, csb);
@@ -394,7 +394,7 @@
static RegisterNode<BlockNode> regBlockNode(blr_block);
-DmlNode* BlockNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* BlockNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
BlockNode* node = FB_NEW(pool) BlockNode(pool);
node->action = PAR_parse_stmt(tdbb, csb);
@@ -712,7 +712,7 @@
static RegisterNode<CompoundStmtNode> regCompoundStmtNode(blr_begin);
-DmlNode* CompoundStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* CompoundStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
CompoundStmtNode* node = FB_NEW(pool) CompoundStmtNode(pool);
@@ -852,7 +852,7 @@
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)
+DmlNode* ContinueLeaveNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
ContinueLeaveNode* node = FB_NEW(pool) ContinueLeaveNode(pool, blrOp);
node->labelNumber = csb->csb_blr_reader.getByte();
@@ -904,7 +904,7 @@
static RegisterNode<CursorStmtNode> regCursorStmtNode(blr_cursor_stmt);
-DmlNode* CursorStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* CursorStmtNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
CursorStmtNode* node = FB_NEW(pool) CursorStmtNode(pool, csb->csb_blr_reader.getByte());
node->cursorNumber = csb->csb_blr_reader.getWord();
@@ -1156,7 +1156,7 @@
static RegisterNode<DeclareCursorNode> regDeclareCursorNode(blr_dcl_cursor);
-DmlNode* DeclareCursorNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* DeclareCursorNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
DeclareCursorNode* node = FB_NEW(pool) DeclareCursorNode(pool);
@@ -1270,7 +1270,7 @@
static RegisterNode<DeclareSubFuncNode> regDeclareSubFuncNode(blr_subfunc_decl);
DmlNode* DeclareSubFuncNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
MetaName name;
PAR_name(csb, name);
@@ -1532,7 +1532,7 @@
static RegisterNode<DeclareSubProcNode> regDeclareSubProcNode(blr_subproc_decl);
-DmlNode* DeclareSubProcNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* DeclareSubProcNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
MetaName name;
PAR_name(csb, name);
@@ -1804,7 +1804,7 @@
static RegisterNode<DeclareVariableNode> regDeclareVariableNode(blr_dcl_variable);
-DmlNode* DeclareVariableNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* DeclareVariableNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
DeclareVariableNode* node = FB_NEW(pool) DeclareVariableNode(pool);
@@ -1908,7 +1908,7 @@
static RegisterNode<EraseNode> regEraseNode(blr_erase);
-DmlNode* EraseNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* EraseNode::parse(thread_db* /*tdbb*/, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
const USHORT n = csb->csb_blr_reader.getByte();
@@ -2318,7 +2318,7 @@
static RegisterNode<ErrorHandlerNode> regErrorHandlerNode(blr_error_handler);
-DmlNode* ErrorHandlerNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* ErrorHandlerNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
ErrorHandlerNode* node = FB_NEW(pool) ErrorHandlerNode(pool);
@@ -2466,7 +2466,7 @@
static RegisterNode<ExecProcedureNode> regExecProcedureNodeSubProc(blr_exec_subproc);
// Parse an execute procedure reference.
-DmlNode* ExecProcedureNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR blrOp)
+DmlNode* ExecProcedureNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
SET_TDBB(tdbb);
@@ -2853,7 +2853,7 @@
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)
+DmlNode* ExecStatementNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR blrOp)
{
ExecStatementNode* node = FB_NEW(pool) ExecStatementNode(pool);
node->traScope = EDS::traCommon;
@@ -3304,7 +3304,7 @@
static RegisterNode<IfNode> regIfNode(blr_if);
-DmlNode* IfNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, UCHAR /*blrOp*/)
+DmlNode* IfNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, const UCHAR /*blrOp*/)
{
IfNode* node = FB_NEW(pool) IfNode(pool);
@@ -3391,7 +3391,7 @@
static RegisterNode<InAutonomousTransactionNode> regInAutonomousTransactionNode(blr_auto_trans);
DmlNode* InAutonomousTransactionNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb,
- UCHAR /*blrOp*/)
+ const UCHAR /*blrOp*/)
{
InAutonomousTransactionNode* node = FB_NEW(pool) InAutonomousTransactionNode(pool);
@@ -3602,7 +...
[truncated message content] |