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
161d4eea
Commit
161d4eea
authored
Nov 24, 2010
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
af6ceb25
1c37eaaa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
mysql-test/r/connect.result
mysql-test/r/connect.result
+11
-0
mysql-test/t/connect.test
mysql-test/t/connect.test
+28
-0
sql/sql_connect.cc
sql/sql_connect.cc
+13
-0
strings/CHARSET_INFO.txt
strings/CHARSET_INFO.txt
+4
-7
No files found.
mysql-test/r/connect.result
View file @
161d4eea
...
@@ -215,6 +215,17 @@ SET GLOBAL event_scheduler = OFF;
...
@@ -215,6 +215,17 @@ SET GLOBAL event_scheduler = OFF;
# -- End of Bug#35074.
# -- End of Bug#35074.
#
# -- Bug#49752: 2469.126.2 unintentionally breaks authentication
# against MySQL 5.1 server
#
GRANT ALL ON test.* TO 'Azundris12345678'@'localhost' IDENTIFIED BY 'test123';
FLUSH PRIVILEGES;
DROP USER 'Azundris12345678'@'localhost';
FLUSH PRIVILEGES;
#
# -- End of Bug#49752
#
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# -- End of 5.1 tests
# -- End of 5.1 tests
# ------------------------------------------------------------------
# ------------------------------------------------------------------
mysql-test/t/connect.test
View file @
161d4eea
...
@@ -293,6 +293,34 @@ SET GLOBAL event_scheduler = OFF;
...
@@ -293,6 +293,34 @@ SET GLOBAL event_scheduler = OFF;
--
echo
# -- End of Bug#35074.
--
echo
# -- End of Bug#35074.
--
echo
--
echo
###########################################################################
--
echo
#
--
echo
# -- Bug#49752: 2469.126.2 unintentionally breaks authentication
--
echo
# against MySQL 5.1 server
--
echo
#
GRANT
ALL
ON
test
.*
TO
'Azundris12345678'
@
'localhost'
IDENTIFIED
BY
'test123'
;
FLUSH
PRIVILEGES
;
--
replace_result
$MASTER_MYSOCK
MASTER_SOCKET
$MASTER_MYPORT
MASTER_PORT
connect
(
con1
,
localhost
,
Azundris123456789
,
test123
,
test
);
disconnect
con1
;
connection
default
;
DROP
USER
'Azundris12345678'
@
'localhost'
;
FLUSH
PRIVILEGES
;
--
echo
#
--
echo
# -- End of Bug#49752
--
echo
#
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
--
echo
# -- End of 5.1 tests
--
echo
# -- End of 5.1 tests
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
...
...
sql/sql_connect.cc
View file @
161d4eea
...
@@ -899,6 +899,19 @@ static int check_connection(THD *thd)
...
@@ -899,6 +899,19 @@ static int check_connection(THD *thd)
user_len
-=
2
;
user_len
-=
2
;
}
}
/*
Clip username to allowed length in characters (not bytes). This is
mostly for backward compatibility.
*/
{
CHARSET_INFO
*
cs
=
system_charset_info
;
int
err
;
user_len
=
(
uint
)
cs
->
cset
->
well_formed_len
(
cs
,
user
,
user
+
user_len
,
USERNAME_CHAR_LENGTH
,
&
err
);
user
[
user_len
]
=
'\0'
;
}
if
(
thd
->
main_security_ctx
.
user
)
if
(
thd
->
main_security_ctx
.
user
)
x_free
(
thd
->
main_security_ctx
.
user
);
x_free
(
thd
->
main_security_ctx
.
user
);
if
(
!
(
thd
->
main_security_ctx
.
user
=
my_strdup
(
user
,
MYF
(
MY_WME
))))
if
(
!
(
thd
->
main_security_ctx
.
user
=
my_strdup
(
user
,
MYF
(
MY_WME
))))
...
...
strings/CHARSET_INFO.txt
View file @
161d4eea
...
@@ -208,14 +208,11 @@ charpos() - calculates the offset of the given position in the string.
...
@@ -208,14 +208,11 @@ charpos() - calculates the offset of the given position in the string.
Used in SQL functions LEFT(), RIGHT(), SUBSTRING(),
Used in SQL functions LEFT(), RIGHT(), SUBSTRING(),
INSERT()
INSERT()
well_formed_length()
well_formed_len()
- finds the length of correctly formed multi-byte beginning.
- returns length of a given multi-byte string in bytes
Used in INSERTs to cut a beginning of the given string
Used in INSERTs to shorten the given string so it
which is
a) is "well formed" according to the given character set
a) "well formed" according to the given character set.
b) can fit into the given data type
b) can fit into the given data type
Terminates the string in the good position, taking in account
multi-byte character boundaries.
lengthsp() - returns the length of the given string without trailing spaces.
lengthsp() - returns the length of the given string without trailing spaces.
...
...
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