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
b04f8481
Commit
b04f8481
authored
Sep 20, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: use is_supported_parser_charset
parent
1a731af1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
sql/sql_class.h
sql/sql_class.h
+4
-0
sql/sql_parse.h
sql/sql_parse.h
+0
-5
sql/sys_vars.cc
sql/sys_vars.cc
+1
-2
No files found.
sql/sql_class.h
View file @
b04f8481
...
@@ -801,6 +801,10 @@ mysqld_collation_get_by_name(const char *name,
...
@@ -801,6 +801,10 @@ mysqld_collation_get_by_name(const char *name,
return
cs
;
return
cs
;
}
}
inline
bool
is_supported_parser_charset
(
CHARSET_INFO
*
cs
)
{
return
MY_TEST
(
cs
->
mbminlen
==
1
);
}
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
...
...
sql/sql_parse.h
View file @
b04f8481
...
@@ -198,9 +198,4 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
...
@@ -198,9 +198,4 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
bool
check_global_access
(
THD
*
thd
,
ulong
want_access
,
bool
no_errors
=
false
);
bool
check_global_access
(
THD
*
thd
,
ulong
want_access
,
bool
no_errors
=
false
);
inline
bool
is_supported_parser_charset
(
CHARSET_INFO
*
cs
)
{
return
MY_TEST
(
cs
->
mbminlen
==
1
);
}
#endif
/* SQL_PARSE_INCLUDED */
#endif
/* SQL_PARSE_INCLUDED */
sql/sys_vars.cc
View file @
b04f8481
...
@@ -622,8 +622,7 @@ static bool check_cs_client(sys_var *self, THD *thd, set_var *var)
...
@@ -622,8 +622,7 @@ static bool check_cs_client(sys_var *self, THD *thd, set_var *var)
if
(
check_charset_not_null
(
self
,
thd
,
var
))
if
(
check_charset_not_null
(
self
,
thd
,
var
))
return
true
;
return
true
;
// Currently, UCS-2 cannot be used as a client character set
if
(
!
is_supported_parser_charset
((
CHARSET_INFO
*
)(
var
->
save_result
.
ptr
)))
if
(((
CHARSET_INFO
*
)(
var
->
save_result
.
ptr
))
->
mbminlen
>
1
)
return
true
;
return
true
;
return
false
;
return
false
;
...
...
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