You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer, I expect the GUID expression generated by AbstractPlatform::getGuidExpression() to have the same semantic (namely, UUIDv1) across supported platforms.
Current behavior
On MySQL platform, it's implemented as UUID() which generates UUIDv1 and is therefore correct.
On PostgreSQL platform, it's implemented it as UUID_GENERATE_V4() which generates UUIDv4. For some reason, UUID_GENERATE_V1() is unavailable on Travis CI:
SQLSTATE[42883]: Undefined function: 7 ERROR: function uuid_generate_v1() does not exist
On Oracle platform, it's implemented as SYS_GUID() which returns RAW(16) which is not a UUID according to Stackoverflow.
On SQL Server and SQLAnywhere, it's implemented as NEWID(). From the documentation, it's not clear which UUID version it generates, but according to the test output, it's not UUIDv1:
Failed asserting that 'DBB4D428-2338-4D4F-823F-4AA2ECEC985A' is greater than 'F4959EE5-02EC-4136-A21F-211813F67B63'
On SQLite, it's implemented using purely RANDOMBLOB() which makes it not compliant with the the UUIDv1 definition.
All implementations generate UUIDv1 which looks impossible. Given the current state of the feature, would it make sense to deprecate it and encourage users to use application-generated UUIDs?
The text was updated successfully, but these errors were encountered:
Summary
As a developer, I expect the GUID expression generated by
AbstractPlatform::getGuidExpression()
to have the same semantic (namely, UUIDv1) across supported platforms.Current behavior
UUID()
which generates UUIDv1 and is therefore correct.UUID_GENERATE_V4()
which generates UUIDv4. For some reason,UUID_GENERATE_V1()
is unavailable on Travis CI:SYS_GUID()
which returnsRAW(16)
which is not a UUID according to Stackoverflow.NEWID()
. From the documentation, it's not clear which UUID version it generates, but according to the test output, it's not UUIDv1:RANDOMBLOB()
which makes it not compliant with the the UUIDv1 definition.There's also a summary of the above on Wikipedia.
How to reproduce
Below is the pseudo-code. See a real example in #3162.
Expected behavior
All implementations generate UUIDv1 which looks impossible. Given the current state of the feature, would it make sense to deprecate it and encourage users to use application-generated UUIDs?
The text was updated successfully, but these errors were encountered: