mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Revert of the push of bug #20837 due to failing regression tests.
This commit is contained in:
@ -2273,35 +2273,4 @@ END|
|
|||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
#
|
|
||||||
# Bug #20837 Apparent change of isolation
|
|
||||||
# level during transaction
|
|
||||||
#
|
|
||||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|
||||||
CREATE TABLE t1 (s1 INT) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 VALUES (1),(2);
|
|
||||||
COMMIT;
|
|
||||||
SET @@autocommit = 0;
|
|
||||||
COMMIT;
|
|
||||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
|
||||||
START TRANSACTION;
|
|
||||||
SELECT * FROM t1;
|
|
||||||
s1
|
|
||||||
1
|
|
||||||
2
|
|
||||||
Should be READ UNCOMMITTED
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
@@tx_isolation
|
|
||||||
READ-UNCOMMITTED
|
|
||||||
INSERT INTO t1 VALUES (-1);
|
|
||||||
Should be READ UNCOMMITTED
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
@@tx_isolation
|
|
||||||
READ-UNCOMMITTED
|
|
||||||
COMMIT;
|
|
||||||
Should now be REPEATABLE READ
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
@@tx_isolation
|
|
||||||
REPEATABLE-READ
|
|
||||||
DROP TABLE t1;
|
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -536,30 +536,4 @@ DROP PROCEDURE p1;
|
|||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # Bug #20837 Apparent change of isolation
|
|
||||||
--echo # level during transaction
|
|
||||||
--echo #
|
|
||||||
|
|
||||||
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|
||||||
CREATE TABLE t1 (s1 INT) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 VALUES (1),(2);
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
SET @@autocommit = 0;
|
|
||||||
COMMIT;
|
|
||||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
|
||||||
START TRANSACTION;
|
|
||||||
SELECT * FROM t1;
|
|
||||||
--echo Should be READ UNCOMMITTED
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
INSERT INTO t1 VALUES (-1);
|
|
||||||
--echo Should be READ UNCOMMITTED
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
COMMIT;
|
|
||||||
--echo Should now be REPEATABLE READ
|
|
||||||
SELECT @@tx_isolation;
|
|
||||||
DROP TABLE t1;
|
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -1369,14 +1369,8 @@ int ha_autocommit_or_rollback(THD *thd, int error)
|
|||||||
if (thd->transaction_rollback_request && !thd->in_sub_stmt)
|
if (thd->transaction_rollback_request && !thd->in_sub_stmt)
|
||||||
(void) ha_rollback(thd);
|
(void) ha_rollback(thd);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
|
thd->variables.tx_isolation=thd->session_tx_isolation;
|
||||||
{
|
|
||||||
/*
|
|
||||||
If we're in autocommit mode, reset tx_isolation
|
|
||||||
to the default value
|
|
||||||
*/
|
|
||||||
thd->variables.tx_isolation= thd->session_tx_isolation;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
|
Reference in New Issue
Block a user