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
c7d8977f
Commit
c7d8977f
authored
Oct 16, 2003
by
kostja@oak.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for one of the bugs spotted by #1274
parent
3414cf2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
sql/sql_select.cc
sql/sql_select.cc
+11
-1
No files found.
sql/sql_select.cc
View file @
c7d8977f
...
@@ -968,10 +968,20 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
...
@@ -968,10 +968,20 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
}
}
}
}
}
}
/*
Here we sort rows for ORDER BY/GROUP BY clause, if the optimiser
chose FILESORT to be faster than INDEX SCAN or there is no
suitable index present.
Note, that create_sort_index calls test_if_skip_sort_order and may
finally replace sorting with index scan if there is a LIMIT clause in
the query. XXX: it's never shown in EXPLAIN!
OPTION_FOUND_ROWS supersedes LIMIT and is taken into account.
*/
if
(
create_sort_index
(
&
join
.
join_tab
[
join
.
const_tables
],
if
(
create_sort_index
(
&
join
.
join_tab
[
join
.
const_tables
],
group
?
group
:
order
,
group
?
group
:
order
,
select_limit
,
select_limit
,
thd
->
select_limit
))
join
.
select_options
&
OPTION_FOUND_ROWS
?
HA_POS_ERROR
:
thd
->
select_limit
))
goto
err
;
goto
err
;
}
}
join
.
having
=
having
;
// Actually a parameter
join
.
having
=
having
;
// Actually a parameter
...
...
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