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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f1b1f0d7
Commit
f1b1f0d7
authored
Aug 12, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fix
parent
011d9053
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+12
-12
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+3
-0
No files found.
mysql-test/r/subselect.result
View file @
f1b1f0d7
...
@@ -1225,18 +1225,6 @@ SELECT 'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1
...
@@ -1225,18 +1225,6 @@ SELECT 'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1
'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t1.FOLDERNAME = 'Level1')
'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t1.FOLDERNAME = 'Level1')
0
0
drop table t1;
drop table t1;
create table t1 (a int) type=innodb;
create table t2 (a int) type=innodb;
create table t3 (a int) type=innodb;
insert into t1 values (1),(2),(3),(4);
insert into t2 values (10),(20),(30),(40);
insert into t3 values (1),(2),(10),(50);
select a from t3 where t3.a in (select a from t1 where a <= 3 union select * from t2 where a <= 30);
a
1
2
10
drop table t1,t2;
create table t1 (a int not null, b int, primary key (a));
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
create table t2 (a int not null, primary key (a));
create table t3 (a int not null, b int, primary key (a));
create table t3 (a int not null, b int, primary key (a));
...
@@ -1343,3 +1331,15 @@ insert into t2 values (1);
...
@@ -1343,3 +1331,15 @@ insert into t2 values (1);
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
ERROR 42S02: Unknown table 'x' in field list
ERROR 42S02: Unknown table 'x' in field list
DROP TABLE t1, t2;
DROP TABLE t1, t2;
create table t1 (a int) type=innodb;
create table t2 (a int) type=innodb;
create table t3 (a int) type=innodb;
insert into t1 values (1),(2),(3),(4);
insert into t2 values (10),(20),(30),(40);
insert into t3 values (1),(2),(10),(50);
select a from t3 where t3.a in (select a from t1 where a <= 3 union select * from t2 where a <= 30);
a
1
2
10
drop table t1,t2;
mysql-test/t/subselect.test
View file @
f1b1f0d7
...
@@ -782,6 +782,7 @@ SELECT pseudo as a, pseudo as b FROM t1 GROUP BY (SELECT a) ORDER BY (SELECT id*
...
@@ -782,6 +782,7 @@ SELECT pseudo as a, pseudo as b FROM t1 GROUP BY (SELECT a) ORDER BY (SELECT id*
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
(
SELECT
1
as
a
)
UNION
(
SELECT
1
)
ORDER
BY
(
SELECT
a
+
0
);
(
SELECT
1
as
a
)
UNION
(
SELECT
1
)
ORDER
BY
(
SELECT
a
+
0
);
#
#
# key field overflow test
# key field overflow test
#
#
...
@@ -854,6 +855,7 @@ select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
...
@@ -854,6 +855,7 @@ select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
select
*
from
t2
where
t2
.
a
in
(
select
a
from
t1
where
t1
.
b
<>
30
and
t1
.
b
<>
31
);
select
*
from
t2
where
t2
.
a
in
(
select
a
from
t1
where
t1
.
b
<>
30
and
t1
.
b
<>
31
);
explain
select
*
from
t2
where
t2
.
a
in
(
select
a
from
t1
where
t1
.
b
<>
30
);
explain
select
*
from
t2
where
t2
.
a
in
(
select
a
from
t1
where
t1
.
b
<>
30
);
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
#
# alloc_group_fields() working
# alloc_group_fields() working
#
#
...
@@ -875,6 +877,7 @@ insert into t1 values (1);
...
@@ -875,6 +877,7 @@ insert into t1 values (1);
insert
into
t2
values
(
1
);
insert
into
t2
values
(
1
);
select
*
from
t1
where
exists
(
select
s1
from
t2
having
max
(
t2
.
s1
)
=
t1
.
s1
);
select
*
from
t1
where
exists
(
select
s1
from
t2
having
max
(
t2
.
s1
)
=
t1
.
s1
);
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
#
# update subquery with wrong field (to force name resolving
# update subquery with wrong field (to force name resolving
# in UPDATE name space)
# in UPDATE name space)
...
...
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