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
f8349447
Commit
f8349447
authored
Oct 04, 2019
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix
parent
8e268505
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
sql/opt_trace.h
sql/opt_trace.h
+1
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-3
sql/sql_select.h
sql/sql_select.h
+2
-1
sql/sql_sort_nest.cc
sql/sql_sort_nest.cc
+2
-2
No files found.
sql/opt_trace.h
View file @
f8349447
...
...
@@ -111,6 +111,7 @@ void print_best_access_for_table(THD *thd, POSITION *pos,
enum
join_type
type
);
void
add_sort_nest_tables_to_trace
(
JOIN
*
join
,
Mat_join_tab_nest_info
*
nest_info
);
void
trace_sort_nest
(
JOIN
*
join
,
uint
idx
,
table_map
remaining_tables
);
/*
Security related (need to add a proper comment here)
...
...
sql/sql_select.cc
View file @
f8349447
...
...
@@ -5355,8 +5355,6 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
}
}
join
->
join_tab
=
stat
;
join
->
make_notnull_conds_for_range_scans
();
/*
Here a call is made to remove the constant from the order by clause,
this call would only remove the basic constants. This is done primarily
...
...
@@ -5371,6 +5369,9 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
join->propagate_equal_field_for_orderby();
join->join_tab= stat;
join->make_notnull_conds_for_range_scans();
/* Calc how many (possible) matched records in each table */
/*
...
...
@@ -9715,7 +9716,6 @@ best_extension_by_limited_search(JOIN *join,
{
position->sort_nest_operation_here= TRUE;
}
>>>>>>>
ORDER
BY
LIMIT
/* Compute the cost of extending the plan with 's' */
current_record_count= COST_MULT(record_count, position->records_read);
...
...
sql/sql_select.h
View file @
f8349447
...
...
@@ -2285,7 +2285,8 @@ void best_access_path(JOIN *join, JOIN_TAB *s,
table_map
remaining_tables
,
const
POSITION
*
join_positions
,
uint
idx
,
bool
disable_jbuf
,
double
record_count
,
POSITION
*
pos
,
POSITION
*
loose_scan_pos
);
POSITION
*
pos
,
POSITION
*
loose_scan_pos
,
table_map
sort_nest_tables
,
bool
nest_created
);
bool
cp_buffer_from_ref
(
THD
*
thd
,
TABLE
*
table
,
TABLE_REF
*
ref
);
bool
error_if_full_join
(
JOIN
*
join
);
int
report_error
(
TABLE
*
table
,
int
error
);
...
...
sql/sql_sort_nest.cc
View file @
f8349447
...
...
@@ -43,7 +43,7 @@ clause.
Let's say we have tables
t1, t2, t3, t4 .............tk,tk+1.........................tn
|<---------prefix------------>|<-------suffix--------------->
|<---------prefix------------>|<-------suffix--------------->
|
and lets assume the prefix can resolve the ORDER BY clause and we can push
the LIMIT.
...
...
@@ -124,7 +124,7 @@ Preparation of Sort Nest
Let's say we have the best join order as:
t1, t2, t3, t4 .............tk,tk+1.........................tn
|<---------prefix------------>|<-------suffix--------------->
|<---------prefix------------>|<-------suffix--------------->
|
The array of join_tab structures would look like
...
...
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