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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5ab91f59
Commit
5ab91f59
authored
Dec 13, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove space before #ifdef
parent
5f5e73f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
sql/sql_statistics.cc
sql/sql_statistics.cc
+9
-13
No files found.
sql/sql_statistics.cc
View file @
5ab91f59
...
@@ -3601,10 +3601,10 @@ void set_statistics_for_table(THD *thd, TABLE *table)
...
@@ -3601,10 +3601,10 @@ void set_statistics_for_table(THD *thd, TABLE *table)
Ideally, EITS should provide per-partition statistics but this is not
Ideally, EITS should provide per-partition statistics but this is not
implemented currently.
implemented currently.
*/
*/
#ifdef WITH_PARTITION_STORAGE_ENGINE
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
table
->
part_info
)
if
(
table
->
part_info
)
table
->
used_stat_records
=
table
->
file
->
stats
.
records
;
table
->
used_stat_records
=
table
->
file
->
stats
.
records
;
#endif
#endif
KEY
*
key_info
,
*
key_info_end
;
KEY
*
key_info
,
*
key_info_end
;
for
(
key_info
=
table
->
key_info
,
key_info_end
=
key_info
+
table
->
s
->
keys
;
for
(
key_info
=
table
->
key_info
,
key_info_end
=
key_info
+
table
->
s
->
keys
;
...
@@ -3931,9 +3931,6 @@ bool is_stat_table(const char *db, const char *table)
...
@@ -3931,9 +3931,6 @@ bool is_stat_table(const char *db, const char *table)
bool
is_eits_usable
(
Field
*
field
)
bool
is_eits_usable
(
Field
*
field
)
{
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info
*
part_info
=
field
->
table
->
part_info
;
#endif
/*
/*
(1): checks if we have EITS statistics for a particular column
(1): checks if we have EITS statistics for a particular column
(2): Don't use EITS for GEOMETRY columns
(2): Don't use EITS for GEOMETRY columns
...
@@ -3942,12 +3939,11 @@ bool is_eits_usable(Field *field)
...
@@ -3942,12 +3939,11 @@ bool is_eits_usable(Field *field)
such columns would be handled during partition pruning.
such columns would be handled during partition pruning.
*/
*/
Column_statistics
*
col_stats
=
field
->
read_stats
;
Column_statistics
*
col_stats
=
field
->
read_stats
;
if
(
col_stats
&&
!
col_stats
->
no_stat_values_provided
()
&&
//(1)
return
col_stats
&&
!
col_stats
->
no_stat_values_provided
()
&&
//(1)
field
->
type
()
!=
MYSQL_TYPE_GEOMETRY
//(2)
field
->
type
()
!=
MYSQL_TYPE_GEOMETRY
&&
//(2)
#ifdef WITH_PARTITION_STORAGE_ENGINE
#ifdef WITH_PARTITION_STORAGE_ENGINE
&&
(
!
part_info
||
!
part_info
->
field_in_partition_expr
(
field
))
//(3)
(
!
field
->
table
->
part_info
||
#endif
!
field
->
table
->
part_info
->
field_in_partition_expr
(
field
))
&&
//(3)
)
#endif
return
TRUE
;
true
;
return
FALSE
;
}
}
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