If I use the UUID_SHORT() function in an INSERT statement, how do I make sure the UUID it creates has not already been used in the table before, does it automatically check that, and regenerate a UUID on collision?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The value of
UUID_SHORT()is guaranteed to be unique if the following conditions hold:The
server_idof the current host is unique among your set of master and slave serversserver_idis between 0 and 255You don’t set back your system time for your server between mysqld restarts
You do not invoke
UUID_SHORT()on average more than 16 million times per second between mysqld restarts