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
ae08913e
Commit
ae08913e
authored
Dec 21, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0
parents
52d080f0
5db116af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
mysql-test/r/derived.result
mysql-test/r/derived.result
+5
-0
mysql-test/t/derived.test
mysql-test/t/derived.test
+13
-0
No files found.
mysql-test/r/derived.result
View file @
ae08913e
...
...
@@ -330,3 +330,8 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA
min max avg
10.00 10.00 10
DROP TABLE t1;
CREATE TABLE t1 (a char(10), b char(10));
INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
mysql-test/t/derived.test
View file @
ae08913e
...
...
@@ -214,3 +214,16 @@ CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) N
insert
into
t1
values
(
128
,
'rozn'
,
2
,
now
(),
10
),(
128
,
'rozn'
,
1
,
now
(),
10
);
SELECT
MIN
(
price
)
min
,
MAX
(
price
)
max
,
AVG
(
price
)
avg
FROM
(
SELECT
SUBSTRING
(
MAX
(
concat
(
date_
,
";"
,
price
)),
12
)
price
FROM
t1
WHERE
itemid
=
128
AND
grpid
=
'rozn'
GROUP
BY
itemid
,
grpid
,
vendor
)
lastprices
;
DROP
TABLE
t1
;
#
# Test for bug #7413 "Subquery with non-scalar results participating in
# select list of derived table crashes server" aka "VIEW with sub query can
# cause the MySQL server to crash". If we have encountered problem during
# filling of derived table we should report error and perform cleanup
# properly.
#
CREATE
TABLE
t1
(
a
char
(
10
),
b
char
(
10
));
INSERT
INTO
t1
VALUES
(
'root'
,
'localhost'
),
(
'root'
,
'%'
);
--
error
1242
SELECT
*
FROM
(
SELECT
(
SELECT
a
.
a
FROM
t1
AS
a
WHERE
a
.
a
=
b
.
a
)
FROM
t1
AS
b
)
AS
c
;
DROP
TABLE
t1
;
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