List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:November 3 2008 5:58pm
Subject:bzr commit into mysql-6.0 branch (mats:2884)
View as plain text  
#At file:///home/bzr/merges/merge-6.0-5.1.29-rc/

 2884 Mats Kindahl	2008-11-03 [merge]
      Merging 5.1-5.1.29-rc into 6.0-5.1.29-rc
modified:
  mysql-test/r/innodb_mysql.result
  mysql-test/t/innodb_mysql.test
  sql/sql_class.cc

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2008-10-07 09:49:40 +0000
+++ b/mysql-test/r/innodb_mysql.result	2008-11-03 17:57:27 +0000
@@ -1669,3 +1669,12 @@ explain select a from t2 where a=b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	index	NULL	a	10	NULL	#	Using where; Using index
 drop table t1, t2;
+SET SESSION BINLOG_FORMAT=STATEMENT;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
+@@session.sql_log_bin	1
+@@session.binlog_format	STATEMENT
+@@session.tx_isolation	READ-COMMITTED
+CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+DROP TABLE t1;

=== modified file 'mysql-test/t/innodb_mysql.test'
--- a/mysql-test/t/innodb_mysql.test	2008-05-07 05:58:21 +0000
+++ b/mysql-test/t/innodb_mysql.test	2008-11-03 17:46:47 +0000
@@ -29,3 +29,17 @@ insert into t2 select @a:=A.a+10*(B.a + 
 explain select a from t2 where a=b;
 drop table t1, t2;
 
+#
+# Bug #40360: Binlog related errors with binlog off
+#
+# This bug is triggered when the binlog format is STATEMENT and the
+# binary log is turned off. In this case, no error should be shown for
+# the statement since there are no replication issues.
+
+SET SESSION BINLOG_FORMAT=STATEMENT;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+query_vertical select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
+CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+DROP TABLE t1;
+

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2008-10-23 15:15:44 +0000
+++ b/sql/sql_class.cc	2008-11-03 17:57:27 +0000
@@ -2922,7 +2922,10 @@ extern "C" int thd_non_transactional_upd
 
 extern "C" int thd_binlog_format(const MYSQL_THD thd)
 {
-  return (int) thd->variables.binlog_format;
+  if (mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG))
+    return (int) thd->variables.binlog_format;
+  else
+    return BINLOG_FORMAT_UNSPEC;
 }
 
 extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all)

Thread
bzr commit into mysql-6.0 branch (mats:2884) Mats Kindahl3 Nov