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
043da83a
Commit
043da83a
authored
Jun 14, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
parents
5bd49663
4c3108fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
mysql-test/r/func_concat.result
mysql-test/r/func_concat.result
+7
-0
mysql-test/t/func_concat.test
mysql-test/t/func_concat.test
+8
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+8
-1
No files found.
mysql-test/r/func_concat.result
View file @
043da83a
...
...
@@ -68,3 +68,10 @@ select 'a' union select concat('a', -0.0000);
a
a
a0.0000
create table t1(f1 varchar(6)) charset=utf8;
insert into t1 values ("123456");
select concat(f1, 2) a from t1 union select 'x' a from t1;
a
1234562
x
drop table t1;
mysql-test/t/func_concat.test
View file @
043da83a
...
...
@@ -53,3 +53,11 @@ select 'a' union select concat('a', -0.0);
select
'a'
union
select
concat
(
'a'
,
-
0.0000
);
# End of 4.1 tests
#
# Bug#15962: CONCAT() in UNION may lead to a data trucation.
#
create
table
t1
(
f1
varchar
(
6
))
charset
=
utf8
;
insert
into
t1
values
(
"123456"
);
select
concat
(
f1
,
2
)
a
from
t1
union
select
'x'
a
from
t1
;
drop
table
t1
;
sql/item_strfunc.cc
View file @
043da83a
...
...
@@ -389,7 +389,14 @@ void Item_func_concat::fix_length_and_dec()
return
;
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
max_result_length
+=
args
[
i
]
->
max_length
;
{
if
(
args
[
i
]
->
collation
.
collation
->
mbmaxlen
!=
collation
.
collation
->
mbmaxlen
)
max_result_length
+=
(
args
[
i
]
->
max_length
/
args
[
i
]
->
collation
.
collation
->
mbmaxlen
)
*
collation
.
collation
->
mbmaxlen
;
else
max_result_length
+=
args
[
i
]
->
max_length
;
}
if
(
max_result_length
>=
MAX_BLOB_WIDTH
)
{
...
...
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