Details

    Description

      In the server we have obsolete code to handle 'arc' directories in the following places
      sql/sql_db.cc: find_db_tables_and_rm_known_files()
      sql/sql_db.cc: mysql_rm_arc_files()
      sql/parse_file.cc:rename_in_schema_file()

      Remove this code and instead fix so that mysql_upgrade removes any old arc directories,
      preferably with the code used by mysql_rm_arc_files().

      There is no logic in the current code that will delete the 'arc' files when renaming a trigger file!

      Attachments

        Activity

          Hi,
          I know MySQL and new to MairaDB Server.
          Can I contribute in this issue?
          https://jira.mariadb.org/browse/MDEV-23962

          kalbhairab Sayan Mukherjee added a comment - Hi, I know MySQL and new to MairaDB Server. Can I contribute in this issue? https://jira.mariadb.org/browse/MDEV-23962
          sachin001 Sachin Thakan added a comment -

          Hi, Myself Sachin Thakan. I would like to work on this task. Please do assign it to me. Thank You.

          sachin001 Sachin Thakan added a comment - Hi, Myself Sachin Thakan. I would like to work on this task. Please do assign it to me. Thank You.

          Hi, sachin001, a task cannot be assigned to somebody who isn't in a "developers" group in this Jira. But it doesn't matter, just work on it, as you like and create a pull request on github.

          serg Sergei Golubchik added a comment - Hi, sachin001 , a task cannot be assigned to somebody who isn't in a "developers" group in this Jira. But it doesn't matter, just work on it, as you like and create a pull request on github.
          sachin001 Sachin Thakan added a comment -

          @Sergei Golubchik Thanks for clarification.

          sachin001 Sachin Thakan added a comment - @Sergei Golubchik Thanks for clarification.

          Giving it a try

          Debjyoti Debjyoti Ghosh added a comment - Giving it a try
          theboycalledhp Himanshu Pandey added a comment - - edited
          theboycalledhp Himanshu Pandey added a comment - - edited Sent a PR for this. Link: https://github.com/MariaDB/server/pull/3839

          FWIW arc directories were introduced in MySQL 5.0.1 by the following commit, though I couldn't find rationale for this feature

          commit fd3df185191b8d116eaebae7abc60b5199924f84
          Author: unknown <bell@sanja.is.com.ua>
          Date:   Tue May 11 23:23:49 2004 +0300
           
              file parser for new .frm
          

          Then it was discontinued in 5.0.72 by https://bugs.mysql.com/bug.php?id=17823

          commit 18876585203a239d5e9631f931dd802c696cae17
          Author: Gleb Shchepa <gshchepa@mysql.com>
          Date:   Tue Sep 30 17:50:28 2008 +0500
           
              Fixed bug #17823: 'arc' directories inside database directories.
           
              Server created "arc" directories inside database directories and
              maintained there useless copies of .frm files.
           
              Creation and renaming procedures of those copies as well as
              creation of "arc" directories has been discontinued.
              Removal procedure has been kept untouched to be able to
              cleanup existent database directories by the DROP DATABASE
              query. Also view renaming procedure has been updated to remove
              these directories.
          

          commit 8c9e7a64c55ecbb8da837f932203a697cac04c55
          Author: Gleb Shchepa <gshchepa@mysql.com>
          Date:   Fri Nov 14 21:25:57 2008 +0400
           
              Bug #40021: Renaming view fails, archived .frm for view is
                          missing after downgrade
          

          svoj Sergey Vojtovich added a comment - FWIW arc directories were introduced in MySQL 5.0.1 by the following commit, though I couldn't find rationale for this feature commit fd3df185191b8d116eaebae7abc60b5199924f84 Author: unknown <bell@sanja.is.com.ua> Date: Tue May 11 23:23:49 2004 +0300   file parser for new .frm Then it was discontinued in 5.0.72 by https://bugs.mysql.com/bug.php?id=17823 commit 18876585203a239d5e9631f931dd802c696cae17 Author: Gleb Shchepa <gshchepa@mysql.com> Date: Tue Sep 30 17:50:28 2008 +0500   Fixed bug #17823: 'arc' directories inside database directories.   Server created "arc" directories inside database directories and maintained there useless copies of .frm files.   Creation and renaming procedures of those copies as well as creation of "arc" directories has been discontinued. Removal procedure has been kept untouched to be able to cleanup existent database directories by the DROP DATABASE query. Also view renaming procedure has been updated to remove these directories. commit 8c9e7a64c55ecbb8da837f932203a697cac04c55 Author: Gleb Shchepa <gshchepa@mysql.com> Date: Fri Nov 14 21:25:57 2008 +0400   Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade

          People

            svoj Sergey Vojtovich
            monty Michael Widenius
            Votes:
            2 Vote for this issue
            Watchers:
            13 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.