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
5ce15189
Commit
5ce15189
authored
Nov 28, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
parents
5a07b871
10fda316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
sql/opt_range.cc
sql/opt_range.cc
+8
-2
No files found.
sql/opt_range.cc
View file @
5ce15189
...
@@ -2716,7 +2716,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
...
@@ -2716,7 +2716,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
double
min_cost
=
read_time
;
double
min_cost
=
read_time
;
DBUG_ENTER
(
"get_best_ror_intersect"
);
DBUG_ENTER
(
"get_best_ror_intersect"
);
if
(
tree
->
n_ror_scans
<
2
)
if
(
(
tree
->
n_ror_scans
<
2
)
||
!
param
->
table
->
file
->
records
)
DBUG_RETURN
(
NULL
);
DBUG_RETURN
(
NULL
);
/*
/*
...
@@ -2803,6 +2803,9 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
...
@@ -2803,6 +2803,9 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
min_cost
=
intersect
->
total_cost
;
min_cost
=
intersect
->
total_cost
;
best_rows
=
(
ha_rows
)(
intersect
->
records_fract
*
best_rows
=
(
ha_rows
)(
intersect
->
records_fract
*
rows2double
(
param
->
table
->
file
->
records
));
rows2double
(
param
->
table
->
file
->
records
));
/* Prevent divisons by zero */
if
(
!
best_rows
)
best_rows
=
1
;
is_best_covering
=
intersect
->
is_covering
;
is_best_covering
=
intersect
->
is_covering
;
intersect_scans_best
=
intersect_scans_end
;
intersect_scans_best
=
intersect_scans_end
;
best_index_scan_costs
=
intersect
->
index_scan_costs
;
best_index_scan_costs
=
intersect
->
index_scan_costs
;
...
@@ -2847,6 +2850,9 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
...
@@ -2847,6 +2850,9 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
min_cost
=
intersect
->
total_cost
;
min_cost
=
intersect
->
total_cost
;
best_rows
=
(
ha_rows
)(
intersect
->
records_fract
*
best_rows
=
(
ha_rows
)(
intersect
->
records_fract
*
rows2double
(
param
->
table
->
file
->
records
));
rows2double
(
param
->
table
->
file
->
records
));
/* Prevent divisons by zero */
if
(
!
best_rows
)
best_rows
=
1
;
is_best_covering
=
intersect
->
is_covering
;
is_best_covering
=
intersect
->
is_covering
;
best_index_scan_costs
=
intersect
->
index_scan_costs
;
best_index_scan_costs
=
intersect
->
index_scan_costs
;
}
}
...
@@ -2866,7 +2872,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
...
@@ -2866,7 +2872,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
trp
->
last_scan
=
trp
->
first_scan
+
best_num
;
trp
->
last_scan
=
trp
->
first_scan
+
best_num
;
trp
->
is_covering
=
is_best_covering
;
trp
->
is_covering
=
is_best_covering
;
trp
->
read_cost
=
min_cost
;
trp
->
read_cost
=
min_cost
;
trp
->
records
=
best_rows
?
best_rows
:
1
;
trp
->
records
=
best_rows
;
trp
->
index_scan_costs
=
best_index_scan_costs
;
trp
->
index_scan_costs
=
best_index_scan_costs
;
trp
->
cpk_scan
=
cpk_scan
;
trp
->
cpk_scan
=
cpk_scan
;
DBUG_PRINT
(
"info"
,
DBUG_PRINT
(
"info"
,
...
...
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