Commit 7f115803 authored by unknown's avatar unknown

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


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