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
6070491d
Commit
6070491d
authored
Aug 30, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
90e25c6f
62b95b90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
mysql-test/r/group_min_max.result
mysql-test/r/group_min_max.result
+12
-0
mysql-test/t/group_min_max.test
mysql-test/t/group_min_max.test
+15
-0
sql/opt_range.cc
sql/opt_range.cc
+11
-1
No files found.
mysql-test/r/group_min_max.result
View file @
6070491d
...
@@ -2502,3 +2502,15 @@ a MAX(b)
...
@@ -2502,3 +2502,15 @@ a MAX(b)
2 1
2 1
DROP TABLE t;
DROP TABLE t;
End of 5.0 tests
End of 5.0 tests
#
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
# server crash
#
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 b GROUP BY a;
a MAX(b)
2 1
DROP TABLE t;
End of 5.1 tests
mysql-test/t/group_min_max.test
View file @
6070491d
...
@@ -1018,3 +1018,18 @@ DROP TABLE t;
...
@@ -1018,3 +1018,18 @@ DROP TABLE t;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
--
echo
# server crash
--
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
b
GROUP
BY
a
;
DROP
TABLE
t
;
--
echo
End
of
5.1
tests
sql/opt_range.cc
View file @
6070491d
...
@@ -9639,7 +9639,17 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
...
@@ -9639,7 +9639,17 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
*/
*/
if
(
cond_type
==
Item
::
SUBSELECT_ITEM
)
if
(
cond_type
==
Item
::
SUBSELECT_ITEM
)
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
/*
Condition of the form 'field' is equivalent to 'field <> 0' and thus
satisfies the SA3 condition.
*/
if
(
cond_type
==
Item
::
FIELD_ITEM
)
{
DBUG_PRINT
(
"info"
,
(
"Analyzing: %s"
,
cond
->
full_name
()));
DBUG_RETURN
(
TRUE
);
}
/* We presume that at this point there are no other Items than functions. */
/* We presume that at this point there are no other Items than functions. */
DBUG_ASSERT
(
cond_type
==
Item
::
FUNC_ITEM
);
DBUG_ASSERT
(
cond_type
==
Item
::
FUNC_ITEM
);
...
...
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