Bug #29325: create table overwrites .MYD file of other

table (datadir)
Set errno when retunring an error in my_create_with_symlink.
parent 4f579b8d
...@@ -52,11 +52,13 @@ File my_create_with_symlink(const char *linkname, const char *filename, ...@@ -52,11 +52,13 @@ File my_create_with_symlink(const char *linkname, const char *filename,
{ {
if (!access(filename,F_OK)) if (!access(filename,F_OK))
{ {
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST); my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if (create_link && !access(linkname,F_OK)) if (create_link && !access(linkname,F_OK))
{ {
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST); my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment