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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3c455e31
Commit
3c455e31
authored
Mar 19, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Produce an error when arguments are not compatible for CONCAT()
parent
f63218b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
sql/item.cc
sql/item.cc
+9
-7
sql/item_strfunc.cc
sql/item_strfunc.cc
+6
-2
No files found.
sql/item.cc
View file @
3c455e31
...
...
@@ -180,13 +180,10 @@ bool Item::set_charset(CHARSET_INFO *cs1, enum coercion co1,
set_charset
(
&
my_charset_bin
,
COER_NOCOLL
);
return
0
;
}
if
(
!
my_charset_same
(
cs1
,
cs2
))
{
set_charset
(
&
my_charset_bin
,
COER_NOCOLL
);
return
0
;
}
return
1
;
if
(
co1
<
co2
)
{
set_charset
(
cs1
,
co1
);
...
...
@@ -198,7 +195,12 @@ bool Item::set_charset(CHARSET_INFO *cs1, enum coercion co1,
else
// co2 == co1
{
if
(
cs1
!=
cs2
)
set_charset
(
&
my_charset_bin
,
COER_NOCOLL
);
{
CHARSET_INFO
*
bin
=
get_charset_by_csname
(
cs1
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
));
if
(
!
bin
)
return
1
;
set_charset
(
bin
,
COER_NOCOLL
);
}
else
set_charset
(
cs2
,
co2
);
}
...
...
sql/item_strfunc.cc
View file @
3c455e31
...
...
@@ -328,8 +328,12 @@ void Item_func_concat::fix_length_and_dec()
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
{
max_length
+=
args
[
i
]
->
max_length
;
set_charset
(
charset
(),
coercibility
,
args
[
i
]
->
charset
(),
args
[
i
]
->
coercibility
);
if
(
set_charset
(
charset
(),
coercibility
,
args
[
i
]
->
charset
(),
args
[
i
]
->
coercibility
))
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
func_name
());
break
;
}
}
if
(
max_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