MySQL C++ 连接器和 Boost

huangapple go评论58阅读模式
英文:

MySQL C++ connector and Boost

问题

8.0.23版本的发布说明提到:

> 以前,构建或运行使用传统JDBC API的应用程序需要安装Boost。不再需要Boost来运行此类应用程序。API保持不变,因此不需要更改代码来构建应用程序。但由于这一更改,ABI版本已从7增加到9。要运行应用程序,必须安装与相同ABI构建的Connector/C++版本。

"the ABI version has increased from 7 to 9" 的意思是ABI版本从7增加到9。在文档中没有关于ABI或ABI版本的具体内容。它是否指的是MySQL 7到MySQL 9?如果是的话,为什么会出现在8.0.23版本的发布说明中?

其次,为什么要说你需要Boost来运行JDBC API的应用程序?我不能只链接一个MySQL库(例如Ubuntu上的libmysqlcppconn7v5)吗?我肯定不需要额外链接Boost库吧?

这个应用程序可以在已安装Boost的系统上构建,但在目标系统上可能没有Boost(或gcc等)。

英文:

The 8.0.23 release notes say:

> Previously, to build or run applications that use the legacy JDBC API,
> it was necessary to have Boost installed. Boost is no longer required
> for such applications. The API has not changed, so no code changes are
> required to build applications. However, in consequence of this
> change, the ABI version has increased from 7 to 9. To run
> applications, a version of Connector/C++ built with the same ABI must
> be installed

What does "the ABI version has increased from 7 to 9" mean? I can't see anything in the docs about an ABI or an ABI version. Does it just mean MySQL 7 through MySQL 9? If so, why is this in the 8.0.23 release notes?

Second, why does it say that you need Boost for apps that run the JDBC API? Can't I just link in a MySQL lib (libmysqlcppconn7v5 for Ubuntu)? Surely I don't have to link in a Boost library as well?

This app can be built on a system with Boost installed, but Boost (or gcc/etc) won't be available on the target.

答案1

得分: 1

在8.0.23版本之前,构建使用JDBC API的应用程序需要Boost头文件。

在8.0.23版本中,不再需要这些头文件,因此导出的类已更改。因此,ABI必须提高。由于Debian发行版上的包命名方式,与connectorcpp8(X Dev API)发生了冲突,因此我们将版本从7提升到9。

ABI与MySQL版本无关。它是二进制版本,因此每当导出类中添加/移除内容时,ABI都会提高。

英文:

Up untill 8.0.23 you would need boost headers to build your app that uses JDBC API.

On 8.0.23, that need was removed and, as such, exported classes have changed. So ABI have to be bumped. Due to how packages are named on debian distros, it clashed against connectorcpp8 (X Dev API) so we bumped from 7 to 9.

ABI has nothing to do with MySQL version. It is the binary version so, whenever things are added/removed to exported classes, ABI is bumped.

huangapple
  • 本文由 发表于 2023年3月8日 18:19:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/75671784.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定