-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.2rc1
-
None
-
Sprint 86 (Mar 2022)
-
0.5
When generating CUID server constructs timestamp part without adding padding
gettimeofday(¤t_time, NULL); from_decimal(timestamp, CUID_BASE_36, (size_t)(current_time.tv_sec * 1000 + current_time.tv_usec / 1000));
However on 32 bit systems size_t is only 4 bytes which will cause the timestamp value to wrap around and be shorter, resulting in 24 character CUIDs.
The timestamp value also must be padded so CUIDs have fixed 25 character length.