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
7afbe31d
Commit
7afbe31d
authored
May 24, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.3691
parents
ce1e1f4c
098d8dd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
sql/sql_db.cc
sql/sql_db.cc
+7
-1
No files found.
sql/sql_db.cc
View file @
7afbe31d
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
/* create and drop of databases */
/* create and drop of databases */
#include "mysql_priv.h"
#include "mysql_priv.h"
#include <mysys_err.h>
#include "sql_acl.h"
#include "sql_acl.h"
#include <my_dir.h>
#include <my_dir.h>
#include <m_ctype.h>
#include <m_ctype.h>
...
@@ -185,7 +186,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
...
@@ -185,7 +186,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
strxmov
(
path
,
mysql_data_home
,
"/"
,
db
,
NullS
);
strxmov
(
path
,
mysql_data_home
,
"/"
,
db
,
NullS
);
unpack_dirname
(
path
,
path
);
// Convert if not unix
unpack_dirname
(
path
,
path
);
// Convert if not unix
if
(
my_stat
(
path
,
&
stat_info
,
MYF
(
MY_WME
)))
if
(
my_stat
(
path
,
&
stat_info
,
MYF
(
0
)))
{
{
if
(
!
(
create_options
&
HA_LEX_CREATE_IF_NOT_EXISTS
))
if
(
!
(
create_options
&
HA_LEX_CREATE_IF_NOT_EXISTS
))
{
{
...
@@ -197,6 +198,11 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
...
@@ -197,6 +198,11 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
}
}
else
else
{
{
if
(
my_errno
!=
ENOENT
)
{
my_error
(
EE_STAT
,
MYF
(
0
),
path
,
my_errno
);
goto
exit
;
}
strend
(
path
)[
-
1
]
=
0
;
// Remove last '/' from path
strend
(
path
)[
-
1
]
=
0
;
// Remove last '/' from path
if
(
my_mkdir
(
path
,
0777
,
MYF
(
0
))
<
0
)
if
(
my_mkdir
(
path
,
0777
,
MYF
(
0
))
<
0
)
{
{
...
...
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