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
cc7b3de9
Commit
cc7b3de9
authored
Feb 17, 2011
by
Vasil Dimov
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 from bk-internal into my local repo
parents
0bbaf6e8
65032267
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
2 deletions
+40
-2
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
+8
-0
sql/set_var.cc
sql/set_var.cc
+2
-2
sql/sql_string.h
sql/sql_string.h
+3
-0
No files found.
mysql-test/r/ctype_cp1250_ch.result
View file @
cc7b3de9
...
@@ -238,3 +238,6 @@ select a from t1 where a like "abcdefgh
...
@@ -238,3 +238,6 @@ select a from t1 where a like "abcdefgh
a
a
abcdefgh
abcdefgh
drop table t1;
drop table t1;
set global LC_MESSAGES=convert((@@global.log_bin_trust_function_creators)
using cp1250);
ERROR HY000: Unknown system variable 'LC_MESSAGES'
mysql-test/r/ctype_cp1251.result
View file @
cc7b3de9
...
@@ -375,6 +375,8 @@ FD FD FD D18D FD
...
@@ -375,6 +375,8 @@ FD FD FD D18D FD
FE FE FE D18E FE
FE FE FE D18E FE
FF FF FF D18F FF
FF FF FF D18F FF
DROP TABLE t1;
DROP TABLE t1;
set global LC_TIME_NAMES=convert((-8388608) using cp1251);
ERROR HY000: Unknown locale: '-8388608'
#
#
# End of 5.1 tests
# End of 5.1 tests
#
#
mysql-test/r/ctype_eucjpms.result
100755 → 100644
View file @
cc7b3de9
...
@@ -9859,3 +9859,5 @@ hex(convert(_eucjpms 0xA5FE41 using ucs2))
...
@@ -9859,3 +9859,5 @@ hex(convert(_eucjpms 0xA5FE41 using ucs2))
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
hex(convert(_eucjpms 0x8FABF841 using ucs2))
003F0041
003F0041
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
ERROR HY000: Unknown locale: 'c'
mysql-test/t/ctype_cp1250_ch.test
View file @
cc7b3de9
...
@@ -72,3 +72,13 @@ select a from t1 where a like "abcdefgh
...
@@ -72,3 +72,13 @@ select a from t1 where a like "abcdefgh
drop
table
t1
;
drop
table
t1
;
# End of 4.1 tests
# 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
1193
set
global
LC_MESSAGES
=
convert
((
@@
global
.
log_bin_trust_function_creators
)
using
cp1250
);
mysql-test/t/ctype_cp1251.test
View file @
cc7b3de9
...
@@ -55,6 +55,16 @@ drop table t1;
...
@@ -55,6 +55,16 @@ drop table t1;
--
source
include
/
ctype_8bit
.
inc
--
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
1105
set
global
LC_TIME_NAMES
=
convert
((
-
8388608
)
using
cp1251
);
--
echo
#
--
echo
#
--
echo
# End of 5.1 tests
--
echo
# End of 5.1 tests
--
echo
#
--
echo
#
mysql-test/t/ctype_eucjpms.test
View file @
cc7b3de9
...
@@ -381,3 +381,11 @@ select hex(convert(_eucjpms 0xA5FE41 using ucs2));
...
@@ -381,3 +381,11 @@ select hex(convert(_eucjpms 0xA5FE41 using ucs2));
# the next character, which is a single byte character 0x41.
# the next character, which is a single byte character 0x41.
select
hex
(
convert
(
_eucjpms
0x8FABF841
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
1105
set
global
LC_TIME_NAMES
=
convert
((
convert
((
0x63
)
using
eucjpms
))
using
utf8
);
sql/set_var.cc
View file @
cc7b3de9
...
@@ -1828,7 +1828,7 @@ bool sys_var::check_set(THD *thd, set_var *var, TYPELIB *enum_names)
...
@@ -1828,7 +1828,7 @@ bool sys_var::check_set(THD *thd, set_var *var, TYPELIB *enum_names)
}
}
var
->
save_result
.
ulong_value
=
((
ulong
)
var
->
save_result
.
ulong_value
=
((
ulong
)
find_set
(
enum_names
,
res
->
c_ptr
(),
find_set
(
enum_names
,
res
->
c_ptr
_safe
(),
res
->
length
(),
res
->
length
(),
NULL
,
NULL
,
&
error
,
&
error_len
,
&
error
,
&
error_len
,
...
@@ -2941,7 +2941,7 @@ bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var)
...
@@ -2941,7 +2941,7 @@ bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var)
my_error
(
ER_WRONG_VALUE_FOR_VAR
,
MYF
(
0
),
name
,
"NULL"
);
my_error
(
ER_WRONG_VALUE_FOR_VAR
,
MYF
(
0
),
name
,
"NULL"
);
return
1
;
return
1
;
}
}
const
char
*
locale_str
=
res
->
c_ptr
();
const
char
*
locale_str
=
res
->
c_ptr
_safe
();
if
(
!
(
locale_match
=
my_locale_by_name
(
locale_str
)))
if
(
!
(
locale_match
=
my_locale_by_name
(
locale_str
)))
{
{
my_printf_error
(
ER_UNKNOWN_ERROR
,
my_printf_error
(
ER_UNKNOWN_ERROR
,
...
...
sql/sql_string.h
View file @
cc7b3de9
...
@@ -106,6 +106,9 @@ public:
...
@@ -106,6 +106,9 @@ public:
inline
const
char
*
ptr
()
const
{
return
Ptr
;
}
inline
const
char
*
ptr
()
const
{
return
Ptr
;
}
inline
char
*
c_ptr
()
inline
char
*
c_ptr
()
{
{
DBUG_ASSERT
(
!
alloced
||
!
Ptr
||
!
Alloced_length
||
(
Alloced_length
>=
(
str_length
+
1
)));
if
(
!
Ptr
||
Ptr
[
str_length
])
/* Should be safe */
if
(
!
Ptr
||
Ptr
[
str_length
])
/* Should be safe */
(
void
)
realloc
(
str_length
);
(
void
)
realloc
(
str_length
);
return
Ptr
;
return
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