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 !!! > > How-To-Repeat: > mysql > create database findBug; > mysql > use findBug > mysql > create table metatable(objid BIGINT not null, tablename > varchar(64), field varchar(64), type varchar(50), PRIMARY KEY (objid)) > type=BDB; > mysql > create table metaindex(objid BIGINT not null, indexname > varchar(64), ref_metatable DOUBLE not null, PRIMARY KEY (objid)) type=BDB; > mysql > create table metaoid(objid BIGINT not null, tablename > varchar(64), oid BIGINT not null, PRIMARY KEY (objid), UNIQUE(tablename)) > type=BDB; > mysql > insert into metaoid values(1, "metaoid",4); > mysql > insert into metaoid values(2, "metatable",1); > mysql > insert into metaoid values(3, "metaindex",1); > mysql > select * from metaoid; > +-------+-----------+-----+ > | objid | tablename | oid | > +-------+-----------+-----+ > | 1 | metaoid | 4 | > | 2 | metatable | 1 | > | 3 | metaindex | 1 | > +-------+-----------+-----+ > > mysql > alter table metaoid add column test varchar(255); > mysql > select * from metaoid; > +-------+-----------+-----+------+ > | objid | tablename | oid | test | > +-------+-----------+-----+------+ > | 1 | metaoid | 4 | NULL | > | 2 | metatable | 1 | NULL | > | 3 | metaindex | 1 | NULL | > +-------+-----------+-----+------+ > > mysql > quit; > C:\>net stop mysql > C:\>net start mysql > > mysql > select * from metaoid; > +-------+-----------+-----+------+ > | objid | tablename | oid | test | > +-------+-----------+-----+------+ > | 1 | metaoid | 4 | NULL | > | 2 | metatable | 1 | NULL | > | 3 | metaindex | 1 | NULL | > +-------+-----------+-----+------+ > > So this seems to be ok now, the problem starts when executing the next steps. > > mysql > alter table metaoid drop column test; > mysql > quit; > C:\>net stop mysql > C:\>net start mysql > mysql > select * from metaoid; > Empty set (0.01 sec) > > mysql > insert into metaoid values (5,"test",1); > mysql > select * from metaoid; > +-------+-----------+-----+ > | objid | tablename | oid | > +-------+-----------+-----+ > | 5 | test | 1 | > +-------+-----------+-----+ > > mysql > quit; > C:\>net stop mysql > C:\>net start mysql > > mysql > select * from metaoid; > +-------+-----------+-----+ > | objid | tablename | oid | > +-------+-----------+-----+ > | 5 | test | 1 | > +-------+-----------+-----+ When I restarted mysql in mysql-3.23.51 my old data was visible again and the new data was lost. Now it seems to be the other way round !!!!! > > Fix: > No fix found for this problem. > > Synopsis: Strange behaviour of MySQL after dropping a column. > Submitter-Id: > Originator: Ismaël Cams > Organization: Siemens Atea > MySQL support: license > Severity: critical > Priority: high > Category: mysqld > Class: sw-bug > Release: mysql-3.23.52. > > Executable: mysqld > Environment: 512 MB RAM, PII > System: Win2000 and NT > Compiler: VC++ 6.0 > Architecture: i > > Kind regards, > Ismaël > > > > > > > --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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