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
15b2074b
Commit
15b2074b
authored
Nov 23, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
fa4c0203
c592f46b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
mysql-test/r/group_min_max.result
mysql-test/r/group_min_max.result
+11
-0
mysql-test/t/group_min_max.test
mysql-test/t/group_min_max.test
+12
-0
sql/opt_range.cc
sql/opt_range.cc
+5
-1
No files found.
mysql-test/r/group_min_max.result
View file @
15b2074b
...
@@ -2501,6 +2501,17 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
...
@@ -2501,6 +2501,17 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
a MAX(b)
2 1
2 1
DROP TABLE t;
DROP TABLE t;
#
# Bug #48472: Loose index scan inappropriately chosen for some WHERE
# conditions
#
CREATE TABLE t (a INT, b INT, INDEX (a,b));
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
SELECT a, MAX(b) FROM t WHERE 0=b+0 GROUP BY a;
a MAX(b)
2 0
DROP TABLE t;
End of 5.0 tests
End of 5.0 tests
#
#
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
...
...
mysql-test/t/group_min_max.test
View file @
15b2074b
...
@@ -1016,6 +1016,18 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
...
@@ -1016,6 +1016,18 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
DROP
TABLE
t
;
DROP
TABLE
t
;
--
echo
#
--
echo
# Bug #48472: Loose index scan inappropriately chosen for some WHERE
--
echo
# conditions
--
echo
#
CREATE
TABLE
t
(
a
INT
,
b
INT
,
INDEX
(
a
,
b
));
INSERT
INTO
t
VALUES
(
2
,
0
),
(
2
,
0
),
(
2
,
1
),
(
2
,
1
);
INSERT
INTO
t
SELECT
*
FROM
t
;
SELECT
a
,
MAX
(
b
)
FROM
t
WHERE
0
=
b
+
0
GROUP
BY
a
;
DROP
TABLE
t
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
...
...
sql/opt_range.cc
View file @
15b2074b
...
@@ -9851,7 +9851,11 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
...
@@ -9851,7 +9851,11 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
}
}
else
if
(
cur_arg
->
const_item
())
else
if
(
cur_arg
->
const_item
())
{
{
DBUG_RETURN
(
TRUE
);
/*
For predicates of the form "const OP expr" we also have to check 'expr'
to make a decision.
*/
continue
;
}
}
else
else
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
...
...
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