When a table is first accessed, InnoDB (including some releases prior to InnoDB storage engine 1.0) checks that the file format of the tablespace in which the table is stored is fully supported. This check prevents crashes or corruptions that would otherwise occur when tables using a “too new” data structure are encountered.
Note that all tables using any file format supported by a
release can be read or written (assuming the user has sufficient
privileges). The setting of the system configuration parameter
innodb_file_format can prevent creating a new table that uses
specific file formats, even if they are supported by a given
release. Such a setting might be used to preserve backward
compatibility, but it does not prevent accessing any table that
uses any supported format.
As noted in Section 4.2, “Named File Formats”, versions of InnoDB older than 5.0.21 cannot reliably use database files created by newer versions if a new file format was used when a table was created. To prevent various error conditions or corruptions, InnoDB checks file format compatibility when it opens a file (for example, upon first access to a table). If the currently running version of InnoDB does not support the file format identified by the table type in the InnoDB data dictionary, MySQL reports the following error:
ERROR 1146 (42S02): Table '
t1' doesn't exist
InnoDB also writes a message to the error log:
t1: unknown table type
The table type should be equal to the tablespace flags, which contains the file format version as discussed in Section 4.5, “Identifying the File Format in Use”.
Versions of InnoDB prior to 4.1 did not include table format identifiers in the database files, and versions prior to 5.0.21 did not include a table format compatibility check. Therefore, there is no way to ensure proper operations if a table in a “too new” format is used with versions of InnoDB prior to 5.0.21.
The new file format management capability introduced with the InnoDB storage engine (comprising tablespace tagging and run-time checks) allows InnoDB to verify as soon as possible that the running version of software can properly process the tables existing in the database.
If you permit InnoDB to open a database containing files in a
format it does not support (by setting the parameter
table-level checking described in this section still applies.
Users are strongly urged not to use database files that contain “Barracuda” file format tables with releases of InnoDB older than the InnoDB storage engine. It is possible to “downgrade” such tables to the “Antelope” format (that the built-in InnoDB in MySQL up to version 5.1 supports) with the procedure described in Section 4.6, “Downgrading the File Format”.
This is the User’s Guide for InnoDB storage engine 1.1 for MySQL 5.5, generated on 2010-04-13 (revision: 19994) .