summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 518b9ca624b..bcf534c9e84 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2754,7 +2754,14 @@ String *Item_func_uuid::val_str(String *str)
tv++;
}
else
- nanoseq=0;
+ {
+ if (nanoseq)
+ {
+ tv-=nanoseq;
+ nanoseq=0;
+ }
+ DBUG_ASSERT(tv > uuid_time);
+ }
uuid_time=tv;
pthread_mutex_unlock(&LOCK_uuid_generator);