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
3dc16466
Commit
3dc16466
authored
Feb 25, 2010
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
6f3770ca
735de9ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
mysql-test/r/join.result
mysql-test/r/join.result
+11
-0
mysql-test/t/join.test
mysql-test/t/join.test
+13
-0
sql/sql_select.cc
sql/sql_select.cc
+5
-3
No files found.
mysql-test/r/join.result
View file @
3dc16466
...
@@ -1145,3 +1145,14 @@ NULL
...
@@ -1145,3 +1145,14 @@ NULL
NULL
NULL
1
1
DROP TABLE t1, t2, mm1;
DROP TABLE t1, t2, mm1;
#
# Bug #50335: Assertion `!(order->used & map)' in eq_ref_table
#
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b));
INSERT INTO t1 VALUES (0,0), (1,1);
SELECT * FROM t1 STRAIGHT_JOIN t1 t2 ON t1.a=t2.a AND t1.a=t2.b ORDER BY t2.a, t1.a;
a b a b
0 0 0 0
1 1 1 1
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/join.test
View file @
3dc16466
...
@@ -816,3 +816,16 @@ CREATE TABLE mm1(a CHAR(9),b INT,KEY(b),KEY(a))
...
@@ -816,3 +816,16 @@ CREATE TABLE mm1(a CHAR(9),b INT,KEY(b),KEY(a))
ENGINE
=
MERGE
UNION
=
(
t1
,
t2
);
ENGINE
=
MERGE
UNION
=
(
t1
,
t2
);
SELECT
t1
.
a
FROM
mm1
,
t1
;
SELECT
t1
.
a
FROM
mm1
,
t1
;
DROP
TABLE
t1
,
t2
,
mm1
;
DROP
TABLE
t1
,
t2
,
mm1
;
--
echo
#
--
echo
# Bug #50335: Assertion `!(order->used & map)' in eq_ref_table
--
echo
#
CREATE
TABLE
t1
(
a
INT
NOT
NULL
,
b
INT
NOT
NULL
,
PRIMARY
KEY
(
a
,
b
));
INSERT
INTO
t1
VALUES
(
0
,
0
),
(
1
,
1
);
SELECT
*
FROM
t1
STRAIGHT_JOIN
t1
t2
ON
t1
.
a
=
t2
.
a
AND
t1
.
a
=
t2
.
b
ORDER
BY
t2
.
a
,
t1
.
a
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/sql_select.cc
View file @
3dc16466
...
@@ -7028,9 +7028,11 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab)
...
@@ -7028,9 +7028,11 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab)
}
}
if
(
order
)
if
(
order
)
{
{
found
++
;
if
(
!
(
order
->
used
&
map
))
DBUG_ASSERT
(
!
(
order
->
used
&
map
));
{
order
->
used
|=
map
;
found
++
;
order
->
used
|=
map
;
}
continue
;
// Used in ORDER BY
continue
;
// Used in ORDER BY
}
}
if
(
!
only_eq_ref_tables
(
join
,
start_order
,
(
*
ref_item
)
->
used_tables
()))
if
(
!
only_eq_ref_tables
(
join
,
start_order
,
(
*
ref_item
)
->
used_tables
()))
...
...
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