On 15/12/2011 15:04, Leyne, Sean wrote: > 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. > > There is no UUID "binary representation" in the RFC. There it's just a formated string.
Also we never documented our binary representation, and the only thing visible on it is that it's the same representation of the formatted string. Change this would be wrong IMO, and much worse considering this change would need new (and hence confusing) format functions. For Windows users this binary representation is also wrong now, cause reserved bits is not documented in it. Adriano ------------------------------------------------------------------------------ 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