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

table (datadir)
Set errno when retunring an error in my_create_with_symlink.
This commit is contained in:
gkodinov/kgeorge@magare.gmz 2007-07-18 15:33:41 +03:00
parent 4f579b8d0e
commit 94535ca828

View file

@ -52,11 +52,13 @@ File my_create_with_symlink(const char *linkname, const char *filename,
{
if (!access(filename,F_OK))
{
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST);
DBUG_RETURN(-1);
}
if (create_link && !access(linkname,F_OK))
{
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST);
DBUG_RETURN(-1);
}