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
e67a0d2b
Commit
e67a0d2b
authored
Dec 25, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check of LIMIT in row IN subquery (SCRUM related)
parent
980ca356
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+2
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+2
-0
sql/item_subselect.cc
sql/item_subselect.cc
+14
-0
No files found.
mysql-test/r/subselect.result
View file @
e67a0d2b
...
@@ -809,4 +809,6 @@ NULL
...
@@ -809,4 +809,6 @@ NULL
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');
ROW(1, 1, 'a') IN (select b,a,c from t where c='b' or c='a')
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);
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table if exists t;
drop table if exists t;
mysql-test/t/subselect.test
View file @
e67a0d2b
...
@@ -454,4 +454,6 @@ select ROW(1, 1, 'a') IN (select b,a,c from t where a is not null);
...
@@ -454,4 +454,6 @@ select ROW(1, 1, 'a') IN (select b,a,c from t where a is not null);
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
a
,
b
,
c
from
t
where
c
=
'b'
or
c
=
'a'
);
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
a
,
b
,
c
from
t
where
c
=
'b'
or
c
=
'a'
);
select
ROW
(
1
,
2
,
'a'
)
IN
(
select
a
,
b
,
c
from
t
where
c
=
'b'
or
c
=
'a'
);
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
select
ROW
(
1
,
1
,
'a'
)
IN
(
select
b
,
a
,
c
from
t
limit
2
);
drop
table
if
exists
t
;
drop
table
if
exists
t
;
sql/item_subselect.cc
View file @
e67a0d2b
...
@@ -517,6 +517,13 @@ void Item_in_subselect::row_value_transformer(st_select_lex *select_lex,
...
@@ -517,6 +517,13 @@ void Item_in_subselect::row_value_transformer(st_select_lex *select_lex,
Item
*
left_expr
)
Item
*
left_expr
)
{
{
DBUG_ENTER
(
"Item_in_subselect::row_value_transformer"
);
DBUG_ENTER
(
"Item_in_subselect::row_value_transformer"
);
if
(
select_lex
->
master_unit
()
->
global_parameters
->
select_limit
!=
HA_POS_ERROR
)
{
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"LIMIT & IN/ALL/ANY/SOME subquery"
);
DBUG_VOID_RETURN
;
}
Item_in_optimizer
*
optimizer
;
Item_in_optimizer
*
optimizer
;
substitution
=
optimizer
=
new
Item_in_optimizer
(
left_expr
,
this
);
substitution
=
optimizer
=
new
Item_in_optimizer
(
left_expr
,
this
);
if
(
!
optimizer
)
if
(
!
optimizer
)
...
@@ -530,6 +537,13 @@ void Item_in_subselect::row_value_transformer(st_select_lex *select_lex,
...
@@ -530,6 +537,13 @@ void Item_in_subselect::row_value_transformer(st_select_lex *select_lex,
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
for
(
SELECT_LEX
*
sl
=
select_lex
;
sl
;
sl
=
sl
->
next_select
())
for
(
SELECT_LEX
*
sl
=
select_lex
;
sl
;
sl
=
sl
->
next_select
())
{
{
if
(
select_lex
->
select_limit
!=
HA_POS_ERROR
)
{
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"LIMIT & IN/ALL/ANY/SOME subquery"
);
DBUG_VOID_RETURN
;
}
select_lex
->
dependent
=
1
;
select_lex
->
dependent
=
1
;
Item
*
item
=
0
;
Item
*
item
=
0
;
...
...
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