Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11121

Master - Slave Replication - Duplicate key error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.0.20
    • N/A
    • Replication
    • CentOS release 6.7 / MariaDB 10.0.20

    Description

      Our architecture is MariaDB Replication(Master - Slave) and Slave DB is read only mode.

      2016 10/20 , We got a error. The error message is below.

      161020 16:18:05 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table dbname.system_sd_sync; Duplicate entry '200001986744' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mariadb-bin.000179, end_log_pos 318838554, Gtid 1-1-110570931, Internal MariaDB error code: 1062
      161020 16:18:05 [Warning] Slave: Duplicate entry '200001986744' for key 'PRIMARY' Error_code: 1062
      161020 16:18:05 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mariadb-bin.000179' position 318837719
      

      We have not had super privileges except root and replication user.

      The primary key of table(system_sd_sync) is a sequence using a funtion & innodb engine table.
      Two tables and one function create script, Master-Slave my.cnf files, error query file attach.

      Master's data is valid but Slave's data is not valid.
      And there is no logging in master's binary log about slave's data.

      I don't know what is mean slave's data.

      Attachments

        1. error query.TXT
          3 kB
        2. hostname1.cnf
          6 kB
        3. hostname2.cnf
          6 kB
        4. table dictionary.TXT
          4 kB

        Activity

          People

            Unassigned Unassigned
            jisun jisun bae
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.