Nextcloud database table corrupt > how to repair?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): 8.2.16

The issue you are facing:

`An exception occurred while executing a query: SQLSTATE[HY000]: 
General error: 1034 Index for table 'oc_systemtag_object_mapping' is 
corrupt; try to repair it`

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. I do not know what happened and caused the problem. Most probably it happened when watchtower updated the docker container.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"CI7TMf1IAbApwVocYCF0","level":3,"time":"2024-02-24T17:19:52+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob, arguments: Array\n(\n    [storageId] => 10\n    [rootId] => 2092500\n)\n)","userAgent":"--","version":"28.0.2.5","exception":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1034 Index for table 'oc_systemtag_object_mapping' is corrupt; try to repair it","Code":1034,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1208,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(?, ?, ?)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(?, ?, ?)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(:dcValue1, :dcValue2, :tagid)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemTag/SystemTagObjectMapper.php","line":149,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/recognize/lib/Service/TagManager.php","line":77,"function":"assignTags","class":"OC\\SystemTag\\SystemTagObjectMapper","type":"->","args":["2476515","files",["101","173","1",8,9]]},{"file":"/var/www/html/apps/recognize/lib/Classifiers/Images/LandmarksClassifier.php","line":47,"function":"assignTags","class":"OCA\\Recognize\\Service\\TagManager","type":"->","args":[2476515,["101","173","1"]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":41,"function":"classify","class":"OCA\\Recognize\\Classifiers\\Images\\LandmarksClassifier","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifierJob.php","line":73,"function":"classify","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":33,"function":"runClassifier","class":"OCA\\Recognize\\BackgroundJobs\\ClassifierJob","type":"->","args":["landmarks",[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":117,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000]: General error: 1034 Index for table 'oc_systemtag_object_mapping' is corrupt; try to repair it","Code":1034,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["HY000",1034,"Index for table 'oc_systemtag_object_mapping' is corrupt; try to repair it"]]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(?, ?, ?)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(:dcValue1, :dcValue2, :tagid)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemTag/SystemTagObjectMapper.php","line":149,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/recognize/lib/Service/TagManager.php","line":77,"function":"assignTags","class":"OC\\SystemTag\\SystemTagObjectMapper","type":"->","args":["2476515","files",["101","173","1",8,9]]},{"file":"/var/www/html/apps/recognize/lib/Classifiers/Images/LandmarksClassifier.php","line":47,"function":"assignTags","class":"OCA\\Recognize\\Service\\TagManager","type":"->","args":[2476515,["101","173","1"]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":41,"function":"classify","class":"OCA\\Recognize\\Classifiers\\Images\\LandmarksClassifier","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifierJob.php","line":73,"function":"classify","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":33,"function":"runClassifier","class":"OCA\\Recognize\\BackgroundJobs\\ClassifierJob","type":"->","args":["landmarks",[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 1034 Index for table 'oc_systemtag_object_mapping' is corrupt; try to repair it","Code":"HY000","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(?, ?, ?)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_systemtag_object_mapping` (`objectid`, `objecttype`, `systemtagid`) VALUES(:dcValue1, :dcValue2, :tagid)",["2476515","files","173"],[2,2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemTag/SystemTagObjectMapper.php","line":149,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/recognize/lib/Service/TagManager.php","line":77,"function":"assignTags","class":"OC\\SystemTag\\SystemTagObjectMapper","type":"->","args":["2476515","files",["101","173","1",8,9]]},{"file":"/var/www/html/apps/recognize/lib/Classifiers/Images/LandmarksClassifier.php","line":47,"function":"assignTags","class":"OCA\\Recognize\\Service\\TagManager","type":"->","args":[2476515,["101","173","1"]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":41,"function":"classify","class":"OCA\\Recognize\\Classifiers\\Images\\LandmarksClassifier","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifierJob.php","line":73,"function":"classify","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[["OCA\\Recognize\\Db\\QueueFile",6762],["OCA\\Recognize\\Db\\QueueFile",6763],["OCA\\Recognize\\Db\\QueueFile",6764],["OCA\\Recognize\\Db\\QueueFile",6765],["OCA\\Recognize\\Db\\QueueFile",6766],["OCA\\Recognize\\Db\\QueueFile",6767],["OCA\\Recognize\\Db\\QueueFile",6768],["OCA\\Recognize\\Db\\QueueFile",6769],["OCA\\Recognize\\Db\\QueueFile",6770],["OCA\\Recognize\\Db\\QueueFile",6771],["OCA\\Recognize\\Db\\QueueFile",6772],["OCA\\Recognize\\Db\\QueueFile",6773],["OCA\\Recognize\\Db\\QueueFile",6774],["OCA\\Recognize\\Db\\QueueFile",6775],["OCA\\Recognize\\Db\\QueueFile",6776],["OCA\\Recognize\\Db\\QueueFile",6777],["OCA\\Recognize\\Db\\QueueFile",6778],["OCA\\Recognize\\Db\\QueueFile",6779],["OCA\\Recognize\\Db\\QueueFile",6780],["OCA\\Recognize\\Db\\QueueFile",6781]]]},{"file":"/var/www/html/apps/recognize/lib/BackgroundJobs/ClassifyLandmarksJob.php","line":33,"function":"runClassifier","class":"OCA\\Recognize\\BackgroundJobs\\ClassifierJob","type":"->","args":["landmarks",[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob","type":"->","args":[[10,2092500]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"message":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob, arguments: Array\n(\n    [storageId] => 10\n    [rootId] => 2092500\n)\n)","exception":{},"CustomMessage":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyLandmarksJob, arguments: Array\n(\n    [storageId] => 10\n    [rootId] => 2092500\n)\n)"}}

Is that a MySQL/MariaDB or PostgreSQL database?


Take the values from your config/config.php:

DB_HOST = 'dbhost'
DB_USER = 'dbuser'
DB_PASS = 'dbpassword'
DB_NAME = 'dbname'


If dbtype is mysql:

Open a terminal and enter

mysql --host=$DB_HOST --user=$DB_USER --password=$DB_PASS $DB_NAME --no-auto-rehash --default-character-set=utf8mb4

Now you should be inside of the MySQL/MariaDB command line console. If your database name is “nextcloud”, It should look like this:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 210114
Server version: 10.11.7-MariaDB-1:10.11.7+maria~ubu2204-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [nextcloud]>

now enter this repair command at the

MariaDB [nextcloud]>

prompt:

REPAIR TABLE oc_systemtag_object_mapping;

After that is ready, you can exit the MySQL/MariaDB Console with

\q

If dbtype is pgsql:

Open a terminal and enter

PGPASSWORD=$DB_PASS psql --host=$DB_HOST --user=$DB_USER -d$DB_NAME

Now you should be inside of the PostgreSQL command line console. If your database name is “nextcloud”, It should look like this:

psql (14.10 (Ubuntu 14.10-0ubuntu0.22.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

nextcloud=>

now enter this repair commands at the

nextcloud=>

prompt:

REINDEX INDEX oc_systemtag_object_mapping_pkey;

and

REINDEX INDEX systag_by_tagid;

After that is ready, you can exit the PostgreSQL Console with

\q

I hope this will repair the database table.


Much and good luck,
ernolf

1 Like

Thanks for the answer!

I used the nextcloud repair command:
sudo -u www-data php occ maintenance:repair
and it worked well

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html

2 Likes

I have the same error again:

An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1034 Index for t
  able 'oc_systemtag_object_mapping' is corrupt; try to repair it

But repairing it did not help:


 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
     - Delete clients (and their related access tokens) with the redirect_uri starting with oc:// or ending with *
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - JS cache cleared
 - Clear every generated avatar
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Add token cleanup job
 - Clean up abandoned apps
 - Add possibly missing system config
 - Add AI tasks cleanup job
 - Queue a job to generate metadata
 - migrate lazy config values
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 5 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects

 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up

     - 0 calendar subscriptions without an user have been cleaned up
 - Remove invalid object properties
     - 0 invalid object properties removed.
 - Write default encryption module configuration to the database
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Restore default tags that are missing
     - Looking up default tags
     - 1 accounts to check found

 - Add a generated message-id to all Mail messages that have none
     - Looking up messages without a message-id
 - Purify and migrate collected mail addresses

 - Insert background jobs for all accounts

 - Make Mail itinerary extractor executable
     - itinerary file doesn't exist
 - Create or update provisioned Mail accounts
     - 0 accounts provisioned
 - Repair Broken Threads for all mail accounts
     - Repaired threads, 0 messages updated
 - Queue a job to delete duplicated cached messages
 - Clean up meta table
 - Show a hint about the new editor to existing users
 - Set binary permissions
 - Update OAuth token expiration times
 - init metadata
 - Install recognize dependencies
 - Create help command
 - Invalidate access cache for projects conversation provider
     - Invalidation not required
 - Cache the user display names
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
 - Register the Matterbridge binary
 - Force-reset all Text document sessions
 - Initialize migration of background images from dashboard to theming app
 - Add background job to check for backup codes
 - Populating added database structures for workflows
mysql> REPAIR TABLE oc_systemtag_object_mapping;
+---------------------------------------+--------+----------+---------------------------------------------------------+
| Table                                 | Op     | Msg_type | Msg_text                                                |
+---------------------------------------+--------+----------+---------------------------------------------------------+
| nextcloud.oc_systemtag_object_mapping | repair | note     | The storage engine for the table doesn't support repair |
+---------------------------------------+--------+----------+---------------------------------------------------------+
1 row in set (0.03 sec)

Can I somehow delete the table and let it be built from scratch?