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
9c63b18f
Commit
9c63b18f
authored
Jan 03, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed do with subselects
parent
164ab11b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+10
-1
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+9
-1
sql/sql_parse.cc
sql/sql_parse.cc
+8
-1
No files found.
mysql-test/r/subselect.result
View file @
9c63b18f
...
@@ -841,4 +841,13 @@ ROW(1, 1, 'a') IN (select b,a,c from t where c='b' or c='a')
...
@@ -841,4 +841,13 @@ ROW(1, 1, 'a') IN (select b,a,c from t where c='b' or c='a')
1
1
select ROW(1, 1, 'a') IN (select b,a,c from t limit 2);
select ROW(1, 1, 'a') IN (select b,a,c from t limit 2);
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table if exists t;
drop table t;
create table t (a int);
insert into t values (1);
do @a:=(SELECT a from t);
select @a;
@a
1
drop table t;
do (SELECT a from t);
Table 'test.t' doesn't exist
mysql-test/t/subselect.test
View file @
9c63b18f
...
@@ -462,4 +462,12 @@ select ROW(1, 2, 'a') IN (select a,b,c from t where c='b' or c='a');
...
@@ -462,4 +462,12 @@ select ROW(1, 2, 'a') IN (select a,b,c from t where c='b' or c='a');
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
b
,
a
,
c
from
t
where
c
=
'b'
or
c
=
'a'
);
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
b
,
a
,
c
from
t
where
c
=
'b'
or
c
=
'a'
);
--
error
1235
--
error
1235
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
b
,
a
,
c
from
t
limit
2
);
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
b
,
a
,
c
from
t
limit
2
);
drop
table
if
exists
t
;
drop
table
t
;
create
table
t
(
a
int
);
insert
into
t
values
(
1
);
do
@
a
:=
(
SELECT
a
from
t
);
select
@
a
;
drop
table
t
;
--
error
1146
do
(
SELECT
a
from
t
);
sql/sql_parse.cc
View file @
9c63b18f
...
@@ -1598,7 +1598,14 @@ mysql_execute_command(THD *thd)
...
@@ -1598,7 +1598,14 @@ mysql_execute_command(THD *thd)
break
;
break
;
}
}
case
SQLCOM_DO
:
case
SQLCOM_DO
:
res
=
mysql_do
(
thd
,
*
lex
->
insert_list
);
if
(
tables
&&
((
res
=
check_table_access
(
thd
,
SELECT_ACL
,
tables
))
||
(
res
=
open_and_lock_tables
(
thd
,
tables
))))
break
;
fix_tables_pointers
(
lex
->
all_selects_list
);
res
=
mysql_do
(
thd
,
*
lex
->
insert_list
);
if
(
thd
->
net
.
report_error
)
res
=
-
1
;
break
;
break
;
case
SQLCOM_EMPTY_QUERY
:
case
SQLCOM_EMPTY_QUERY
:
...
...
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