MySQL autocommit and starttransaction issue.
Posted: 22.11.2020, 14:04
Hi All!
If MySQL is in autocommit mode, then if you call:
StartTransaction
Update/insert/delete
Commit
My understanding is that calling Commit will automatically put the driver back into autocommit mode, but it doesn't (or I should say that the Autocommit properties are set correctly, but the underlying call to mysql_autocommit(FHandle, 1) is never made.) The Commit method has:
I think that the line that says AutoCommit := True is supposed to be calling SetAutocommit(True). I've made that change (in commit and rollback) in my source and it seems to fix the issue, but there may be more to it.
-Mark
If MySQL is in autocommit mode, then if you call:
StartTransaction
Update/insert/delete
Commit
My understanding is that calling Commit will automatically put the driver back into autocommit mode, but it doesn't (or I should say that the Autocommit properties are set correctly, but the underlying call to mysql_autocommit(FHandle, 1) is never made.) The Commit method has:
Code: Select all
AutoCommit := True;
-Mark