Dashboard heatmap always loading on mysql 8 #2468

Closed
opened 2025-11-02 04:37:22 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @gaydin on GitHub (Oct 29, 2018).

  • Gitea version (or commit ref): d4e6278764
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

https://gist.github.com/gaydin/ee00f012fbefe913daa53a98c0c55f1c

Description

Maybe need changed
https://github.com/go-gitea/gitea/blob/master/models/user_heatmap.go#L26
UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(created_unix), '%Y%m%d'))
to
UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(created_unix)))

Originally created by @gaydin on GitHub (Oct 29, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): d4e62787644bf08e5044b7aeb36c0080cd892fef - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: https://gist.github.com/gaydin/ee00f012fbefe913daa53a98c0c55f1c ## Description Maybe need changed https://github.com/go-gitea/gitea/blob/master/models/user_heatmap.go#L26 ```UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(created_unix), '%Y%m%d'))``` to ```UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(created_unix)))```
GiteaMirror added the type/bug label 2025-11-02 04:37:22 -06:00
Author
Owner

@kolaente commented on GitHub (Oct 31, 2018):

Does this also fail in mysql 5/ mariadb 10?

@kolaente commented on GitHub (Oct 31, 2018): Does this also fail in mysql 5/ mariadb 10?
Author
Owner

@gaydin commented on GitHub (Oct 31, 2018):

I tested on MySQL 5.6.37 - work fine.
Trouble with mysql 8.0.13 only.
After changing DATE_FORMAT to DATE works fine on MySQL 5.6 and 8

@gaydin commented on GitHub (Oct 31, 2018): I tested on MySQL 5.6.37 - work fine. Trouble with mysql 8.0.13 only. After changing DATE_FORMAT to DATE works fine on MySQL 5.6 and 8
Author
Owner

@sapk commented on GitHub (Oct 31, 2018):

@gaydin do you know how to make a PR ?
If not maybe we could add a label good first issue to attract new contributor ?

@sapk commented on GitHub (Oct 31, 2018): @gaydin do you know how to make a PR ? If not maybe we could add a label `good first issue` to attract new contributor ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2468