summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-03-13 08:15:06 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-03-13 08:15:06 +0200
commit7fb03d7abf4e668d76aded38378120361c218ba4 (patch)
treeab6a8f7d29479970e5d3b48b0d671d1dc07c166e /strings
parent09c5c335e3e8447e7d07c987293042175b51b495 (diff)
parent1c4b6afbaaf7dbcee4b035d1bf79156fa68a6475 (diff)
downloadmariadb-git-7fb03d7abf4e668d76aded38378120361c218ba4.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 4473e754365..74b8d2ed8e5 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1000,6 +1000,12 @@ static int ull2dec(ulonglong from, decimal_t *to)
sanity(to);
+ if (!from)
+ {
+ decimal_make_zero(to);
+ return E_DEC_OK;
+ }
+
for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) {}
if (unlikely(intg1 > to->len))
{