Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1c658417
Commit
1c658417
authored
Mar 18, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make DROP DATABASE to behave as documented in the manual - to report number of files deleted
parent
43706715
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
mysql-test/r/drop.result
mysql-test/r/drop.result
+1
-0
mysql-test/t/drop.test
mysql-test/t/drop.test
+2
-0
sql/sql_db.cc
sql/sql_db.cc
+3
-0
No files found.
mysql-test/r/drop.result
View file @
1c658417
...
@@ -21,6 +21,7 @@ select * from mysqltest.mysqltest;
...
@@ -21,6 +21,7 @@ select * from mysqltest.mysqltest;
n
n
4
4
drop database if exists mysqltest;
drop database if exists mysqltest;
affected rows: 4
create database mysqltest;
create database mysqltest;
drop database mysqltest;
drop database mysqltest;
flush tables with read lock;
flush tables with read lock;
...
...
mysql-test/t/drop.test
View file @
1c658417
...
@@ -24,7 +24,9 @@ create database mysqltest;
...
@@ -24,7 +24,9 @@ create database mysqltest;
create
table
mysqltest
.
mysqltest
(
n
int
);
create
table
mysqltest
.
mysqltest
(
n
int
);
insert
into
mysqltest
.
mysqltest
values
(
4
);
insert
into
mysqltest
.
mysqltest
values
(
4
);
select
*
from
mysqltest
.
mysqltest
;
select
*
from
mysqltest
.
mysqltest
;
--
enable_info
drop
database
if
exists
mysqltest
;
drop
database
if
exists
mysqltest
;
--
disable_info
create
database
mysqltest
;
create
database
mysqltest
;
drop
database
mysqltest
;
drop
database
mysqltest
;
...
...
sql/sql_db.cc
View file @
1c658417
...
@@ -500,6 +500,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
...
@@ -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
)
if
(
find_type
(
fn_ext
(
file
->
name
),
&
known_extentions
,
1
+
2
)
<=
0
)
found_other_files
++
;
found_other_files
++
;
else
deleted
++
;
continue
;
continue
;
}
}
strxmov
(
filePath
,
org_path
,
"/"
,
file
->
name
,
NullS
);
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,
...
@@ -521,6 +523,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
/* Link into list */
/* Link into list */
(
*
tot_list_next
)
=
table_list
;
(
*
tot_list_next
)
=
table_list
;
tot_list_next
=
&
table_list
->
next
;
tot_list_next
=
&
table_list
->
next
;
deleted
++
;
}
}
else
else
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment