diff options
author | Sergey Petrunia <sergefp@mysql.com> | 2009-02-23 19:16:48 +0300 |
---|---|---|
committer | Sergey Petrunia <sergefp@mysql.com> | 2009-02-23 19:16:48 +0300 |
commit | cb6581d89459a4c45e9146a40e1f0119a2e8e325 (patch) | |
tree | 3d3b5469190266610021c7ceae3e2beb730355fe /sql/sql_select.h | |
parent | fecaef26af0417a23f6585c79de41abd5f6aba86 (diff) | |
download | mariadb-git-cb6581d89459a4c45e9146a40e1f0119a2e8e325.tar.gz |
- Backport @@optimizer_switch support from 6.0
- Add support for setting it as a server commandline argument
- Add support for those switches:
= no_index_merge
= no_index_merge_union
= no_index_merge_sort_union
= no_index_merge_intersection
mysql-test/r/index_merge_myisam.result:
Testcases for index_merge related @@optimizer_switch flags.
mysql-test/t/index_merge_myisam.test:
Testcases for index_merge related @@optimizer_switch flags.
sql/set_var.cc:
- Backport @@optimizer_switch support from 6.0
- Add support for setting it as a server commandline argument
sql/sql_class.h:
- Backport @@optimizer_switch support from 6.0
sql/sql_select.h:
- Backport @@optimizer_switch support from 6.0
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 7d794b71f4d..353c2b1d610 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -729,3 +729,9 @@ bool error_if_full_join(JOIN *join); int report_error(TABLE *table, int error); int safe_index_read(JOIN_TAB *tab); COND *remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value); + +inline bool optimizer_flag(THD *thd, uint flag) +{ + return (thd->variables.optimizer_switch & flag); +} + |