You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/27 00:55:57 UTC

[GitHub] [superset] betodealmeida commented on a change in pull request #12728: fix: Erroneous uuid generation for mysql fixed.

betodealmeida commented on a change in pull request #12728:
URL: https://github.com/apache/superset/pull/12728#discussion_r564942676



##########
File path: superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
##########
@@ -81,7 +81,8 @@ class ImportMixin:
 
 # Add uuids directly using built-in SQL uuid function
 add_uuids_by_dialect = {
-    MySQLDialect: """UPDATE %s SET uuid = UNHEX(REPLACE(uuid(), "-", ""));""",
+# TODO uuid from mysql aren't working as expected. that's why shouldn't be used for now. 
+#    MySQLDialect: """UPDATE %s SET uuid = UNHEX(REPLACE(uuid(), "-", ""));""",

Review comment:
       @iercan can you try changing it to:
   
   ```python
   MySQLDialect: """UPDATE %s SET uuid = U UNHEX(REPLACE(CONVERT(UUID() using utf8mb4), '-', ''));"""
   ```
   
   Based on https://dba.stackexchange.com/a/278540




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org