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
2c7948dc
Commit
2c7948dc
authored
Oct 13, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-group_concat-4.1
parents
1862f671
6159df3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+11
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+8
-1
sql/item_sum.cc
sql/item_sum.cc
+2
-2
No files found.
mysql-test/r/func_gconcat.result
View file @
2c7948dc
...
...
@@ -196,3 +196,14 @@ insert into t1 values('test'),('test2');
select * from t1 having group_concat(bar)='';
bar
drop table t1;
create table t1 (a int, a1 varchar(10));
create table t2 (a0 int);
insert into t1 values (0,"a"),(0,"b"),(1,"c");
insert into t2 values (1),(2),(3);
select group_concat(a1 order by (t1.a IN (select a0 from t2))) from t1;
group_concat(a1 order by (t1.a IN (select a0 from t2)))
b,a,c
select group_concat(a1 order by (t1.a)) from t1;
group_concat(a1 order by (t1.a))
b,a,c
drop table t1, t2;
mysql-test/t/func_gconcat.test
View file @
2c7948dc
...
...
@@ -119,4 +119,11 @@ insert into t1 values('test'),('test2');
select
*
from
t1
having
group_concat
(
bar
)
=
''
;
drop
table
t1
;
# ORDER BY fix_fields()
create
table
t1
(
a
int
,
a1
varchar
(
10
));
create
table
t2
(
a0
int
);
insert
into
t1
values
(
0
,
"a"
),(
0
,
"b"
),(
1
,
"c"
);
insert
into
t2
values
(
1
),(
2
),(
3
);
select
group_concat
(
a1
order
by
(
t1
.
a
IN
(
select
a0
from
t2
)))
from
t1
;
select
group_concat
(
a1
order
by
(
t1
.
a
))
from
t1
;
drop
table
t1
,
t2
;
\ No newline at end of file
sql/item_sum.cc
View file @
2c7948dc
...
...
@@ -1773,8 +1773,8 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
for
(
i
=
0
;
i
<
arg_count_order
;
i
++
)
{
ORDER
*
order_item
=
order
[
i
];
Item
*
item
=*
order_item
->
item
;
if
(
item
->
fix_fields
(
thd
,
tables
,
&
item
)
||
item
->
check_cols
(
1
))
if
((
*
order_item
->
item
)
->
fix_fields
(
thd
,
tables
,
order_item
->
item
)
||
(
*
order_item
->
item
)
->
check_cols
(
1
))
return
1
;
}
result_field
=
0
;
...
...
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