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
9a7a47c2
Commit
9a7a47c2
authored
Jan 19, 2005
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/dbdata/psergey/mysql-4.1-bug7885
into mysql.com:/dbdata/psergey/mysql-5.0-bug7885
parents
c449637c
b1c3e430
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+8
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+11
-0
sql/item_subselect.cc
sql/item_subselect.cc
+2
-1
No files found.
mysql-test/r/subselect.result
View file @
9a7a47c2
...
@@ -2160,3 +2160,11 @@ WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000);
...
@@ -2160,3 +2160,11 @@ WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000);
f1
f1
NULL
NULL
1
1
drop table t1,t2;
create table t1 (a1 int);
create table t2 (b1 int);
select * from t1 where a2 > any(select b1 from t2);
ERROR 42S22: Unknown column 'a2' in 'scalar IN/ALL/ANY subquery'
select * from t1 where a1 > any(select b1 from t2);
a1
drop table t1,t2;
mysql-test/t/subselect.test
View file @
9a7a47c2
...
@@ -1417,3 +1417,14 @@ SELECT f1 FROM t1
...
@@ -1417,3 +1417,14 @@ SELECT f1 FROM t1
SELECT
f1
FROM
t1
SELECT
f1
FROM
t1
WHERE
f1
<>
ALL
(
SELECT
SUM
(
f1
)
AS
sf1
FROM
t2
HAVING
sf1
>
10000
);
WHERE
f1
<>
ALL
(
SELECT
SUM
(
f1
)
AS
sf1
FROM
t2
HAVING
sf1
>
10000
);
drop
table
t1
,
t2
;
# Test for BUG#7885: Server crash when 'any' subselect compared to
# non-existant field.
create
table
t1
(
a1
int
);
create
table
t2
(
b1
int
);
--
error
1054
select
*
from
t1
where
a2
>
any
(
select
b1
from
t2
);
select
*
from
t1
where
a1
>
any
(
select
b1
from
t2
);
drop
table
t1
,
t2
;
sql/item_subselect.cc
View file @
9a7a47c2
...
@@ -177,6 +177,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
...
@@ -177,6 +177,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
}
}
fix_length_and_dec
();
fix_length_and_dec
();
}
}
else
return
1
;
uint8
uncacheable
=
engine
->
uncacheable
();
uint8
uncacheable
=
engine
->
uncacheable
();
if
(
uncacheable
)
if
(
uncacheable
)
{
{
...
@@ -264,7 +266,6 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex)
...
@@ -264,7 +266,6 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex)
{
{
DBUG_ENTER
(
"Item_singlerow_subselect::Item_singlerow_subselect"
);
DBUG_ENTER
(
"Item_singlerow_subselect::Item_singlerow_subselect"
);
init
(
select_lex
,
new
select_singlerow_subselect
(
this
));
init
(
select_lex
,
new
select_singlerow_subselect
(
this
));
max_columns
=
1
;
maybe_null
=
1
;
maybe_null
=
1
;
max_columns
=
UINT_MAX
;
max_columns
=
UINT_MAX
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
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