Commit c65c72f0 authored by unknown's avatar unknown
Browse files

InnoDB: Use system-supplied tmpfile() on Netware, as there is no

open interface for setting the "delete-on-close" flag.


innobase/os/os0file.c:
  Use system-supplied tmpfile() on Netware
sql/ha_innodb.cc:
  Remove innobase_mysql_tmpfile() on Netware.
parent d8d9f79e
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ os_io_init_simple(void)
	}
}

#ifndef UNIV_HOTBACKUP
#if !defined(UNIV_HOTBACKUP) && !defined(__NETWARE__)
/*************************************************************************
Creates a temporary file. This function is defined in ha_innodb.cc. */

@@ -383,7 +383,7 @@ int
innobase_mysql_tmpfile(void);
/*========================*/
			/* out: temporary file descriptor, or < 0 on error */
#endif /* !UNIV_HOTBACKUP */
#endif /* !UNIV_HOTBACKUP && !__NETWARE__ */

/***************************************************************************
Creates a temporary file. */
@@ -393,6 +393,9 @@ os_file_create_tmpfile(void)
/*========================*/
			/* out: temporary file handle, or NULL on error */
{
#ifdef __NETWARE__
	FILE*	file	= tmpfile();
#else /* __NETWARE__ */
	FILE*	file	= NULL;
	int	fd	= -1;
# ifdef UNIV_HOTBACKUP
@@ -430,15 +433,18 @@ os_file_create_tmpfile(void)
	if (fd >= 0) {
		file = fdopen(fd, "w+b");
	}
#endif /* __NETWARE__ */

	if (!file) {
		ut_print_timestamp(stderr);
		fprintf(stderr,
			"  InnoDB: Error: unable to create temporary file;"
			" errno: %d\n", errno);
#ifndef __NETWARE__
		if (fd >= 0) {
			close(fd);
		}
#endif /* !__NETWARE__ */
	}

	return(file);
+2 −0
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ innobase_mysql_print_thd(
	putc('\n', f);
}

#ifndef __NETWARE__
/*************************************************************************
Creates a temporary file. */
extern "C"
@@ -456,6 +457,7 @@ innobase_mysql_tmpfile(void)
	}
	return(fd2);
}
#endif /* !__NETWARE__ */

/*************************************************************************
Gets the InnoDB transaction handle for a MySQL handler object, creates