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
5921189e
Commit
5921189e
authored
Nov 28, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test of changing subselects tree
parent
8e8678be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+9
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+2
-0
No files found.
mysql-test/r/subselect.result
View file @
5921189e
...
@@ -532,6 +532,15 @@ Note 1246 Select 2 was reduced during optimisation
...
@@ -532,6 +532,15 @@ Note 1246 Select 2 was reduced during optimisation
SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
id
id
1
1
SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
id
2
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ref id id 5 const 1 Using where; Using index
3 SUBSELECT No tables used
Warnings:
Note 1246 Select 2 was reduced during optimisation
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t index NULL id 5 NULL 2 Using where; Using index
1 PRIMARY t index NULL id 5 NULL 2 Using where; Using index
...
...
mysql-test/t/subselect.test
View file @
5921189e
...
@@ -317,6 +317,8 @@ INSERT INTO t VALUES (1),(2);
...
@@ -317,6 +317,8 @@ INSERT INTO t VALUES (1),(2);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
);
EXPLAIN
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
);
EXPLAIN
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
UNION
SELECT
3
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
UNION
SELECT
3
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
+
(
select
1
));
EXPLAIN
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
+
(
select
1
));
EXPLAIN
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
UNION
SELECT
3
);
EXPLAIN
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
1
UNION
SELECT
3
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
5
UNION
SELECT
3
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
5
UNION
SELECT
3
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
5
UNION
SELECT
2
);
SELECT
*
FROM
t
WHERE
id
IN
(
SELECT
5
UNION
SELECT
2
);
...
...
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