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
5d4881b8
Commit
5d4881b8
authored
Jul 12, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/18503-bug-4.1-mysql
parents
893e9276
8ffda481
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+15
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+14
-0
sql/sql_select.cc
sql/sql_select.cc
+5
-0
No files found.
mysql-test/r/subselect.result
View file @
5d4881b8
...
@@ -2835,3 +2835,18 @@ a
...
@@ -2835,3 +2835,18 @@ a
4
4
DROP TABLE t1,t2,t3;
DROP TABLE t1,t2,t3;
purge master logs before (select adddate(current_timestamp(), interval -4 day));
purge master logs before (select adddate(current_timestamp(), interval -4 day));
CREATE TABLE t1 (f1 INT);
CREATE TABLE t2 (f2 INT);
INSERT INTO t1 VALUES (1);
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2);
f1
1
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE 1=0);
f1
1
INSERT INTO t2 VALUES (1);
INSERT INTO t2 VALUES (2);
SELECT * FROM t1 WHERE f1 > ALL (SELECT f2 FROM t2 WHERE f2=0);
f1
1
DROP TABLE t1, t2;
mysql-test/t/subselect.test
View file @
5d4881b8
...
@@ -1820,4 +1820,18 @@ DROP TABLE t1,t2,t3;
...
@@ -1820,4 +1820,18 @@ DROP TABLE t1,t2,t3;
purge
master
logs
before
(
select
adddate
(
current_timestamp
(),
interval
-
4
day
));
purge
master
logs
before
(
select
adddate
(
current_timestamp
(),
interval
-
4
day
));
#
# Bug#18503: Queries with a quantified subquery returning empty set may
# return a wrong result.
#
CREATE
TABLE
t1
(
f1
INT
);
CREATE
TABLE
t2
(
f2
INT
);
INSERT
INTO
t1
VALUES
(
1
);
SELECT
*
FROM
t1
WHERE
f1
>
ALL
(
SELECT
f2
FROM
t2
);
SELECT
*
FROM
t1
WHERE
f1
>
ALL
(
SELECT
f2
FROM
t2
WHERE
1
=
0
);
INSERT
INTO
t2
VALUES
(
1
);
INSERT
INTO
t2
VALUES
(
2
);
SELECT
*
FROM
t1
WHERE
f1
>
ALL
(
SELECT
f2
FROM
t2
WHERE
f2
=
0
);
DROP
TABLE
t1
,
t2
;
# End of 4.1 tests
# End of 4.1 tests
sql/sql_select.cc
View file @
5d4881b8
...
@@ -6780,8 +6780,13 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
...
@@ -6780,8 +6780,13 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
{
{
if
(
!
join
->
first_record
)
if
(
!
join
->
first_record
)
{
{
List_iterator_fast
<
Item
>
it
(
*
join
->
fields
);
Item
*
item
;
/* No matching rows for group function */
/* No matching rows for group function */
join
->
clear
();
join
->
clear
();
while
((
item
=
it
++
))
item
->
no_rows_in_result
();
}
}
if
(
join
->
having
&&
join
->
having
->
val_int
()
==
0
)
if
(
join
->
having
&&
join
->
having
->
val_int
()
==
0
)
error
=
-
1
;
// Didn't satisfy having
error
=
-
1
;
// Didn't satisfy having
...
...
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