Skip to content

Detect crashed mysql tables & display a message in the UI #2194

Description

@mattab

When the log tables are crashed, the SQL error /exception is caught upstream, and it is not displayed in the UI. The report shows "No data" but not the error.

However in the API, the error is displayed:


su www-data -c "sh /home/piwik/misc/cron/archive.sh"
Starting Piwik reports archiving...

Archiving period = day for idsite = 1...
<?xml version="1.0" encoding="utf-8" ?>
<result>
        <error message="SQLSTATE[HY000]: General error: 145 Table './piwik_demo/piwik_log_visit' is marked as crashed and should be repaired" /       >
</result>
Archiving period = week for idsite = 1...


We should detect such error in the UI, and display a warning message in red / yellow, telling the user that statistics are not tracked because tables are crashed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions