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
54735ae3
Commit
54735ae3
authored
Mar 19, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #3087 CONCAT_WS makes the server die in case of illegal mix of collations
parent
8bbb6d2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+2
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+2
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-0
No files found.
mysql-test/r/func_str.result
View file @
54735ae3
...
...
@@ -339,6 +339,8 @@ select concat(_latin1'a',_latin2'a',_latin5'a');
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin5_turkish_ci,COERCIBLE) for operation 'concat'
select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a');
ERROR HY000: Illegal mix of collations for operation 'concat'
select concat_ws(_latin1'a',_latin2'a');
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat_ws'
select FIELD('b','A','B');
FIELD('b','A','B')
2
...
...
mysql-test/t/func_str.test
View file @
54735ae3
...
...
@@ -195,6 +195,8 @@ select concat(_latin1'a',_latin2'a');
select
concat
(
_latin1
'a'
,
_latin2
'a'
,
_latin5
'a'
);
--
error
1271
select
concat
(
_latin1
'a'
,
_latin2
'a'
,
_latin5
'a'
,
_latin7
'a'
);
--
error
1267
select
concat_ws
(
_latin1
'a'
,
_latin2
'a'
);
#
# Test FIELD() and collations
...
...
sql/item_strfunc.cc
View file @
54735ae3
...
...
@@ -628,9 +628,11 @@ void Item_func_concat_ws::fix_length_and_dec()
max_length
=
separator
->
max_length
*
(
arg_count
-
1
);
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
{
DTCollation
tmp
(
collation
.
collation
,
collation
.
derivation
);
max_length
+=
args
[
i
]
->
max_length
;
if
(
collation
.
aggregate
(
args
[
i
]
->
collation
))
{
collation
.
set
(
tmp
);
// Restore the previous value
my_coll_agg_error
(
collation
,
args
[
i
]
->
collation
,
func_name
());
break
;
}
...
...
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