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
b627c681
Commit
b627c681
authored
Jan 17, 2011
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merging from 5.1.
parents
43558466
18e4f23a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
9 deletions
+34
-9
mysql-test/r/ctype_many.result
mysql-test/r/ctype_many.result
+15
-0
mysql-test/t/ctype_many.test
mysql-test/t/ctype_many.test
+15
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+3
-9
sql/item_strfunc.h
sql/item_strfunc.h
+1
-0
No files found.
mysql-test/r/ctype_many.result
View file @
b627c681
No preview for this file type
mysql-test/t/ctype_many.test
View file @
b627c681
...
...
@@ -216,6 +216,21 @@ DROP TABLE t1;
# End of 4.1 tests
--
echo
#
--
echo
# Start of 5.1 tests
--
echo
#
--
echo
#
--
echo
# Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
--
echo
#
SET
NAMES
latin1
;
DO
CONVERT
(
CAST
(
SUBSTRING_INDEX
(
FORMAT
(
1
,
'1111'
),
FORMAT
(
''
,
'Zpq'
),
1
)
AS
BINARY
(
0
))
USING
utf8
);
--
echo
#
--
echo
# End of 5.1 tests
--
echo
#
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
...
...
sql/item_strfunc.cc
View file @
b627c681
...
...
@@ -2959,22 +2959,16 @@ String *Item_func_conv_charset::val_str(String *str)
DBUG_ASSERT
(
fixed
==
1
);
if
(
use_cached_value
)
return
null_value
?
0
:
&
str_value
;
/*
Here we don't pass 'str' as a parameter to args[0]->val_str()
as 'str' may point to 'str_value' (e.g. see Item::save_in_field()),
which we use below to convert string.
Use argument's 'str_value' instead.
*/
String
*
arg
=
args
[
0
]
->
val_str
(
&
args
[
0
]
->
str_value
);
String
*
arg
=
args
[
0
]
->
val_str
(
str
);
uint
dummy_errors
;
if
(
!
arg
)
{
null_value
=
1
;
return
0
;
}
null_value
=
str_value
.
copy
(
arg
->
ptr
(),
arg
->
length
(),
arg
->
charset
(),
null_value
=
tmp_value
.
copy
(
arg
->
ptr
(),
arg
->
length
(),
arg
->
charset
(),
conv_charset
,
&
dummy_errors
);
return
null_value
?
0
:
check_well_formed_result
(
&
str
_value
);
return
null_value
?
0
:
check_well_formed_result
(
&
tmp
_value
);
}
void
Item_func_conv_charset
::
fix_length_and_dec
()
...
...
sql/item_strfunc.h
View file @
b627c681
...
...
@@ -791,6 +791,7 @@ class Item_func_quote :public Item_str_func
class
Item_func_conv_charset
:
public
Item_str_func
{
bool
use_cached_value
;
String
tmp_value
;
public:
bool
safe
;
CHARSET_INFO
*
conv_charset
;
// keep it public
...
...
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