mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Misc.
This commit is contained in:
parent
8ec375b274
commit
f141247dac
@ -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> )
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -5931,6 +5931,7 @@ YBatch* YAttachment::createBatch(CheckStatusWrapper* status, ITransaction* trans
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
|
||||
YService::YService(IProvider* aProvider, IService* aNext, bool utf8)
|
||||
: YHelper(aNext),
|
||||
provider(aProvider),
|
||||
|
Loading…
Reference in New Issue
Block a user