From 4e0b87cd88f38cc14c82a2664c606a26ab44e2eb Mon Sep 17 00:00:00 2001 From: Yubao Liu Date: Tue, 7 May 2019 15:18:05 +0800 Subject: [PATCH] Revert "Remove NUM_FLAG flag from column definition" This reverts commit 447f17fd24f67df510ba2973f4db3e4effe62223. --- lib/MySQL_Protocol.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 5580c7450..5f785651e 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -812,9 +812,7 @@ 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++; - uint16_t flags_ = flags; - flags_ = flags_ & ~NUM_FLAG; - memcpy(_ptr+l,&flags_,sizeof(uint16_t)); l+=sizeof(uint16_t); + memcpy(_ptr+l,&flags,sizeof(uint16_t)); l+=sizeof(uint16_t); _ptr[l]=decimals; l++; _ptr[l]=0x00; l++; _ptr[l]=0x00; l++;