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
36a4f39b
Commit
36a4f39b
authored
Jun 09, 2005
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
parents
95e62048
e093250d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
mysql-test/r/select.result
mysql-test/r/select.result
+17
-0
mysql-test/t/select.test
mysql-test/t/select.test
+16
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-2
No files found.
mysql-test/r/select.result
View file @
36a4f39b
...
...
@@ -2682,3 +2682,20 @@ AND FK_firma_id = 2;
COUNT(*)
0
drop table t1;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
INSERT INTO t2 VALUES (2), (4), (6);
SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
a
2
4
EXPLAIN SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
EXPLAIN SELECT t1.a FROM t1 INNER JOIN t2 ON t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
DROP TABLE t1,t2;
mysql-test/t/select.test
View file @
36a4f39b
...
...
@@ -2255,3 +2255,19 @@ AND FK_firma_id = 2;
drop
table
t1
;
#
# Test for bug #10084: STRAIGHT_JOIN with ON expression
#
CREATE
TABLE
t1
(
a
int
);
CREATE
TABLE
t2
(
a
int
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
INSERT
INTO
t2
VALUES
(
2
),
(
4
),
(
6
);
SELECT
t1
.
a
FROM
t1
STRAIGHT_JOIN
t2
ON
t1
.
a
=
t2
.
a
;
EXPLAIN
SELECT
t1
.
a
FROM
t1
STRAIGHT_JOIN
t2
ON
t1
.
a
=
t2
.
a
;
EXPLAIN
SELECT
t1
.
a
FROM
t1
INNER
JOIN
t2
ON
t1
.
a
=
t2
.
a
;
DROP
TABLE
t1
,
t2
;
sql/sql_yacc.yy
View file @
36a4f39b
...
...
@@ -5108,10 +5108,12 @@ derived_table_list:
join_table:
table_ref normal_join table_ref { TEST_ASSERT($1 && ($$=$3)); }
| table_ref STRAIGHT_JOIN table_
factor
{
TEST_ASSERT($1 && ($$=$3)); $3->straight=1; }
| table_ref STRAIGHT_JOIN table_
ref
{ TEST_ASSERT($1 && ($$=$3)); $3->straight=1; }
| table_ref normal_join table_ref ON expr
{ TEST_ASSERT($1 && ($$=$3)); add_join_on($3,$5); }
| table_ref STRAIGHT_JOIN table_ref ON expr
{ TEST_ASSERT($1 && ($$=$3)); $3->straight=1; add_join_on($3,$5); }
| table_ref normal_join table_ref
USING
{
...
...
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