MySQL:将查询从 v4 迁移到 v5
将项目从 MySQL 4 迁移到 MySQL 5 时,为了确保查询保持兼容,我需要解决哪些主要问题?
一般来说,事情应该没问题,但我知道一些在 MySQL 4 查询中隐式工作的东西必须在 MySQL 5 中显式定义(但我一辈子都记不起来到底是什么)。
When migrating a project from MySQL 4 to MySQL 5, what are the primary things I need to address in order to ensure queries remain compatible?
In general things should be fine, but I know that some things that worked implicitly in MySQL 4 queries have to be defined explicitly in MySQL 5 (but I can't for the life of me remember what exaxtly).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅 http://dev.mysql.com /doc/refman/5.0/en/upgrading-from-4-1.html 获取可能影响您的差异列表。
我观察到的唯一一个情况是当您的查询同时使用逗号样式 (SQL-89) 和
JOIN
样式语法时。 一些 MySQL 4.x 查询必须重写以符合现在更符合标准的连接语义。 请参阅 http://dev.mysql.com/doc/refman/5.0/en/join.html" rel="nofollow noreferrer">http:// /dev.mysql.com/doc/refman/5.0/en/join.htmlSee http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html for a list of differences that could affect you.
The only one I've observed is when you have a query that uses both comma-style (SQL-89) and
JOIN
-style syntax. Some MySQL 4.x queries must be rewritten to comply with the now more standards-compliant join semantics. See "Join Processing Changes in MySQL 5.0.12" on page http://dev.mysql.com/doc/refman/5.0/en/join.html除了 Bill 所说的之外,了解升级时需要做什么的最佳方法是在新数据库上离线尝试您的应用程序。 针对新数据库加载应用程序,看看有什么问题。
In addition to what Bill says, the best way to see what needs to be done when upgrading is to try your app on the new database offline. Load up the app against the new db and see what breaks.