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
8b2be4e4
Commit
8b2be4e4
authored
Nov 27, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after-merge fix
parent
6339053d
Changes
3
Show 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 @
8b2be4e4
...
@@ -163,9 +163,9 @@ a
...
@@ -163,9 +163,9 @@ a
7
7
delete from t2 where a=100;
delete from t2 where a=100;
select * from t3 where a in (select a,b from t2);
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);
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);
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)
select b,max(a) as ma from t4 group by b having b < (select max(t2.a)
from t2 where t2.b=t4.b);
from t2 where t2.b=t4.b);
...
...
sql/item.cc
View file @
8b2be4e4
...
@@ -496,8 +496,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
...
@@ -496,8 +496,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
thd
->
fatal_error
=
1
;
// can't create Item => out of memory
thd
->
fatal_error
=
1
;
// can't create Item => out of memory
}
}
else
else
my_message
(
ER_SUBSELECT_NO_1_COL
,
ER
(
ER_SUBSELECT_NO_1_COL
),
my_error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
MYF
(
0
));
}
}
else
else
if
(
!
fitem
->
table_name
)
if
(
!
fitem
->
table_name
)
...
@@ -506,8 +505,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
...
@@ -506,8 +505,7 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
fitem
->
table_name
);
my_error
(
ER_BAD_TABLE_ERROR
,
MYF
(
0
),
fitem
->
table_name
);
}
}
else
else
my_message
(
ER_SUBSELECT_NO_1_COL
,
ER
(
ER_SUBSELECT_NO_1_COL
),
my_error
(
ER_CARDINALITY_COL
,
MYF
(
0
),
1
);
MYF
(
0
));
}
}
else
else
res
=
item
->
fix_fields
(
thd
,
list
,
&
item
);
res
=
item
->
fix_fields
(
thd
,
list
,
&
item
);
...
...
sql/item_subselect.cc
View file @
8b2be4e4
...
@@ -285,7 +285,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
...
@@ -285,7 +285,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
Item
*
item
;
Item
*
item
;
if
(
sl
->
item_list
.
elements
>
1
)
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
item
=
0
;
// Item_asterisk_remover must fail
}
}
else
else
...
@@ -297,7 +297,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
...
@@ -297,7 +297,7 @@ void Item_in_subselect::single_value_transformer(st_select_lex *select_lex,
{
{
sl
->
item_list
.
push_back
(
item
);
sl
->
item_list
.
push_back
(
item
);
item
=
(
*
func
)(
left_expr
,
new
Item_ref
(
sl
->
item_list
.
head_ref
(),
item
=
(
*
func
)(
left_expr
,
new
Item_ref
(
sl
->
item_list
.
head_ref
(),
0
,
"<result>"
));
0
,
(
char
*
)
"<result>"
));
if
(
sl
->
having
)
if
(
sl
->
having
)
sl
->
having
=
new
Item_cond_and
(
sl
->
having
,
item
);
sl
->
having
=
new
Item_cond_and
(
sl
->
having
,
item
);
else
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