summaryrefslogtreecommitdiff
path: root/sql/protocol_cursor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/protocol_cursor.cc')
-rw-r--r--sql/protocol_cursor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc
index 31eaa894045..8904aba7b88 100644
--- a/sql/protocol_cursor.cc
+++ b/sql/protocol_cursor.cc
@@ -112,7 +112,8 @@ bool Protocol_cursor::write()
for (; cur_field < fields_end; ++cur_field, ++data_tmp)
{
- if ((len= net_field_length((uchar **)&cp)) == 0)
+ if ((len= net_field_length((uchar **)&cp)) == 0 ||
+ len == NULL_LENGTH)
{
*data_tmp= 0;
}