mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog include/Makefile.am: remove the rest of isam/merge references include/config-win.h: unused and abused macro removed include/my_pthread.h: unused and abused macro removed include/my_sys.h: MY_IGNORE_BADFD flag include/mysql_embed.h: remove the rest of isam/merge references mysql-test/r/replace.result: remove the rest of isam/merge references mysql-test/t/replace.test: remove the rest of isam/merge references mysql-test/t/xa.test: comment mysys/my_sync.c: MY_IGNORE_BADFD flag sql/handler.cc: remove the rest of isam/merge references sql/log.cc: fix a race condition in TC_LOG_BINLOG::unlog preparation for binlog group commit sql/mysql_priv.h: remove duplicates sql/mysqld.cc: remove the rest of isam/merge references sql/opt_range.cc: remove the rest of isam/merge references sql/set_var.cc: hide unused variables. simplify sync_binlog code sql/sql_base.cc: remove the rest of isam/merge references sql/sql_class.h: cleanup
This commit is contained in:
parent
5dbcb1555f
commit
cd0a50bf34
17 changed files with 82 additions and 130 deletions
|
|
@ -27,7 +27,14 @@
|
|||
my_flags Flags (now only MY_WME is supported)
|
||||
|
||||
NOTE
|
||||
If file system supports its, only file data is synced, not inode date
|
||||
If file system supports its, only file data is synced, not inode data.
|
||||
|
||||
MY_IGNORE_BADFD is useful when fd is "volatile" - not protected by a
|
||||
mutex. In this case by the time of fsync(), fd may be already closed by
|
||||
another thread, or even reassigned to a different file. With this flag -
|
||||
MY_IGNORE_BADFD - such a situation will not be considered an error.
|
||||
(which is correct behaviour, if we know that the other thread synced the
|
||||
file before closing)
|
||||
|
||||
RETURN
|
||||
0 ok
|
||||
|
|
@ -55,10 +62,15 @@ int my_sync(File fd, myf my_flags)
|
|||
|
||||
if (res)
|
||||
{
|
||||
if (!(my_errno= errno))
|
||||
my_errno= -1; /* Unknown error */
|
||||
if (my_flags & MY_WME)
|
||||
int er= errno;
|
||||
if (!(my_errno= er))
|
||||
my_errno= -1; /* Unknown error */
|
||||
if (my_flags & MY_IGNORE_BADFD &&
|
||||
(er == EBADF || er == EINVAL || er == EROFS))
|
||||
res= 0;
|
||||
else if (my_flags & MY_WME)
|
||||
my_error(EE_SYNC, MYF(ME_BELL+ME_WAITTANG), my_filename(fd), my_errno);
|
||||
}
|
||||
DBUG_RETURN(res);
|
||||
} /* my_read */
|
||||
} /* my_sync */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue