summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-08-28 16:41:23 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2002-08-28 16:41:23 +0300
commit9210160c5560c61044dd1529c9fa4de46e126a77 (patch)
tree69f65dccef0752eb3d30c80ef25a24beec3d36cf /sql/sql_table.cc
parent63cdfc4b436baec414f587535fbdca0119765615 (diff)
downloadmariadb-git-9210160c5560c61044dd1529c9fa4de46e126a77.tar.gz
Little but nasty bug with BDB and alter table
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 9a5056a1f35..534b267403c 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1665,11 +1665,6 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
VOID(pthread_cond_broadcast(&COND_refresh));
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())
@@ -1679,6 +1674,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open));
+#ifdef HAVE_BERKELEY_DB
+ extern bool berkeley_flush_logs(void);
+ if (old_db_type == DB_TYPE_BERKELEY_DB)
+ {
+ (void)berkeley_flush_logs();
+ table=open_ltable(thd,table_list,TL_READ);
+ }
+#endif
end_temporary:
sprintf(tmp_name,ER(ER_INSERT_INFO),(ulong) (copied+deleted),