summaryrefslogtreecommitdiff
path: root/strings/json_lib.c
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2022-01-19 18:35:27 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:35:27 +0300
commitda78030ec87e30d2218a0de182ffb87fc541da97 (patch)
tree7f7ce9bb818d56679eaf034b52f05738b8d83da1 /strings/json_lib.c
parente222e44d1bfc995870430bb90d8ac97e91f66cb4 (diff)
parentce4956f3229a8b2c26a4913fdbc190b5c822cb8e (diff)
downloadmariadb-git-preview-10.8-MDEV-26519-json-histograms.tar.gz
Merge MDEV-26519: JSON_HB histograms into 10.8preview-10.8-MDEV-26519-json-histograms
Diffstat (limited to 'strings/json_lib.c')
-rw-r--r--strings/json_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 7b895c216b5..836255bdf28 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1637,7 +1637,7 @@ int json_escape(CHARSET_INFO *str_cs,
if (c_len < 0)
{
/* JSON buffer is depleted. */
- return -1;
+ return JSON_ERROR_OUT_OF_SPACE;
}
/* JSON charset cannot convert this character. */
@@ -1649,7 +1649,7 @@ int json_escape(CHARSET_INFO *str_cs,
json+= c_len, json_end)) <= 0)
{
/* JSON buffer is depleted. */
- return -1;
+ return JSON_ERROR_OUT_OF_SPACE;
}
json+= c_len;
@@ -1682,11 +1682,11 @@ int json_escape(CHARSET_INFO *str_cs,
continue;
}
/* JSON buffer is depleted. */
- return -1;
+ return JSON_ERROR_OUT_OF_SPACE;
}
}
else /* c_len == 0, an illegal symbol. */
- return -1;
+ return JSON_ERROR_ILLEGAL_SYMBOL;
}
return (int)(json - json_start);