Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: MySQL FireDac 64bit transaction / commit not working, 32bit version works


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Dec 24, 2017 8:36 AM Last Post By: Dmitry Arefiev
Christoph Weidm...

Posts: 1
Registered: 9/4/10
MySQL FireDac 64bit transaction / commit not working, 32bit version works  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 22, 2017 4:58 AM
Hi,
I use Delphi Tokyo 10.2, Release 2 in a development Win10 Creators Fall Upgrade VM.
We have one application compiled for 32bit and 64bit using FireDAC to a Linux mySQL database (5.7).

FireDac Option AutoCommit is set (default) True.
Inside the code we do several update / inserts SQLs with a TFDQuery with Transaction like:

dsQ := TFDQuery.Create(Self);
dsQ.Connection := DM1.FDConnection1; //reference to a global mySQL connection
dsQ.Connection.StartTransaction;
 
try
   dsQ.SQL.Text := ''INSERT INTO .....';
[...]
  dsQ.ExecSQL;
[...]
  dsQ.Connection.Commit;
except
  dsQ.Connection.Rollback;
  raise;


This compiles error free in 32bit and 64bit (with accourding dlls lying in the runtime folders).

Inside the application the code is executed like expected, the users see the results locally, BUT in 64bit the changes are not commited on the databases and all data manipulating after this code segment is uncommitted, too (but visibly for the user).

The exact same code is working in 32bit. All changes are commited on the database like expected.

This definitly worked in Delphi Seattle and Berlin, I am not sure in which version of Tokyo this happend, because it was hard to find this sporadic faluires (the app is running on 32bit and 64bit Windows clients parallel).

Did anyone recognized a similar failure?
Could somebody test it and acknoledge?

Regards,
Christoph Weidmann
Electris Luxembourg

UPDATE:
In 64bit setting the AutoCommit := False; before the Transaction and TRUE after the commit fixes the problem.
For me this seems to be a bug in the 64bit envirenment of FireDAC.

Edited by: Christoph Weidmann on Dec 22, 2017 5:16 AM
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: MySQL FireDac 64bit transaction / commit not working, 32bit version works  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2017 8:36 AM   in response to: Christoph Weidm... in response to: Christoph Weidm...
Please provide FireDAC environment report for your MySQL connection for x64 and x86 environments:
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/DBMS_Environment_Reports_(FireDAC)#Using_Delphi_Code

--
With best regards,
Dmitry

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02