diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-12-17 21:43:35 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-12-17 21:43:35 +0000 |
commit | 3476b15af99b626bd21a835eeab22f3c9c9f307d (patch) | |
tree | fb25bfc9b6c669b42e70afadf7790f0f8d7db7e3 /storage/innobase/handler | |
parent | 7c2c655ccfb163737ded33559d1942aeddec2970 (diff) | |
parent | 0758893afe391b14016eacb1fb6fa067eea9a548 (diff) | |
download | mariadb-git-3476b15af99b626bd21a835eeab22f3c9c9f307d.tar.gz |
merge mysql-5.1-rep+3 --> mysql-5.1-rep+2-delivery1
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 30b4fc13012..25d3d1e5634 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7120,22 +7120,22 @@ ha_innobase::external_lock( /* Statement based binlogging does not work in isolation level READ UNCOMMITTED and READ COMMITTED since the necessary locks cannot be taken. In this case, we print an - informative error message and return with an error. */ - if (lock_type == F_WRLCK) - { - ulong const binlog_format= thd_binlog_format(thd); - ulong const tx_isolation = thd_tx_isolation(current_thd); - if (tx_isolation <= ISO_READ_COMMITTED - && binlog_format == BINLOG_FORMAT_STMT - && thd_binlog_filter_ok(thd)) - { - char buf[256]; - my_snprintf(buf, sizeof(buf), - "Transaction level '%s' in" - " InnoDB is not safe for binlog mode '%s'", - tx_isolation_names[tx_isolation], - binlog_format_names[binlog_format]); - my_error(ER_BINLOG_LOGGING_IMPOSSIBLE, MYF(0), buf); + informative error message and return with an error. + Note: decide_logging_format would give the same error message, + except it cannot give the extra details. + */ + if (lock_type == F_WRLCK && + !(table_flags() & HA_BINLOG_STMT_CAPABLE) && + thd_binlog_format(thd) == BINLOG_FORMAT_STMT && + thd_binlog_filter_ok(thd)) + { + /* The error may be suppressed by test cases, by setting + the no_innodb_binlog_errors debug symbol. */ + if (DBUG_EVALUATE_IF("no_innodb_binlog_errors", 0, 1)) { + my_error(ER_BINLOG_STMT_MODE_AND_ROW_ENGINE, MYF(0), + " InnoDB is limited to row-logging when " + "transaction isolation level is " + "READ COMMITTED or READ UNCOMMITTED."); DBUG_RETURN(HA_ERR_LOGGING_IMPOSSIBLE); } } |