0

I've always considered that there were no isolation within a single transaction.

For example if I have 2 methods M1 and M2, M1 update X in database and M2 select X or a set containing X. If both method belongs to the same transaction and M2 is executed after M1:

  • Does M2 always seen M1 update whatever the type of operation, the RDBMS or the isolation level is ?
  • If no, can someone explain in details the different possible behavior according to associated criteria
Gab
  • 7,869
  • 4
  • 37
  • 68

1 Answers1

1

In the situation described, M2 will always see M1's changes yes. An isolation level of READ COMMITTED, for example, only applies to other transactions, not the transaction supplying it.

Cheers -

simon at rcl
  • 7,326
  • 1
  • 17
  • 24
  • Thx for answering guy (+1) Don't take it personally but i'd like to wait for some additional views before accepting your answer (I was convinced of this behavior also but this http://stackoverflow.com/questions/20947979/data-are-not-visible-at-support-transation-block#20948112 made me doubt) – Gab Jan 06 '14 at 16:47
  • No problem! You might try the DBA Stack Exchange site - it's mostly developers here and we're not usually experts at this level...it's http://dba.stackexchange.com/ – simon at rcl Jan 06 '14 at 16:55