diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-05-07 13:49:14 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-05-07 13:49:14 +0300 |
commit | 648cf7176cc95f697abd8b94e860c74768680298 (patch) | |
tree | 8f3d19e0f1bd607cb515111f106715f9a4e6fcec /storage/myisam | |
parent | 7b115181987fb88b97ef6d3d88bb16bdbc281e40 (diff) | |
parent | 1ecd68d867ced1d00ebffdcedbf6bc97493f5067 (diff) | |
download | mariadb-git-648cf7176cc95f697abd8b94e860c74768680298.tar.gz |
Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/mi_open.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 7e846fc262c..c7ff84d514e 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -139,13 +139,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) DEBUG_SYNC_C("mi_open_kfile"); if ((kfile= mysql_file_open(mi_key_file_kfile, name_buff, - (open_mode= O_RDWR) | O_SHARE | O_NOFOLLOW, + (open_mode= O_RDWR) | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS))) < 0) { if ((errno != EROFS && errno != EACCES) || mode != O_RDONLY || (kfile= mysql_file_open(mi_key_file_kfile, name_buff, - (open_mode= O_RDONLY) | O_SHARE| O_NOFOLLOW, + (open_mode= O_RDONLY) | O_SHARE| O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS))) < 0) goto err; } @@ -1275,7 +1275,7 @@ int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share) myf flags= MY_WME | (share->mode & O_NOFOLLOW ? MY_NOSYMLINKS: 0); DEBUG_SYNC_C("mi_open_datafile"); info->dfile= mysql_file_open(mi_key_file_dfile, share->data_file_name, - share->mode | O_SHARE, MYF(flags)); + share->mode | O_SHARE | O_CLOEXEC, MYF(flags)); return info->dfile >= 0 ? 0 : 1; } @@ -1284,7 +1284,7 @@ int mi_open_keyfile(MYISAM_SHARE *share) { if ((share->kfile= mysql_file_open(mi_key_file_kfile, share->unique_file_name, - share->mode | O_SHARE | O_NOFOLLOW, + share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS | MY_WME))) < 0) return 1; return 0; |