Adriano, > CORE-3238 is the problem related to UUIDs version and reserved bytes which > we're not respecting. > > Note that in Windows, we generate UUIDs with a WinAPI function so it > generates correct numbers, but in POSIX we just generate random data. > > 1) So from a POV, we may say our GEN_UUID is correct in Windows only, and > that UUID_TO_CHAR (and CHAR_TO_UUID) are always incorrect, since they > don't put each reserved byte in the correct text representation place. > > In this POV, we may need to change POSIX GEN_UUID and introduce new > functions for TO/FROM CHAR. > > 2) I'd instead would consider another way. I'd say current GEN_UUID is > always wrong, and just change it for all platforms. > > The new version will translate the Windows GUID differently, so the > reserved bytes would be in the right place for FROM/TO CHAR functions > work correctly. > > In this way we also maintain the below property, where the string > representation matches the octet one:
This approach would seem wrong. If the Windows UUID functions is generating correct values, and those values are stored correctly in the database. Then it seems that the "raw" number and the text representation are not supposed to be match. So the problem is with the UUID to CHAR functions, not with how the value is stored/generated. Your proposal would have Firebird manipulate the stored value to match the text representation, which seems to contradict the RFC. I agree that the fact that the raw and text values would not look the same is a problem, but is not for this project to contradict the RFC. > I also consider better to say it's currently incorrect for Windows too, since > UUIDs nature is to be distributed and may be interchangeable with ones > generated in others platforms. But what is the basis for the interchange, the raw UUID value or the text representation? Both? Your solution expects that it is only the text representation. Sean ------------------------------------------------------------------------------ 10 Tips for Better Server Consolidation Server virtualization is being driven by many needs. But none more important than the need to reduce IT complexity while improving strategic productivity. Learn More! http://www.accelacomm.com/jaw/sdnl/114/51507609/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel