UUID_SHORT
Syntax
UUID_SHORT()
Description
Returns a "short" universal identifier in the form of a 64-bit unsigned integer.
The return value of UUID_SHORT() is guaranteed to be unique if the following conditions are met:
-
The
server_idvalue of the current server is between 0 and 255 and is unique among the source and replica servers. If the total number ofserver_idvalues exceeds 256, the generated "short" universal identifier cannot be guaranteed to be unique in space, although this function will not return an error. -
Do not set the system time of the server host during seekdb restart.
-
During seekdb restart, the average number of calls to
UUID_SHORT()per second is less than 16 million.
The return value of UUID_SHORT() is constructed as follows:
(server_id & 255) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;
Examples
SELECT UUID_SHORT();
+-----------------------+
| UUID_SHORT() |
+-----------------------+
| 92395783831158784 |
+-----------------------+
1 row in set (0.001 sec)