Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP : [MDEV-23962] Removed obsolete code to handle 'arc' directories #2537

Open
wants to merge 2 commits into
base: 10.6
Choose a base branch
from

Conversation

is-this-echo
Copy link
Contributor

  • The Jira issue number for this PR is: MDEV-23962

Description

--WIP--
Deleted unused code to handle 'arc' directories in this files :
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()

How can this PR be tested?


Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch
  • This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced

PR quality check

Copy link
Contributor

@robinnewhouse robinnewhouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @is-this-echo, thanks for taking a look at this. I realize this is a work in progress still, but I just wanted to point out that in MDEV-23962 the request is not only to remove the mysql_rm_arc_files() etc., but to also make sure that the directories are being removed at some point in mysql_upgrade.

sql/sql_db.cc Show resolved Hide resolved
Copy link
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks just about ready right? It could to with a small test case, that we could handle if you don't have time.

mysql-test/main/mysql_upgrade.test - create some files of arc names before MYSQL_UPGRADE and see if they are removed afterwards (which mysql-test will do by default anyway).

@@ -18,6 +18,9 @@

#include "client_priv.h"
#include <sslopt-vars.h>
#include <my_dir.h>
#include <m_ctype.h>
#include "../include/mysql/psi/mysql_file.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <mysql/psi/mysql_file.h> seems sufficient elsewhere in the codebase.

continue;
}
strxmov(filePath, org_path, "/", file->name, NullS);
if (mysql_file_delete_with_symlink(key_file_misc, filePath, "", MYF(MY_WME)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my_delete is probably sufficient. key_file_misc is related to peformance schema and is really only for within the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants