Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
41c766f3
Commit
41c766f3
authored
Jul 08, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make table_elimination=on|off flag to be always present in @@optimizer_switch.
parent
2d325b3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
36 deletions
+5
-36
sql/mysql_priv.h
sql/mysql_priv.h
+3
-25
sql/mysqld.cc
sql/mysqld.cc
+2
-11
No files found.
sql/mysql_priv.h
View file @
41c766f3
...
...
@@ -591,37 +591,16 @@ protected:
#define OPTIMIZER_SWITCH_JOIN_CACHE_HASHED (1ULL << 22)
#define OPTIMIZER_SWITCH_JOIN_CACHE_BKA (1ULL << 23)
#define OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE (1ULL << 24)
#ifdef DBUG_OFF
# define OPTIMIZER_SWITCH_LAST (1ULL << 25)
#else
# define OPTIMIZER_SWITCH_TABLE_ELIMINATION (1ULL << 25)
# define OPTIMIZER_SWITCH_LAST (1ULL << 26)
#endif
#define OPTIMIZER_SWITCH_TABLE_ELIMINATION (1ULL << 25)
#define OPTIMIZER_SWITCH_LAST (1ULL << 26)
#ifdef DBUG_OFF
/* The following must be kept in sync with optimizer_switch_str in mysqld.cc */
/*
TODO: Materialization is off by default to mimic 5.1/5.2 behavior.
Once cost based choice between materialization and in-to-exists should be
enabled by default, add OPTIMIZER_SWITCH_MATERIALIZATION
*/
# define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
OPTIMIZER_SWITCH_DERIVED_MERGE | \
OPTIMIZER_SWITCH_DERIVED_WITH_KEYS | \
OPTIMIZER_SWITCH_IN_TO_EXISTS | \
OPTIMIZER_SWITCH_PARTIAL_MATCH_ROWID_MERGE|\
OPTIMIZER_SWITCH_PARTIAL_MATCH_TABLE_SCAN|\
OPTIMIZER_SWITCH_SUBQUERY_CACHE|\
OPTIMIZER_SWITCH_SUBQUERY_CACHE | \
OPTIMIZER_SWITCH_JOIN_CACHE_INCREMENTAL | \
OPTIMIZER_SWITCH_JOIN_CACHE_HASHED | \
OPTIMIZER_SWITCH_JOIN_CACHE_BKA | \
OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE)
#else
# define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
...
...
@@ -636,7 +615,6 @@ enabled by default, add OPTIMIZER_SWITCH_MATERIALIZATION
OPTIMIZER_SWITCH_JOIN_CACHE_HASHED | \
OPTIMIZER_SWITCH_JOIN_CACHE_BKA | \
OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE)
#endif
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
...
...
sql/mysqld.cc
View file @
41c766f3
...
...
@@ -350,9 +350,7 @@ static const char *optimizer_switch_names[]=
"join_cache_hashed"
,
"join_cache_bka"
,
"optimize_join_buffer_size"
,
#ifndef DBUG_OFF
"table_elimination"
,
#endif
"default"
,
NullS
};
...
...
@@ -384,9 +382,7 @@ static const unsigned int optimizer_switch_names_len[]=
sizeof
(
"join_cache_hashed"
)
-
1
,
sizeof
(
"join_cache_bka"
)
-
1
,
sizeof
(
"optimize_join_buffer_size"
)
-
1
,
#ifndef DBUG_OFF
sizeof
(
"table_elimination"
)
-
1
,
#endif
sizeof
(
"default"
)
-
1
};
TYPELIB
optimizer_switch_typelib
=
{
array_elements
(
optimizer_switch_names
)
-
1
,
""
,
...
...
@@ -502,12 +498,9 @@ static const char *optimizer_switch_str="index_merge=on,index_merge_union=on,"
"join_cache_incremental=on,"
"join_cache_hashed=on,"
"join_cache_bka=on,"
"optimize_join_buffer_size=on"
#ifndef DBUG_OFF
",table_elimination=on"
;
#else
"optimize_join_buffer_size=on,"
"table_elimination=on"
;
;
#endif
#ifdef SAFEMALLOC
my_bool
sf_malloc_trough_check
=
0
;
#endif
...
...
@@ -7559,9 +7552,7 @@ each time the SQL thread starts.",
"subquery_cache, outer_join_with_cache, semijoin_with_cache, "
"join_cache_incremental, join_cache_hashed, join_cache_bka, "
"optimize_join_buffer_size"
#ifndef DBUG_OFF
", table_elimination"
#endif
"} and val={on, off, default}."
,
&
optimizer_switch_str
,
&
optimizer_switch_str
,
0
,
GET_STR
,
REQUIRED_ARG
,
/*OPTIMIZER_SWITCH_DEFAULT*/
0
,
0
,
0
,
0
,
0
,
0
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment