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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3e206c1c
Commit
3e206c1c
authored
Jul 14, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do handler specific drop-database at safe place.
Fix for access problem (merge from 4.0)
parent
5af8ab54
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
sql/sql_db.cc
sql/sql_db.cc
+1
-8
sql/sql_parse.cc
sql/sql_parse.cc
+2
-1
No files found.
sql/sql_db.cc
View file @
3e206c1c
...
@@ -166,6 +166,7 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
...
@@ -166,6 +166,7 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
if
((
deleted
=
mysql_rm_known_files
(
thd
,
dirp
,
path
,
0
))
>=
0
)
if
((
deleted
=
mysql_rm_known_files
(
thd
,
dirp
,
path
,
0
))
>=
0
)
{
{
ha_drop_database
(
path
);
if
(
!
thd
->
query
)
if
(
!
thd
->
query
)
{
{
thd
->
query
=
path
;
thd
->
query
=
path
;
...
@@ -189,14 +190,6 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
...
@@ -189,14 +190,6 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
exit:
exit:
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_mysql_create_db
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_mysql_create_db
));
/* It seems MySQL may call this function when there still are queries
running on tables of the database. Since InnoDB waits until the
queries have ended, we have to call ha_drop_database outside
the above two mutexes to avoid deadlocks. */
ha_drop_database
(
path
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
sql/sql_parse.cc
View file @
3e206c1c
...
@@ -2154,7 +2154,8 @@ check_access(THD *thd,uint want_access,const char *db, uint *save_priv,
...
@@ -2154,7 +2154,8 @@ check_access(THD *thd,uint want_access,const char *db, uint *save_priv,
thd
->
priv_user
,
db
);
/* purecov: inspected */
thd
->
priv_user
,
db
);
/* purecov: inspected */
else
else
db_access
=
thd
->
db_access
;
db_access
=
thd
->
db_access
;
want_access
&=
~
EXTRA_ACL
;
// Remove SHOW attribute
// Remove SHOW attribute and access rights we already have
want_access
&=
~
(
thd
->
master_access
|
EXTRA_ACL
);
db_access
=
((
*
save_priv
=
(
db_access
|
thd
->
master_access
))
&
want_access
);
db_access
=
((
*
save_priv
=
(
db_access
|
thd
->
master_access
))
&
want_access
);
/* grant_option is set if there exists a single table or column grant */
/* grant_option is set if there exists a single table or column grant */
...
...
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