8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00
This commit is contained in:
Adriano dos Santos Fernandes 2017-11-05 22:22:00 -02:00
parent 8ec375b274
commit f141247dac
9 changed files with 21 additions and 16 deletions

View File

@ -434,7 +434,8 @@ FIRST_DAY
--------- ---------
Function: Function:
Returns the first day of the year/month/week of a given date/timestamp value. Returns a date/timestamp with the first day of the year/month/week of a given
date/timestamp value.
Format: Format:
FIRST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> ) FIRST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> )
@ -515,7 +516,8 @@ LAST_DAY
-------- --------
Function: Function:
Returns the last day of the year/month/week of a given date/timestamp value. Returns a date/timestamp with the last day of the year/month/week of a given
date/timestamp value.
Format: Format:
LAST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> ) LAST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> )

View File

@ -35,7 +35,7 @@ namespace Firebird {
}; };
class BatchCompletionState FB_FINAL : class BatchCompletionState FB_FINAL :
public DisposeIface<Firebird::IBatchCompletionStateImpl<BatchCompletionState, CheckStatusWrapper> > public DisposeIface<IBatchCompletionStateImpl<BatchCompletionState, CheckStatusWrapper> >
{ {
public: public:
BatchCompletionState(bool storeCounts, ULONG lim) BatchCompletionState(bool storeCounts, ULONG lim)

View File

@ -1631,16 +1631,19 @@ public:
#ifndef WIN_NT #ifndef WIN_NT
unsigned oldCount = 0; unsigned oldCount = 0;
for (;;) for (;;)
{ {
unsigned newCount = 0; unsigned newCount = 0;
FailedBlock* oldList = failedList; FailedBlock* oldList = failedList;
if (oldList) if (oldList)
{ {
fb_assert(oldList->prev); fb_assert(oldList->prev);
oldList->prev = &oldList; oldList->prev = &oldList;
failedList = NULL; failedList = NULL;
} }
while (oldList) while (oldList)
{ {
++newCount; ++newCount;
@ -1648,8 +1651,10 @@ public:
SemiDoubleLink::pop(oldList); SemiDoubleLink::pop(oldList);
releaseRaw(true, fb, fb->blockSize, false); releaseRaw(true, fb, fb->blockSize, false);
} }
if (newCount == oldCount) if (newCount == oldCount)
break; break;
oldCount = newCount; oldCount = newCount;
} }
#endif // WIN_NT #endif // WIN_NT

View File

@ -1637,10 +1637,10 @@ bool isBpbSegmented(unsigned parLength, const unsigned char* par)
(Firebird::Arg::Gds(isc_random) << "Malformed BPB").raise(); (Firebird::Arg::Gds(isc_random) << "Malformed BPB").raise();
if (!bpb.find(isc_bpb_type)) if (!bpb.find(isc_bpb_type))
{
return true; return true;
}
int type = bpb.getInt(); int type = bpb.getInt();
return type & isc_bpb_type_stream ? false : true; return type & isc_bpb_type_stream ? false : true;
} }

View File

@ -3172,9 +3172,8 @@ static processing_state bulk_insert_hack(const char* command)
dfixvalue = (FB_DEC_FIXED*) datap; dfixvalue = (FB_DEC_FIXED*) datap;
if (isqlGlob.dfix) if (isqlGlob.dfix)
{
isqlGlob.dfix->fromString(fbStatus, get_numeric_value(lastPos).c_str(), scale, dfixvalue); isqlGlob.dfix->fromString(fbStatus, get_numeric_value(lastPos).c_str(), scale, dfixvalue);
}
if ((!isqlGlob.dfix) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS)) if ((!isqlGlob.dfix) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
{ {
STDERROUT("Input parsing problem"); STDERROUT("Input parsing problem");

View File

@ -1101,7 +1101,6 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
return P_TRUE(xdrs, p); return P_TRUE(xdrs, p);
} }
///case op_insert: ///case op_insert:
default: default:
#ifdef DEV_BUILD #ifdef DEV_BUILD
@ -2432,4 +2431,3 @@ private:
return TRUE; return TRUE;
} }

View File

@ -5931,6 +5931,7 @@ YBatch* YAttachment::createBatch(CheckStatusWrapper* status, ITransaction* trans
//------------------------------------- //-------------------------------------
YService::YService(IProvider* aProvider, IService* aNext, bool utf8) YService::YService(IProvider* aProvider, IService* aNext, bool utf8)
: YHelper(aNext), : YHelper(aNext),
provider(aProvider), provider(aProvider),