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
95acd426
Commit
95acd426
authored
Oct 30, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B31884-5.0-opt
parents
9e6bb07d
6bbdacae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+11
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+15
-0
sql/item_subselect.h
sql/item_subselect.h
+1
-0
No files found.
mysql-test/r/subselect.result
View file @
95acd426
...
...
@@ -4139,4 +4139,15 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
3
DROP TABLE t1,t2;
CREATE TABLE t1 (a1 INT, a2 INT);
CREATE TABLE t2 (b1 INT, b2 INT);
INSERT INTO t1 VALUES (100, 200);
INSERT INTO t1 VALUES (101, 201);
INSERT INTO t2 VALUES (101, 201);
INSERT INTO t2 VALUES (103, 203);
SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL
0
0
DROP TABLE t1, t2;
End of 5.0 tests.
mysql-test/t/subselect.test
View file @
95acd426
...
...
@@ -2987,4 +2987,19 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1;
SELECT
(
SELECT
SUM
(
t1
.
a
)
FROM
t2
WHERE
a
=
1
)
FROM
t1
;
DROP
TABLE
t1
,
t2
;
#
# Bug #31884: Assertion + crash in subquery in the SELECT clause.
#
CREATE
TABLE
t1
(
a1
INT
,
a2
INT
);
CREATE
TABLE
t2
(
b1
INT
,
b2
INT
);
INSERT
INTO
t1
VALUES
(
100
,
200
);
INSERT
INTO
t1
VALUES
(
101
,
201
);
INSERT
INTO
t2
VALUES
(
101
,
201
);
INSERT
INTO
t2
VALUES
(
103
,
203
);
SELECT
((
a1
,
a2
)
IN
(
SELECT
*
FROM
t2
WHERE
b2
>
0
))
IS
NULL
FROM
t1
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
.
sql/item_subselect.h
View file @
95acd426
...
...
@@ -306,6 +306,7 @@ public:
double
val_real
();
String
*
val_str
(
String
*
);
my_decimal
*
val_decimal
(
my_decimal
*
);
void
update_null_value
()
{
(
void
)
val_bool
();
}
bool
val_bool
();
void
top_level_item
()
{
abort_on_null
=
1
;
}
inline
bool
is_top_level_item
()
{
return
abort_on_null
;
}
...
...
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