mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 12:43:03 +01:00
Misc.
This commit is contained in:
parent
d02b6714f8
commit
e31eefb8d9
@ -173,6 +173,7 @@ typedef int (*FB_SHUTDOWN_CALLBACK)(const int reason, const int mask, void* arg)
|
||||
struct FB_DEC16_t {
|
||||
ISC_UINT64 fb_data[1];
|
||||
};
|
||||
|
||||
struct FB_DEC34_t {
|
||||
ISC_UINT64 fb_data[2];
|
||||
};
|
||||
|
@ -316,6 +316,7 @@ template <typename DSC>
|
||||
bool areParamsDouble(int argsCount, DSC** args)
|
||||
{
|
||||
bool decSeen = false;
|
||||
|
||||
for (int i = 0; i < argsCount; ++i)
|
||||
{
|
||||
if (args[i]->isApprox())
|
||||
@ -323,6 +324,7 @@ bool areParamsDouble(int argsCount, DSC** args)
|
||||
if (args[i]->isDecFloat())
|
||||
decSeen = true;
|
||||
}
|
||||
|
||||
return !decSeen;
|
||||
}
|
||||
|
||||
@ -2885,7 +2887,8 @@ dsc* evlQuantize(thread_db* tdbb, const SysFunction* function, const NestValueAr
|
||||
impure->vlu_misc.vlu_dec64 = v1.quantize(decSt, v2);
|
||||
impure->vlu_desc.makeDecimal64(&impure->vlu_misc.vlu_dec64);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Decimal128 v1 = MOV_get_dec128(tdbb, value[0]);
|
||||
Decimal128 v2 = MOV_get_dec128(tdbb, value[1]);
|
||||
|
||||
@ -2930,7 +2933,8 @@ dsc* evlCompare(thread_db* tdbb, const SysFunction* function, const NestValueArr
|
||||
fb_assert(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Decimal128 v1 = MOV_get_dec128(tdbb, value[0]);
|
||||
Decimal128 v2 = MOV_get_dec128(tdbb, value[1]);
|
||||
|
||||
@ -2973,7 +2977,8 @@ dsc* evlNormDec(thread_db* tdbb, const SysFunction* function, const NestValueArr
|
||||
impure->vlu_misc.vlu_dec64 = v.normalize(decSt);
|
||||
impure->vlu_desc.makeDecimal64(&impure->vlu_misc.vlu_dec64);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Decimal128 v = MOV_get_dec128(tdbb, value);
|
||||
|
||||
impure->vlu_misc.vlu_dec128 = v.normalize(decSt);
|
||||
|
@ -819,13 +819,13 @@ void FUN_evaluate(thread_db* tdbb, const Function* function, const NestValueArra
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
request->req_flags &= ~req_null;
|
||||
}
|
||||
|
||||
while (array_stack.hasData())
|
||||
{
|
||||
delete[] array_stack.pop();
|
||||
}
|
||||
|
||||
blob_stack.close();
|
||||
|
||||
} // try
|
||||
|
@ -420,12 +420,7 @@ Decimal64 MOV_get_dec64(Jrd::thread_db* tdbb, const dsc* desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* M O V _ g e t _ d o u b l e
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
* Convert something arbitrary to a double precision number
|
||||
* M O V _ g e t _ d e c 6 4
|
||||
*
|
||||
**************************************/
|
||||
|
||||
@ -437,12 +432,7 @@ Decimal128 MOV_get_dec128(Jrd::thread_db* tdbb, const dsc* desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* M O V _ g e t _ d o u b l e
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
* Functional description
|
||||
* Convert something arbitrary to a double precision number
|
||||
* M O V _ g e t _ d e c 1 2 8
|
||||
*
|
||||
**************************************/
|
||||
|
||||
|
@ -821,6 +821,7 @@ void Sort::diddleKey(UCHAR* record, bool direction)
|
||||
*pp++ ^= -1;
|
||||
} while (--n);
|
||||
}
|
||||
|
||||
*p ^= 1 << 7;
|
||||
((Decimal64*) p)->grabKey(lwp);
|
||||
}
|
||||
@ -842,6 +843,7 @@ void Sort::diddleKey(UCHAR* record, bool direction)
|
||||
*pp++ ^= -1;
|
||||
} while (--n);
|
||||
}
|
||||
|
||||
*p ^= 1 << 7;
|
||||
((Decimal128*) p)->grabKey(lwp);
|
||||
}
|
||||
@ -1095,6 +1097,7 @@ void Sort::diddleKey(UCHAR* record, bool direction)
|
||||
*pp++ ^= -1;
|
||||
} while (--n);
|
||||
}
|
||||
|
||||
p[3] ^= 1 << 7;
|
||||
((Decimal64*) p)->grabKey(lwp);
|
||||
}
|
||||
@ -1115,6 +1118,7 @@ void Sort::diddleKey(UCHAR* record, bool direction)
|
||||
*pp++ ^= -1;
|
||||
} while (--n);
|
||||
}
|
||||
|
||||
p[3] ^= 1 << 7;
|
||||
((Decimal128*) p)->grabKey(lwp);
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ public:
|
||||
ULONG skd_vary_offset; // Offset to varying/cstring length
|
||||
|
||||
USHORT getSkdLength() const { return skd_length; }
|
||||
|
||||
void setSkdLength(UCHAR dtype, USHORT v)
|
||||
{
|
||||
skd_dtype = dtype;
|
||||
@ -178,6 +179,7 @@ public:
|
||||
}
|
||||
|
||||
ULONG getSkdOffset() const { return skd_offset; }
|
||||
|
||||
void setSkdOffset(const sort_key_def* prev = nullptr, dsc* desc = nullptr)
|
||||
{
|
||||
skd_offset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user