您的位置:首页 > 数据库 > MySQL

mysql 4.0迁移到5.0总结(一) 建库脚本的迁移

2009-02-05 13:35 183 查看
经过尝试,两者之间有以下的区别:

(1)4.0中vachar字段中,空格不被计数
(2)4.0中,表名两端的空格会自动过滤
(3)4.0中,vachar字段中,/不被计数
(4)5.0中自增长类型必须单独设置成key或索引
(5)5.0中,联合索引的总容量不能超过1000bytes,通过限定个别索引的有效长度进行改善
(6)5.0中,Condition是关键字,不能作为字段名
(7)5.0中create Table 语句中 最后一个字段后跟逗号,会报错

以前的脚本在5.0上跑会出现的问题:

(1)ERROR 1406 (22001): Data too long for column 'xxx' at row 1
(2)ERROR 1103 (42000): Incorrect table name 'xxx '
(3)ERROR 1075 (42000): Incorrect table definition; there can be only one auto colum
n and it must be defined as a key

(4)ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
(5)ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ') TYP
E=MyISAM' at line 9
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: