我有 MySQL 5.5.24。Сalling uuid_short() 几次我只得到一个递增的值:
mysql> select uuid_short();
+-------------------+
| uuid_short() |
+-------------------+
| 22851044396498953 |
+-------------------+
1 row in set (0.00 sec)
mysql> select uuid_short();
+-------------------+
| uuid_short() |
+-------------------+
| 22851044396498954 |
+-------------------+
1 row in set (0.00 sec)
但是手册说:
The UUID_SHORT() return value is constructed this way:
(server_id & 255) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;
似乎“server_startup_time_in_seconds”或“server_id”都没有变化。(我更改了@@global.server_id
系统变量,但没有效果)。
有谁知道为什么?