I have a program which has been dumping data with TMyDump for a long time, and recently it began giving problems.
I use a dump query like
Code: Select all
select * from table where 1
Code: Select all
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND 0=1' at line 1
With TMyDump, it still works when I use "
Code: Select all
select * from table where true
Is it possible that this was changed in a recent mydac version?
Current MyDac version: 9.0.2 (for XE3)
The problem can be reproduced with this piece of code:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
dmp: TMyDump;
ms: TMemoryStream;
begin
ms := TMemoryStream.Create;
dmp := TMyDump.Create(Nil);
dmp.Connection := MyConnection1;
dmp.Options.AddDrop := False;
dmp.Options.InsertType := itInsert;
dmp.Objects := [];
dmp.Objects := dmp.Objects + [doData];
dmp.BackupToStream(ms,'select * from mytable where 1 ');//THROWS SQL EXCEPTION
//...
end;