Commit 79a40dbc authored by vasil's avatar vasil

branches/zip:

Revert our temporary fix for Bug#40360 Binlog related errors with binlog off

This bug was fixed in MySQL code.

Our fix went into r2944 and r2947, but this patch does not entirely revert
those revisions because we want to leave the test case that was introduced
and also r2944 itself reverted r2935 and r2936. So if we completely revert
r2944 and r2947 then we would loose the test and will restore r2935 and
r2936.

This resolves Issue#108 We should remove ib_bin_log_is_engaged() once mysql
add an equivallent, see Bug#40360
parent 3fde1094
...@@ -70,7 +70,6 @@ extern "C" { ...@@ -70,7 +70,6 @@ extern "C" {
#include "ha_innodb.h" #include "ha_innodb.h"
#include "i_s.h" #include "i_s.h"
#include "handler0vars.h" #include "handler0vars.h"
#include "mysql_addons.h"
#ifndef MYSQL_SERVER #ifndef MYSQL_SERVER
/* This is needed because of Bug #3596. Let us hope that pthread_mutex_t /* This is needed because of Bug #3596. Let us hope that pthread_mutex_t
...@@ -7672,12 +7671,12 @@ ha_innobase::external_lock( ...@@ -7672,12 +7671,12 @@ ha_innobase::external_lock(
READ UNCOMMITTED and READ COMMITTED since the necessary READ UNCOMMITTED and READ COMMITTED since the necessary
locks cannot be taken. In this case, we print an locks cannot be taken. In this case, we print an
informative error message and return with an error. */ informative error message and return with an error. */
if (lock_type == F_WRLCK && ib_bin_log_is_engaged(thd)) if (lock_type == F_WRLCK)
{ {
ulong const binlog_format= thd_binlog_format(thd); ulong const binlog_format= thd_binlog_format(thd);
ulong const tx_isolation = thd_tx_isolation(ha_thd()); ulong const tx_isolation = thd_tx_isolation(ha_thd());
if (tx_isolation <= ISO_READ_COMMITTED if (tx_isolation <= ISO_READ_COMMITTED &&
&& binlog_format == BINLOG_FORMAT_STMT) binlog_format == BINLOG_FORMAT_STMT)
{ {
char buf[256]; char buf[256];
my_snprintf(buf, sizeof(buf), my_snprintf(buf, sizeof(buf),
......
...@@ -23,16 +23,3 @@ Created November 07, 2007 Vasil Dimov ...@@ -23,16 +23,3 @@ Created November 07, 2007 Vasil Dimov
#include "mysql_addons.h" #include "mysql_addons.h"
#include "univ.i" #include "univ.i"
/* http://bugs.mysql.com/40360 */
/* http://lists.mysql.com/commits/57450 */
/**
See if the binary log is engaged for a thread, i.e., open and
LOG_BIN is set.
@return @c true if the binlog is active, @c false otherwise.
*/
my_bool ib_bin_log_is_engaged(const MYSQL_THD thd)
{
return mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG);
}
...@@ -14,34 +14,3 @@ here. In a perfect world this file exists but is empty. ...@@ -14,34 +14,3 @@ here. In a perfect world this file exists but is empty.
Created November 07, 2007 Vasil Dimov Created November 07, 2007 Vasil Dimov
*******************************************************/ *******************************************************/
#include <my_global.h> /* for my_bool */
#include <mysql/plugin.h> /* for MYSQL_THD */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/***********************************************************************
Retrieve THD::thread_id
http://bugs.mysql.com/30930 */
unsigned long
ib_thd_get_thread_id(
/*=================*/
/* out: THD::thread_id */
const void* thd); /* in: THD */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* http://bugs.mysql.com/40360 */
/* http://lists.mysql.com/commits/57450 */
/**
See if the binary log is engaged for a thread, i.e., open and
LOG_BIN is set.
@return @c true if the binlog is active, @c false otherwise.
*/
my_bool ib_bin_log_is_engaged(const MYSQL_THD thd);
...@@ -37,7 +37,7 @@ diff -Nur sql/CMakeLists.txt.orig sql/CMakeLists.txt ...@@ -37,7 +37,7 @@ diff -Nur sql/CMakeLists.txt.orig sql/CMakeLists.txt
diff -Nur sql/mysqld.def.orig sql/mysqld.def diff -Nur sql/mysqld.def.orig sql/mysqld.def
--- sql/mysqld.def.orig 1969-12-31 18:00:00 -06:00 --- sql/mysqld.def.orig 1969-12-31 18:00:00 -06:00
+++ sql/mysqld.def 2008-10-31 02:20:32 -05:00 +++ sql/mysqld.def 2008-10-31 02:20:32 -05:00
@@ -0,0 +1,100 @@ @@ -0,0 +1,98 @@
+EXPORTS +EXPORTS
+ ?use_hidden_primary_key@handler@@UAEXXZ + ?use_hidden_primary_key@handler@@UAEXXZ
+ ?get_dynamic_partition_info@handler@@UAEXPAUPARTITION_INFO@@I@Z + ?get_dynamic_partition_info@handler@@UAEXPAUPARTITION_INFO@@I@Z
...@@ -82,8 +82,6 @@ diff -Nur sql/mysqld.def.orig sql/mysqld.def ...@@ -82,8 +82,6 @@ diff -Nur sql/mysqld.def.orig sql/mysqld.def
+ ?THR_THD@@3PAVTHD@@A + ?THR_THD@@3PAVTHD@@A
+ ?end_of_list@@3Ulist_node@@A + ?end_of_list@@3Ulist_node@@A
+ ?mysql_tmpdir_list@@3Ust_my_tmpdir@@A + ?mysql_tmpdir_list@@3Ust_my_tmpdir@@A
+ ?mysql_bin_log@@3VMYSQL_BIN_LOG@@A
+ ?is_open@MYSQL_LOG@@QAE_NXZ
+ mysql_query_cache_invalidate4 + mysql_query_cache_invalidate4
+ thd_query + thd_query
+ thd_sql_command + thd_sql_command
...@@ -142,7 +140,7 @@ diff -Nur sql/mysqld.def.orig sql/mysqld.def ...@@ -142,7 +140,7 @@ diff -Nur sql/mysqld.def.orig sql/mysqld.def
diff -Nur sql/mysqld_x64.def.orig sql/mysqld_x64.def diff -Nur sql/mysqld_x64.def.orig sql/mysqld_x64.def
--- sql/mysqld_x64.def.orig 1969-12-31 18:00:00 -06:00 --- sql/mysqld_x64.def.orig 1969-12-31 18:00:00 -06:00
+++ sql/mysqld_x64.def 2008-10-31 02:22:04 -05:00 +++ sql/mysqld_x64.def 2008-10-31 02:22:04 -05:00
@@ -0,0 +1,99 @@ @@ -0,0 +1,98 @@
+EXPORTS +EXPORTS
+ ?use_hidden_primary_key@handler@@UEAAXXZ + ?use_hidden_primary_key@handler@@UEAAXXZ
+ ?get_dynamic_partition_info@handler@@UEAAXPEAUPARTITION_INFO@@I@Z + ?get_dynamic_partition_info@handler@@UEAAXPEAUPARTITION_INFO@@I@Z
...@@ -187,8 +185,6 @@ diff -Nur sql/mysqld_x64.def.orig sql/mysqld_x64.def ...@@ -187,8 +185,6 @@ diff -Nur sql/mysqld_x64.def.orig sql/mysqld_x64.def
+ ?THR_THD@@3PEAVTHD@@EA + ?THR_THD@@3PEAVTHD@@EA
+ ?end_of_list@@3Ulist_node@@A + ?end_of_list@@3Ulist_node@@A
+ ?mysql_tmpdir_list@@3Ust_my_tmpdir@@A + ?mysql_tmpdir_list@@3Ust_my_tmpdir@@A
+ ?mysql_bin_log@@3VMYSQL_BIN_LOG@@A
+ ?is_open@MYSQL_LOG@@QEAA_NXZ
+ mysql_query_cache_invalidate4 + mysql_query_cache_invalidate4
+ thd_query + thd_query
+ thd_sql_command + thd_sql_command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment