MariaDB版本字符串的第一部分是什么意思? [英] What does the first part of the MariaDB version string mean?

查看:28
本文介绍了MariaDB版本字符串的第一部分是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我从PHP中检查数据库版本信息,MariaDB将在其版本字符串的开头返回一组额外的版本号.

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"

5.5.5 代表什么?

推荐答案

MariaDB将主要版本号提高到10(2位)时,引入了版本前缀(即复制版本破解").

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

这是必要的,因为复制协议期望使用1位数的主版本号,并且会以2位数的版本号中断.

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

版本5.5.5从未发布.

The version 5.5.5 was never released.

从Connector/C来源:

From Connector/C source:

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

这篇关于MariaDB版本字符串的第一部分是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆