Cams Ismael writes: > Description: > A time ago I reported next bug: > > "The ALTER TABLE command behaves very strange when stopping and > restarting the MySQL server afterwards. I noticed this after having > rebooted my PC (which means that the MySql server is stopped and > restarted). Before the reboot I dropped a column in one of my > tables. > After I had done this all the data was available in my table. > However after have been rebooting my PC all the data was gone !!! It > even > becomes crazier. After the second reboot the data was visisble > again. > The tests I have executed showed that this problem shows up for both > adding and deleting a column of a table. Also I noticed that when > you add > data after have been stopping the MySQL server the first time > this data > is dissapeared after a second stop of the MySQL server." > > This problem should be solved in mysql-3.23.52. I have checked this > and came > to the conclusion the problem is indeed solved when adding a column, > but after > dropping a column the problem still exists !!! > > > > Kind regards, > > Ismaël
Thank you for your test case. It helped us fix a bug in ALTER TABLE with BDB handler. Fix will come up in 3.23.53 and 4.0.4. This is a patch that fixes it: ===== sql/sql_table.cc 1.103 vs edited ===== *** /tmp/sql_table.cc-1.103-25819 Mon Aug 5 18:50:34 2002 --- edited/sql/sql_table.cc Wed Aug 28 15:10:52 2002 *************** *** 1665,1675 **** 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()) --- 1665,1670 ---- *************** *** 1679,1684 **** --- 1674,1687 ---- } 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), -- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php