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
0ef427ae
Commit
0ef427ae
authored
Jul 18, 2012
by
Chaithra Gopalareddy
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.1 to 5.5
parents
8dc96fc7
ddcd6867
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+0
-2
sql/sql_select.cc
sql/sql_select.cc
+9
-2
No files found.
mysql-test/r/subselect.result
View file @
0ef427ae
...
...
@@ -4562,8 +4562,6 @@ SELECT * FROM t1
WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
pk a
1 10
3 30
2 20
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), KEY b (b));
INSERT INTO t1 VALUES (1,NULL), (9,NULL);
...
...
sql/sql_select.cc
View file @
0ef427ae
...
...
@@ -1520,12 +1520,19 @@ JOIN::optimize()
DBUG_RETURN
(
1
);
}
}
/*
Calculate a possible 'limit' of table rows for 'GROUP BY': 'need_tmp'
implies that there will be more postprocessing so the specified
'limit' should not be enforced yet in the call to
'test_if_skip_sort_order'.
*/
const
ha_rows
limit
=
need_tmp
?
HA_POS_ERROR
:
unit
->
select_limit_cnt
;
if
(
!
(
select_options
&
SELECT_BIG_RESULT
)
&&
((
group_list
&&
(
!
simple_group
||
!
test_if_skip_sort_order
(
&
join_tab
[
const_tables
],
group_list
,
unit
->
select_limit_cnt
,
0
,
limit
,
0
,
&
join_tab
[
const_tables
].
table
->
keys_in_use_for_group_by
)))
||
select_distinct
)
&&
...
...
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