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
Row size too large depends on history of table #6653
Comments
I could not reproduce it. Tested with MySQL 8.2.0 and MariaDB 10.5.21. |
It looks like all MariaDB versions are affected by this since version 10.4 where Instant DROP COLUMN was introduced. MySQL does not seem to be affected.
Can you please check the value of |
According to MariaDB this is not considered to be a bug: https://jira.mariadb.org/browse/MDEV-28760 |
Using However we probably only want interfere with this if we absolutely have to, so we need to catch |
I was able to reproduce it with my local MariaDB 11.2.2 server. First script causes the error, second script works with the following result:
|
The way I read https://dev.mysql.com/doc/refman/8.0/en/optimize-table.html that running |
I think so, yes. In some cases this does a full copy of the table, so always executing it is not a good solution IMO. |
Would it make sense to introduce a |
Not sure if this is needed. You could just use |
Yes, though I was thinking more in the line of automatically optimising all tables of the database. |
I still do think doing it in |
I also think this could be done in |
Thinking again, if this really should be done e.g. once a month, shouldn't it just be a cron job? |
Cronjob makes sense to me (if we are sure that this cannot break anything). The cronjob can then also be used to directly be executed on the command line, if you need to. |
I think it’s too dangerous to do that automatically for every table in a cron job. For large tables this might take some time to complete which could result in downtimes. If the table is very large and there is not enough disk space available it can end up in a disaster (according to some reports on the internet). |
We once tried to tackle the
1118 (42000): Row size too large
issue in #4179 but it seems that this error still occurs quite often.Today I was able to reproduce this on a MariaDB 10.6.16 server and a MariaDB 10.6.15 from a different hosting company using the following SQL code:
It looks like the row size not only includes the currently existing columns but also all removed columns from the past.
A possible fix could be calling
ALTER TABLE test_row_size FORCE
orOPTIMIZE TABLE test_row_size
. At least it fixed it in my test case:Can someone reproduce this? (First script failing, second script running successfully)
If so, please report the version of your SQL server.
The text was updated successfully, but these errors were encountered: