mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
BUG#23051 (READ COMMITTED breaks mixed and statement-based replication):
Minor fixes to get proper detection of transaction isolation level when inside external_lock().
This commit is contained in:
@@ -19,7 +19,6 @@ im_instance_conf : Bug#20294 2007-05-30 alik Instance manager tests
|
||||
im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance.
|
||||
im_instance_conf : BUG#28743 Instance manager generates warnings in test suite
|
||||
im_utils : BUG#28743 Instance manager generates warnings in test suite
|
||||
innodb : Disabling test case awaiting reply from Innobase
|
||||
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
|
||||
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
|
@@ -15,6 +15,10 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
# Disabling it temporarily for statement-based logging since some
|
||||
# tests are not safe while binlog is on.
|
||||
-- source include/have_binlog_format_mixed_or_row.inc
|
||||
|
||||
#
|
||||
# Small basic test with ignore
|
||||
#
|
||||
@@ -775,7 +779,7 @@ CREATE TABLE `t2` (
|
||||
insert into t1 values (1,1),(2,2);
|
||||
insert into t2 values (1,1),(4,4);
|
||||
reset master;
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
--error ER_DUP_ENTRY
|
||||
UPDATE t2,t1 SET t2.a=t1.a+2;
|
||||
# check
|
||||
select * from t2 /* must be (3,1), (4,4) */;
|
||||
@@ -787,7 +791,7 @@ delete from t2;
|
||||
insert into t1 values (1,2),(3,4),(4,4);
|
||||
insert into t2 values (1,2),(3,4),(4,4);
|
||||
reset master;
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
--error ER_DUP_ENTRY
|
||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||
show master status /* there must be no UPDATE query event */;
|
||||
|
||||
|
@@ -6267,16 +6267,17 @@ ha_innobase::external_lock(
|
||||
if (lock_type == F_WRLCK)
|
||||
{
|
||||
ulong const binlog_format= thd->variables.binlog_format;
|
||||
if (trx->isolation_level <= TRX_ISO_READ_COMMITTED &&
|
||||
ulong const tx_isolation = thd_tx_isolation(current_thd);
|
||||
if (tx_isolation <= ISO_READ_COMMITTED &&
|
||||
binlog_format == BINLOG_FORMAT_STMT)
|
||||
{
|
||||
char buf[256];
|
||||
bool const read_uncommitted =
|
||||
trx->isolation_level == TRX_ISO_READ_UNCOMMITTED;
|
||||
my_snprintf(buf, sizeof(buf),
|
||||
"Transaction level 'READ %sCOMMITTED' in"
|
||||
"Transaction level '%s' in"
|
||||
" InnoDB is not safe for binlog mode '%s'",
|
||||
read_uncommitted ? "UN" : "",
|
||||
tx_isolation_names[tx_isolation],
|
||||
binlog_format_names[binlog_format]);
|
||||
my_error(ER_BINLOG_LOGGING_IMPOSSIBLE, MYF(0), buf);
|
||||
return HA_ERR_LOGGING_IMPOSSIBLE;
|
||||
|
Reference in New Issue
Block a user