What does the first part of the MariaDB version string mean?

天大地大妈咪最大 提交于 2020-05-17 06:45:42

问题


If I inspect the DB version information from within PHP, MariaDB returns an extra set of version numbers at the front of its version string.

>>> DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
=> "5.5.5-10.2.20-MariaDB-1:10.2.20+maria~bionic"

What does the 5.5.5 represent?


回答1:


The version prefix (so called "replication version hack") was introduced when MariaDB bumped the major version number to 10 (2 digits).

This was necessary, since the replication protocol expects a 1-digit major version number and would break with a 2 digit version number.

The version 5.5.5 was never released.

From Connector/C source:

#define MA_RPL_VERSION_HACK "5.5.5-"
...
mysql->server_version= strdup(end + sizeof(MA_RPL_VERSION_HACK) - 1);


来源:https://stackoverflow.com/questions/56601304/what-does-the-first-part-of-the-mariadb-version-string-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!