You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/01/27 09:35:57 UTC

[superset] branch master updated: fix: uuid generatiion for mysql fixed (#12787)

This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new ecc1eae  fix: uuid generatiion for mysql fixed (#12787)
ecc1eae is described below

commit ecc1eae2c3f6b8266cee2970ee00103178573181
Author: İbrahim Ercan <ib...@gmail.com>
AuthorDate: Wed Jan 27 12:35:09 2021 +0300

    fix: uuid generatiion for mysql fixed (#12787)
---
 .../migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py b/superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
index 5600212..4929300 100644
--- a/superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
+++ b/superset/migrations/versions/b56500de1855_add_uuid_column_to_import_mixin.py
@@ -81,7 +81,7 @@ default_batch_size = int(os.environ.get("BATCH_SIZE", 200))
 
 # Add uuids directly using built-in SQL uuid function
 add_uuids_by_dialect = {
-    MySQLDialect: """UPDATE %s SET uuid = UNHEX(REPLACE(uuid(), "-", ""));""",
+    MySQLDialect: """UPDATE %s SET uuid = UNHEX(REPLACE(CONVERT(UUID() using utf8mb4), '-', ''));""",
     PGDialect: """UPDATE %s SET uuid = uuid_in(md5(random()::text || clock_timestamp()::text)::cstring);""",
 }