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
d8263089
Commit
d8263089
authored
Apr 04, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge new tests
mysql-test/r/join_outer.result: Update results mysql-test/t/join_outer.test: Merge
parents
fdb5f6c7
da6b7e90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
9 deletions
+44
-9
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+19
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+10
-1
sql/item_sum.cc
sql/item_sum.cc
+15
-8
No files found.
mysql-test/r/join_outer.result
View file @
d8263089
...
...
@@ -864,3 +864,22 @@ a b a b
3 1 NULL NULL
4 2 NULL NULL
DROP TABLE t1,t2;
set group_concat_max_len=5;
create table t1 (a int, b varchar(20));
create table t2 (a int, c varchar(20));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
drop table t1, t2;
set group_concat_max_len=default;
mysql-test/t/join_outer.test
View file @
d8263089
...
...
@@ -614,4 +614,13 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1));
DROP
TABLE
t1
,
t2
;
# Bug #8681: Bad warning message when group_concat() exceeds max length
set
group_concat_max_len
=
5
;
create
table
t1
(
a
int
,
b
varchar
(
20
));
create
table
t2
(
a
int
,
c
varchar
(
20
));
insert
into
t1
values
(
1
,
"aaaaaaaaaa"
),(
2
,
"bbbbbbbbbb"
);
insert
into
t2
values
(
1
,
"cccccccccc"
),(
2
,
"dddddddddd"
);
select
group_concat
(
t1
.
b
,
t2
.
c
)
from
t1
left
join
t2
using
(
a
)
group
by
t1
.
a
;
select
group_concat
(
t1
.
b
,
t2
.
c
)
from
t1
inner
join
t2
using
(
a
)
group
by
t1
.
a
;
drop
table
t1
,
t2
;
set
group_concat_max_len
=
default
;
sql/item_sum.cc
View file @
d8263089
...
...
@@ -1787,16 +1787,26 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
void
Item_func_group_concat
::
cleanup
()
{
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"Item_func_group_concat::cleanup"
);
Item_sum
::
cleanup
();
/* Adjust warning message to include total number of cut values */
if
(
warning
)
{
char
warn_buff
[
MYSQL_ERRMSG_SIZE
];
sprintf
(
warn_buff
,
ER
(
ER_CUT_VALUE_GROUP_CONCAT
),
count_cut_values
);
warning
->
set_msg
(
thd
,
warn_buff
);
warning
=
0
;
}
/*
Free table and tree if they belong to this item (if item have not pointer
to original item from which was made copy => it own its objects )
*/
if
(
!
original
)
{
THD
*
thd
=
current_thd
;
if
(
table
)
{
free_tmp_table
(
thd
,
table
);
...
...
@@ -1809,13 +1819,6 @@ void Item_func_group_concat::cleanup()
tree_mode
=
0
;
delete_tree
(
tree
);
}
if
(
warning
)
{
char
warn_buff
[
MYSQL_ERRMSG_SIZE
];
sprintf
(
warn_buff
,
ER
(
ER_CUT_VALUE_GROUP_CONCAT
),
count_cut_values
);
warning
->
set_msg
(
thd
,
warn_buff
);
warning
=
0
;
}
}
DBUG_VOID_RETURN
;
}
...
...
@@ -2076,6 +2079,10 @@ String* Item_func_group_concat::val_str(String* str)
if
(
null_value
)
return
0
;
if
(
count_cut_values
&&
!
warning
)
/*
ER_CUT_VALUE_GROUP_CONCAT needs an argument, but this gets set in
Item_func_group_concat::cleanup().
*/
warning
=
push_warning
(
item_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_CUT_VALUE_GROUP_CONCAT
,
ER
(
ER_CUT_VALUE_GROUP_CONCAT
));
...
...
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