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
26c4e642
Commit
26c4e642
authored
Jun 26, 2009
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
local merge: 5.1-bt bug branch --> 5.1-bt latest
parents
bb4faa54
e6f15deb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
0 deletions
+104
-0
mysql-test/extra/rpl_tests/rpl_reset_slave.test
mysql-test/extra/rpl_tests/rpl_reset_slave.test
+54
-0
mysql-test/suite/rpl/r/rpl_row_reset_slave.result
mysql-test/suite/rpl/r/rpl_row_reset_slave.result
+23
-0
mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
+23
-0
sql/slave.cc
sql/slave.cc
+3
-0
sql/sql_repl.cc
sql/sql_repl.cc
+1
-0
No files found.
mysql-test/extra/rpl_tests/rpl_reset_slave.test
View file @
26c4e642
...
...
@@ -41,3 +41,57 @@ reset slave;
start
slave
;
sync_with_master
;
show
status
like
'slave_open_temp_tables'
;
#
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err*
#
# clearing the status
stop
slave
;
reset
slave
;
let
$last_io_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Errno
,
1
);
echo
***
errno
must
be
zero
:
$last_io_errno
***
;
#
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
#
change
master
to
master_user
=
'impossible_user_name'
;
start
slave
;
source
include
/
wait_for_slave_io_to_stop
.
inc
;
let
$last_io_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Errno
,
1
);
--
disable_query_log
eval
SELECT
$last_io_errno
>
0
as
ONE
;
--
enable_query_log
source
include
/
stop_slave
.
inc
;
change
master
to
master_user
=
'root'
;
source
include
/
start_slave
.
inc
;
let
$last_io_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Errno
,
1
);
let
$last_io_error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Error
,
1
);
--
echo
***
last
errno
must
be
zero
:
$last_io_errno
***
--
echo
***
last
error
must
be
blank
:
$last_io_error
***
#
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
#
source
include
/
stop_slave
.
inc
;
change
master
to
master_user
=
'impossible_user_name'
;
start
slave
;
source
include
/
wait_for_slave_io_to_stop
.
inc
;
let
$last_io_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Errno
,
1
);
--
disable_query_log
eval
SELECT
$last_io_errno
>
0
as
ONE
;
--
enable_query_log
source
include
/
stop_slave
.
inc
;
reset
slave
;
let
$last_io_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Errno
,
1
);
let
$last_io_error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_IO_Error
,
1
);
let
$last_sql_errno
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_SQL_Errno
,
1
);
let
$last_sql_error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_SQL_Error
,
1
);
--
echo
***
io
last
errno
must
be
zero
:
$last_io_errno
***
--
echo
***
io
last
error
must
be
blank
:
$last_io_error
***
--
echo
***
sql
last
errno
must
be
zero
:
$last_sql_errno
***
--
echo
***
sql
last
error
must
be
blank
:
$last_sql_error
***
mysql-test/suite/rpl/r/rpl_row_reset_slave.result
View file @
26c4e642
...
...
@@ -174,3 +174,26 @@ start slave;
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 0
stop slave;
reset slave;
*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
*** last errno must be zero: 0 ***
*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
reset slave;
*** io last errno must be zero: 0 ***
*** io last error must be blank: ***
*** sql last errno must be zero: 0 ***
*** sql last error must be blank: ***
mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
View file @
26c4e642
...
...
@@ -174,3 +174,26 @@ start slave;
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 1
stop slave;
reset slave;
*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
*** last errno must be zero: 0 ***
*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
ONE
1
include/stop_slave.inc
reset slave;
*** io last errno must be zero: 0 ***
*** io last error must be blank: ***
*** sql last errno must be zero: 0 ***
*** sql last error must be blank: ***
sql/slave.cc
View file @
26c4e642
...
...
@@ -2418,6 +2418,7 @@ pthread_handler_t handle_slave_io(void *arg)
pthread_detach_this_thread
();
thd
->
thread_stack
=
(
char
*
)
&
thd
;
// remember where our stack is
mi
->
clear_error
();
if
(
init_slave_thread
(
thd
,
SLAVE_THD_IO
))
{
pthread_cond_broadcast
(
&
mi
->
start_cond
);
...
...
@@ -2532,6 +2533,7 @@ requesting master dump") ||
goto
connected
;
});
DBUG_ASSERT
(
mi
->
last_error
().
number
==
0
);
while
(
!
io_slave_killed
(
thd
,
mi
))
{
ulong
event_len
;
...
...
@@ -3731,6 +3733,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
if
(
!
slave_was_killed
)
{
mi
->
clear_error
();
// clear possible left over reconnect error
if
(
reconnect
)
{
if
(
!
suppress_warnings
&&
global_system_variables
.
log_warnings
)
...
...
sql/sql_repl.cc
View file @
26c4e642
...
...
@@ -1043,6 +1043,7 @@ int reset_slave(THD *thd, Master_info* mi)
Reset errors (the idea is that we forget about the
old master).
*/
mi
->
clear_error
();
mi
->
rli
.
clear_error
();
mi
->
rli
.
clear_until_condition
();
...
...
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