summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-10-13 12:03:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-10-13 12:03:32 +0300
commita736a3174a4e7c0d92a38901ae61f563d4afede7 (patch)
tree348d15f7c9cc883e86d852fbddc780f506669ee4 /storage/connect
parentb44e12fef176bfc0884fb2c5f4ba7f42bf054f44 (diff)
parent4a7dfda373ff9e28e4f4f35bad76cbfc20934a9a (diff)
downloadmariadb-git-a736a3174a4e7c0d92a38901ae61f563d4afede7.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/bsonudf.cpp9
-rw-r--r--storage/connect/inihandl.cpp8
-rw-r--r--storage/connect/tabbson.cpp2
3 files changed, 10 insertions, 9 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index 0c7112ee15f..771e72b8dbd 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -12,6 +12,7 @@
#include <mysql.h>
#include <sql_error.h>
#include <stdio.h>
+#include <cassert>
#include "bsonudf.h"
@@ -621,7 +622,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n)
{
// For calculated arrays, a local Value must be used
int lng = 0;
- short type, prec = 0;
+ short type = 0, prec = 0;
bool b = n < Nod - 1;
PVAL valp;
PBVAL vlp, vp;
@@ -690,7 +691,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n)
break;
default:
- break;
+ DBUG_ASSERT(!"Implement new op type support.");
} // endswitch Op
return valp = AllocateValue(g, type, lng, prec);
@@ -4978,7 +4979,7 @@ char *bbin_array_add(UDF_INIT *initid, UDF_ARGS *args, char *result,
uint n = 2;
int* x = GetIntArgPtr(g, args, n);
BJNX bnx(g, NULL, TYPE_STRING);
- PBVAL jarp, top, jvp = NULL;
+ PBVAL jarp = NULL, top = NULL, jvp = NULL;
PBVAL jsp = bnx.MakeValue(args, 0, true, &top);
if (bnx.CheckPath(g, args, jsp, jvp, 2))
@@ -5611,7 +5612,7 @@ char *bbin_object_values(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!bsp) {
if (!CheckMemory(g, initid, args, 1, true, true)) {
BJNX bnx(g);
- PBVAL top, jarp;
+ PBVAL top, jarp = NULL;
PBVAL jvp = bnx.MakeValue(args, 0, true, &top);
if (jvp->Type == TYPE_JOB) {
diff --git a/storage/connect/inihandl.cpp b/storage/connect/inihandl.cpp
index 9270e18721c..de04fa91883 100644
--- a/storage/connect/inihandl.cpp
+++ b/storage/connect/inihandl.cpp
@@ -193,7 +193,7 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
secno++;
}
- for (key = section->key; key; key = key->next)
+ for (key = section->key; key; key = key->next) {
if (key->name[0]) {
fprintf(file, "%s", SVP(key->name));
@@ -201,9 +201,9 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
fprintf(file, "=%s", SVP(key->value));
fprintf(file, "\n");
- } // endif key->name
-
- } // endfor section
+ } // endif key->name
+ }
+ } // endfor section
} // end of PROFILE_Save
diff --git a/storage/connect/tabbson.cpp b/storage/connect/tabbson.cpp
index 3b1f1c84d1a..a7c561318c7 100644
--- a/storage/connect/tabbson.cpp
+++ b/storage/connect/tabbson.cpp
@@ -871,7 +871,7 @@ PBVAL BCUTIL::MakeBson(PGLOBAL g, PBVAL jsp, int n)
/***********************************************************************/
PBVAL BCUTIL::GetRowValue(PGLOBAL g, PBVAL row, int i)
{
- int nod = Cp->Nod, n = nod - 1;
+ int nod = Cp->Nod;
JNODE *nodes = Cp->Nodes;
PBVAL arp;
PBVAL bvp = NULL;