Failed to read uncommitted data from the same session into the MySql / .net connector

I hit my head against the wall with this, maybe someone can shed some light on what might be causing this behavior.

I have an asp.net (2.0) application that, like this some point does:

using (TransactionScope scope = new TransactionScope (...)) {

// ... do a bunch of some requests

InsertOrder ();

InsertOrderDetails ();

// do some more logics and queries

ReadOrder (); // reads the recently inserted order OK

ReadOrderDetails (); // HERE IS A PROBLEM, I CAN'T READ NEW INSERTED DETAILS

// do more inserts ....

scope.Complete ();

}

Additional contact information:

  • MySql Community5.0.27
  • MySql / net 5.2.3 connector
  • Order and OrderDetails is InnoDB with FK constraints
  • Polling enabled (although I tried to disable polling and had the same behavior)
  • I've tried setting different isolation levels in a transaction only if with the same behavior, but it's the same connection, so it doesn't make any difference?

Anyone have any ideas on what might be causing this?

Any help would be greatly appreciated

Jaime

0


source to share


2 answers


I was really doing a stupid thing with a query not allowing it to return any result ... Nothing to do with transaction or MySql



0


source


My guess is that the different functions you call collect different connections, so they don't see uncommitted transaction changes.



One way to test this is to get the connection ID and compare it.

+1


source







All Articles