diff options
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index d0566ed2506..15fca88080e 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -1344,9 +1344,9 @@ bool Protocol::send_result_set_row(List<Item> *row_items) /** - Send \\0 end terminated string. + Send \\0 end terminated string or NULL - @param from NullS or \\0 terminated string + @param from NullS or \\0 terminated string @note In most cases one should use store(from, length) instead of this function @@ -1357,12 +1357,11 @@ bool Protocol::send_result_set_row(List<Item> *row_items) 1 error */ -bool Protocol::store(const char *from, CHARSET_INFO *cs) +bool Protocol::store_string_or_null(const char *from, CHARSET_INFO *cs) { if (!from) return store_null(); - size_t length= strlen(from); - return store(from, length, cs); + return store(from, strlen(from), cs); } @@ -1381,7 +1380,7 @@ bool Protocol::store(I_List<i_string>* str_list) tmp.length(0); while ((s=it++)) { - tmp.append(s->ptr); + tmp.append(s->ptr, strlen(s->ptr)); tmp.append(','); } if ((len= tmp.length())) |