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
2a87e83d
Commit
2a87e83d
authored
Feb 17, 2011
by
Magne Mahre
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.1
parents
7ea3f6d4
a03af18e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
1 deletion
+41
-1
mysql-test/r/ctype_cp1250_ch.result
mysql-test/r/ctype_cp1250_ch.result
+3
-0
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+2
-0
mysql-test/r/ctype_eucjpms.result
mysql-test/r/ctype_eucjpms.result
+2
-0
mysql-test/t/ctype_cp1250_ch.test
mysql-test/t/ctype_cp1250_ch.test
+10
-0
mysql-test/t/ctype_cp1251.test
mysql-test/t/ctype_cp1251.test
+10
-0
mysql-test/t/ctype_eucjpms.test
mysql-test/t/ctype_eucjpms.test
+10
-0
sql/sql_string.h
sql/sql_string.h
+3
-0
sql/sys_vars.cc
sql/sys_vars.cc
+1
-1
No files found.
mysql-test/r/ctype_cp1250_ch.result
View file @
2a87e83d
...
...
@@ -238,3 +238,6 @@ select a from t1 where a like "abcdefgh
a
abcdefgh
drop table t1;
set global LC_MESSAGES=convert((@@global.log_bin_trust_function_creators)
using cp1250);
ERROR HY000: Unknown locale: '1'
mysql-test/r/ctype_cp1251.result
View file @
2a87e83d
...
...
@@ -386,6 +386,8 @@ FD FD FD D18D FD
FE FE FE D18E FE
FF FF FF D18F FF
DROP TABLE t1;
set global LC_TIME_NAMES=convert((-8388608) using cp1251);
ERROR HY000: Unknown locale: '-8388608'
#
# End of 5.1 tests
#
...
...
mysql-test/r/ctype_eucjpms.result
View file @
2a87e83d
...
...
@@ -9859,6 +9859,8 @@ hex(convert(_eucjpms 0xA5FE41 using ucs2))
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
003F0041
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
ERROR HY000: Unknown locale: 'c'
#
# Start of 5.5 tests
#
...
...
mysql-test/t/ctype_cp1250_ch.test
View file @
2a87e83d
...
...
@@ -72,3 +72,13 @@ select a from t1 where a like "abcdefgh
drop
table
t1
;
# End of 4.1 tests
#
# Bug #48053 String::c_ptr has a race and/or does an invalid
# memory reference
# (triggered by Valgrind tests)
# (see also ctype_eucjpms.test, ctype_cp1250.test, ctype_cp1251.test)
#
--
error
1649
set
global
LC_MESSAGES
=
convert
((
@@
global
.
log_bin_trust_function_creators
)
using
cp1250
);
mysql-test/t/ctype_cp1251.test
View file @
2a87e83d
...
...
@@ -65,6 +65,16 @@ DROP TABLE t1;
--
source
include
/
ctype_8bit
.
inc
#
# Bug #48053 String::c_ptr has a race and/or does an invalid
# memory reference
# (triggered by Valgrind tests)
# (see also ctype_eucjpms.test, ctype_cp1250.test, ctype_cp1251.test)
#
--
error
1649
set
global
LC_TIME_NAMES
=
convert
((
-
8388608
)
using
cp1251
);
--
echo
#
--
echo
# End of 5.1 tests
--
echo
#
...
...
mysql-test/t/ctype_eucjpms.test
View file @
2a87e83d
...
...
@@ -382,6 +382,16 @@ select hex(convert(_eucjpms 0xA5FE41 using ucs2));
select
hex
(
convert
(
_eucjpms
0x8FABF841
using
ucs2
));
#
# Bug #48053 String::c_ptr has a race and/or does an invalid
# memory reference
# (triggered by Valgrind tests)
# (see also ctype_eucjpms.test, ctype_cp1250.test, ctype_cp1251.test)
#
--
error
1649
set
global
LC_TIME_NAMES
=
convert
((
convert
((
0x63
)
using
eucjpms
))
using
utf8
);
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
...
...
sql/sql_string.h
View file @
2a87e83d
...
...
@@ -113,6 +113,9 @@ class String
inline
const
char
*
ptr
()
const
{
return
Ptr
;
}
inline
char
*
c_ptr
()
{
DBUG_ASSERT
(
!
alloced
||
!
Ptr
||
!
Alloced_length
||
(
Alloced_length
>=
(
str_length
+
1
)));
if
(
!
Ptr
||
Ptr
[
str_length
])
/* Should be safe */
(
void
)
realloc
(
str_length
);
return
Ptr
;
...
...
sql/sys_vars.cc
View file @
2a87e83d
...
...
@@ -3082,7 +3082,7 @@ static bool check_locale(sys_var *self, THD *thd, set_var *var)
String
str
(
buff
,
sizeof
(
buff
),
system_charset_info
),
*
res
;
if
(
!
(
res
=
var
->
value
->
val_str
(
&
str
)))
return
true
;
else
if
(
!
(
locale
=
my_locale_by_name
(
res
->
c_ptr
())))
else
if
(
!
(
locale
=
my_locale_by_name
(
res
->
c_ptr
_safe
())))
{
ErrConvString
err
(
res
);
my_error
(
ER_UNKNOWN_LOCALE
,
MYF
(
0
),
err
.
ptr
());
...
...
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