summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorSergey Petrunia <sergefp@mysql.com>2009-03-11 23:13:39 +0300
committerSergey Petrunia <sergefp@mysql.com>2009-03-11 23:13:39 +0300
commitfd35040890864139eba77c16c4292c28eadf0f10 (patch)
treef959e15dc0af30eb3066527235b89ec71e837e9f /sql/mysql_priv.h
parent989ee96b64b9eb510a62857c0ca7ef7dbdf28f2b (diff)
downloadmariadb-git-fd35040890864139eba77c16c4292c28eadf0f10.tar.gz
Change optimizer_switch from no_xxx to xxx=on/xx=off.
mysql-test/r/index_merge_myisam.result: Testcases mysql-test/t/index_merge_myisam.test: Testcases sql/strfunc.cc: Change optimizer_switch from no_xxx to xxx=on/xx=off. - Add functions to parse the new syntax
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 3b8e65d532f..f2ce7471922 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -523,11 +523,18 @@ protected:
#define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2)
#define MODE_PAD_CHAR_TO_FULL_LENGTH (ULL(1) << 31)
-/* @@optimizer_switch flags */
-#define OPTIMIZER_SWITCH_NO_INDEX_MERGE 1
-#define OPTIMIZER_SWITCH_NO_INDEX_MERGE_UNION 2
-#define OPTIMIZER_SWITCH_NO_INDEX_MERGE_SORT_UNION 4
-#define OPTIMIZER_SWITCH_NO_INDEX_MERGE_INTERSECT 8
+/* @@optimizer_switch flags. These must be in sync with optimizer_switch_typelib */
+#define OPTIMIZER_SWITCH_INDEX_MERGE 1
+#define OPTIMIZER_SWITCH_INDEX_MERGE_UNION 2
+#define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION 4
+#define OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT 8
+#define OPTIMIZER_SWITCH_LAST 16
+
+#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT)
+
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
@@ -1831,6 +1838,10 @@ extern enum_field_types agg_field_type(Item **items, uint nitems);
/* strfunc.cc */
ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs,
char **err_pos, uint *err_len, bool *set_warning);
+ulonglong find_set_from_flags(TYPELIB *lib, uint default_set,
+ ulonglong cur_set, ulonglong default_set,
+ const char *str, uint length, CHARSET_INFO *cs,
+ char **err_pos, uint *err_len, bool *set_warning);
uint find_type(const TYPELIB *lib, const char *find, uint length,
bool part_match);
uint find_type2(const TYPELIB *lib, const char *find, uint length,