#At file:///home/svoj/devel/innodb-snapshots/mysql-5.1-bugteam/ based on revid:svoj@stripped
3175 Sergey Vojtovich 2009-11-03
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.
modified:
storage/innodb_plugin/include/os0file.h
storage/innodb_plugin/os/os0file.c
=== modified file 'storage/innodb_plugin/include/os0file.h'
--- a/storage/innodb_plugin/include/os0file.h 2009-11-03 09:58:28 +0000
+++ b/storage/innodb_plugin/include/os0file.h 2009-11-03 09:59:06 +0000
@@ -260,21 +260,6 @@ library of Netware does not expose the d
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
=== modified file 'storage/innodb_plugin/os/os0file.c'
--- a/storage/innodb_plugin/os/os0file.c 2009-11-03 09:58:28 +0000
+++ b/storage/innodb_plugin/os/os0file.c 2009-11-03 09:59:06 +0000
@@ -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 */
/***********************************************************************//**
Attachment: [text/bzr-bundle] bzr/svoj@sun.com-20091103095906-kg0y0m5d0jae4v4a.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (svoj:3175) | Sergey Vojtovich | 3 Nov |