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
d7bd717e
Commit
d7bd717e
authored
Nov 27, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after-merge fix
parent
4be2cfd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+2
-2
sql/item.cc
sql/item.cc
+2
-4
sql/item_subselect.cc
sql/item_subselect.cc
+2
-2
No files found.
mysql-test/r/subselect.result
View file @
d7bd717e
...
...
@@ -163,9 +163,9 @@ a
7
delete from t2 where a=100;
select * from t3 where a in (select a,b from t2);
Subselect returns more than 1 field
Cardinality error (more/less than 1 columns)
select * from t3 where a in (select * from t2);
Subselect returns more than 1 field
Cardinality error (more/less than 1 columns)
insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9);
select b,max(a) as ma from t4 group by b having b < (select max(t2.a)
from t2 where t2.b=t4.b);
...
...
sql/item.cc
View file @
d7bd717e
...
...
@@ -496,8 +496,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
thd
->
fatal_error
=
1
;
// can't create Item => out of memory
}
else
my_message
(
ER_SUBSELECT_NO_1_COL
,
ER
(
ER_SUBSELECT_NO_1_COL
),
MYF
(
0
));
my_error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
}
else
if
(
!
fitem
->
table_name
)
...
...
@@ -506,8 +505,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
fitem
->
table_name
);
}
else
my_message
(
ER_SUBSELECT_NO_1_COL
,
ER
(
ER_SUBSELECT_NO_1_COL
),
MYF
(
0
));
my_error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
}
else
res
=
item
->
fix_fields
(
thd
,
list
,
&
item
);
...
...
sql/item_subselect.cc
View file @
d7bd717e
...
...
@@ -285,7 +285,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
Item
*
item
;
if
(
sl
->
item_list
.
elements
>
1
)
{
my_
message
(
ER_SUBSELECT_NO_1_COL
,
ER
(
ER_SUBSELECT_NO_1_COL
),
MYF
(
0
)
);
my_
error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
item
=
0
;
// Item_asterisk_remover must fail
}
else
...
...
@@ -297,7 +297,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
{
sl
->
item_list
.
push_back
(
item
);
item
=
(
*
func
)(
left_expr
,
new
Item_ref
(
sl
->
item_list
.
head_ref
(),
0
,
"<result>"
));
0
,
(
char
*
)
"<result>"
));
if
(
sl
->
having
)
sl
->
having
=
new
Item_cond_and
(
sl
->
having
,
item
);
else
...
...
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