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
b15d3377
Commit
b15d3377
authored
Nov 03, 2009
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved test case for bug 31157 from query_cache.test to subselect.test
parent
a9ce3864
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletion
+33
-1
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+2
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+14
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+2
-1
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+15
-0
No files found.
mysql-test/r/query_cache.result
View file @
b15d3377
...
@@ -1708,6 +1708,7 @@ Qcache_hits 2
...
@@ -1708,6 +1708,7 @@ Qcache_hits 2
DROP TABLE t1;
DROP TABLE t1;
SET GLOBAL query_cache_size= default;
SET GLOBAL query_cache_size= default;
End of 5.0 tests
End of 5.0 tests
SET GLOBAL query_cache_size=1024*1024*512;
CREATE TABLE t1 (a ENUM('rainbow'));
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();
INSERT INTO t1 VALUES (),(),(),(),();
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
...
@@ -1722,4 +1723,5 @@ SELECT 1 FROM t1 GROUP BY
...
@@ -1722,4 +1723,5 @@ SELECT 1 FROM t1 GROUP BY
1
1
1
1
DROP TABLE t1;
DROP TABLE t1;
SET GLOBAL query_cache_size= default;
End of 5.1 tests
End of 5.1 tests
mysql-test/r/subselect.result
View file @
b15d3377
...
@@ -4563,4 +4563,18 @@ id g v s
...
@@ -4563,4 +4563,18 @@ id g v s
51 50 NULL l
51 50 NULL l
61 60 NULL l
61 60 NULL l
drop table t1, t2;
drop table t1, t2;
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();
SELECT 1 FROM t1 GROUP BY (SELECT 1 FROM t1 ORDER BY AVG(LAST_INSERT_ID()));
1
1
DROP TABLE t1;
CREATE TABLE t1 (a LONGBLOB);
INSERT INTO t1 SET a = 'aaaa';
INSERT INTO t1 SET a = 'aaaa';
SELECT 1 FROM t1 GROUP BY
(SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1);
1
1
DROP TABLE t1;
End of 5.1 tests.
End of 5.1 tests.
mysql-test/t/query_cache.test
View file @
b15d3377
...
@@ -1294,7 +1294,7 @@ SET GLOBAL query_cache_size= default;
...
@@ -1294,7 +1294,7 @@ SET GLOBAL query_cache_size= default;
# Bug #31157: Crash when select+order by the avg of some field within the
# Bug #31157: Crash when select+order by the avg of some field within the
# group by
# group by
#
#
SET
GLOBAL
query_cache_size
=
1024
*
1024
*
512
;
CREATE
TABLE
t1
(
a
ENUM
(
'rainbow'
));
CREATE
TABLE
t1
(
a
ENUM
(
'rainbow'
));
INSERT
INTO
t1
VALUES
(),(),(),(),();
INSERT
INTO
t1
VALUES
(),(),(),(),();
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
1
FROM
t1
ORDER
BY
AVG
(
LAST_INSERT_ID
()));
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
1
FROM
t1
ORDER
BY
AVG
(
LAST_INSERT_ID
()));
...
@@ -1305,6 +1305,7 @@ INSERT INTO t1 SET a = 'aaaa';
...
@@ -1305,6 +1305,7 @@ INSERT INTO t1 SET a = 'aaaa';
SELECT
1
FROM
t1
GROUP
BY
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
LAST_INSERT_ID
()
FROM
t1
ORDER
BY
MIN
(
a
)
ASC
LIMIT
1
);
(
SELECT
LAST_INSERT_ID
()
FROM
t1
ORDER
BY
MIN
(
a
)
ASC
LIMIT
1
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
SET
GLOBAL
query_cache_size
=
default
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
mysql-test/t/subselect.test
View file @
b15d3377
...
@@ -3544,4 +3544,19 @@ where v in(select v
...
@@ -3544,4 +3544,19 @@ where v in(select v
where
t1
.
g
=
t2
.
g
)
is
unknown
;
where
t1
.
g
=
t2
.
g
)
is
unknown
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Bug #31157: Crash when select+order by the avg of some field within the
# group by
#
CREATE
TABLE
t1
(
a
ENUM
(
'rainbow'
));
INSERT
INTO
t1
VALUES
(),(),(),(),();
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
1
FROM
t1
ORDER
BY
AVG
(
LAST_INSERT_ID
()));
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
LONGBLOB
);
INSERT
INTO
t1
SET
a
=
'aaaa'
;
INSERT
INTO
t1
SET
a
=
'aaaa'
;
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
LAST_INSERT_ID
()
FROM
t1
ORDER
BY
MIN
(
a
)
ASC
LIMIT
1
);
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
.
--
echo
End
of
5.1
tests
.
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