mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:03:03 +01:00
Cleanup: get rid of unused variables.
This commit is contained in:
parent
96717261aa
commit
f412800202
@ -2,7 +2,7 @@
|
|||||||
Linear Regression Functions
|
Linear Regression Functions
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
REGR_* functions analyze relationshitp of the 2 numeric set of data.
|
REGR_* functions analyze relationship of the 2 numeric set of data.
|
||||||
These functions calculate with records that both of 2 set are not NULL.
|
These functions calculate with records that both of 2 set are not NULL.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
@ -2237,16 +2237,15 @@ void RegrCountAggNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
|||||||
|
|
||||||
bool RegrCountAggNode::aggPass(thread_db* tdbb, jrd_req* request) const
|
bool RegrCountAggNode::aggPass(thread_db* tdbb, jrd_req* request) const
|
||||||
{
|
{
|
||||||
|
EVL_expr(tdbb, request, arg);
|
||||||
|
if (request->req_flags & req_null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
EVL_expr(tdbb, request, arg2);
|
||||||
|
if (request->req_flags & req_null)
|
||||||
|
return false;
|
||||||
|
|
||||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
||||||
|
|
||||||
dsc* desc = EVL_expr(tdbb, request, arg);
|
|
||||||
if (request->req_flags & req_null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
dsc* desc2 = EVL_expr(tdbb, request, arg2);
|
|
||||||
if (request->req_flags & req_null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
++impure->vlu_misc.vlu_int64;
|
++impure->vlu_misc.vlu_int64;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -2007,7 +2007,6 @@ DeclareSubProcNode* DeclareSubProcNode::dsqlPass(DsqlCompilerScratch* dsqlScratc
|
|||||||
for (NestConst<ParameterClause>* i = paramArray.begin(); i != paramArray.end(); ++i)
|
for (NestConst<ParameterClause>* i = paramArray.begin(); i != paramArray.end(); ++i)
|
||||||
{
|
{
|
||||||
ParameterClause* param = *i;
|
ParameterClause* param = *i;
|
||||||
const unsigned paramIndex = i - paramArray.begin();
|
|
||||||
|
|
||||||
SignatureParameter sigParam(pool);
|
SignatureParameter sigParam(pool);
|
||||||
sigParam.type = 1; // output
|
sigParam.type = 1; // output
|
||||||
|
@ -256,7 +256,6 @@ dsc* PercentRankWinNode::aggExecute(thread_db* /*tdbb*/, jrd_req* request) const
|
|||||||
|
|
||||||
dsc* PercentRankWinNode::winPass(thread_db* /*tdbb*/, jrd_req* request, SlidingWindow* window) const
|
dsc* PercentRankWinNode::winPass(thread_db* /*tdbb*/, jrd_req* request, SlidingWindow* window) const
|
||||||
{
|
{
|
||||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
|
||||||
impure_value_ex* impureTemp = request->getImpure<impure_value_ex>(tempImpure);
|
impure_value_ex* impureTemp = request->getImpure<impure_value_ex>(tempImpure);
|
||||||
|
|
||||||
double partitionSize = window->getPartitionSize();
|
double partitionSize = window->getPartitionSize();
|
||||||
@ -433,8 +432,6 @@ void FirstValueWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
|||||||
|
|
||||||
dsc* FirstValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
dsc* FirstValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
||||||
{
|
{
|
||||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
|
||||||
|
|
||||||
if (!window->moveWithinFrame(-(window->getRecordPosition() - window->getFrameStart())))
|
if (!window->moveWithinFrame(-(window->getRecordPosition() - window->getFrameStart())))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -496,8 +493,6 @@ void LastValueWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
|||||||
|
|
||||||
dsc* LastValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
dsc* LastValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
||||||
{
|
{
|
||||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
|
||||||
|
|
||||||
if (!window->moveWithinFrame(window->getFrameEnd() - window->getRecordPosition()))
|
if (!window->moveWithinFrame(window->getFrameEnd() - window->getRecordPosition()))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -573,8 +568,6 @@ void NthValueWinNode::aggInit(thread_db* tdbb, jrd_req* request) const
|
|||||||
|
|
||||||
dsc* NthValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
dsc* NthValueWinNode::winPass(thread_db* tdbb, jrd_req* request, SlidingWindow* window) const
|
||||||
{
|
{
|
||||||
impure_value_ex* impure = request->getImpure<impure_value_ex>(impureOffset);
|
|
||||||
|
|
||||||
dsc* desc = EVL_expr(tdbb, request, row);
|
dsc* desc = EVL_expr(tdbb, request, row);
|
||||||
if (!desc || (request->req_flags & req_null))
|
if (!desc || (request->req_flags & req_null))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -41,13 +41,6 @@
|
|||||||
#include "../gpre/par_proto.h"
|
#include "../gpre/par_proto.h"
|
||||||
#include "../yvalve/gds_proto.h"
|
#include "../yvalve/gds_proto.h"
|
||||||
|
|
||||||
static const UCHAR blr_bpb[] =
|
|
||||||
{
|
|
||||||
isc_bpb_version1,
|
|
||||||
isc_bpb_source_type, 1, isc_blob_blr,
|
|
||||||
isc_bpb_target_type, 1, isc_blob_blr
|
|
||||||
};
|
|
||||||
|
|
||||||
/*____________________________________________________________
|
/*____________________________________________________________
|
||||||
*
|
*
|
||||||
* Lookup a field by name in a context.
|
* Lookup a field by name in a context.
|
||||||
|
@ -263,7 +263,6 @@
|
|||||||
-------------------------------------------- */
|
-------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
static const int UNICODE_REPLACEMENT_CHARACTER = 0xFFFD;
|
|
||||||
static const int CANT_MAP_CHARACTER = 0;
|
static const int CANT_MAP_CHARACTER = 0;
|
||||||
|
|
||||||
static const USHORT to_unicode_map[256] = {
|
static const USHORT to_unicode_map[256] = {
|
||||||
|
@ -670,8 +670,6 @@ void EXE_receive(thread_db* tdbb,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto statement = request->getStatement();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (nodeIs<StallNode>(request->req_message))
|
if (nodeIs<StallNode>(request->req_message))
|
||||||
@ -818,7 +816,6 @@ void EXE_send(thread_db* tdbb, jrd_req* request, USHORT msg, ULONG length, const
|
|||||||
node = request->req_message;
|
node = request->req_message;
|
||||||
|
|
||||||
jrd_tra* transaction = request->req_transaction;
|
jrd_tra* transaction = request->req_transaction;
|
||||||
const JrdStatement* statement = request->getStatement();
|
|
||||||
|
|
||||||
const SelectNode* selectNode;
|
const SelectNode* selectNode;
|
||||||
|
|
||||||
@ -881,7 +878,6 @@ void EXE_start(thread_db* tdbb, jrd_req* request, jrd_tra* transaction)
|
|||||||
ERR_post(Arg::Gds(isc_req_no_trans));
|
ERR_post(Arg::Gds(isc_req_no_trans));
|
||||||
|
|
||||||
JrdStatement* statement = request->getStatement();
|
JrdStatement* statement = request->getStatement();
|
||||||
const jrd_prc* proc = statement->procedure;
|
|
||||||
|
|
||||||
/* Post resources to transaction block. In particular, the interest locks
|
/* Post resources to transaction block. In particular, the interest locks
|
||||||
on relations/indices are copied to the transaction, which is very
|
on relations/indices are copied to the transaction, which is very
|
||||||
@ -1348,8 +1344,6 @@ const StmtNode* EXE_looper(thread_db* tdbb, jrd_req* request, const StmtNode* no
|
|||||||
|
|
||||||
// Execute stuff until we drop
|
// Execute stuff until we drop
|
||||||
|
|
||||||
const JrdStatement* statement = request->getStatement();
|
|
||||||
|
|
||||||
while (node && !(request->req_flags & req_stall))
|
while (node && !(request->req_flags & req_stall))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -73,7 +73,6 @@ void InternalProvider::jrdAttachmentEnd(thread_db* tdbb, Attachment* att, bool f
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
{ // scope
|
{ // scope
|
||||||
Database* dbb = tdbb->getDatabase();
|
|
||||||
MutexLockGuard guard(m_mutex, FB_FUNCTION);
|
MutexLockGuard guard(m_mutex, FB_FUNCTION);
|
||||||
|
|
||||||
AttToConnMap::Accessor acc(&m_connections);
|
AttToConnMap::Accessor acc(&m_connections);
|
||||||
|
@ -1435,7 +1435,6 @@ static void store_global_field(thread_db* tdbb, const gfld* gfield, AutoRequest&
|
|||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
SET_TDBB(tdbb);
|
SET_TDBB(tdbb);
|
||||||
Database* dbb = tdbb->getDatabase();
|
|
||||||
Jrd::Attachment* attachment = tdbb->getAttachment();
|
Jrd::Attachment* attachment = tdbb->getAttachment();
|
||||||
|
|
||||||
STORE(REQUEST_HANDLE handle) X IN RDB$FIELDS
|
STORE(REQUEST_HANDLE handle) X IN RDB$FIELDS
|
||||||
|
@ -1517,9 +1517,6 @@ void JRD_transliterate(thread_db* tdbb, Firebird::IStatus* vector) throw()
|
|||||||
|
|
||||||
const ULONG SWEEP_INTERVAL = 20000;
|
const ULONG SWEEP_INTERVAL = 20000;
|
||||||
|
|
||||||
const char DBL_QUOTE = '\042';
|
|
||||||
const char SINGLE_QUOTE = '\'';
|
|
||||||
|
|
||||||
|
|
||||||
static void trace_warning(thread_db* tdbb, FbStatusVector* userStatus, const char* func)
|
static void trace_warning(thread_db* tdbb, FbStatusVector* userStatus, const char* func)
|
||||||
{
|
{
|
||||||
@ -7460,7 +7457,6 @@ static void init_database_lock(thread_db* tdbb)
|
|||||||
**************************************/
|
**************************************/
|
||||||
SET_TDBB(tdbb);
|
SET_TDBB(tdbb);
|
||||||
Database* const dbb = tdbb->getDatabase();
|
Database* const dbb = tdbb->getDatabase();
|
||||||
Jrd::Attachment* const attachment = tdbb->getAttachment();
|
|
||||||
|
|
||||||
// Main database lock
|
// Main database lock
|
||||||
|
|
||||||
@ -8039,7 +8035,6 @@ static void purge_transactions(thread_db* tdbb, Jrd::Attachment* attachment, con
|
|||||||
* from an attachment
|
* from an attachment
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
Database* const dbb = attachment->att_database;
|
|
||||||
jrd_tra* const trans_dbk = attachment->att_dbkey_trans;
|
jrd_tra* const trans_dbk = attachment->att_dbkey_trans;
|
||||||
|
|
||||||
if (force_flag)
|
if (force_flag)
|
||||||
|
@ -363,11 +363,11 @@ static void sort_indices_by_selectivity(CompilerScratch::csb_repeat* csbTail);
|
|||||||
// macro definitions
|
// macro definitions
|
||||||
|
|
||||||
#ifdef OPT_DEBUG
|
#ifdef OPT_DEBUG
|
||||||
const int DEBUG_PUNT = 5;
|
//const int DEBUG_PUNT = 5;
|
||||||
const int DEBUG_RELATIONSHIPS = 4;
|
//const int DEBUG_RELATIONSHIPS = 4;
|
||||||
const int DEBUG_ALL = 3;
|
//const int DEBUG_ALL = 3;
|
||||||
const int DEBUG_CANDIDATE = 2;
|
//const int DEBUG_CANDIDATE = 2;
|
||||||
const int DEBUG_BEST = 1;
|
//const int DEBUG_BEST = 1;
|
||||||
const int DEBUG_NONE = 0;
|
const int DEBUG_NONE = 0;
|
||||||
|
|
||||||
FILE *opt_debug_file = 0;
|
FILE *opt_debug_file = 0;
|
||||||
|
@ -119,7 +119,6 @@ void RecordSource::printInversion(thread_db* tdbb, const InversionNode* inversio
|
|||||||
case InversionNode::TYPE_INDEX:
|
case InversionNode::TYPE_INDEX:
|
||||||
{
|
{
|
||||||
const IndexRetrieval* const retrieval = inversion->retrieval;
|
const IndexRetrieval* const retrieval = inversion->retrieval;
|
||||||
const jrd_rel* const relation = retrieval->irb_relation;
|
|
||||||
|
|
||||||
MetaName indexName;
|
MetaName indexName;
|
||||||
if (retrieval->irb_name && retrieval->irb_name->hasData())
|
if (retrieval->irb_name && retrieval->irb_name->hasData())
|
||||||
|
@ -1462,7 +1462,7 @@ static bool check_prepare_result(int prepare_result, jrd_tra* transaction, jrd_r
|
|||||||
**************************************
|
**************************************
|
||||||
*
|
*
|
||||||
* Functional description
|
* Functional description
|
||||||
* Called by VIO_modify and VIO_erase. Raise update conflict error if not in
|
* Called by VIO_modify and VIO_erase. Raise update conflict error if not in
|
||||||
* read consistency transaction or lock error happens or if request is already
|
* read consistency transaction or lock error happens or if request is already
|
||||||
* in update conflict mode. In latter case set TRA_ex_restart flag to correctly
|
* in update conflict mode. In latter case set TRA_ex_restart flag to correctly
|
||||||
* handle request restart.
|
* handle request restart.
|
||||||
@ -1473,17 +1473,17 @@ static bool check_prepare_result(int prepare_result, jrd_tra* transaction, jrd_r
|
|||||||
|
|
||||||
jrd_req* top_request = request->req_snapshot.m_owner;
|
jrd_req* top_request = request->req_snapshot.m_owner;
|
||||||
|
|
||||||
const bool restart_ready = top_request &&
|
const bool restart_ready = top_request &&
|
||||||
(top_request->req_flags & req_restart_ready);
|
(top_request->req_flags & req_restart_ready);
|
||||||
|
|
||||||
// Second update conflict when request is already in update conflict mode
|
// Second update conflict when request is already in update conflict mode
|
||||||
// means we have some (indirect) UPDATE\DELETE in WHERE clause of primary
|
// means we have some (indirect) UPDATE\DELETE in WHERE clause of primary
|
||||||
// cursor. In this case all we can do is restart whole request immediately.
|
// cursor. In this case all we can do is restart whole request immediately.
|
||||||
const bool secondary = top_request &&
|
const bool secondary = top_request &&
|
||||||
(top_request->req_flags & req_update_conflict) &&
|
(top_request->req_flags & req_update_conflict) &&
|
||||||
(prepare_result != PREPARE_LOCKERR);
|
(prepare_result != PREPARE_LOCKERR);
|
||||||
|
|
||||||
if (!(transaction->tra_flags & TRA_read_consistency) || prepare_result == PREPARE_LOCKERR ||
|
if (!(transaction->tra_flags & TRA_read_consistency) || prepare_result == PREPARE_LOCKERR ||
|
||||||
secondary || !restart_ready)
|
secondary || !restart_ready)
|
||||||
{
|
{
|
||||||
if (secondary)
|
if (secondary)
|
||||||
@ -1898,7 +1898,7 @@ bool VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
|
|||||||
verb_post(tdbb, transaction, rpb, rpb->rpb_undo);
|
verb_post(tdbb, transaction, rpb, rpb->rpb_undo);
|
||||||
|
|
||||||
// We have INSERT + DELETE or UPDATE + DELETE in the same transaction.
|
// We have INSERT + DELETE or UPDATE + DELETE in the same transaction.
|
||||||
// UPDATE has already notified GC, while INSERT has not. Check for
|
// UPDATE has already notified GC, while INSERT has not. Check for
|
||||||
// backversion allows to avoid second notification in case of UPDATE.
|
// backversion allows to avoid second notification in case of UPDATE.
|
||||||
|
|
||||||
if ((dbb->dbb_flags & DBB_gc_background) && !rpb->rpb_relation->isTemporary() && !backVersion)
|
if ((dbb->dbb_flags & DBB_gc_background) && !rpb->rpb_relation->isTemporary() && !backVersion)
|
||||||
@ -3219,7 +3219,7 @@ bool VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb, j
|
|||||||
const bool backVersion = (org_rpb->rpb_b_page != 0);
|
const bool backVersion = (org_rpb->rpb_b_page != 0);
|
||||||
record_param temp;
|
record_param temp;
|
||||||
PageStack stack;
|
PageStack stack;
|
||||||
int prepare_result = prepare_update(tdbb, transaction, org_rpb->rpb_transaction_nr, org_rpb,
|
int prepare_result = prepare_update(tdbb, transaction, org_rpb->rpb_transaction_nr, org_rpb,
|
||||||
&temp, new_rpb, stack, false);
|
&temp, new_rpb, stack, false);
|
||||||
if (!check_prepare_result(prepare_result, transaction, tdbb->getRequest(), org_rpb))
|
if (!check_prepare_result(prepare_result, transaction, tdbb->getRequest(), org_rpb))
|
||||||
return false;
|
return false;
|
||||||
@ -5533,7 +5533,6 @@ static int prepare_update( thread_db* tdbb,
|
|||||||
**************************************/
|
**************************************/
|
||||||
SET_TDBB(tdbb);
|
SET_TDBB(tdbb);
|
||||||
|
|
||||||
Attachment* const attachment = tdbb->getAttachment();
|
|
||||||
jrd_rel* const relation = rpb->rpb_relation;
|
jrd_rel* const relation = rpb->rpb_relation;
|
||||||
|
|
||||||
#ifdef VIO_DEBUG
|
#ifdef VIO_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user