New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitea 1.5.0 crashes #171

Closed
luto opened this Issue Aug 17, 2018 · 3 comments

Comments

Projects
None yet
2 participants

@luto luto added the bug label Aug 17, 2018

@ehlers

This comment has been minimized.

Copy link

ehlers commented Aug 17, 2018

See go-gitea/gitea#4663, the base issue is go-gitea/gitea#2979.

MariaDB <= v10.2.1 and MySQL <= v5.6 use COMPACT as the default row format, later versions are using DYNAMIC. THE COMPACT row format supports columns up to 767 bytes. The table topic uses a varchar(255), which exceeds the max key length as 4*255 = 1020. As Uberspace 7 uses MariaDB v10.1.34, gitea installations / upgrades to 1.5.0 are affected.

To fix that, change table topic to DYNAMIC: ALTER TABLE topic ROW_FORMAT=DYNAMIC;

You may even want to change all tables to DYNAMIC, this shell command displays the necessary SQL commands (replace <username> with your username):
mysql -B -N -e "SELECT CONCAT('ALTER TABLE \`', TABLE_NAME, '\` ROW_FORMAT=DYNAMIC;') AS mysql FROM INFORMATION_SCHEMA.TABLES WHERE ROW_FORMAT = 'Compact' AND TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA = '<username>_gitea';"

I've done that on my gitea v1.5.0 installation on uberspace 7 and it's working great, see my gitea installation at https://git.bernhard-ehlers.de.

@luto luto added the guide label Nov 5, 2018

@ehlers

This comment has been minimized.

Copy link

ehlers commented Nov 5, 2018

I haven't tested, but with Uberspace 7.1.15 and it's MariaDB 10.3 this issue should be resolved. The default row format is now DYNAMIC.

$ mysql -e "show variables like 'innodb_default_row_format'"
+---------------------------+---------+
| Variable_name             | Value   |
+---------------------------+---------+
| innodb_default_row_format | dynamic |
+---------------------------+---------+
@luto

This comment has been minimized.

Copy link
Member Author

luto commented Nov 14, 2018

Yes, works just fine. Thanks! :)

@luto luto closed this Nov 14, 2018

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