xiaokang commented on code in PR #45126: URL: https://github.com/apache/doris/pull/45126#discussion_r1875121634
########## be/src/util/mysql_row_buffer.cpp: ########## @@ -107,7 +107,11 @@ MysqlRowBuffer<is_binary_format>::~MysqlRowBuffer() { template <bool is_binary_format> void MysqlRowBuffer<is_binary_format>::open_dynamic_mode() { if (!_dynamic_mode) { - *_pos++ = NEXT_EIGHT_BYTE; + // if _pos now exactly at the end of _buf memory, + // we should reserve 1 byte for _dynamic_mode flag byte to avoid *pos = 254 + // cause _dynamic_mode flag byte be overwritten + reserve(1); + *_pos++ = NEXT_EIGHT_BYTE; // *_pos = 254 ; _pos++ Review Comment: Can you check that is there any more place should reserve() be called before *_pos++ ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org