Skip to content

Commit

Permalink
Merge pull request #4039 from sysown/v2.x-fix_deprecate_eof_status
Browse files Browse the repository at this point in the history
Fix status flag read from ok packet using 'CLIENT_DEPRECATE_EOF'
  • Loading branch information
renecannao authored Dec 7, 2022
2 parents 6373e96 + 1d20198 commit 28f1367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Query_Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ unsigned char* ok_to_eof_packet(QC_entry_t* entry) {
mysql_hdr ok_hdr;
memcpy(&ok_hdr, ok_packet, sizeof(mysql_hdr));
ok_packet += sizeof(mysql_hdr);
// Skipt the 'affected_rows' and 'last_insert_id'
ok_packet += 2;
// Skip the 'OK packet header', 'affected_rows' and 'last_insert_id'
ok_packet += 3;
uint16_t status_flags = *reinterpret_cast<uint16_t*>(ok_packet);
ok_packet += 2;
uint16_t warnings = *reinterpret_cast<uint16_t*>(ok_packet);
Expand Down

0 comments on commit 28f1367

Please sign in to comment.