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
1f8efee5
Commit
1f8efee5
authored
Mar 16, 2015
by
Kristian Nielsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge MDEV-7198: status variable for Slave_skipped_errors
parents
ef4d8db5
9362dd43
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
2 deletions
+17
-2
mysql-test/suite/rpl/r/rpl_skip_error.result
mysql-test/suite/rpl/r/rpl_skip_error.result
+6
-0
mysql-test/suite/rpl/t/rpl_skip_error.test
mysql-test/suite/rpl/t/rpl_skip_error.test
+2
-0
sql/log_event.cc
sql/log_event.cc
+6
-2
sql/mysqld.cc
sql/mysqld.cc
+2
-0
sql/slave.h
sql/slave.h
+1
-0
No files found.
mysql-test/suite/rpl/r/rpl_skip_error.result
View file @
1f8efee5
...
...
@@ -95,6 +95,9 @@ t2 CREATE TABLE `t2` (
`data` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show global status like 'slave_skipped_errors';
Variable_name Value
Slave_skipped_errors 4
INSERT INTO t2 VALUES(1, 1);
INSERT INTO t2 VALUES(2, 1);
INSERT INTO t2 VALUES(3, 1);
...
...
@@ -104,6 +107,9 @@ DELETE FROM t2 WHERE id = 5;
SET SQL_LOG_BIN=1;
UPDATE t2 SET id= id + 3, data = 2;
show global status like 'slave_skipped_errors';
Variable_name Value
Slave_skipped_errors 5
**** We cannot execute a select as there are differences in the
**** behavior between STMT and RBR.
==== Clean Up ====
...
...
mysql-test/suite/rpl/t/rpl_skip_error.test
View file @
1f8efee5
...
...
@@ -140,6 +140,7 @@ connection slave;
CREATE
TABLE
t2
(
id
INT
NOT
NULL
PRIMARY
KEY
,
data
INT
)
Engine
=
MyIsam
;
SHOW
CREATE
TABLE
t2
;
show
global
status
like
'slave_skipped_errors'
;
connection
master
;
...
...
@@ -157,6 +158,7 @@ sync_slave_with_master;
let
$error
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Last_SQL_Error
,
1
);
echo
$error
;
show
global
status
like
'slave_skipped_errors'
;
--
echo
****
We
cannot
execute
a
select
as
there
are
differences
in
the
--
echo
****
behavior
between
STMT
and
RBR
.
...
...
sql/log_event.cc
View file @
1f8efee5
...
...
@@ -428,8 +428,12 @@ inline int idempotent_error_code(int err_code)
inline
int
ignored_error_code
(
int
err_code
)
{
return
((
err_code
==
ER_SLAVE_IGNORED_TABLE
)
||
(
use_slave_mask
&&
bitmap_is_set
(
&
slave_error_mask
,
err_code
)));
if
(
use_slave_mask
&&
bitmap_is_set
(
&
slave_error_mask
,
err_code
))
{
statistic_increment
(
slave_skipped_errors
,
LOCK_status
);
return
1
;
}
return
err_code
==
ER_SLAVE_IGNORED_TABLE
;
}
/*
...
...
sql/mysqld.cc
View file @
1f8efee5
...
...
@@ -519,6 +519,7 @@ ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
ulong
max_connections
,
max_connect_errors
;
ulong
extra_max_connections
;
ulong
slave_retried_transactions
;
ulonglong
slave_skipped_errors
;
ulong
feature_files_opened_with_delayed_keys
;
ulonglong
denied_connections
;
my_decimal
decimal_zero
;
...
...
@@ -8266,6 +8267,7 @@ SHOW_VAR status_vars[]= {
{
"Slave_received_heartbeats"
,(
char
*
)
&
show_slave_received_heartbeats
,
SHOW_SIMPLE_FUNC
},
{
"Slave_retried_transactions"
,(
char
*
)
&
slave_retried_transactions
,
SHOW_LONG
},
{
"Slave_running"
,
(
char
*
)
&
show_slave_running
,
SHOW_SIMPLE_FUNC
},
{
"Slave_skipped_errors"
,
(
char
*
)
&
slave_skipped_errors
,
SHOW_LONGLONG
},
#endif
{
"Slow_launch_threads"
,
(
char
*
)
&
slow_launch_threads
,
SHOW_LONG
},
{
"Slow_queries"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
long_query_count
),
SHOW_LONG_STATUS
},
...
...
sql/slave.h
View file @
1f8efee5
...
...
@@ -130,6 +130,7 @@ extern my_bool opt_log_slave_updates;
extern
char
*
opt_slave_skip_errors
;
extern
my_bool
opt_replicate_annotate_row_events
;
extern
ulonglong
relay_log_space_limit
;
extern
ulonglong
slave_skipped_errors
;
/*
3 possible values for Master_info::slave_running and
...
...
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