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
a2248579
Commit
a2248579
authored
Nov 24, 2011
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
BUG#13427949
Automerged against latest mysql-5.5.
parents
0fa7fe90
4b157e15
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletion
+48
-1
mysql-test/suite/rpl/r/rpl_connection.result
mysql-test/suite/rpl/r/rpl_connection.result
+11
-0
mysql-test/suite/rpl/t/rpl_connection.test
mysql-test/suite/rpl/t/rpl_connection.test
+24
-0
sql/slave.cc
sql/slave.cc
+13
-1
No files found.
mysql-test/suite/rpl/r/rpl_connection.result
0 → 100644
View file @
a2248579
include/master-slave.inc
[connection master]
call mtr.add_suppression(".*Invalid .* username when attempting to connect to the master server.*");
include/stop_slave.inc
CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= '';
START SLAVE;
include/wait_for_slave_io_error.inc [errno=1045, 1593]
include/stop_slave.inc
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
START SLAVE;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_connection.test
0 → 100644
View file @
a2248579
--
source
include
/
not_embedded
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_mixed
.
inc
#
# BUG#13427949: CHANGE MASTER TO USER='' (EMPTY USER) CAUSES ERRORS ON VALGRING
#
--
connection
slave
call
mtr
.
add_suppression
(
".*Invalid .* username when attempting to connect to the master server.*"
);
# Assert that we disallow empty users and that no problem
--
source
include
/
stop_slave
.
inc
CHANGE
MASTER
TO
MASTER_USER
=
''
,
MASTER_PASSWORD
=
''
;
START
SLAVE
;
--
let
$slave_io_errno
=
1045
,
1593
--
source
include
/
wait_for_slave_io_error
.
inc
--
source
include
/
stop_slave
.
inc
CHANGE
MASTER
TO
MASTER_USER
=
'root'
,
MASTER_PASSWORD
=
''
;
START
SLAVE
;
--
source
include
/
rpl_end
.
inc
sql/slave.cc
View file @
a2248579
...
...
@@ -4208,6 +4208,16 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
if
(
opt_plugin_dir_ptr
&&
*
opt_plugin_dir_ptr
)
mysql_options
(
mysql
,
MYSQL_PLUGIN_DIR
,
opt_plugin_dir_ptr
);
/* we disallow empty users */
if
(
mi
->
user
==
NULL
||
mi
->
user
[
0
]
==
0
)
{
mi
->
report
(
ERROR_LEVEL
,
ER_SLAVE_FATAL_ERROR
,
ER
(
ER_SLAVE_FATAL_ERROR
),
"Invalid (empty) username when attempting to "
"connect to the master server. Connection attempt "
"terminated."
);
DBUG_RETURN
(
1
);
}
while
(
!
(
slave_was_killed
=
io_slave_killed
(
thd
,
mi
))
&&
(
reconnect
?
mysql_reconnect
(
mysql
)
!=
0
:
mysql_real_connect
(
mysql
,
mi
->
host
,
mi
->
user
,
mi
->
password
,
0
,
...
...
@@ -4336,7 +4346,9 @@ MYSQL *rpl_connect_master(MYSQL *mysql)
/* This one is not strictly needed but we have it here for completeness */
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_DIR
,
(
char
*
)
charsets_dir
);
if
(
io_slave_killed
(
thd
,
mi
)
if
(
mi
->
user
==
NULL
||
mi
->
user
[
0
]
==
0
||
io_slave_killed
(
thd
,
mi
)
||
!
mysql_real_connect
(
mysql
,
mi
->
host
,
mi
->
user
,
mi
->
password
,
0
,
mi
->
port
,
0
,
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