Skip to content

Commit

Permalink
修改增加支持adb
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujunhe committed May 11, 2024
1 parent 7a5ccd8 commit 326f57f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions src/metabase/driver/mysql.clj
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,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';")
[{:keys [global_tz system_tz offset]}] (jdbc/query spec sql)
(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
(try
Expand Down
2 changes: 1 addition & 1 deletion src/metabase/email/pulse.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<table class="background" width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #F9F9F9; padding: 20px; table-layout: fixed;">
<tr>
<td>
<div class="container" style="background-color: white; max-width: 555px; border-radius: 24px; margin: 0 auto; padding: 30px;">
<div class="container" style="background-color: white; max-width: 100%; border-radius: 24px; margin: 0 auto; padding: 30px;">
<table class="header">
<tr>
<td width="28px">
Expand Down

0 comments on commit 326f57f

Please sign in to comment.