mirror of
https://github.com/MariaDB/server.git
synced 2025-08-17 06:42:17 +03:00
MDEV-26664 Store UUIDs in a more efficient manner
UUID values llllllll-mmmm-Vhhh-vsss-nnnnnnnnnnnn are now stored as nnnnnnnnnnnn-vsss-Vhhh-mmmm-llllllll inside the record: - the groups (segments separated by dash) are reordered right-to-left. - the bytes inside the groups are not reordered (stored as before, in big-endian format). This provides a better sorting order: the earlier UUID was generated, the higher it appears in the ORDER BY output. Also, this change enables a good key prefix compression, because the constant part is now in the beginning, while the non-constant part (the timestamp) is in the end.
This commit is contained in:
committed by
Sergei Golubchik
parent
50bcda010f
commit
b9f19f7eae
@@ -484,6 +484,11 @@ public:
|
||||
if (str.Alloced_length)
|
||||
Alloced_length= (uint32) (str.Alloced_length - offset);
|
||||
}
|
||||
LEX_CSTRING to_lex_cstring() const
|
||||
{
|
||||
LEX_CSTRING tmp= {Ptr, str_length};
|
||||
return tmp;
|
||||
}
|
||||
inline LEX_CSTRING *get_value(LEX_CSTRING *res)
|
||||
{
|
||||
res->str= Ptr;
|
||||
|
Reference in New Issue
Block a user