Hi!
On Jun 17, Tatjana A Nuernberg wrote:
> ChangeSet@stripped, 2008-06-17 07:59:12+02:00, tnurnberg@stripped +3 -0
> Bug#35848: UUID() returns UUIDs with the wrong time
>
> offset for time part in UUIDs was 1/1000 of what it
> should be. In other words, offset was off.
>
> Also handle the case where we count into the future
> when several UUIDs are generated in one "tick", and
> then the next call is late enough for us to unwind
> some but not all of those borrowed ticks.
>
> Lastly, handle the case where we keep borrowing and
> borrowing until the tick-counter overflows by also
> changing into a new "numberspace" by creating a new
> random suffix.
ok to push, with one minor change:
> diff -Nrup a/sql/item_strfunc.cc b/sql/item_strfunc.cc
> --- a/sql/item_strfunc.cc 2007-01-11 14:44:59 +01:00
> +++ b/sql/item_strfunc.cc 2008-06-17 07:59:10 +02:00
...
> + set_clock_seq_str();
> + tv= my_getsystime() + UUID_TIME_OFFSET;
> + nanoseq= 0;
No need to explicitly reset nanoseq here, it's done in
set_clock_seq_str() anyway.
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring