diff options
author | unknown <sanja@askmonty.org> | 2011-09-02 15:10:10 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-09-02 15:10:10 +0300 |
commit | b152c4c71dff8b2142e220850d9329fe63f4cfbd (patch) | |
tree | 585b0d57da5c535a64dc5393a268e2d4c81c2066 /mysys/my_open.c | |
parent | ea8aa329099ee28ec6f1266d8d01a6fc664259cf (diff) | |
parent | 37a8497d494ea256ff4b13a89e62150e06a17dae (diff) | |
download | mariadb-git-b152c4c71dff8b2142e220850d9329fe63f4cfbd.tar.gz |
Merge 5.2->5.3
Diffstat (limited to 'mysys/my_open.c')
-rw-r--r-- | mysys/my_open.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c index b1788506832..dc2fcaf04c6 100644 --- a/mysys/my_open.c +++ b/mysys/my_open.c @@ -41,6 +41,8 @@ File my_open(const char *FileName, int Flags, myf MyFlags) DBUG_ENTER("my_open"); DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d", FileName, Flags, MyFlags)); + if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF))) + MyFlags|= my_global_flags; #if defined(_WIN32) fd= my_win_open(FileName, Flags); #elif !defined(NO_OPEN_3) @@ -69,6 +71,8 @@ int my_close(File fd, myf MyFlags) int err; DBUG_ENTER("my_close"); DBUG_PRINT("my",("fd: %d MyFlags: %d",fd, MyFlags)); + if (!(MyFlags & (MY_WME | MY_FAE))) + MyFlags|= my_global_flags; pthread_mutex_lock(&THR_LOCK_open); #ifndef _WIN32 @@ -84,7 +88,8 @@ int my_close(File fd, myf MyFlags) DBUG_PRINT("error",("Got error %d on close",err)); my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) - my_error(EE_BADCLOSE, MYF(ME_BELL+ME_WAITTANG),my_filename(fd),errno); + my_error(EE_BADCLOSE, MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))), + my_filename(fd),errno); } if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN) { @@ -150,8 +155,8 @@ File my_register_filename(File fd, const char *FileName, enum file_type { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; - DBUG_PRINT("error",("print err: %d",error_message_number)); - my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG), + my_error(error_message_number, + MYF(ME_BELL | ME_WAITTANG | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))), FileName, my_errno); } DBUG_RETURN(-1); |