8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +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:
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:
FIRST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> )
@ -515,7 +516,8 @@ LAST_DAY
--------
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:
LAST_DAY( OF { YEAR | MONTH | WEEK } FROM <date_or_timestamp> )

View File

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

View File

@ -1631,16 +1631,19 @@ public:
#ifndef WIN_NT
unsigned oldCount = 0;
for(;;)
for (;;)
{
unsigned newCount = 0;
FailedBlock* oldList = failedList;
if (oldList)
{
fb_assert(oldList->prev);
oldList->prev = &oldList;
failedList = NULL;
}
while (oldList)
{
++newCount;
@ -1648,8 +1651,10 @@ public:
SemiDoubleLink::pop(oldList);
releaseRaw(true, fb, fb->blockSize, false);
}
if (newCount == oldCount)
break;
oldCount = newCount;
}
#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();
if (!bpb.find(isc_bpb_type))
{
return true;
}
int type = bpb.getInt();
return type & isc_bpb_type_stream ? false : true;
}

View File

@ -478,12 +478,12 @@ const UCHAR DSC_ZTYPE_OTHER = 4;
const UCHAR DSC_ZTYPE_BAD = 5;
const UCHAR decimalDescTable[5][5] = {
/* DSC_ZTYPE_FLT64 DSC_ZTYPE_FLT128 DSC_ZTYPE_FIXED DSC_ZTYPE_INT DSC_ZTYPE_OTHER */
/* DSC_ZTYPE_FLT64 DSC_ZTYPE_FLT128 DSC_ZTYPE_FIXED DSC_ZTYPE_INT DSC_ZTYPE_OTHER */
/* DSC_ZTYPE_FLT64 */ {DSC_ZTYPE_FLT64, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128},
/* DSC_ZTYPE_FLT128 */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128},
/* DSC_ZTYPE_FIXED */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FIXED, DSC_ZTYPE_FIXED, DSC_ZTYPE_FLT128},
/* DSC_ZTYPE_INT */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FIXED, DSC_ZTYPE_BAD, DSC_ZTYPE_BAD},
/* DSC_ZTYPE_OTHER */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_BAD, DSC_ZTYPE_BAD}
/* DSC_ZTYPE_FIXED */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FIXED, DSC_ZTYPE_FIXED, DSC_ZTYPE_FLT128},
/* DSC_ZTYPE_INT */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FIXED, DSC_ZTYPE_BAD, DSC_ZTYPE_BAD},
/* DSC_ZTYPE_OTHER */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_BAD, DSC_ZTYPE_BAD}
};
UCHAR getFType(const dsc& desc)

View File

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

View File

@ -2361,7 +2361,7 @@ void Batch::addBlob(CheckStatusWrapper* status, unsigned length, const void* inB
RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
// Policy check
switch(blobPolicy)
switch (blobPolicy)
{
case IBatch::BLOB_ID_ENGINE:
genBlobId(blobId);
@ -2404,7 +2404,7 @@ void Batch::appendBlobData(CheckStatusWrapper* status, unsigned length, const vo
}
// Policy check
switch(blobPolicy)
switch (blobPolicy)
{
case IBatch::BLOB_ID_USER:
case IBatch::BLOB_ID_ENGINE:

View File

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

View File

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