From a9c7c79a0a8ed7e143c65f00c5b80a80db46d8cc Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 3 Nov 2009 13:59:06 +0400 Subject: [PATCH] Applying InnoDB plugin snashot Detailed revision comments: r6046 | pekka | 2009-10-08 12:24:56 +0300 (Thu, 08 Oct 2009) | 3 lines branches/zip: Revert r6044 which added os_file_is_same() function (issue#186). This functionality is moved to Hot Backup source tree. --- storage/innodb_plugin/include/os0file.h | 15 ------- storage/innodb_plugin/os/os0file.c | 54 ------------------------- 2 files changed, 69 deletions(-) diff --git a/storage/innodb_plugin/include/os0file.h b/storage/innodb_plugin/include/os0file.h index 20c3be1b228..8535ef092c3 100644 --- a/storage/innodb_plugin/include/os0file.h +++ b/storage/innodb_plugin/include/os0file.h @@ -260,21 +260,6 @@ library of Netware does not expose the delete-on-close flag. FILE* os_file_create_tmpfile(void); /*========================*/ -#else -/***********************************************************************//** -Check if two paths refer to the same file or directory. On Unix-like systems -the files are considered equal if they have the same inode (as returned by -stat(2) system call). -@return 1 if files are the same, 0 if they are not the same, and -1 on error -(error number can be retrieved with os_file_get_last_error) */ -UNIV_INTERN -int -os_file_is_same( -/*============*/ - const char* pathname1, /*!< in: pathname of a file - or directory */ - const char* pathname2); /*!< in: pathname of a file - or directory */ #endif /* !UNIV_HOTBACKUP */ /***********************************************************************//** The os_file_opendir() function opens a directory stream corresponding to the diff --git a/storage/innodb_plugin/os/os0file.c b/storage/innodb_plugin/os/os0file.c index f084789011b..a1d3bad2add 100644 --- a/storage/innodb_plugin/os/os0file.c +++ b/storage/innodb_plugin/os/os0file.c @@ -612,60 +612,6 @@ os_file_create_tmpfile(void) return(file); } -#else -/***********************************************************************//** -Check if two paths refer to the same file or directory. On Unix-like systems -the files are considered equal if they have the same inode (as returned by -stat(2) system call). -@return 1 if files are the same, 0 if they are not the same, and -1 on error -(error number can be retrieved with os_file_get_last_error) */ -UNIV_INTERN -int -os_file_is_same( -/*============*/ - const char* pathname1, /*!< in: pathname of a file - or directory */ - const char* pathname2) /*!< in: pathname of a file - or directory */ -{ -#ifdef __WIN__ - /* NOTE This Windows implementation is incomplete; we need to - check inodes of the files as we do on Unix-like systems. - */ - if (0 == strcmp(pathname1, pathname2)) { - /* paths are the same */ - return (1); - } else { - /* path are different */ - return (0); - } -#else - struct stat fileinfo1, fileinfo2; - int rcode; - - if (0 == strcmp(pathname1, pathname2)) { - /* paths are the same */ - return (1); - } - - /* get inodes with stat(2)*/ - rcode = stat(pathname1, &fileinfo1); - if (rcode < 0) { - /* failure */ - os_file_handle_error_no_exit(pathname1, "os_file_is_same"); - return (-1); - } - rcode = stat(pathname2, &fileinfo2); - if (rcode < 0) { - /* failure */ - os_file_handle_error_no_exit(pathname2, "os_file_is_same"); - return (-1); - } - - return (fileinfo1.st_ino == fileinfo2.st_ino); -#endif -} - #endif /* !UNIV_HOTBACKUP */ /***********************************************************************//**