Bug 507296 - Databases created by MySQL v4 are corrupted when using F11
Summary: Databases created by MySQL v4 are corrupted when using F11
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-22 08:33 UTC by Simon Andrews
Modified: 2013-07-03 03:23 UTC (History)
3 users (show)

Fixed In Version: 5.1.35-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-24 19:31:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Simon Andrews 2009-06-22 08:33:28 UTC
Description of problem:
There is a problem with the mysql_upgrade program where it is failing to update tables created with mysql v4 such that they appear corrupted can can't be accessed within v5.1


Version-Release number of selected component (if applicable):
mysql-5.1.32-1.fc11

How reproducible:
Not sure - but many people have seen this.  There are reproducible test cases available

Steps to Reproduce:
1. Create a database in mysql v4
2. Update mysql to 5.1
3. Run mysqlcheck on the database
  
Actual results:
Errors such as:

warning  : Table is marked as crashed
warning  : Size of indexfile is: 1975296      Should be: 1572864
error    : Found key at page 180224 that points to record outside datafile
error    : Corrupt
Error    : Incorrect key file for table 'Clone_hit'; try to repair it
error    : Corrupt

Repair table (even with use_frm) can't fix this, neither can isamchk.  Apparently it requires a dump from the old verion, completely deleting the files under /var/lib/mysql (apart from the mysql tables), and then a restore to get things working again.

This could potentially cause big problems.


Expected results:
Tables are upgraded properly from older versions.

Additional info:
There is an upstream report of this, which suggests that this is fixed in v5.1.35 but I've not been able to verify that this solves the problem and the bug page isn't exactly chock full of reports that it works.  The upstream bug is at:

http://bugs.mysql.com/bug.php?id=37631

Comment 1 Tom Lane 2009-06-22 13:33:49 UTC
Please add your comments to the existing upstream bug --- I am not in a position to fix this for you.

Comment 2 Simon Andrews 2009-06-22 13:43:31 UTC
I'll keep track of the upstream bug, but consider this a placeholder for a request to the patched version of mysql as soon as it's released.  

I'm sure others will be hitting this bug at some point so this should also hopefully be useful to point them to the upstream problem.

Comment 3 Tom Lane 2009-06-22 14:07:02 UTC
FWIW, 5.1.35 is in updates-testing now.

Comment 4 Simon Andrews 2009-06-22 14:47:23 UTC
5.1.35 fixes this problem for me.  Let me know if you want me to report this in the buildsystem to help get this pushed out.

Thanks!

Comment 5 Tom Lane 2009-06-22 15:09:54 UTC
Given that, I'll go ahead and mark it for stable --- it's been in testing a few days already.

Comment 6 Fedora Update System 2009-06-24 19:31:18 UTC
mysql-5.1.35-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.