mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Ensure we do not send an empty query, if a single query is larger than the max_allowed_packet setting. This way, we most probably get disconnected anyway, but that clearly leaves responsibility to the user to make the query smaller.
This commit is contained in:
@ -2629,7 +2629,7 @@ begin
|
||||
BatchStartOffset := FBatch[i].LeftOffset;
|
||||
while i < FBatch.Count do begin
|
||||
PacketSize := FBatch[i].RightOffset - BatchStartOffset + ((i-FBatchPosition) * 20);
|
||||
if PacketSize >= MaxAllowedPacket then begin
|
||||
if (PacketSize >= MaxAllowedPacket) and (SQL <> '') then begin
|
||||
// TODO: Log('Limiting batch packet size to '+FormatByteNumber(Length(SQL))+' with '+FormatNumber(i-FUserQueryOffset)+' queries.', lcDebug);
|
||||
break;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user