From 447f17fd24f67df510ba2973f4db3e4effe62223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sat, 7 Oct 2017 02:44:27 +0200 Subject: [PATCH] Remove NUM_FLAG flag from column definition Possible bug fix for #1192 --- lib/MySQL_Protocol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 17c84458d..39254a2c4 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -735,7 +735,9 @@ bool MySQL_Protocol::generate_pkt_field(bool send, void **ptr, unsigned int *len memcpy(_ptr+l,&charset,sizeof(uint16_t)); l+=sizeof(uint16_t); memcpy(_ptr+l,&column_length,sizeof(uint32_t)); l+=sizeof(uint32_t); _ptr[l]=type; l++; - memcpy(_ptr+l,&flags,sizeof(uint16_t)); l+=sizeof(uint16_t); + uint16_t flags_ = flags; + flags_ = flags_ & ~NUM_FLAG; + memcpy(_ptr+l,&flags_,sizeof(uint16_t)); l+=sizeof(uint16_t); _ptr[l]=decimals; l++; _ptr[l]=0x00; l++; _ptr[l]=0x00; l++;