diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-08 19:44:22 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-09 08:53:08 +0200 |
commit | ad0c218a440575fa6fb6634aca7a08448a4360e0 (patch) | |
tree | b52811847ce51c92eabdeed3104df8b0168943df /mysys/my_create.c | |
parent | bb4ef470c24cdbcedba3dd3dcda3b3d88b6fb491 (diff) | |
parent | 9fe92a9770a801c4cd36390620486be4cb06752b (diff) | |
download | mariadb-git-ad0c218a440575fa6fb6634aca7a08448a4360e0.tar.gz |
Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:
recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).
Report progress also via systemd using sd_notifyf().
Diffstat (limited to 'mysys/my_create.c')
-rw-r--r-- | mysys/my_create.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/mysys/my_create.c b/mysys/my_create.c index 6a3bcd63557..014b65c4e14 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -36,7 +36,7 @@ File my_create(const char *FileName, int CreateFlags, int access_flags, myf MyFlags) { - int fd, rc; + int fd; DBUG_ENTER("my_create"); DBUG_PRINT("my",("Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %lu", FileName, CreateFlags, access_flags, MyFlags)); @@ -54,21 +54,7 @@ File my_create(const char *FileName, int CreateFlags, int access_flags, fd= -1; } - rc= my_register_filename(fd, FileName, FILE_BY_CREATE, + fd= my_register_filename(fd, FileName, FILE_BY_CREATE, EE_CANTCREATEFILE, MyFlags); - /* - my_register_filename() may fail on some platforms even if the call to - *open() above succeeds. In this case, don't leave the stale file because - callers assume the file to not exist if my_create() fails, so they don't - do any cleanups. - */ - if (unlikely(fd >= 0 && rc < 0)) - { - int tmp= my_errno; - my_close(fd, MyFlags); - my_delete(FileName, MyFlags); - my_errno= tmp; - } - - DBUG_RETURN(rc); + DBUG_RETURN(fd); } /* my_create */ |