mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@@ -118,7 +118,7 @@ BJNX::BJNX(PGLOBAL g) : BDOC(g)
|
||||
Jp = NULL;
|
||||
Nodes = NULL;
|
||||
Value = NULL;
|
||||
MulVal = NULL;
|
||||
//MulVal = NULL;
|
||||
Jpath = NULL;
|
||||
Buf_Type = TYPE_STRING;
|
||||
Long = len;
|
||||
@@ -149,7 +149,7 @@ BJNX::BJNX(PGLOBAL g, PBVAL row, int type, int len, int prec, my_bool wr) : BDOC
|
||||
Jp = NULL;
|
||||
Nodes = NULL;
|
||||
Value = AllocateValue(g, type, len, prec);
|
||||
MulVal = NULL;
|
||||
//MulVal = NULL;
|
||||
Jpath = NULL;
|
||||
Buf_Type = type;
|
||||
Long = len;
|
||||
@@ -274,40 +274,6 @@ my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm)
|
||||
return true;
|
||||
} // endif's
|
||||
|
||||
#if 0
|
||||
// For calculated arrays, a local Value must be used
|
||||
switch (jnp->Op) {
|
||||
case OP_NUM:
|
||||
jnp->Valp = AllocateValue(g, TYPE_INT);
|
||||
break;
|
||||
case OP_ADD:
|
||||
case OP_MULT:
|
||||
case OP_SEP:
|
||||
if (!IsTypeChar(Buf_Type))
|
||||
jnp->Valp = AllocateValue(g, Buf_Type, 0, GetPrecision());
|
||||
else
|
||||
jnp->Valp = AllocateValue(g, TYPE_DOUBLE, 0, 2);
|
||||
|
||||
break;
|
||||
case OP_MIN:
|
||||
case OP_MAX:
|
||||
jnp->Valp = AllocateValue(g, Buf_Type, Long, GetPrecision());
|
||||
break;
|
||||
case OP_CNC:
|
||||
if (IsTypeChar(Buf_Type))
|
||||
jnp->Valp = AllocateValue(g, TYPE_STRING, Long, GetPrecision());
|
||||
else
|
||||
jnp->Valp = AllocateValue(g, TYPE_STRING, 512);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // endswitch Op
|
||||
|
||||
if (jnp->Valp)
|
||||
MulVal = AllocateValue(g, jnp->Valp);
|
||||
#endif // 0
|
||||
|
||||
return false;
|
||||
} // end of SetArrayOptions
|
||||
|
||||
@@ -453,6 +419,8 @@ PBVAL BJNX::MakeJson(PGLOBAL g, PBVAL bvp, int n)
|
||||
{
|
||||
PBVAL vlp, jvp = bvp;
|
||||
|
||||
Jb = false;
|
||||
|
||||
if (n < Nod -1) {
|
||||
if (bvp->Type == TYPE_JAR) {
|
||||
int ars = GetArraySize(bvp);
|
||||
@@ -3023,7 +2991,7 @@ void bson_object_grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*)
|
||||
PBVAL bop = (PBVAL)g->Activityp;
|
||||
|
||||
if (g->N-- > 0)
|
||||
bxp->SetKeyValue(bop, bxp->MakeValue(args, 1), MakePSZ(g, args, 0));
|
||||
bxp->SetKeyValue(bop, bxp->MakeValue(args, 1), MakePSZ(g, args, 0));
|
||||
|
||||
} // end of bson_object_grp_add
|
||||
|
||||
@@ -3711,7 +3679,7 @@ char *bson_get_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||
PUSH_WARNING("CheckMemory error");
|
||||
goto fin;
|
||||
} else {
|
||||
bnx.Reset();
|
||||
bnx.Reset();
|
||||
jvp = bnx.MakeValue(args, 0, true);
|
||||
|
||||
if (g->Mrr) { // First argument is a constant
|
||||
@@ -4057,7 +4025,7 @@ double bsonget_real(UDF_INIT *initid, UDF_ARGS *args,
|
||||
*is_null = 1;
|
||||
return 0.0;
|
||||
} else {
|
||||
bnx.Reset();
|
||||
bnx.Reset();
|
||||
jvp = bnx.MakeValue(args, 0);
|
||||
|
||||
if ((p = bnx.GetString(jvp))) {
|
||||
|
Reference in New Issue
Block a user