summaryrefslogtreecommitdiff
path: root/storage/connect/bsonudf.cpp
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-11-03 11:47:10 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2022-11-03 11:47:10 +0100
commitf8997c68fe645cc94f6730a135aca5e530dec449 (patch)
treeb3d607eb1a106a16b900d7da6af81a60332a7584 /storage/connect/bsonudf.cpp
parent49a22c5897823c528d52886f6048d5b4c91e221f (diff)
parentacf8dc0a577f8fed2d059c033f4efbd07dd95ac0 (diff)
downloadmariadb-git-mariadb-10.10.2.tar.gz
Merge branch '10.9' into 10.10mariadb-10.10.2
Diffstat (limited to 'storage/connect/bsonudf.cpp')
-rw-r--r--storage/connect/bsonudf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index 1519ed473df..d2ddfc5f489 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -3574,14 +3574,14 @@ char *bson_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
JTYP type;
BJNX bnx(g);
- PBVAL jvp, top = NULL;
+ PBVAL jvp = NULL, top = NULL;
PBVAL jsp[2] = {NULL, NULL};
for (int i = 0; i < 2; i++) {
jvp = bnx.MakeValue(args, i, true);
if (i) {
- if (jvp->Type != type) {
+ if (jvp && (jvp->Type != type)) {
PUSH_WARNING("Argument types mismatch");
goto fin;
} // endif type
@@ -5725,14 +5725,14 @@ char *bbin_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
JTYP type;
BJNX bnx(g);
- PBVAL jvp, top = NULL;
+ PBVAL jvp = NULL, top = NULL;
PBVAL jsp[2] = {NULL, NULL};
for (int i = 0; i < 2; i++) {
if (i) {
jvp = bnx.MakeValue(args, i, true);
- if (jvp->Type != type) {
+ if (jvp && (jvp->Type != type)) {
PUSH_WARNING("Argument types mismatch");
goto fin;
} // endif type