Closed IntelOrca closed 8 years ago
Sure enough, it looks like it just tries to execute the word "BEGIN" at https://github.com/SapientGuardian/mysql-connector-net-netstandard/blob/6.9_netstandard/Source/MySql.Data/Connection.cs#L391
My guess is that either the server is not being put in the right state to understand that, or it's never supposed to get there (perhaps it's supposed to be caught by a CommandInterceptor). I see we have MySqlPromotableTransaction ifdef'd out, but I can't actually find any references to it, so that may be a red herring.
Probably the easiest way to track down this one would be to build the upstream source, run that same simple test, and follow BeginTransaction down the stack to see where it diverges. I think I'll have time to do that this weekend if nobody beats me to it.
@SapientGuardian thanks, I have uploaded a test project which builds for both net46
(with MySql.Data) and netcoreapp1.0
(with SapientGuardian.MySql.Data).
Found the problem - There's a list of keywords that's supposed to be in the resources, which we lost in the conversion. Since it isn't finding "BEGIN" in our empty list, it thinks it's a stored procedure and is actually executing "call BEGIN" instead of just "BEGIN". I'll fix this, but note that we have so much transaction stuff ifdef'd out that YMMV even after I fix this bug.
It looks like the transaction classes are just small wrapper classes that do the BEGIN
, ROLLBACK
and COMMIT
commands etc. Hopefully there isn't much else to it, at least for what I need it for.
I am having trouble getting transactions working, the following code:
gives this exception: