8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 04:43:03 +01:00
This commit is contained in:
asfernandes 2011-07-16 18:49:28 +00:00
parent 87a81a5002
commit 42850d55b8
5 changed files with 17 additions and 10 deletions

View File

@ -4954,8 +4954,10 @@ bool FieldNode::sameAs(thread_db* tdbb, CompilerScratch* csb, /*const*/ ExprNode
return fieldId == o->fieldId &&
(fieldStream == o->fieldStream ||
(tail->csb_relation && other_tail->csb_relation && tail->csb_relation->rel_id == other_tail->csb_relation->rel_id) ||
(tail->csb_procedure && other_tail->csb_procedure && tail->csb_procedure->getId() == other_tail->csb_procedure->getId()));
(tail->csb_relation && other_tail->csb_relation &&
tail->csb_relation->rel_id == other_tail->csb_relation->rel_id) ||
(tail->csb_procedure && other_tail->csb_procedure &&
tail->csb_procedure->getId() == other_tail->csb_procedure->getId()));
}
return false;
@ -7627,8 +7629,10 @@ bool RecordKeyNode::sameAs(thread_db* tdbb, CompilerScratch* csb, /*const*/ Expr
return blrOp == o->blrOp &&
(recStream == o->recStream ||
(tail->csb_relation && other_tail->csb_relation && tail->csb_relation->rel_id == other_tail->csb_relation->rel_id) ||
(tail->csb_procedure && other_tail->csb_procedure && tail->csb_procedure->getId() == other_tail->csb_procedure->getId()));
(tail->csb_relation && other_tail->csb_relation &&
tail->csb_relation->rel_id == other_tail->csb_relation->rel_id) ||
(tail->csb_procedure && other_tail->csb_procedure &&
tail->csb_procedure->getId() == other_tail->csb_procedure->getId()));
}
ValueExprNode* RecordKeyNode::pass1(thread_db* tdbb, CompilerScratch* csb)

View File

@ -1858,7 +1858,8 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra*
string_length = static_cast<USHORT>(sql_length);
}
if (!string || !string_length) {
if (!string || !string_length)
{
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
// Unexpected end of command
// CVC: Nothing will be line 1, column 1 for the user.

View File

@ -4219,14 +4219,14 @@ ddl_type1
;
ddl_type2
: COLUMN { $$ = ddl_relation; }
: COLUMN { $$ = ddl_relation; }
| ddl_param_opt PARAMETER { $$ = $1; }
;
ddl_param_opt
: { $$ = ddl_unknown; }
| PROCEDURE { $$ = ddl_procedure; }
| FUNCTION { $$ = ddl_udf; }
: { $$ = ddl_unknown; }
| PROCEDURE { $$ = ddl_procedure; }
| FUNCTION { $$ = ddl_udf; }
;
ddl_subname

View File

@ -25,6 +25,7 @@
#include "ibase.h"
#include "firebird/impl/boost/preprocessor/seq/for_each_i.hpp"
#include <assert.h>
#include <string.h>
#define FB_MESSAGE(name, fields) \
@ -103,7 +104,7 @@ struct FbVarChar
void set(const char* s)
{
length = strlen(s);
// check that length <= N ?
assert(length <= N);
memcpy(str, s, length);
}
};

View File

@ -90,6 +90,7 @@ bool checkExpressionIndex(thread_db* tdbb, CompilerScratch* csb, const index_des
map[0] = (UCHAR) stream;
}
// ASF: AutoPtr will delete only the top node.
AutoPtr<ExprNode> expression(NodeCopier::copy(tdbb, csb, idx->idx_expression, map));
return expression->sameAs(tdbb, csb, node);
}