Bug #21889 Refuse to execute a query on a deprecated table version
Submitted: 29 Aug 2006 0:29 Modified: 4 Nov 2008 23:16
Reporter: Morgan Tocker Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.1+ OS:Any (ALL)
Assigned to: CPU Architecture:Any

[29 Aug 2006 0:29] Morgan Tocker
Description:
Between MySQL 4.1 and 5.0 a number of changes were made.  As a result the upgrade advise was to export with mysqldump and then import the data into the new version.

The problem with this, is that there is nothing to stop a user *ignoring* the advice.  There seem to be a lot of known issues (and crashes) associated with using the older data files in a new version.

How to repeat:
* Install MySQL 4.1.
* Create databases with decimal fields
* Install MySQL 5.0, using the MySQL 4.1 data files and not following the upgrade instructions.
* Watch your server burn up, and explode.

Suggested fix:
If the table version (as seen in SHOW TABLE STATUS) is less than what the server expects, refuse to run the query.

There will be experienced users aware of the caveats of running older tables on newer servers, so a variable should be available to turn this off.

i.e.
[mysqld]
allow_deprecated_table_versions

Additional notes:
* I am suggestion an error (i.e. statement doesn't get executed), not a warning since some of the incompatibilities cause crashes.

* I am also suggesting this fix go into 5.1+ as it may compatibility for some users.
[29 Aug 2006 1:10] MySQL Verification Team
Thank you for the bug feature request.
[4 Oct 2008 23:16] Konstantin Osipov
Please provide a test case.
[5 Nov 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".