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

mariadb-dump needs --add-drop-procedure

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Backup
    • None

    Description

      I was trying to script all my stored procedures, add some changes and send them back to the database, but I could not find a way to make the new version replace the existing version automatically. I think we all agree that mariadb-dump needs a new option
      --add-drop-procedure

      Right now I am using
      db=test
      name=test
      name1=test_copy

      mysqldump --quick --no-create-db --no-create-info --no-data --triggers --routines \
      --skip-opt --add-drop-trigger --skip-extended-insert --compact \
      --where="db='${db}' AND type='PROCEDURE' AND name IN ('${name}', '${name1}')" --databases "${db}"

      I aim to script two stored procedures test and test_copy only, and right after send them back like below:
      MySQL test < test.sql

      Attachments

        Activity

          People

            Unassigned Unassigned
            philip_38 Philip orleans
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.