MyDAC Exception insert in blob field Table

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Wsnet
Posts: 1
Joined: Mon 06 Feb 2017 15:52

MyDAC Exception insert in blob field Table

Post by Wsnet » Mon 06 Feb 2017 16:21

At an insert in the blob field table of files of the sizes > 16Mb outside local network, get exception:
see in screenshot in url:

https://yadi.sk/i/mvPMiwyL3DCaXy


https://yadi.sk/i/mvPMiwyL3DCaXy

Code: Select all

procedure TForm2.btnInsertRecordClick(Sender: TObject);
var
  BlobField: TBlobField;
begin
  with TOpenDialog.Create(nil) do
  try
    MyQuery1.Close;
    MyQuery1.SQL.Clear;
    MyQuery1.SQL.Add('select id, name, file_blob1 from blob_table where id=:pID');
    MyQuery1.ParamByName('pID').AsInteger := 0;
    MyQuery1.Open;
    if Execute then
    begin
      MyQuery1.Append;
      MyQuery1.FieldByName('id').AsInteger := 1;
      MyQuery1.FieldByName('name').AsString := 'Test';
      BlobField := MyQuery1.FieldByName('file_blob1') as TBlobField;
      BlobField.LoadFromFile(FileName);
      MyQuery1.Post;
    end;
  finally
    Free;
  end;
end;

Code: Select all

mysql> show variables like "max_allowed_packet"
    -> ;
+--------------------+-----------+
| Variable_name      | Value     |
+--------------------+-----------+
| max_allowed_packet | 524288000 |
+--------------------+-----------+

Code: Select all

MySQL Table 
blob_table
ID:Int (10)
NAME:VARCHAR(200)
FILE_BLOB1: LONGBLOB

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MyDAC Exception insert in blob field Table

Post by ViktorV » Wed 08 Feb 2017 10:28

Unfortunately, we could not reproduce the problem.
Please make sure you have the latest version of MyDAC 8.7.27.
In order to get a detailed answer, please compose a small sample demonstrating the described behavior and send it using the contact form https://www.devart.com/company/contactform.html including scripts for creating database objects. Also please specify the exact MySQL server version, extension and the file size which being inserted causes an error.

Post Reply