Bug #8171 True VARCHAR: problems when server is down-graded
Submitted: 27 Jan 2005 23:52 Modified: 16 May 2005 15:21
Reporter: Trudy Pelzer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug OS:Linux (SuSE 9.1)
Assigned to: CPU Architecture:Any

[27 Jan 2005 23:52] Trudy Pelzer
Description:
A problem exists with the "true varchar" change: 
if I create a table with a VARCHAR column in 5.0.3,
then try to read the database with a 4.1.x version
of MySQL (e.g. 4.1.10), I get an error:
ERROR 1033 (HY000): Incorrect information in file: '<table name>'

So server down-grade doesn't appear to be possible
once MySQL 5.0 has created a new VARCHAR column.

How to repeat:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.3-alpha-debug

mysql> use tp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> create table t1 (col1 int, col2 varchar(7500));
Query OK, 0 rows affected (0.01 sec)

mysql> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                  |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `col1` int(11) default NULL,
  `col2` varchar(7500) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> insert into t1 values (50,'hello');
Query OK, 1 row affected (0.01 sec)

mysql> quit;

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

mysql> use tp;
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 't1'
Database changed

mysql> select * from t1;
ERROR 1033 (HY000): Incorrect information in file: './tp/t1.frm'
[7 May 2005 14:33] Trudy Pelzer
Just document this. -Brian
[16 May 2005 15:21] Paul DuBois
I've added a note about this problem to this section:

http://dev.mysql.com/doc/mysql/en/upgrading-from-4-1.html