Commit d7871389 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org
Browse files

This is the only way to fix ALTER TABLE bug with BDB

I wish I had connection stop  / start so that I could have made a 
test case.
parent 7dce4bd3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -46928,6 +46928,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.52
@itemize @bullet
@item
Fixed bug in ALTERing  TABLE of BDB type.
@item
Fixed bug when logging @code{LOAD DATA INFILE} to binary log with no 
active database.
@item
+5 −1
Original line number Diff line number Diff line
@@ -1652,7 +1652,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
    VOID(pthread_mutex_unlock(&LOCK_open));
    goto err;
  }

#ifdef HAVE_BERKELEY_DB
  extern bool berkeley_flush_logs(void);
  if (old_db_type == DB_TYPE_BERKELEY_DB &&  berkeley_flush_logs())
    goto err;
#endif
  thd->proc_info="end";
  mysql_update_log.write(thd, thd->query,thd->query_length);
  if (mysql_bin_log.is_open())