From cf2789bf0b8ddd6bbe4c90bbfe9a70492a3b4fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= <marko.makela@mariadb.com> Date: Mon, 3 Jul 2017 11:27:53 +0300 Subject: [PATCH] ha_innobase::write_row(): Test the cheaper condition first --- storage/innobase/handler/ha_innodb.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 14b1cb477f4..e4684719ff3 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -8496,15 +8496,15 @@ ha_innobase::write_row( || sql_command == SQLCOM_OPTIMIZE || sql_command == SQLCOM_CREATE_INDEX #ifdef WITH_WSREP - || (wsrep_on(m_user_thd) && wsrep_load_data_splitting && - sql_command == SQLCOM_LOAD && - !thd_test_options( - m_user_thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) + || (sql_command == SQLCOM_LOAD + && wsrep_load_data_splitting && wsrep_on(m_user_thd) + && !thd_test_options( + m_user_thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) #endif /* WITH_WSREP */ || sql_command == SQLCOM_DROP_INDEX) && m_num_write_row >= 10000) { #ifdef WITH_WSREP - if (wsrep_on(m_user_thd) && sql_command == SQLCOM_LOAD) { + if (sql_command == SQLCOM_LOAD && wsrep_on(m_user_thd)) { WSREP_DEBUG("forced trx split for LOAD: %s", wsrep_thd_query(m_user_thd)); } -- GitLab