Skip to content

Instantly share code, notes, and snippets.

View Lunaxod's full-sized avatar

Oleksandr Maksymeniuk Lunaxod

View GitHub Profile
@merkushin
merkushin / mysql_uuid.sql
Last active October 15, 2023 14:06
MySQL UUID v5 Stored Functions
DROP FUNCTION IF EXISTS uuid_from_bin;
DROP FUNCTION IF EXISTS uuid_to_bin;
DROP FUNCTION IF EXISTS uuid_v5;
DROP FUNCTION IF EXISTS uuid_v4;
DELIMITER //
CREATE FUNCTION uuid_from_bin(b BINARY(16))
RETURNS CHAR(36)
BEGIN