Bug #7089 Make version-4.1 mysqld to recognize version-5.0 InnoDB tables
Submitted: 8 Dec 2004 0:36 Modified: 21 Dec 2004 17:53
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.0.22, 4.1.7 OS:Any (all)
Assigned to: Marko Mäkelä CPU Architecture:Any

[8 Dec 2004 0:36] Peter Gulutzan
Description:
Using MySQL 5.0.3-alpha-debug, I create a database. 
I use that database. 
I create a table with engine=innodb. 
I quit. 
Using MySQL 4.1.8-debug, I try to use that database. 
The server crashes. 
 

How to repeat:
***** at this stage, i have a server going. notice that when i start it's 5.0.3-alpha-debug ***** 
 
pgulutzan@d-142-59-78-116:~> /usr/local/mysql/bin/mysql --user=rootWelcome to the 
MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 3 to server version: 5.0.3-alpha-debug 
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 
 
mysql> create database db97; 
Query OK, 1 row affected (0.00 sec) 
 
mysql> use db97; 
Database changed 
mysql> create table t (s1 int) engine=innodb; 
Query OK, 0 rows affected (0.01 sec) 
 
mysql> quit; 
Bye 
pgulutzan@d-142-59-78-116:~> /usr/local/mysql/bin/mysqladmin --user=root shutdown 
 
***** at this stage, i change servers -- notice that when i restart it's 4.1.8-debug ***** 
 
 
pgulutzan@d-142-59-78-116:~> /usr/local/mysql/bin/mysql --user=root 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 1 to server version: 4.1.8-debug 
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 
 
mysql> use db97; 
Reading table information for completion of table and column names 
You can turn off this feature to get a quicker startup with -A 
 
Didn't find any fields in table 't' 
Database changed 
mysql>     
 
***** at this stage, the server has crashed *****
[8 Dec 2004 0:42] Heikki Tuuri
Peter G,

I am changing this to a feature request.

InnoDB tables in 5.0.3 have a new, compact table format :). 4.1 is not supposed to be able to read them.

When Marko has time, he might consider adding a check to 4.1 that recognizes 5.0 format tables and returns an error message.

Regards,

Heikki
[8 Dec 2004 1:19] Brian Aker
I agree with Peter, its a bug. Keep in mind that we try to keep it so that users can always 
upgrade to the latest version, and still downgrade safely.

It would be nice, if it was possible to read the data, but in the absence of this, we really should 
throw an error at least.
[8 Dec 2004 3:15] Miguel Solorzano
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.8-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>  use db97;
Database changed
mysql> show tables;
+----------------+
| Tables_in_db97 |
+----------------+
| t              |
+----------------+
1 row in set (0.02 sec)

mysql> show create table t;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[8 Dec 2004 15:05] Marko Mäkelä
Hmm, shouldn't the test be added to MySQL 4.0 as well? What about 3.23?
[13 Dec 2004 12:14] Marko Mäkelä
I've committed a changeset to 4.0 that will refuse to load tables that are in the new MySQL 5.0.3 format.
[13 Dec 2004 12:31] Marko Mäkelä
I pushed the patch to the 4.0 source repository, and it will eventually be merged to the 4.1 tree. It will be included in 4.0.23 and 4.1.9 or 4.1.8.