mysql-server-5.1 deletes tables on start

Bug #593552 reported by Matthias Meier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.1 (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: mysql-server-5.1

unbelievable - since the lucid security update 'mysql-server-5.1_5.1.41-3ubuntu12.3_i386.deb', when starting the mysql daemin, all tables in the data directory are lost!
Also after restoring the data directory, rebooting and starting the mysql daemon again, all is lost!!

After reverting to mysql-server-5.1_5.1.41-3ubuntu12.1_i386.deb it is working correctly.

description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we can't fix it because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem. We have instructions on debugging some types of problems at http://wiki.ubuntu.com/DebuggingProcedures.
At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible).
Thanks!

When reporting bugs in the future please use apport, either via the appropriate application's "Help -> Report a Problem" menu or using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in mysql-dfsg-5.1 (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Matthias Meier (matthias-j-meier) wrote :

Possibly the deleting of all the mysql tables occurs because I have an invalid table 'tcexam9.bak' in the mysql data directory, which i copied long ago manually for testing reasons.

I will verify this in the next mainenance window of my server :)

Find attached the syslog of the mysql start before and after the mysql-server upgrade.

Revision history for this message
Matthias Meier (matthias-j-meier) wrote :
Revision history for this message
Matthias Meier (matthias-j-meier) wrote :
Revision history for this message
Matthias Meier (matthias-j-meier) wrote :

As following scenario shows, the problem occures really because of a oviously invalid table which I backuped inside the mysql data directory:

Test1)
Before starting the problematic mysql server security release (5.1.41-3ubuntu12.3) by "start mysql" the mysql data directory shows following entries:

debian-5.0.flag ibdata1 ib_logfile0 ib_logfile1 mysql mysql_upgrade_info tcexam tcexam9 tcexam.bak1 zm

Mention the entry "tcexam.bak1" which is an exact copy of the "tcexam" table directory.
(identical according a "diff -r" and also the access rights are same. Possibly I copied the table manually some years ago by a "cp -a tcexam tcexam.bak1" - I didn't use these two tables since then because I'm working now on another table "tcexam9").

After starting the mysql-server (release 5.1.41-3ubuntu12.3) the only directory entry left is:
"tcexam@002ebak1"

So a l l t a b l e s d i s a p e a r e d - including table mysql and all other tabels!

Test2)
After restoring the directory from the backup and deleting "tcexam.bak1" manually before starting the mysql-server, all is working fine.

Test3)
After that I did another test with the now working setup:
I stopped the mysyl-server, copied "tcexam" now manually by a "cp -a tcexam tcexam.bak1" and started mysql again - but now the problem doesn't happen again!

(But of course I can reproduce it by resoring the original directory content.)

As I mentioned, this happens only with mysql-server-5.1 5.1.41-3ubuntu12.3, not with older releases!

At last I looked into the subdirectory "tcexam@002ebak1" and what surprise all the tables are there:
db.opt ibdata1 ib_logfile1 mysql_upgrade_info tcexam9 zm
debian-5.0.flag ib_logfile0 mysql tcexam tcexam.bak1

Strange isn't it?

Regards
Matthias

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-dfsg-5.1 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-dfsg-5.1 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.