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
b30570be
Commit
b30570be
authored
Sep 08, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-bug-grp
parents
a022b3c5
c8422dfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+9
-0
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+9
-0
sql/item_sum.cc
sql/item_sum.cc
+2
-0
No files found.
mysql-test/r/group_by.result
View file @
b30570be
...
...
@@ -629,3 +629,12 @@ explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort
DROP TABLE t1;
create table t1 ( col1 int, col2 int );
insert into t1 values (1,1),(1,2),(1,3),(2,1),(2,2);
select group_concat( distinct col1 ) as alias from t1
group by col2 having alias like '%';
alias
1,2
1,2
1
drop table t1;
mysql-test/t/group_by.test
View file @
b30570be
...
...
@@ -456,3 +456,12 @@ INSERT INTO t1 VALUES (1,2),(2,3),(4,5),(3,5),(1,5),(23,5);
SELECT
i
,
COUNT
(
DISTINCT
(
i
))
FROM
t1
GROUP
BY
j
ORDER
BY
NULL
;
explain
SELECT
i
,
COUNT
(
DISTINCT
(
i
))
FROM
t1
GROUP
BY
j
ORDER
BY
NULL
;
DROP
TABLE
t1
;
# Test for BUG#5400: GROUP_CONCAT returns everything twice.
create
table
t1
(
col1
int
,
col2
int
);
insert
into
t1
values
(
1
,
1
),(
1
,
2
),(
1
,
3
),(
2
,
1
),(
2
,
2
);
select
group_concat
(
distinct
col1
)
as
alias
from
t1
group
by
col2
having
alias
like
'%'
;
drop
table
t1
;
sql/item_sum.cc
View file @
b30570be
...
...
@@ -2121,6 +2121,8 @@ String* Item_func_group_concat::val_str(String* str)
DBUG_ASSERT
(
fixed
==
1
);
if
(
null_value
)
return
0
;
if
(
result
.
length
())
return
&
result
;
if
(
tree_mode
)
{
tree_walk
(
tree
,
(
tree_walk_action
)
&
dump_leaf_key
,
(
void
*
)
this
,
...
...
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