MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 1 2010 11:57am
Subject:bzr commit into mysql-5.1-bugteam branch (svoj:3507) Bug#50691
View as plain text  
#At file:///home/svoj/devel/innodb-snapshots/mysql-5.1-bugteam/ based on revid:svoj@stripped

 3507 Sergey Vojtovich	2010-04-01
      Applying InnoDB snapshot, fixes BUG#50691.
      
      Detailed revision comments:
      
      r6724 | marko | 2010-02-17 15:52:05 +0200 (Wed, 17 Feb 2010) | 11 lines
      branches/zip: Merge revisions 6613:6669 from branches/5.1:
        ------------------------------------------------------------------------
        r6669 | jyang | 2010-02-11 12:24:19 +0200 (Thu, 11 Feb 2010) | 7 lines
      
        branches/5.1: Fix bug #50691, AIX implementation of readdir_r
        causes InnoDB errors. readdir_r() returns an non-NULL value
        in the case of reaching the end of a directory. It should
        not be treated as an error return.
      
        rb://238 approved by Marko
        ------------------------------------------------------------------------

    modified:
      storage/innodb_plugin/os/os0file.c
=== modified file 'storage/innodb_plugin/os/os0file.c'
--- a/storage/innodb_plugin/os/os0file.c	2010-04-01 11:31:37 +0000
+++ b/storage/innodb_plugin/os/os0file.c	2010-04-01 11:57:04 +0000
@@ -789,7 +789,15 @@ next_file:
 #ifdef HAVE_READDIR_R
 	ret = readdir_r(dir, (struct dirent*)dirent_buf, &ent);
 
-	if (ret != 0) {
+	if (ret != 0
+#ifdef UNIV_AIX
+	    /* On AIX, only if we got non-NULL 'ent' (result) value and
+	    a non-zero 'ret' (return) value, it indicates a failed
+	    readdir_r() call. An NULL 'ent' with an non-zero 'ret'
+	    would indicate the "end of the directory" is reached. */
+	    && ent != NULL
+#endif
+	   ) {
 		fprintf(stderr,
 			"InnoDB: cannot read directory %s, error %lu\n",
 			dirname, (ulong)ret);


Attachment: [text/bzr-bundle] bzr/svoj@sun.com-20100401115704-qk5cr06hdrg67u4o.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (svoj:3507) Bug#50691Sergey Vojtovich1 Apr