You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
YZWL/IDEA/sys/version_patch.sql

28 lines
744 B

create
definer = `mysql.sys`@localhost function sys.version_patch() returns tinyint unsigned comment '
Description
-----------
Returns the patch release version of MySQL Server.
Returns
-----------
TINYINT UNSIGNED
Example
-----------
mysql> SELECT VERSION(), sys.version_patch();
+--------------------------------------+---------------------+
| VERSION() | sys.version_patch() |
+--------------------------------------+---------------------+
| 5.7.9-enterprise-commercial-advanced | 9 |
+--------------------------------------+---------------------+
1 row in set (0.00 sec)
' sql security invoker no sql
BEGIN
RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(VERSION(), '-', 1), '.', -1);
END;