From 0498b6d6892dc0bdc3745fd1fc45dcc8eef35dd0 Mon Sep 17 00:00:00 2001 From: zhoujunhe Date: Thu, 20 Jun 2024 17:27:23 +0800 Subject: [PATCH] =?UTF-8?q?adb=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 ++++++ src/metabase/driver/mysql.clj | 9 +-------- src/metabase/email/pulse.mustache | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c6d1edecddc7..ce3f7bc7c8689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,12 @@ COPY . . RUN git config --global --add safe.directory /home/node RUN INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build.sh :version ${VERSION} +RUN cd ~/.m2/repository/org/mariadb/jdbc/mariadb-java-client/2.7.10 \ + && rm -f mariadb-java-client-2.7.10.jar \ + && apt-get install wget -y \ + && wget https://github.com/zhoujunhe/mariadb-connector-j/releases/download/AnalyticDB_2.7.10/mariadb-java-client-2.7.10.jar \ + && sha1sum mariadb-java-client-2.7.10.jar | awk '{print $1}' > mariadb-java-client-2.7.10.jar.sha1 +RUN INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build.sh :version ${VERSION} # ################### # # STAGE 2: runner diff --git a/src/metabase/driver/mysql.clj b/src/metabase/driver/mysql.clj index f3897a37f12b5..1b07db4391c89 100644 --- a/src/metabase/driver/mysql.clj +++ b/src/metabase/driver/mysql.clj @@ -221,14 +221,7 @@ #_{:clj-kondo/ignore [:deprecated-var]} (defmethod sql-jdbc.sync/db-default-timezone :mysql [_ spec] - (let [sql (str "SELECT @@GLOBAL.time_zone AS global_tz," - " @@system_time_zone AS system_tz," - " time_format(" - " timediff(" - " now(), convert_tz(now(), @@GLOBAL.time_zone, '+00:00')" - " )," - " '%H:%i'" - " ) AS 'offset';") +(let [sql (str "SELECT '+08:00' AS `global_tz`,'CST' AS `system_tz`,'08:00' AS `offset`;") [{:keys [global_tz system_tz offset]}] (jdbc/query spec sql) the-valid-id (fn [zone-id] (when zone-id diff --git a/src/metabase/email/pulse.mustache b/src/metabase/email/pulse.mustache index d1ce84b7f7a32..1712fe613a94c 100644 --- a/src/metabase/email/pulse.mustache +++ b/src/metabase/email/pulse.mustache @@ -88,7 +88,7 @@
-
+