diff --git a/lib/packets/resultset_header.js b/lib/packets/resultset_header.js index 8aa17e037e..43b1892a91 100644 --- a/lib/packets/resultset_header.js +++ b/lib/packets/resultset_header.js @@ -91,7 +91,8 @@ class ResultSetHeader { if (stateChanges) { this.stateChanges = stateChanges; } - const m = this.info.match(/\schanged:\s*(\d+)/i); + // Use the same regex as mysqljs at https://github.com/mysqljs/mysql/blob/dc9c152a87ec51a1f647447268917243d2eab1fd/lib/protocol/packets/OkPacket.js#L3C29-L3C91 + const m = this.info.match(/^[^:0-9]+: [0-9]+[^:0-9]+: ([0-9]+)[^:0-9]+: [0-9]+[^:0-9]*$/); if (m !== null) { this.changedRows = parseInt(m[1], 10); } else {