summaryrefslogtreecommitdiff
path: root/mysys/my_fopen.c
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-07-14 16:05:29 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-07-14 16:05:29 -0400
commitdced5146bdfc46e200ba35a86c3c55fb60972e33 (patch)
tree22e3dd18f4edec2a585341fee607765f96b2744f /mysys/my_fopen.c
parent75931feabe99595e9659a423e299c4229d3c02ba (diff)
downloadmariadb-git-dced5146bdfc46e200ba35a86c3c55fb60972e33.tar.gz
Merge branch '10.0-galera' into 10.1
Diffstat (limited to 'mysys/my_fopen.c')
-rw-r--r--mysys/my_fopen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index 3ec5e0ba0b1..1fa3f9b9b8f 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -42,7 +42,7 @@ static void make_ftype(char * to,int flag);
FILE *my_fopen(const char *filename, int flags, myf MyFlags)
{
FILE *fd;
- char type[5];
+ char type[10];
DBUG_ENTER("my_fopen");
DBUG_PRINT("my",("Name: '%s' flags: %d MyFlags: %lu",
filename, flags, MyFlags));
@@ -350,9 +350,11 @@ static void make_ftype(register char * to, register int flag)
else
*to++= 'r';
-#if FILE_BINARY /* If we have binary-files */
if (flag & FILE_BINARY)
*to++='b';
-#endif
+
+ if (O_CLOEXEC)
+ *to++= 'e';
+
*to='\0';
} /* make_ftype */