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
975b37a5
Commit
975b37a5
authored
Nov 26, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents
f79311f5
dd556e14
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
mysql-test/r/derived.result
mysql-test/r/derived.result
+3
-0
mysql-test/t/derived.test
mysql-test/t/derived.test
+2
-1
sql/sql_derived.cc
sql/sql_derived.cc
+11
-7
No files found.
mysql-test/r/derived.result
View file @
975b37a5
...
@@ -65,3 +65,6 @@ a t
...
@@ -65,3 +65,6 @@ a t
19 19
19 19
20 20
20 20
drop table if exists t1;
drop table if exists t1;
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a)));
(SELECT * FROM (SELECT 1 as a))
1
mysql-test/t/derived.test
View file @
975b37a5
...
@@ -34,3 +34,4 @@ while ($1)
...
@@ -34,3 +34,4 @@ while ($1)
enable_query_log
;
enable_query_log
;
SELECT
*
FROM
(
SELECT
*
FROM
t1
)
ORDER
BY
a
ASC
LIMIT
0
,
20
;
SELECT
*
FROM
(
SELECT
*
FROM
t1
)
ORDER
BY
a
ASC
LIMIT
0
,
20
;
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
SELECT
*
FROM
(
SELECT
(
SELECT
*
FROM
(
SELECT
1
as
a
)));
sql/sql_derived.cc
View file @
975b37a5
...
@@ -50,7 +50,10 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
...
@@ -50,7 +50,10 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
if
(
res
)
if
(
res
)
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
for
(
TABLE_LIST
*
cursor
=
(
TABLE_LIST
*
)
tables
;
for
(
SELECT_LEX
*
ssl
=
sl
;
ssl
;
ssl
=
ssl
->
next_select_in_list
())
{
TABLE_LIST
*
t_tables
=
(
TABLE_LIST
*
)
ssl
->
table_list
.
first
;
for
(
TABLE_LIST
*
cursor
=
(
TABLE_LIST
*
)
t_tables
;
cursor
;
cursor
;
cursor
=
cursor
->
next
)
cursor
=
cursor
->
next
)
{
{
...
@@ -61,6 +64,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
...
@@ -61,6 +64,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
if
(
res
)
DBUG_RETURN
(
res
);
if
(
res
)
DBUG_RETURN
(
res
);
}
}
}
}
}
Item
*
item
;
Item
*
item
;
List_iterator
<
Item
>
it
(
sl
->
item_list
);
List_iterator
<
Item
>
it
(
sl
->
item_list
);
...
...
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