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
feb36554
Commit
feb36554
authored
Jan 11, 2013
by
Chaithra Gopalareddy
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.1 to 5.5
parents
a40ea266
b140c368
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+32
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+30
-0
sql/item.h
sql/item.h
+2
-0
No files found.
mysql-test/r/join_outer.result
View file @
feb36554
...
...
@@ -1702,4 +1702,36 @@ EXECUTE prep_stmt;
f
1
DROP TABLE t1;
#
# Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS
# WRONG RESULT
#
CREATE TABLE t1 (i1 int);
INSERT INTO t1 VALUES (100), (101);
CREATE TABLE t2 (i2 int, i3 int);
INSERT INTO t2 VALUES (20,1),(10,2);
CREATE TABLE t3 (i4 int(11));
INSERT INTO t3 VALUES (1),(2);
SELECT (
SELECT MAX( t2.i2 )
FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
WHERE t2.i3 <> t1.i1
) AS field1
FROM t1;;
field1
20
20
SELECT (
SELECT MAX( t2.i2 )
FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
WHERE t2.i3 <> t1.i1
) AS field1
FROM t1 GROUP BY field1;;
field1
20
drop table t1,t2,t3;
# End of test for Bug#13068506
End of 5.1 tests
mysql-test/t/join_outer.test
View file @
feb36554
...
...
@@ -1272,5 +1272,35 @@ EXECUTE prep_stmt;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS
--
echo
# WRONG RESULT
--
echo
#
CREATE
TABLE
t1
(
i1
int
);
INSERT
INTO
t1
VALUES
(
100
),
(
101
);
CREATE
TABLE
t2
(
i2
int
,
i3
int
);
INSERT
INTO
t2
VALUES
(
20
,
1
),(
10
,
2
);
CREATE
TABLE
t3
(
i4
int
(
11
));
INSERT
INTO
t3
VALUES
(
1
),(
2
);
let
$query
=
SELECT
(
SELECT
MAX
(
t2
.
i2
)
FROM
t3
RIGHT
JOIN
t2
ON
(
t2
.
i3
=
2
)
WHERE
t2
.
i3
<>
t1
.
i1
)
AS
field1
FROM
t1
;
--
echo
--
eval
$query
;
--
echo
--
eval
$query
GROUP
BY
field1
;
--
echo
drop
table
t1
,
t2
,
t3
;
--
echo
# End of test for Bug#13068506
--
echo
End
of
5.1
tests
sql/item.h
View file @
feb36554
...
...
@@ -2720,6 +2720,8 @@ public:
{
return
(
*
ref
)
->
const_item
()
?
0
:
OUTER_REF_TABLE_BIT
;
}
table_map
not_null_tables
()
const
{
return
0
;
}
virtual
Ref_Type
ref_type
()
{
return
OUTER_REF
;
}
};
...
...
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