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:
|
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> )
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,12 +478,12 @@ const UCHAR DSC_ZTYPE_OTHER = 4;
|
|||||||
const UCHAR DSC_ZTYPE_BAD = 5;
|
const UCHAR DSC_ZTYPE_BAD = 5;
|
||||||
|
|
||||||
const UCHAR decimalDescTable[5][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_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_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_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_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_OTHER */ {DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_FLT128, DSC_ZTYPE_BAD, DSC_ZTYPE_BAD}
|
||||||
};
|
};
|
||||||
|
|
||||||
UCHAR getFType(const dsc& desc)
|
UCHAR getFType(const dsc& desc)
|
||||||
|
@ -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");
|
||||||
|
@ -2361,7 +2361,7 @@ void Batch::addBlob(CheckStatusWrapper* status, unsigned length, const void* inB
|
|||||||
RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
|
RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
|
||||||
|
|
||||||
// Policy check
|
// Policy check
|
||||||
switch(blobPolicy)
|
switch (blobPolicy)
|
||||||
{
|
{
|
||||||
case IBatch::BLOB_ID_ENGINE:
|
case IBatch::BLOB_ID_ENGINE:
|
||||||
genBlobId(blobId);
|
genBlobId(blobId);
|
||||||
@ -2404,7 +2404,7 @@ void Batch::appendBlobData(CheckStatusWrapper* status, unsigned length, const vo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Policy check
|
// Policy check
|
||||||
switch(blobPolicy)
|
switch (blobPolicy)
|
||||||
{
|
{
|
||||||
case IBatch::BLOB_ID_USER:
|
case IBatch::BLOB_ID_USER:
|
||||||
case IBatch::BLOB_ID_ENGINE:
|
case IBatch::BLOB_ID_ENGINE:
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user