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
6d179ad1
Commit
6d179ad1
authored
Oct 04, 2022
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typecast warnings-as-errors on Windows.
parent
33fc8037
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
mysql-test/main/opt_trace.result
mysql-test/main/opt_trace.result
+2
-2
sql/opt_subselect.cc
sql/opt_subselect.cc
+6
-2
sql/sql_select.cc
sql/sql_select.cc
+3
-2
No files found.
mysql-test/main/opt_trace.result
View file @
6d179ad1
...
...
@@ -2471,9 +2471,9 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"index": "a_c",
"can_resolve_order": true,
"direction": 1,
"rows_to_examine": 4,
"rows_to_examine": 4
.390243902
,
"range_scan": true,
"scan_cost": 1
0.5218905
,
"scan_cost": 1
1.5484164
,
"chosen": true
},
{
...
...
sql/opt_subselect.cc
View file @
6d179ad1
...
...
@@ -2555,8 +2555,12 @@ bool optimize_semijoin_nests(JOIN *join, table_map all_table_map)
int
tableno
;
double
rows
=
1.0
;
while
((
tableno
=
tm_it
.
next_bit
())
!=
Table_map_iterator
::
BITMAP_END
)
rows
=
COST_MULT
(
rows
,
join
->
map2table
[
tableno
]
->
table
->
opt_range_condition_rows
);
{
ha_rows
tbl_rows
=
join
->
map2table
[
tableno
]
->
table
->
opt_range_condition_rows
;
rows
=
COST_MULT
(
rows
,
rows2double
(
tbl_rows
));
}
sjm
->
rows
=
MY_MIN
(
sjm
->
rows
,
rows
);
}
memcpy
((
uchar
*
)
sjm
->
positions
,
...
...
sql/sql_select.cc
View file @
6d179ad1
...
...
@@ -30033,11 +30033,12 @@ void JOIN::cache_const_exprs()
static bool get_range_limit_read_cost(const POSITION *pos,
const TABLE *table,
uint keynr,
ha_rows rows_limit,
ha_rows rows_limit
_arg
,
ha_rows rows_to_scan,
double *read_cost,
double *read_rows)
{
double rows_limit= rows2double(rows_limit_arg);
if (table->opt_range_keys.is_set(keynr))
{
/*
...
...
@@ -30108,7 +30109,7 @@ static bool get_range_limit_read_cost(const POSITION *pos,
HA_ROWS_MAX);
*read_cost= (cost.read_cost +
rows_to_scan * WHERE_COST_THD(table->in_use));
*read_rows= rows
_to_scan
;
*read_rows= rows
2double(rows_to_scan)
;
return 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