From d8fe091e280e688b88e496250c170786a6abaf08 Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Thu, 24 Jun 2004 14:42:56 +0200 Subject: [PATCH] Enabling the --innodb-safe-binlog option in code. If you wish to disable it, you just need to change this line of mysqld.cc: #if MYSQL_VERSION_ID >= 40103 to, say, #if MYSQL_VERSION_ID > 40103 I am noticing a failure of bdb.test; I believe this is not related to the code I added yesterday and today, but I am checking. In any case I push this changeset as it cannot by itself bring more mess that I *may* (or not) already have brought with previous pushes. --- sql/handler.cc | 2 +- sql/mysqld.cc | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index f4cd2901be1..f11c7d5eac3 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -385,7 +385,7 @@ int ha_report_binlog_offset_and_commit(THD *thd, #ifdef HAVE_INNOBASE_DB THD_TRANS *trans; trans = &thd->transaction.all; - if (trans->innobase_tid && trans->innodb_active_trans) + if (trans->innodb_active_trans) { /* If we updated some InnoDB tables (innodb_active_trans is true), the diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7b36be3dd84..6caba1dfe95 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2539,11 +2539,8 @@ server."); if (opt_innodb_safe_binlog) { if (have_innodb != SHOW_OPTION_YES) - { - sql_print_error("Error: --innodb-safe-binlog is meaningful only if " + sql_print_error("Warning: --innodb-safe-binlog is meaningful only if " "the InnoDB storage engine is enabled in the server."); - unireg_abort(1); - } if (innobase_flush_log_at_trx_commit != 1) { sql_print_error("Warning: --innodb-safe-binlog is meaningful only if " @@ -4639,7 +4636,7 @@ replicating a LOAD DATA INFILE command.", enough, as then user can't set it to 1 so it will always be ignored in the rest of code. */ -#if MYSQL_VERSION_ID > 40103 +#if MYSQL_VERSION_ID >= 40103 /* innodb_safe_binlog is not a variable, just an option. Does not make sense to make it a variable, as it is only used at startup (and so the