Add repair step or OCC command to change MySQL row format
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Feature description
In Nextcloud appear a Wrong row format error that seems could not be solved by the Nextcloud updater or an OCC command.
Steps to reproduce
Update from V30 to v31
To solve these Problems, only an obscure database hack seems possible to solve this:
https://help.nextcloud.com/t/upgrade-to-nextcloud-hub-10-31-0-0-incorrect-row-format-found-in-your-database/218366
In my opinion, Nextcloud created this error, so Nextcloud should also correct this.
I think it is a shame that Nextcloud publish an Update that lead to an error in the database that could not be automatically corrected.
Nextcloud think something is not set up the best possible way? Then Nextcloud should also give a solution. And a link to SQL documentation is not what I understand as a proper solution.
Expected behavior
Possible behavior 1:
- Nextcloud Update
- check for database entries which need changes
- do it
Possible behavior 2:
- Nextcloud Update
- check for database entries which need changes
- create split it into smal steps and do it when possible
Possible behavior 3
- Nextcloud Update
- check for database entries which need changes
- allow admin to repair it by an occ command
#!/bin/bash
# Prompt for database credentials
read -p "Enter Database Name: " DB_NAME
read -p "Enter Username: " DB_USER
read -s -p "Enter Password: " DB_PASS
echo
# Execute all ALTER TABLE statements in one query
mysql -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" -Bse "
SELECT CONCAT('ALTER TABLE \`', TABLE_NAME, '\` ROW_FORMAT=DYNAMIC;')
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = '$DB_NAME'
AND ENGINE = 'InnoDB'
" | mysql -u "$DB_USER" -p"$DB_PASS" "$DB_NAME"
Nextcloud Server version
31
Operating system
None
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"htaccess.RewriteBase": "\/",
"loglevel": 2,
"logtimezone": "Europe\/Berlin",
"dbtype": "mysql",
"version": "31.0.6.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "***REMOVED SENSITIVE VALUE***",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"maintenance": false,
"default_phone_region": "CH",
"logdateformat": "Y.m.d, H:i:s",
"default_language": "de",
"default_locale": "de_CH",
"syslog_tag": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtpauth": 1,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"theme": "",
"reference_opengraph": false,
"updater.release.channel": "stable",
"app_install_overwrite": [
"piwik",
"richdocuments",
"csp_editor"
],
"memories.exiftool_no_local": true,
"memories.vod.path": "\/http-cloud\/apps\/memories\/bin-ext\/go-vod-amd64",
"memories.db.triggers.fcu": true,
"maintenance_window_start": 1
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the V30-to-V31 upgrade with MySQL and tracing the database update handling and existing OCC commands. Compare the proposed row-format repair with the current upgrade behavior and determine whether an updater step or an OCC command is the intended scope. Done means the affected tables can be identified and repaired through a supported Nextcloud path rather than manual SQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100