mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
make DROP DATABASE to behave as documented in the manual - to report number of files deleted
This commit is contained in:
parent
7395d54d5b
commit
84b256013b
3 changed files with 6 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ select * from mysqltest.mysqltest;
|
|||
n
|
||||
4
|
||||
drop database if exists mysqltest;
|
||||
affected rows: 4
|
||||
create database mysqltest;
|
||||
drop database mysqltest;
|
||||
flush tables with read lock;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ create database mysqltest;
|
|||
create table mysqltest.mysqltest (n int);
|
||||
insert into mysqltest.mysqltest values (4);
|
||||
select * from mysqltest.mysqltest;
|
||||
--enable_info
|
||||
drop database if exists mysqltest;
|
||||
--disable_info
|
||||
create database mysqltest;
|
||||
drop database mysqltest;
|
||||
|
||||
|
|
|
|||
|
|
@ -500,6 +500,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
|
|||
{
|
||||
if (find_type(fn_ext(file->name),&known_extentions,1+2) <= 0)
|
||||
found_other_files++;
|
||||
else
|
||||
deleted++;
|
||||
continue;
|
||||
}
|
||||
strxmov(filePath,org_path,"/",file->name,NullS);
|
||||
|
|
@ -521,6 +523,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
|
|||
/* Link into list */
|
||||
(*tot_list_next)= table_list;
|
||||
tot_list_next= &table_list->next;
|
||||
deleted++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue