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
903387af
Commit
903387af
authored
Sep 27, 2006
by
gkodinov/kgeorge@macbook.gmz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #21174: Index degrades sort performance and optimizer does not honor IGNORE INDEX
- reversed the patch for 5.0 and moved to 5.1
parent
542cdbbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
23 deletions
+0
-23
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+0
-9
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+0
-12
sql/sql_select.cc
sql/sql_select.cc
+0
-2
No files found.
mysql-test/r/group_by.result
View file @
903387af
...
...
@@ -821,12 +821,3 @@ a b real_b
68 France France
DROP VIEW v1;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT, b INT, KEY(a));
INSERT INTO t1 VALUES (1, 1), (2, 2), (3,3), (4,4);
EXPLAIN SELECT a, SUM(b) FROM t1 GROUP BY a LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 4
EXPLAIN SELECT a, SUM(b) FROM t1 IGNORE INDEX (a) GROUP BY a LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
DROP TABLE t1;
mysql-test/t/group_by.test
View file @
903387af
...
...
@@ -655,15 +655,3 @@ where t2.b=v1.a GROUP BY t2.b;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
;
#
# Bug #21174: Index degrades sort performance and
# optimizer does not honor IGNORE INDEX
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
2
),
(
3
,
3
),
(
4
,
4
);
EXPLAIN
SELECT
a
,
SUM
(
b
)
FROM
t1
GROUP
BY
a
LIMIT
2
;
EXPLAIN
SELECT
a
,
SUM
(
b
)
FROM
t1
IGNORE
INDEX
(
a
)
GROUP
BY
a
LIMIT
2
;
DROP
TABLE
t1
;
sql/sql_select.cc
View file @
903387af
...
...
@@ -11735,8 +11735,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
We must not try to use disabled keys.
*/
usable_keys
=
table
->
s
->
keys_in_use
;
/* we must not consider keys that are disabled by IGNORE INDEX */
usable_keys
.
intersect
(
table
->
keys_in_use_for_query
);
for
(
ORDER
*
tmp_order
=
order
;
tmp_order
;
tmp_order
=
tmp_order
->
next
)
{
...
...
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