sql/Makefile.am: better mysqld dependencies

sql/discover.cc:    close(-1) bug
sql/slave.cc:       DBUG_ENTER/RETURN tags
ha_archive.cc:      double-close bug
parent 71657322
......@@ -35,7 +35,7 @@ LDADD = $(top_builddir)/vio/libvio.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
mysqld_DEPENDENCIES= @mysql_plugin_libs@ $(LDADD)
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@pstack_libs@ \
@mysql_plugin_libs@ \
......
......@@ -119,8 +119,8 @@ int writefrm(const char *name, const void *frmdata, uint len)
{
if (my_write(file,(byte*)frmdata,len,MYF(MY_WME | MY_NABP)))
error= 2;
VOID(my_close(file,MYF(0)));
}
VOID(my_close(file,MYF(0)));
DBUG_RETURN(error);
} /* writefrm */
......
This diff is collapsed.
......@@ -1320,25 +1320,18 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
we don't check rc here because we want to open the file back up even
if the optimize failed but we will return rc below so that we will
know it failed.
We also need to reopen our read descriptor since it has changed.
*/
DBUG_PRINT("info", ("Reopening archive data file"));
if (!(azopen(&(share->archive_write), share->data_file_name,
O_WRONLY|O_APPEND|O_BINARY)))
if (!azopen(&(share->archive_write), share->data_file_name,
O_WRONLY|O_APPEND|O_BINARY) ||
!azopen(&archive, share->data_file_name, O_RDONLY|O_BINARY))
{
DBUG_PRINT("info", ("Could not open archive write file"));
rc= HA_ERR_CRASHED_ON_USAGE;
goto error;
}
/*
Now we need to reopen our read descriptor since it has changed.
*/
if (!(azopen(&archive, share->data_file_name, O_RDONLY|O_BINARY)))
{
rc= HA_ERR_CRASHED_ON_USAGE;
goto error;
}
DBUG_RETURN(rc);
error:
azclose(&writer);
......
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