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
ec68494b
Commit
ec68494b
authored
Mar 23, 2015
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
parent
4fbba098
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
mysql-test/r/ctype_filename.result
mysql-test/r/ctype_filename.result
+7
-0
mysql-test/t/ctype_filename.test
mysql-test/t/ctype_filename.test
+6
-0
strings/ctype-utf8.c
strings/ctype-utf8.c
+11
-2
No files found.
mysql-test/r/ctype_filename.result
View file @
ec68494b
...
...
@@ -11,3 +11,10 @@ create table com1 (a int);
drop table com1;
create table `clock$` (a int);
drop table `clock$`;
#
# MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
#
SET NAMES utf8;
SELECT @a:=CONVERT('aя' USING filename) AS `@a`, BINARY @a, REVERSE(@a), HEX(@a), HEX(REVERSE(@a));
@a BINARY @a REVERSE(@a) HEX(@a) HEX(REVERSE(@a))
aя a@r1 яa 61407231 40723161
mysql-test/t/ctype_filename.test
View file @
ec68494b
...
...
@@ -19,3 +19,9 @@ drop table com1;
create
table
`clock$`
(
a
int
);
drop
table
`clock$`
;
--
echo
#
--
echo
# MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
--
echo
#
SET
NAMES
utf8
;
SELECT
@
a
:=
CONVERT
(
'aя'
USING
filename
)
AS
`@a`
,
BINARY
@
a
,
REVERSE
(
@
a
),
HEX
(
@
a
),
HEX
(
REVERSE
(
@
a
));
strings/ctype-utf8.c
View file @
ec68494b
...
...
@@ -7098,7 +7098,7 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t
wc
,
uchar
*
s
,
uchar
*
e
)
{
int
code
;
char
hex
[]
=
"0123456789abcdef"
;
static
const
char
hex
[]
=
"0123456789abcdef"
;
if
(
s
>=
e
)
return
MY_CS_TOOSMALL
;
...
...
@@ -7144,6 +7144,15 @@ my_charlen_filename(CHARSET_INFO *cs, const uchar *str, const uchar *end)
}
static
uint
my_ismbchar_filename
(
CHARSET_INFO
*
cs
,
const
char
*
str
,
const
char
*
end
)
{
my_wc_t
wc
;
int
rc
=
my_mb_wc_filename
(
cs
,
&
wc
,
(
const
uchar
*
)
str
,
(
const
uchar
*
)
end
);
return
rc
>
1
?
rc
:
0
;
}
#define MY_FUNCTION_NAME(x) my_ ## x ## _filename
#define CHARLEN(cs,str,end) my_charlen_filename(cs,str,end)
#define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN
...
...
@@ -7172,7 +7181,7 @@ static MY_COLLATION_HANDLER my_collation_filename_handler =
static
MY_CHARSET_HANDLER
my_charset_filename_handler
=
{
NULL
,
/* init */
my_ismbchar_
utf8
,
my_ismbchar_
filename
,
my_mbcharlen_utf8
,
my_numchars_mb
,
my_charpos_mb
,
...
...
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