Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: DBI mysql set transaction isolation level

by moritz (Cardinal)
on Feb 13, 2014 at 06:49 UTC ( [id://1074753]=note: print w/replies, xml ) Need Help??


in reply to DBI mysql set transaction isolation level

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 435 Server version: 5.5.35-0ubuntu0.12.04.2 (Ubuntu) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights res +erved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input st +atement. mysql> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Query OK, 0 rows affected (0.00 sec) mysql> SELECT * FROM information_schema.global_variables WHERE -> variable_name = 'tx_isolation'; +---------------+-----------------+ | VARIABLE_NAME | VARIABLE_VALUE | +---------------+-----------------+ | TX_ISOLATION | REPEATABLE-READ | +---------------+-----------------+ 1 row in set (0.01 sec) mysql>

Doesn't seem to be a DBI problem.

If I remeber correctly, the SQL standard only specifies minimum isolation properties for the various isolation level; giving the user a level with more isolation than requested thus isn't a violation of the standard.

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

    I'm not seeing your point, as you posted output from the mysql shell, but are referring to the DBI? I was succesful in changing the isolation both in the shell and the GUI, but not in DBI. thanks!

      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

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found