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
5082c41b
Commit
5082c41b
authored
Aug 15, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge
parents
c78623fa
4161d7cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+17
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+18
-0
No files found.
mysql-test/r/subselect.result
View file @
5082c41b
...
@@ -2829,6 +2829,23 @@ SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
...
@@ -2829,6 +2829,23 @@ SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
a b
a b
aaa aaa
aaa aaa
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int, b int);
CREATE TABLE t3 (b int NOT NULL);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t2 VALUES (1,10), (3,30);
SELECT * FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t3.b IS NOT NULL OR t2.a > 10;
a b b
SELECT * FROM t1
WHERE t1.a NOT IN (SELECT a FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t3.b IS NOT NULL OR t2.a > 10);
a
1
2
3
4
DROP TABLE t1,t2,t3;
create table t1 (df decimal(5,1));
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(1.1);
insert into t1 values(2.2);
insert into t1 values(2.2);
...
...
mysql-test/t/subselect.test
View file @
5082c41b
...
@@ -1801,6 +1801,24 @@ SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
...
@@ -1801,6 +1801,24 @@ SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #11479: subquery over left join with an empty inner table
#
CREATE
TABLE
t1
(
a
int
);
CREATE
TABLE
t2
(
a
int
,
b
int
);
CREATE
TABLE
t3
(
b
int
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
);
INSERT
INTO
t2
VALUES
(
1
,
10
),
(
3
,
30
);
SELECT
*
FROM
t2
LEFT
JOIN
t3
ON
t2
.
b
=
t3
.
b
WHERE
t3
.
b
IS
NOT
NULL
OR
t2
.
a
>
10
;
SELECT
*
FROM
t1
WHERE
t1
.
a
NOT
IN
(
SELECT
a
FROM
t2
LEFT
JOIN
t3
ON
t2
.
b
=
t3
.
b
WHERE
t3
.
b
IS
NOT
NULL
OR
t2
.
a
>
10
);
DROP
TABLE
t1
,
t2
,
t3
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
...
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