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
4deb135b
Commit
4deb135b
authored
Jun 17, 2003
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed change_master() to use ER_MASTER_INFO (better display).
parent
0a0ca199
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+1
-1
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+8
-2
sql/slave.cc
sql/slave.cc
+1
-0
sql/sql_repl.cc
sql/sql_repl.cc
+1
-1
No files found.
mysql-test/r/rpl_rotate_logs.result
View file @
4deb135b
...
...
@@ -5,7 +5,7 @@ Could not initialize master info structure, check permisions on master.info
slave start;
Could not initialize master info structure, check permisions on master.info
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
Could not initialize master info
Could not initialize master info
structure, check permisions on master.info
reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
reset master;
...
...
mysql-test/t/rpl_rotate_logs.test
View file @
4deb135b
...
...
@@ -16,14 +16,20 @@ system cat /dev/null > var/slave-data/master.info;
system
chmod
000
var
/
slave
-
data
/
master
.
info
;
connection
slave
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
# START SLAVE will fail because it can't read the file (mode 000) (system error 13)
--
error
1201
slave
start
;
system
chmod
600
var
/
slave
-
data
/
master
.
info
;
# It will fail again because the file is empty so the slave cannot get valuable
# info about how to connect to the master from it (failure in
# init_strvar_from_file() in init_master_info()).
--
error
1201
slave
start
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
# Will get error 13 on Unix systems becasue file is not readable
!
eval
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
$MASTER_MYPORT
,
master_user
=
'root'
;
# CHANGE MASTER will fail because it first parses master.info before changing it
# (so when master.info is bad, people have to use RESET SLAVE first).
--
error
1201
eval
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
$MASTER_MYPORT
,
master_user
=
'root'
;
reset
slave
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
eval
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
$MASTER_MYPORT
,
master_user
=
'root'
;
...
...
sql/slave.cc
View file @
4deb135b
...
...
@@ -1644,6 +1644,7 @@ int show_master_info(THD* thd, MASTER_INFO* mi)
if
(
mi
->
host
[
0
])
{
DBUG_PRINT
(
"info"
,(
"host is set: '%s'"
,
mi
->
host
));
String
*
packet
=
&
thd
->
packet
;
packet
->
length
(
0
);
...
...
sql/sql_repl.cc
View file @
4deb135b
...
...
@@ -828,7 +828,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
// TODO: see if needs re-write
if
(
init_master_info
(
mi
,
master_info_file
,
relay_log_info_file
,
0
))
{
send_error
(
&
thd
->
net
,
0
,
"Could not initialize master info"
);
send_error
(
&
thd
->
net
,
ER_MASTER_INFO
);
unlock_slave_threads
(
mi
);
DBUG_RETURN
(
1
);
}
...
...
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