Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: DBI mysql set transaction isolation level

by McA (Priest)
on Feb 13, 2014 at 12:44 UTC ( [id://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

Hi,

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
McA

  • 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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074821]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found