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

mysqldump outputs fully qualified names for views when lower_case_table_names=2

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.8, 10.6.10
    • None
    • None
    • None
    • Windows 10 64bit
      10.6.10-MariaDB

    Description

      Setting lower_case_table_names=2 option forces mysqldump to output fully qualified names for the views (including database name).
      After removing this option and restarting MariaDB - dump is generated without database name in the script.

      This is an issues because such a scrips can't be used to recreate database with a different name.

      Steps to reproduce:

      • add option lower_case_table_names=2 to the my.ini file
      • restart the MariaDB server
      • generate dump using mysqldump --skip-lock-tables --routines --skip-add-drop-table --skip-extended-insert --no-data --events --skip-quote-names --compact --skip-set-charset

      Example with lower_case_table_names=2

      /*!50001 VIEW db_name.view_name AS select ...
      

      Example without lower_case_table_names=2

      /*!50001 VIEW view_name AS select ...
      

      Output of the

      SHOW CREATE TABLE view_name
      

      changes to print fully qualified name when lower_case_table_names=2

      Attachments

        Activity

          People

            Unassigned Unassigned
            VitaliyG Vitaliy
            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.