Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.0.22
-
None
-
CentOS 6.6 , MariaDB Server 10.0.22
Description
Hi, all
At 2:30 am of every day , run mysqldump backup database. at 2:50 , backup completed.
backup shell script :
mysqldump --single-transaction --dump-slave=2 -R -E -A > /data/backup/db.bak.
|
Slavesql=$(mysql -u$user -p$pwd -e "show slave status \G" | grep "Slave_SQL_Running" | awk '{print $2}'| head -1)
|
 |
if [ $Slavesql = "No" ]; then
|
mysql -u$user -p$pwd -e "start slave sql_thread;"
|
fi
|
today , we encounter a problem below( before the problem , both backup and start slave normal )
151122 2:28:24 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.019252' at position 1073741972, relay log '/data/mysql/log/relay-bin.001773' position: 4; GTID position '1-5358-2,0-5358-41013482462'
|
151122 2:28:24 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table db01.userdata; Duplicate entry 'GT~70086000033071590-111153-2015-11-22' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.019252, end_log_pos 1073742442, Gtid 0-5358-41011850370, Internal MariaDB error code: 1062
|
151122 2:28:24 [Warning] Slave: Duplicate entry 'GT~70086000033071590-111153-2015-11-22' for key 'PRIMARY' Error_code: 1062
|
151122 2:28:24 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.019252' position 1073741972; GTID position '1-5358-2,0-5358-41013482462'
|
151122 2:28:24 [Note] Error reading relay log event: slave SQL thread was killed
|
151122 2:28:24 [ERROR] Slave (additional info): Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
151122 2:28:24 [Warning] Slave: Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
A similar question was raised: MDEV-8405
we temporary solved method: skip_slave_error=1062 , restart mysql