1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.


sql/parse_file.cc:
  Fixed bug #17823: 'arc' directories inside database directories.
  View/table creation and renaming procedures maintained
  backup copies of .frm files. Those copies are unused yet,
  so this feature was incomplete and unnecessary.
  
  1. Unwanted code has been hidden by FRM_ARCHIVE ifdefs
  (the FRM_ARCHIVE macro is not defined).
  
  2. Renaming procedure has been modified to remove obsolete
  "arc" directories.
sql/parse_file.h:
  Fixed bug #17823: 'arc' directories inside database directories.
  The "thd" parameter has been added to the rename_in_schema_file()
  function.
sql/sql_db.cc:
  Fixed bug #17823: 'arc' directories inside database directories.
  Scope of the mysql_rm_arc_files() function has been changed to
  global for use from the parse_file.cc file.
sql/sql_view.cc:
  Fixed bug #17823: 'arc' directories inside database directories.
  Added the "thd" argument to rename_in_schema_file() calls.
This commit is contained in:
Gleb Shchepa
2008-09-30 17:50:28 +05:00
parent ce64a16b75
commit 3c9d4ea821
4 changed files with 39 additions and 11 deletions

View File

@ -1858,7 +1858,7 @@ mysql_rename_view(THD *thd,
goto err;
/* rename view and it's backups */
if (rename_in_schema_file(view->db, view->table_name, new_name,
if (rename_in_schema_file(thd, view->db, view->table_name, new_name,
view_def.revision - 1, num_view_backups))
goto err;
@ -1877,7 +1877,7 @@ mysql_rename_view(THD *thd,
num_view_backups))
{
/* restore renamed view in case of error */
rename_in_schema_file(view->db, new_name, view->table_name,
rename_in_schema_file(thd, view->db, new_name, view->table_name,
view_def.revision - 1, num_view_backups);
goto err;
}