diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 01:37:54 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 01:37:54 +0200 |
commit | 1acfa942edb72fedcf92dd017ae5fef8694382e5 (patch) | |
tree | 721fcd9a479ce34633659c936f36fa1e20856620 /mysys/my_fopen.c | |
parent | cc413ce9a368b930aba5e63c0ab013f7b3ab3c04 (diff) | |
parent | 5a0fff50f87e20c4e95a84143a0a3bb67e03e29e (diff) | |
download | mariadb-git-1acfa942edb72fedcf92dd017ae5fef8694382e5.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysys/my_fopen.c')
-rw-r--r-- | mysys/my_fopen.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index b6027a99c90..4f14bc5aaef 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -69,19 +69,13 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags) DBUG_RETURN(fd); /* safeguard */ } mysql_mutex_lock(&THR_LOCK_open); - if ((my_file_info[filedesc].name= (char*) - my_strdup(filename,MyFlags))) - { - my_stream_opened++; - my_file_total_opened++; - my_file_info[filedesc].type= STREAM_BY_FOPEN; - mysql_mutex_unlock(&THR_LOCK_open); - DBUG_PRINT("exit",("stream: 0x%lx", (long) fd)); - DBUG_RETURN(fd); - } + my_file_info[filedesc].name= (char*) my_strdup(filename,MyFlags); + my_stream_opened++; + my_file_total_opened++; + my_file_info[filedesc].type= STREAM_BY_FOPEN; mysql_mutex_unlock(&THR_LOCK_open); - (void) my_fclose(fd,MyFlags); - my_errno=ENOMEM; + DBUG_PRINT("exit",("stream: 0x%lx", (long) fd)); + DBUG_RETURN(fd); } else my_errno=errno; |