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

Invalid, non-executed (split) DROP statement is logged to binlog

    XMLWordPrintable

Details

    Description

      Given a database that contains foreign keys that cannot be dropped without disabling foreign key checks, mysqladmin drop will fail, but still log the statement to the binlog - leading to replication failures.

      unfortunately there seems to be multiple issues combined and I haven't been able to properly reproduce this

      • have a database that cannot be dropped due to mysql saying Cannot delete or update a parent row: a foreign key constraint fails
      • use mysqladmin drop on that database, leading to the error above (this is somewhat unexpected when the FKs are all within that one DB)
      • the server will binlog a 'split' DROP TABLES statement instead of DROP DATABASE - eg it will execute DROP TABLE IF EXISTS a,b,c / DROP TABLE IF EXISTS d,e,f / DROP TABLE IF EXISTS g,h,i which definitely fails with foreign keys
      • slaves fail on this same 'split' query even though the master never actually executed it

      Attachments

        Activity

          People

            Unassigned Unassigned
            sjon sjon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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