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
c358e322
Commit
c358e322
authored
Sep 20, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into rurik.mysql.com:/home/igor/mysql-5.0-opt
parents
ea3dfa4a
1b5bd18d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+9
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+15
-0
sql/filesort.cc
sql/filesort.cc
+1
-0
No files found.
mysql-test/r/func_gconcat.result
View file @
c358e322
...
@@ -654,3 +654,12 @@ CHAR_LENGTH( GROUP_CONCAT(b) )
...
@@ -654,3 +654,12 @@ CHAR_LENGTH( GROUP_CONCAT(b) )
240001
240001
SET GROUP_CONCAT_MAX_LEN = 1024;
SET GROUP_CONCAT_MAX_LEN = 1024;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,1), (1,2), (2,2), (1,3);
SELECT GROUP_CONCAT(a), x
FROM (SELECT a, GROUP_CONCAT(b) x FROM t1 GROUP BY a) AS s
GROUP BY x;
GROUP_CONCAT(a) x
2 1,2
1 2,3
DROP TABLE t1;
mysql-test/t/func_gconcat.test
View file @
c358e322
...
@@ -447,3 +447,18 @@ SELECT a, CHAR_LENGTH(b) FROM t1;
...
@@ -447,3 +447,18 @@ SELECT a, CHAR_LENGTH(b) FROM t1;
SELECT
CHAR_LENGTH
(
GROUP_CONCAT
(
b
)
)
FROM
t1
;
SELECT
CHAR_LENGTH
(
GROUP_CONCAT
(
b
)
)
FROM
t1
;
SET
GROUP_CONCAT_MAX_LEN
=
1024
;
SET
GROUP_CONCAT_MAX_LEN
=
1024
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #22015: crash with GROUP_CONCAT over a derived table that
# returns the results of aggregation by GROUP_CONCAT
#
CREATE
TABLE
t1
(
a
int
,
b
int
);
INSERT
INTO
t1
VALUES
(
2
,
1
),
(
1
,
2
),
(
2
,
2
),
(
1
,
3
);
SELECT
GROUP_CONCAT
(
a
),
x
FROM
(
SELECT
a
,
GROUP_CONCAT
(
b
)
x
FROM
t1
GROUP
BY
a
)
AS
s
GROUP
BY
x
;
DROP
TABLE
t1
;
sql/filesort.cc
View file @
c358e322
...
@@ -1268,6 +1268,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
...
@@ -1268,6 +1268,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
switch
((
sortorder
->
result_type
=
sortorder
->
item
->
result_type
()))
{
switch
((
sortorder
->
result_type
=
sortorder
->
item
->
result_type
()))
{
case
STRING_RESULT
:
case
STRING_RESULT
:
sortorder
->
length
=
sortorder
->
item
->
max_length
;
sortorder
->
length
=
sortorder
->
item
->
max_length
;
set_if_smaller
(
sortorder
->
length
,
thd
->
variables
.
max_sort_length
);
if
(
use_strnxfrm
((
cs
=
sortorder
->
item
->
collation
.
collation
)))
if
(
use_strnxfrm
((
cs
=
sortorder
->
item
->
collation
.
collation
)))
{
{
sortorder
->
length
=
cs
->
coll
->
strnxfrmlen
(
cs
,
sortorder
->
length
);
sortorder
->
length
=
cs
->
coll
->
strnxfrmlen
(
cs
,
sortorder
->
length
);
...
...
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