[Groonga-mysql-commit] mroonga/mroonga [master] Split a large condition

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 17:28:39 JST 2012


Kouhei Sutou	2012-10-04 17:28:39 +0900 (Thu, 04 Oct 2012)

  New Revision: 1db883935f518e51841b70b955c3a1cf46ac296b
  https://github.com/mroonga/mroonga/commit/1db883935f518e51841b70b955c3a1cf46ac296b

  Log:
    Split a large condition

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+20 -7)
===================================================================
--- ha_mroonga.cpp    2012-10-04 17:19:31 +0900 (e8084b5)
+++ ha_mroonga.cpp    2012-10-04 17:28:39 +0900 (05eb33f)
@@ -12911,19 +12911,32 @@ bool ha_mroonga::check_written_by_row_based_binlog()
 #else
   current_stmt_binlog_row = thd->current_stmt_binlog_row_based;
 #endif
+  if (!current_stmt_binlog_row) {
+    DBUG_RETURN(false);
+  }
+
+  if (table->s->tmp_table != NO_TMP_TABLE) {
+    DBUG_RETURN(false);
+  }
+
+  if (!binlog_filter->db_ok(table->s->db.str)) {
+    DBUG_RETURN(false);
+  }
+
 #ifdef MRN_OPTION_BITS_IS_UNDER_VARIABLES
   option_bits = thd->variables.option_bits & OPTION_BIN_LOG;
 #else
   option_bits = thd->options & OPTION_BIN_LOG;
 #endif
+  if (!option_bits) {
+    DBUG_RETURN(false);
+  }
 
-  DBUG_RETURN(
-    current_stmt_binlog_row &&
-    table->s->tmp_table == NO_TMP_TABLE &&
-    binlog_filter->db_ok(table->s->db.str) &&
-    option_bits &&
-    mysql_bin_log.is_open()
-  );
+  if (!mysql_bin_log.is_open()) {
+    DBUG_RETURN(false);
+  }
+
+  DBUG_RETURN(true);
 }
 
 #ifdef MRN_HAVE_HA_REBIND_PSI
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-mysql-commit mailing list
Back to archive index