diff options
author | unknown <sanja@askmonty.org> | 2013-09-11 19:10:46 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2013-09-11 19:10:46 +0300 |
commit | db4b76775e4c98c73b58ff50af410d4e5cf665b9 (patch) | |
tree | 9120f4b4ee721817295f1dce9aecce88883ee4f7 /mysys/ma_dyncol.c | |
parent | 232eb75b67bc6243d499b1fa78e3d92829897593 (diff) | |
download | mariadb-git-db4b76775e4c98c73b58ff50af410d4e5cf665b9.tar.gz |
MDEV-4995: mariadb_dyncol_column_count returns error when passing an empty dynamic column
An empty string processing added to mariadb_dyncol_column_count().
Diffstat (limited to 'mysys/ma_dyncol.c')
-rw-r--r-- | mysys/ma_dyncol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c index d1a59a343df..99cf51a8318 100644 --- a/mysys/ma_dyncol.c +++ b/mysys/ma_dyncol.c @@ -4327,6 +4327,10 @@ mariadb_dyncol_column_count(DYNAMIC_COLUMN *str, uint *column_count) DYN_HEADER header; enum enum_dyncol_func_result rc; + *(column_count)= 0; + if (str->length == 0) + return ER_DYNCOL_OK; + if ((rc= init_read_hdr(&header, str)) < 0) return rc; *column_count= header.column_count; |