Hi, Magne!
On Oct 26, Magne Mahre wrote:
>
> 3197 Magne Mahre 2009-10-26
> Bug #20837 Apparent change of isolation level during transaction
A couple of minor comments:
1. your test case contradicts itself, the result file contains:
+should be REPEATABLE READ
+SELECT @@tx_isolation;
+@@tx_isolation
+READ-COMMITTED
It says "should be REPEATABLE READ" but shows READ COMMITTED.
2. the initial values of autocommit and tx_isolation are important for
your test, please start the test from SELECT @@autocommit, @@tx_isolation;
And a couple of bigger issues:
1. I don't understand what you're fixing, it doesn't look like your
patch has anything to do with the original Peter's test case.
2. I don't understand what you're testing, I've tried your test case on
my old 6.0 tree - and I got *exactly* your results with none of your
code changes.
3. despite the fact that the vanilla MySQL without your changes passes
the test case, there's still a bug - in the test case. It says
set transaction isolation level read uncommitted;
--echo should be READ UNCOMMITTED
SELECT @@tx_isolation;
begin;
--echo should be READ UNCOMMITTED
SELECT @@tx_isolation;
But the last @@tx_isolation should be READ COMMITTED. SET TRANSACTION
sets isolation level for the *next* transaction only, and in autocommit
mode this next transaction is yours "SELECT @@tx_isolation".
If you fix your test case it'll start to fail, demonstrating a bug.
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring