Bug #35190 | Can't upgrade MySQL 6 without mysqldump first | ||
---|---|---|---|
Submitted: | 10 Mar 2008 19:09 | Modified: | 6 Oct 2008 16:51 |
Reporter: | Kevin Benton (Candidate Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | 6.0.4 | OS: | Any |
Assigned to: | Sergey Vojtovich | CPU Architecture: | Any |
Tags: | qc triaged |
[10 Mar 2008 19:09]
Kevin Benton
[22 Mar 2008 8:30]
Sveta Smirnova
Thank you for the report. Feature request verified as described: either a) upgrade existing databases to the new format, or b) refuse to start without a special startup option acknowledging that the user has taken appropriate steps to prevent data loss. Current 6.0.4 behavior with table t1 created in version 6.0.3 is: mysql> select * from t1; ERROR 1146 (42S02): Table 'test.t1' doesn't exist mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | t1 | +----------------+ 1 row in set (0.00 sec)
[2 Apr 2008 18:20]
Kevin Lewis
Sergey, If an upgrade happens without exporting the data first, the data is not lost, it just cannot be found. So maybe you can find a better error message that we can return.
[2 Apr 2008 19:54]
Kevin Benton
> [2 Apr 20:20] Kevin Lewis > Sergey, If an upgrade happens without exporting the data first, the data is > not lost, it just cannot be found. So maybe you can find a better error > message that we can return. Kevin - if the data cannot be found, it's lost. Reporting a "better error message" doesn't make the data available. The fix for this needs to prevent data from becoming inaccessible for any reason (lost or cannot be found). I completely disagree with the D5/R2/E3 evaluation of this bug. The perception is that because MySQL reports the data isn't there, that this is truly S1.
[2 Apr 2008 20:09]
Ann Harrison
The data can not be read by the most recent version of Falcon. Restoring the previous version will cause the data to become available again. The error message should indicate that access is being attempted by the wrong version of Falcon.
[2 Apr 2008 20:39]
Kevin Benton
Ann - again - this is about perception - users often upgrade without reading detailed release notes first. If the installation specifically warns the user that upgrading will make data unavailable (whether lost or not) and forces the user to ack. the warning, I am as certain as I can be that users will appreciate it. Users will be upset if they aren't warned and are forced to downgrade so they can grab data that didn't get dealt with in the upgrade, then re-upgrade and manually apply the "old" data back to the "new" table(s). Without this kind of functionality, I'm less likely to stick with testing MySQL because it's difficult to know if I'm going to run into more of this type of incompatibility and not get warned. One thing I learned a *long* time ago when asking for volunteers to test - honor the tester's time as much as possible - asking a tester to read pages of release notes to find out that there's an incompatible change made that prevents them from simply upgrading without backing data up first and restoring (but only part of that data because we don't want to overwrite certain types of data) - that seems like a lot of work for a tester to go through. I want my testers to spend the largest part of their time on testing changes not trying to figure out how to install my latest release without losing data.
[3 Apr 2008 17:10]
Hakan Küçükyılmaz
If Falcon detects a incompatible data, then it has to refuse to start. Period. No error message on client, no starting at all, no strange ERROR 1146 (42S02): Table 'test.t1' doesn't exist. We have to write into the error log, that the database has to updated.
[3 Apr 2008 17:25]
Kevin Benton
> [3 Apr 19:10] Hakan Kuecuekyilmaz > If Falcon detects a incompatible data, then it has to refuse to start. Period. ... Hakan, I almost agree with you. When upgrading, it seems to me that the upgrade process ought to catch this type of problem and self-correct or at least warn the user that continuing beyond a certain point will result in the inability to access data. Once beyond that point, users ought to be able to start the server and replace tables stored in old formats of Falcon if not self-corrected. If the upgrade can self-correct, then I agree with you - refuse to start. In any case, it seems that providing a way to upgrade old format Falcon tables as a part of the installation process without down-grading is necessary. If that means providing a separate program that can read the old format files and re-write them to the new format, that would be great!
[29 Apr 2008 11:37]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/46182 ChangeSet@1.2655, 2008-04-29 15:34:12+05:00, svoj@mysql.com +1 -0 BUG#35190 - Can't upgrade MySQL 6 without mysqldump first Falcon silently succeedes to open incompatible data files (e.g. created by different version) on server start. With this fix falcon refuses to start if it mets incompatible data files.
[29 Apr 2008 15:02]
Kevin Lewis
Wow, that was easier than we thought!
[5 Aug 2008 16:37]
Sergey Vojtovich
Was pushed to 6.0.6.
[4 Oct 2008 15:28]
Jon Stephens
Documented in the 6.0.6 changelog as follows: Previously, Falcon failed silently when attempting to read incompatible datafiles created by an earlier version of the storage engine. Now, when Falcon encounters such datafiles, it refuses to start, and an appropriate error is issued instead.
[6 Oct 2008 16:51]
Kevin Benton
Thanks all - great update. :-)