Commit 0dd066cb authored by Vasil Dimov's avatar Vasil Dimov

Fix Bug#16000909 MEMORY LEAK, MYSQL_INPLACE_ALTER_TABLE

This is a followup to the fix of
Bug#14628410 ASSERTION `! IS_SET()' FAILED IN DIAGNOSTICS_AREA::SET_OK_STATUS
(satya.bodapati@oracle.com-20121213132316-5joz4phltx9yhjs7)

In innobase_mysql_tmpfile(): allocate/open the file after
the return(-1); statement.
parent febe03c2
......@@ -1140,7 +1140,10 @@ innobase_mysql_tmpfile(void)
DBUG_ENTER("innobase_mysql_tmpfile");
DBUG_EXECUTE_IF("innobase_tmpfile_creation_failure", return(-1););
DBUG_EXECUTE_IF(
"innobase_tmpfile_creation_failure",
return(-1);
);
tmpdir = my_tmpdir(&mysql_tmpdir_list);
......@@ -1203,9 +1206,14 @@ innobase_mysql_tmpfile(void)
/*========================*/
{
int fd2 = -1;
File fd = mysql_tmpfile("ib");
File fd;
DBUG_EXECUTE_IF(
"innobase_tmpfile_creation_failure",
return(-1);
);
DBUG_EXECUTE_IF("innobase_tmpfile_creation_failure", return(-1););
fd = mysql_tmpfile("ib");
if (fd >= 0) {
/* Copy the file descriptor, so that the additional resources
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment