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
37467ebe
Commit
37467ebe
authored
Dec 24, 2003
by
bar@bar.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_parse.cc:
Fix for the bug 1175: Usernames will not converted to utf8 during connect
parent
b15ea37f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
sql/sql_parse.cc
sql/sql_parse.cc
+9
-0
No files found.
sql/sql_parse.cc
View file @
37467ebe
...
...
@@ -834,6 +834,7 @@ static int check_connection(THD *thd)
char
*
passwd
=
strend
(
user
)
+
1
;
char
*
db
=
passwd
;
char
db_buff
[
NAME_LEN
+
1
];
// buffer to store db in utf8
char
user_buff
[
USERNAME_LENGTH
+
1
];
// buffer to store user in utf8
/*
Old clients send null-terminated string as password; new clients send
the size (1 byte) + string (not null-terminated). Hence in case of empty
...
...
@@ -854,6 +855,14 @@ static int check_connection(THD *thd)
db
=
db_buff
;
}
if
(
user
)
{
user_buff
[
copy_and_convert
(
user_buff
,
sizeof
(
user_buff
)
-
1
,
system_charset_info
,
user
,
strlen
(
user
),
thd
->
charset
())]
=
'\0'
;
user
=
user_buff
;
}
if
(
thd
->
user
)
x_free
(
thd
->
user
);
if
(
!
(
thd
->
user
=
my_strdup
(
user
,
MYF
(
0
))))
...
...
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