summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index f07410e0d43..71d121a9ead 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -7384,6 +7384,18 @@ mysqld_get_one_option(int optid,
}
break;
#endif /* defined(ENABLED_DEBUG_SYNC) */
+ case OPT_ENGINE_CONDITION_PUSHDOWN:
+ /*
+ The last of --engine-condition-pushdown and --optimizer_switch on
+ command line wins (see get_options().
+ */
+ if (global_system_variables.engine_condition_pushdown)
+ global_system_variables.optimizer_switch|=
+ OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN;
+ else
+ global_system_variables.optimizer_switch&=
+ ~OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN;
+ break;
}
return 0;
}
@@ -7610,6 +7622,11 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
else
pool_of_threads_scheduler(&thread_scheduler); /* purecov: tested */
#endif
+
+ global_system_variables.engine_condition_pushdown=
+ test(global_system_variables.optimizer_switch &
+ OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN);
+
return 0;
}