向后兼容、向前兼容

向后兼容

也叫作向下兼容,就是兼容老的。

可以是现在的程序兼容老的数据;也可以是现在的数据兼容老的程序。就是当前的主题(subject)兼容过去的。

例如下面一段话

Prior to version 5.7, server and status variables were instrumented in information_schema. This instrumentation was limited: it allowed tracking of only global and current session values. Information about variables and status in other sessions, as well as information about the user variables, was not accessible. However, for backward-compatibility reasons, MySQL 5.7 uses information_schema to track variables. 

-- 摘自 《High Performance MySQL forth edition》

意思是MySQL 5.7版本之前服务器和变量状态,都是使用information_schema来测量监控的。 到了MySQL 5.7版本,MySQL为了向后兼容,使用information_schema来跟踪变量变化。

 

向前兼容

也叫作向上兼容,就是兼容新的。

逻辑正好和向后(向下)反过来

posted @ 2023-05-09 22:33  szcj~  阅读(672)  评论(0)    收藏  举报