{"id":18806739,"url":"https://github.com/lefred/mysql-component-uuid_v1","last_synced_at":"2026-01-08T19:30:14.645Z","repository":{"id":187747690,"uuid":"677432715","full_name":"lefred/mysql-component-uuid_v1","owner":"lefred","description":"MySQL 8 component to extract timestamp from uuid","archived":false,"fork":false,"pushed_at":"2024-01-23T19:42:10.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T21:27:14.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T15:00:24.000Z","updated_at":"2023-08-19T09:47:34.000Z","dependencies_parsed_at":"2023-08-12T02:07:48.119Z","dependency_job_id":"5916f4a1-bbaf-4d87-b61e-f81545685aae","html_url":"https://github.com/lefred/mysql-component-uuid_v1","commit_stats":null,"previous_names":["lefred/mysql-component-uuid_v1"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-component-uuid_v1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-component-uuid_v1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-component-uuid_v1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-component-uuid_v1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefred","download_url":"https://codeload.github.com/lefred/mysql-component-uuid_v1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239742416,"owners_count":19689309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T22:49:26.255Z","updated_at":"2026-01-08T19:30:12.582Z","avatar_url":"https://github.com/lefred.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql-component-uuid_v1\n\nExtending MySQL using the Component Infrastructure - Adding a functions to retrieve\ntimestamp information related to UUID v1 (default in MySQL 8).\n\n```\n MySQL \u003e install component \"file://component_uuid_v1\";\n Query OK, 0 rows affected (0.0005 sec)\n \n MySQL \u003e select * from performance_schema.user_defined_functions where udf_name like 'uuid%';\n+------------------------+-----------------+----------+-------------+-----------------+\n| UDF_NAME               | UDF_RETURN_TYPE | UDF_TYPE | UDF_LIBRARY | UDF_USAGE_COUNT |\n+------------------------+-----------------+----------+-------------+-----------------+\n| uuid_to_unixtime       | integer         | function | NULL        |               1 |\n| uuid_to_timestamp_long | char            | function | NULL        |               1 |\n| uuid_to_timestamp      | char            | function | NULL        |               1 |\n+------------------------+-----------------+----------+-------------+-----------------+\n\n MySQL \u003e select uuid() into @a;\n MySQL \u003e select @a;\n+--------------------------------------+\n| @a                                   |\n+--------------------------------------+\n| cff78875-3855-11ee-bb0e-c8cb9e32df8e |\n+--------------------------------------+\n\n MySQL \u003e select uuid_to_unixtime(@a);\n+----------------------+\n| uuid_to_unixtime(@a) |\n+----------------------+\n|           1691765170 |\n+----------------------+\n\n MySQL \u003e select uuid_to_timestamp(@a);\n+-------------------------+\n| uuid_to_timestamp(@a)   |\n+-------------------------+\n| 2023-08-11 17:46:10.754 |\n+-------------------------+\n\n MySQL \u003e select uuid_to_timestamp_long(@a);\n+------------------------------+\n| uuid_to_timestamp_long(@a)   |\n+------------------------------+\n| Fri Aug 11 17:46:10 2023 GMT |\n+------------------------------+\n```\n\n## Errors Handling\n\nThe current checks performed:\n\n```\n MySQL \u003e select uuid_to_timestamp(\"0189e190-8e91-4d81-9f8d-d9a1edbf955a\");\nERROR: 3200 (HY000): uuid_to_timestamp UDF failed; This is not a UUID v1\n\n MySQL \u003e select uuid_v7_to_timestamp(\"0189e190-8e91-4d81-9f8d-d9a1edbf955a1\");\nERROR: 3200 (HY000): uuid_v7_to_timestamp UDF failed; Invalid UUID string length\n\n MySQL \u003e select uuid_v7_to_timestamp(\"aaa\");\nERROR: 3200 (HY000): uuid_v7_to_timestamp UDF failed; Invalid UUID string length\n\n MySQL \u003e select uuid_v7_to_timestamp(\"0189e190-8e91-4d81-9f8d-d9a1edbf955a1\",1);\nERROR: 3200 (HY000): uuid_v7_to_timestamp UDF failed; this function requires only 1 parameteter\n\n MySQL \u003e select uuid_v7_to_timestamp();\nERROR: 3200 (HY000): uuid_v7_to_timestamp UDF failed; this function requires 1 parameteter\n```\n\n# Compilation notes\n\nSince MySQL 8.3.0, boost is included in the source code (extra directory), but it's not a full\nversion, some modules are missing to compile this component.\n\nYou need to copy them first:\n\n```\ncp -r boost_1_77_0/boost/uuid/ mysql-%{version}/extra/boost/boost_1_77_0/boost/\ncp -r boost_1_77_0/boost/tti/ mysql-%{version}/extra/boost/boost_1_77_0/boost/\ncp -r boost_1_77_0/boost/io/ mysql-%{version}/extra/boost/boost_1_77_0/boost/\ncp -r boost_1_77_0/boost/random/ mysql-%{version}/extra/boost/boost_1_77_0/boost/\ncp boost_1_77_0/boost/random.hpp mysql-%{version}/extra/boost/boost_1_77_0/boost/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysql-component-uuid_v1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefred%2Fmysql-component-uuid_v1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysql-component-uuid_v1/lists"}