Skip to content
Permalink
Browse files

Support very low max_allowed_packet setting in TMySQLConnection.MaxAl…

…lowedPacket, so it has to be >10K only, for not assuming 1M for SQL exports. See https://www.heidisql.com/forum.php?t=35046
  • Loading branch information
ansgarbecker committed Dec 1, 2019
1 parent dd8bacf commit 097a902e3ca3d263c23a399df46584152ca5aff1
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/dbconnection.pas
@@ -4268,7 +4268,7 @@ function TDBConnection.GetSessionVariable(VarName: String; DefaultValue: String=
function TMySQLConnection.MaxAllowedPacket: Int64;
begin
Result := MakeInt(GetSessionVariable('max_allowed_packet'));
if Result < SIZE_MB then begin
if Result < SIZE_KB*10 then begin
Result := SIZE_MB;
Log(lcError, f_('The server did not return a non-zero value for the %s variable. Assuming %s now.', ['max_allowed_packet', FormatByteNumber(Result)]));
end;

0 comments on commit 097a902

Please sign in to comment.
You can’t perform that action at this time.