summaryrefslogtreecommitdiff
path: root/storage/innobase/handler
diff options
context:
space:
mode:
authorVasil Dimov <vasil.dimov@oracle.com>2010-04-14 10:37:52 +0300
committerVasil Dimov <vasil.dimov@oracle.com>2010-04-14 10:37:52 +0300
commit4eb60be01f39c68bcf922dea3f4ecda41913d9f3 (patch)
tree742800142f8212a581bb18bf3e41b01ba53b1d3d /storage/innobase/handler
parentff03e2ffd02b6cdb5f49eaff916232b5b827a9a7 (diff)
downloadmariadb-git-4eb60be01f39c68bcf922dea3f4ecda41913d9f3.tar.gz
Replay 2661.581.1 and 3092.5.1 on top of storage/innobase.
------------------------------------------------------------ revno: 2661.581.1 revision-id: sven.sandberg@sun.com-20090714193119-4693witmsqcaf28q parent: staale.smedseng@sun.com-20090615160325-miaxz8z9rjgm78h4 committer: Sven Sandberg <sven.sandberg@sun.com> branch nick: 5.1-bugteam timestamp: Tue 2009-07-14 21:31:19 +0200 message: BUG#39934: Slave stops for engine that only support row-based logging ... ------------------------------------------------------------ revno: 3092.5.1 revision-id: luis.soares@sun.com-20090924145252-8vvsnbvwo9l8v4vc parent: anurag.shekhar@sun.com-20090831075609-tkpqu41hxtupdeip committer: Luis Soares <luis.soares@sun.com> branch nick: mysql-5.1-bugteam timestamp: Thu 2009-09-24 15:52:52 +0100 message: BUG#42829: binlogging enabled for all schemas regardless of binlog-db-db / binlog-ignore-db ...
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r--storage/innobase/handler/ha_innodb.cc34
1 files changed, 15 insertions, 19 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 7da52939dd6..fb3db95f33e 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -8567,25 +8567,21 @@ 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(ha_thd());
- if (tx_isolation <= ISO_READ_COMMITTED
- && binlog_format == BINLOG_FORMAT_STMT
-#if MYSQL_VERSION_ID > 50140
- && thd_binlog_filter_ok(thd)
-#endif /* MYSQL_VERSION_ID > 50140 */
- )
- {
- 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)) {
+ int skip = 0;
+ /* used by test case */
+ DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = 1;);
+ if (!skip) {
+ 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);
}
}