[MDEV-15854] Implement uuid_to_bin, bin_to_uuid and is_uuid functions Created: 2018-04-12 Updated: 2023-11-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Anders Karlsson | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 10 |
| Labels: | Compatibility, beginner-friendly, compat80, contribution, foundation, over, patch, portability, upstream-fixed | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
MySQL 8.0 introduces these functions, and they are really useful. See more information here: https://dev.mysql.com/blog-archive/mysql-8-0-uuid-support/ Work around is to use the 10.7 uuid type (MDEV-4958). |
| Comments |
| Comment by Manish Rao [ 2019-02-11 ] |
|
Hey, I'd like to contribute to this feature, it'd be nice if you can assign me a mentor as I'm new to MariaDB. |
| Comment by Daniel Black [ 2019-02-11 ] |
|
manish9803, Thanks for you interest. I've already implement this in the github pull requests (against active branches) under Development on the right hand side of this page. You are welcome to test these however the inbuilt tests from Oracle are quite thorough. |
| Comment by Manish Rao [ 2019-02-11 ] |
|
Ohh, cool, Okay |
| Comment by Alexander Barkov [ 2019-05-13 ] |
|
We're going to add a new data type UUID into 10.5. The following syntax will be used instead:
We can consider adding MySQL-8.0 syntax as well, but as a syntactic wrapper for these CAST() operators. " |
| Comment by Daniel Black [ 2020-08-15 ] |
|
Sadly didn't make 10.5 |
| Comment by Alexander Barkov [ 2020-08-15 ] |
|
A working prototype for the UUID data type is available here: |
| Comment by Oli Sennhauser [ 2021-04-07 ] |
|
Related to MDEV-23748? |
| Comment by Bruno Leveque [ 2021-07-23 ] |
|
Unfortunately it did not make it to 10.6 either However, it looks like MDEV-4958 is now under review and scheduled for 10.7. In the meantime I'm switching to MySQL 8.x, as I'd rather use SQL to generate my sequential v4 UUIDs than a PHP implementation. |
| Comment by Rick James [ 2021-07-24 ] |
|
Bruno – MySQL implements the sequential version 1 (not 4) UUIDs. Ver 4 is random. |
| Comment by Rick James [ 2022-06-20 ] |
|
Potential problem: What is the migration path to/from MySQL 8.0 for tables containing UUIDs? I see the following as grief for users wanting to (or needing to) switch between 10.7 and 8.0 (either way):
|
| Comment by Trevor Gross [ 2023-09-29 ] |
|
I have `uuid_to_bin` `uuid_from_bin`/`bin_to_uuid` and `uuid_is_valid` (`is_uuid`) available as UDFs for anyone who needs a workaround: https://github.com/pluots/udf-suite#uuid |