8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00
This commit is contained in:
asfernandes 2010-09-25 23:08:18 +00:00
parent 746c032c90
commit b49391c8d0
8 changed files with 18 additions and 30 deletions

View File

@ -1580,8 +1580,6 @@ const jrd_nod* SuspendNode::execute(thread_db* /*tdbb*/, jrd_req* request) const
ReturnNode* ReturnNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
{
//DsqlCompiledStatement* const statement = dsqlScratch->getStatement();
if (!(dsqlScratch->flags & DsqlCompilerScratch::FLAG_FUNCTION))
{
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<

View File

@ -523,8 +523,6 @@ void GEN_port(DsqlCompilerScratch* dsqlScratch, dsql_msg* message)
**/
void GEN_request(DsqlCompilerScratch* scratch, dsql_nod* node)
{
/*thread_db* tdbb = */JRD_get_thread_data();
DsqlCompiledStatement* statement = scratch->getStatement();
if (statement->getType() == DsqlCompiledStatement::TYPE_CREATE_DB ||

View File

@ -4296,7 +4296,6 @@ static void pass1_expand_select_node(DsqlCompilerScratch* dsqlScratch, dsql_nod*
else if (node->nod_type == nod_derived_table)
{
// AB: Derived table support
/*thread_db* tdbb = */JRD_get_thread_data(); // unused
dsql_nod* sub_items = node->nod_arg[e_derived_table_rse]->nod_arg[e_rse_items];
dsql_nod** ptr = sub_items->nod_arg;
for (const dsql_nod* const* const end = ptr + sub_items->nod_count; ptr < end; ++ptr)

View File

@ -1586,7 +1586,7 @@ InversionNode* OptimizerRetrieval::makeIndexScanNode(IndexScratch* indexScratch)
{
ComparativeBoolNode* cmpNode = (*tail)->matches[0]->as<ComparativeBoolNode>();
fb_assert(cmpNode);
dsc dsc0;
CMP_get_desc(tdbb, csb, cmpNode->arg1.getObject(), &dsc0);

View File

@ -2362,16 +2362,11 @@ static void markIndices(CompilerScratch::csb_repeat* csbTail, SSHORT relationId)
if (!plan || plan->type != PlanNode::TYPE_RETRIEVE)
return;
// find out how many indices were specified; if
// there were none, this is a sequential retrieval
//size_t planCount = 0;
//if (plan->accessType)
// planCount = plan->accessType->items.getCount();
// go through each of the indices and mark it unusable
// Go through each of the indices and mark it unusable
// for indexed retrieval unless it was specifically mentioned
// in the plan; also mark indices for navigational access
// in the plan; also mark indices for navigational access.
// If there were none indices, this is a sequential retrieval.
index_desc* idx = csbTail->csb_idx->items;

View File

@ -2208,7 +2208,7 @@ dsc* evlSetContext(thread_db* tdbb, const SysFunction*, const jrd_nod* args,
impure->vlu_desc.makeLong(0, &impure->vlu_misc.vlu_long);
Firebird::StringMap* contextVars = NULL;
StringMap* contextVars = NULL;
if (nameSpaceStr == USER_SESSION_NAMESPACE)
{
@ -2600,7 +2600,7 @@ dsc* evlOverlay(thread_db* tdbb, const SysFunction* function, const jrd_nod* arg
if (value->isBlob())
{
Firebird::UCharBuffer bpb;
UCharBuffer bpb;
BLB_gen_bpb_from_descs(value, &impure->vlu_desc, bpb);
blb* blob = BLB_open2(tdbb, tdbb->getRequest()->req_transaction,
@ -2621,7 +2621,7 @@ dsc* evlOverlay(thread_db* tdbb, const SysFunction* function, const jrd_nod* arg
if (placing->isBlob())
{
Firebird::UCharBuffer bpb;
UCharBuffer bpb;
BLB_gen_bpb_from_descs(placing, &impure->vlu_desc, bpb);
blb* blob = BLB_open2(tdbb, tdbb->getRequest()->req_transaction,
@ -2957,7 +2957,7 @@ dsc* evlPosition(thread_db* tdbb, const SysFunction* function, const jrd_nod* ar
else
value1Length = MOV_make_string2(tdbb, value1, ttype, &value1Address, value1Buffer);
Firebird::HalfStaticArray<UCHAR, BUFFER_SMALL> value1Canonical;
HalfStaticArray<UCHAR, BUFFER_SMALL> value1Canonical;
value1Canonical.getBuffer(value1Length / cs->minBytesPerChar() * canonicalWidth);
const SLONG value1CanonicalLen = tt->canonical(value1Length, value1Address,
value1Canonical.getCount(), value1Canonical.begin()) * canonicalWidth;
@ -2985,7 +2985,7 @@ dsc* evlPosition(thread_db* tdbb, const SysFunction* function, const jrd_nod* ar
else
value2Length = MOV_make_string2(tdbb, value2, ttype, &value2Address, value2Buffer);
Firebird::HalfStaticArray<UCHAR, BUFFER_SMALL> value2Canonical;
HalfStaticArray<UCHAR, BUFFER_SMALL> value2Canonical;
value2Canonical.getBuffer(value2Length / cs->minBytesPerChar() * canonicalWidth);
const SLONG value2CanonicalLen = tt->canonical(value2Length, value2Address,
value2Canonical.getCount(), value2Canonical.begin()) * canonicalWidth;
@ -3126,7 +3126,7 @@ dsc* evlReplace(thread_db* tdbb, const SysFunction*, const jrd_nod* args,
if (lengths[1] == 0)
return values[0];
Firebird::HalfStaticArray<UCHAR, BUFFER_SMALL> canonicals[2]; // searched, find
HalfStaticArray<UCHAR, BUFFER_SMALL> canonicals[2]; // searched, find
for (int i = 0; i < 2; ++i)
{
canonicals[i].getBuffer(lengths[i] / cs->minBytesPerChar() * canonicalWidth);
@ -3247,8 +3247,8 @@ dsc* evlReverse(thread_db* tdbb, const SysFunction*, const jrd_nod* args,
blb* blob = BLB_open(tdbb, tdbb->getRequest()->req_transaction,
reinterpret_cast<bid*>(value->dsc_address));
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer2;
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer2;
UCHAR* p = buffer.getBuffer(blob->blb_length);
const SLONG len = BLB_get_data(tdbb, blob, p, blob->blb_length, true);
@ -3357,7 +3357,7 @@ dsc* evlRight(thread_db* tdbb, const SysFunction*, const jrd_nod* args,
if (charSet->isMultiByte())
{
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
start = charSet->length(
BLB_get_data(tdbb, blob, buffer.getBuffer(blob->blb_length), blob->blb_length, false),
@ -3667,7 +3667,7 @@ const SysFunction SysFunction::functions[] =
};
const SysFunction* SysFunction::lookup(const Firebird::MetaName& name)
const SysFunction* SysFunction::lookup(const MetaName& name)
{
for (const SysFunction* f = functions; f->name.length() > 0; ++f)
{
@ -3726,7 +3726,7 @@ dsc* SysFunction::substring(thread_db* tdbb, impure_value* impure,
blb* blob = BLB_open(tdbb, tdbb->getRequest()->req_transaction,
reinterpret_cast<bid*>(value->dsc_address));
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
CharSet* charSet = INTL_charset_lookup(tdbb, value->getCharSet());
//const ULONG totLen = length * charSet->maxBytesPerChar();
@ -3735,7 +3735,7 @@ dsc* SysFunction::substring(thread_db* tdbb, impure_value* impure,
buffer.getBuffer(MIN(blob->blb_length, (offset + length) * charSet->maxBytesPerChar()));
dataLen = BLB_get_data(tdbb, blob, buffer.begin(), buffer.getCount(), false);
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer2;
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer2;
buffer2.getBuffer(dataLen);
dataLen = charSet->substring(dataLen, buffer.begin(),

View File

@ -67,7 +67,6 @@ ValuesImpl::IndividualQueue::~IndividualQueue()
void FB_CALL ValuesImpl::IndividualQueue::enqueue(Error* /*error*/)
{
/*thread_db* tdbb = */JRD_get_thread_data();
const size_t recordCount = records.getCount();
UCHAR* const buffer = (enqueuePos < recordCount ?
records[enqueuePos] : FB_NEW(getPool()) UCHAR[recordSize]);
@ -161,7 +160,6 @@ ValuesImpl::MsgQueue::~MsgQueue()
void FB_CALL ValuesImpl::MsgQueue::enqueue(Error* /*error*/)
{
/*thread_db* tdbb = */JRD_get_thread_data();
const size_t recordCount = records.getCount();
UCHAR* buffer = (enqueuePos < recordCount ?
records[enqueuePos] : FB_NEW(getPool()) UCHAR[msgLength]);

View File

@ -2221,7 +2221,7 @@ BoolExprNode* PAR_parse_boolean(thread_db* tdbb, CompilerScratch* csb)
{
// NS: This error string is correct, please do not mangle it again and again.
// The whole error message is "BLR syntax error: expected %s at offset %d, encountered %d"
PAR_syntax_error(csb, "valid BLR code");
PAR_syntax_error(csb, "valid boolean BLR code");
}
return boolParsers[blrOp](tdbb, *tdbb->getDefaultPool(), csb, blrOp);