Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^3: DBI mysql set transaction isolation level

by McA (Priest)
on Feb 13, 2014 at 12:44 UTC ( #1074821=note: print w/replies, xml ) Need Help??

in reply to Re^2: DBI mysql set transaction isolation level
in thread DBI mysql set transaction isolation level


I have to admit, that I can see the point of Moritz' answer. When he fires the statements without using DBI he gets the same result which you don't expect and think of being the fault of DBI. At least there is a case where you get the same - in your view "wrong" result - without using DBI. This is a hint that the problem is not DBI related, isn't it? IMHO a valueable hint.

Now my hint: There are many variables in MySQL which have a session scope or a global scope. So, without digging deeper I think you change the session transaction level but ask the schema for the global variable.

Best regards

  • Comment on Re^3: DBI mysql set transaction isolation level

Replies are listed 'Best First'.
Re^4: DBI mysql set transaction isolation level
by Anonymous Monk on Feb 13, 2014 at 14:22 UTC

    Ah! thanks to both of you! forest for the trees.... will keep digging re the global vs session variable

      Still perplexed.... this time information_schema.session_variables

      $dbh->{AutoCommit} = 0; # SET FOR TRANSACTION my $result = $dbh->do("SET TRANSACTION ISOLATION LEVEL READ COMMITTED" +); print Dumper($result); my @row_ary = $dbh->selectrow_array("SELECT * FROM information_schema. +session_variables WHERE variable_name LIKE 'tx_%'"); print Dumper(@row_ary); $VAR1 = '0E0'; $VAR1 = 'TX_ISOLATION'; $VAR2 = 'REPEATABLE-READ';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074821]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2018-01-18 04:07 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (206 votes). Check out past polls.