#At file:///home/kgeorge/mysql/bzr/B40360-5.1-5.1.29-rc/
2777 Georgi Kodinov 2008-10-30
Bug #40360: Binlog related errors with binlog off
Fixed MySQL to return BINLOG_FORMAT_UNSPEC when bin_log is off and no binlog_format was specified.
modified:
mysql-test/r/binlog_index.result
mysql-test/r/innodb_mysql.result
mysql-test/t/binlog_index.test
mysql-test/t/innodb_mysql.test
sql/mysqld.cc
per-file messages:
mysql-test/r/binlog_index.result
Bug #40360: additional testing : test if we get correct variable values if
bin_log is on.
mysql-test/r/innodb_mysql.result
Bug #40360: test case
mysql-test/t/binlog_index.test
Bug #40360: additional testing : test if we get correct variable values if
bin_log is on.
mysql-test/t/innodb_mysql.test
Bug #40360: test case
sql/mysqld.cc
Bug #40360:
- keep BINLOG_FORMAT_UNSPEC if bin_log is off.
- remove an impossible ASSERT.
=== modified file 'mysql-test/r/binlog_index.result'
--- a/mysql-test/r/binlog_index.result 2008-04-01 10:36:20 +0000
+++ b/mysql-test/r/binlog_index.result 2008-10-30 11:33:46 +0000
@@ -37,3 +37,10 @@ Error 1377 a problem with deleting MYSQL
Error 1377 Fatal error during log purge
reset master;
End of tests
+SHOW VARIABLES LIKE '%log_bin';
+Variable_name Value
+log_bin ON
+sql_log_bin ON
+SHOW VARIABLES LIKE '%binlog_format%';
+Variable_name Value
+binlog_format STATEMENT
=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result 2008-10-03 12:24:19 +0000
+++ b/mysql-test/r/innodb_mysql.result 2008-10-30 11:33:46 +0000
@@ -1668,3 +1668,15 @@ 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;
+CREATE TABLE t1 (a INT, b datetime) ENGINE=InnoDB;
+connect(localhost,root,,test,12000,/home/kgeorge/mysql/bzr/B40360-5.1-5.1.29-rc/mysql-test/var/tmp/master.sock);
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SHOW VARIABLES LIKE '%log_bin';
+Variable_name Value
+log_bin OFF
+sql_log_bin ON
+SHOW VARIABLES LIKE '%binlog_format%';
+Variable_name Value
+binlog_format
+INSERT INTO t1 VALUES(1,'1972-07-29');
+DROP TABLE t1;
=== modified file 'mysql-test/t/binlog_index.test'
--- a/mysql-test/t/binlog_index.test 2008-03-17 18:19:04 +0000
+++ b/mysql-test/t/binlog_index.test 2008-10-30 11:33:46 +0000
@@ -67,3 +67,10 @@ rmdir $MYSQLTEST_VARDIR/log/master-bin.0
reset master;
--enable_warnings
--echo End of tests
+
+#
+# Bug #40360: Binlog related errors with binlog off
+# additional tests
+
+SHOW VARIABLES LIKE '%log_bin';
+SHOW VARIABLES LIKE '%binlog_format%';
=== 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-10-30 11:33:46 +0000
@@ -29,3 +29,19 @@ 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
+#
+
+CREATE TABLE t1 (a INT, b datetime) ENGINE=InnoDB;
+connect (a,localhost,root,,);
+
+connection a;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SHOW VARIABLES LIKE '%log_bin';
+SHOW VARIABLES LIKE '%binlog_format%';
+INSERT INTO t1 VALUES(1,'1972-07-29');
+connection default;
+
+DROP TABLE t1;
+DISCONNECT a;
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2008-10-09 10:39:42 +0000
+++ b/sql/mysqld.cc 2008-10-30 11:33:46 +0000
@@ -3760,18 +3760,12 @@ with --log-bin instead.");
"--binlog-format work.");
unireg_abort(1);
}
- else
- {
- global_system_variables.binlog_format= BINLOG_FORMAT_STMT;
- }
}
else
+ {
if (opt_binlog_format_id == BINLOG_FORMAT_UNSPEC)
global_system_variables.binlog_format= BINLOG_FORMAT_STMT;
- else
- {
- DBUG_ASSERT(global_system_variables.binlog_format != BINLOG_FORMAT_UNSPEC);
- }
+ }
/* Check that we have not let the format to unspecified at this point */
DBUG_ASSERT((uint)global_system_variables.binlog_format <=
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (kgeorge:2777) Bug#40360 | Georgi Kodinov | 30 Oct |