Jacques Posted June 22, 2020 Share Posted June 22, 2020 Hi Larry, I have incorporated the language part of the forum project into my e-commerce site. I have however ran into issues with MySQL/MariaDB regarding the number of word columns representing the translatable words for the site (over 250 so far). I get the following database error: "Warning: #139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline." Do you have any suggestions on a different approach maybe as having so many columns in a database table is probably not a good idea? Thank you. Link to comment Share on other sites More sharing options...
Larry Posted June 24, 2020 Share Posted June 24, 2020 It looks like this is most commonly caused by InnoDB settings: https://stackoverflow.com/questions/22637733/mysql-error-code-1118-row-size-too-large-8126-changing-some-columns-to-te/33655143 If you'd like to keep the current approach and aren't going to add like double the current number of columns, you can try that. If this is going to continue to balloon in size, you'll need to dramatically rethink how translated text is stored. An option would be to switch the rows and columns. You won't have the row size issue anymore but you'll need to select the one column for every row and then use that query to populate a PHP array, which is laborious. Alternatively you could store all the translations in one string, like in JSON format. Retrieval and usage shouldn't be too bad but updating the values will be effortful. There's a number of ways you could approach this but those are the first two that come to mind. Everything has its tradeoffs! Link to comment Share on other sites More sharing options...
Jacques Posted June 26, 2020 Author Share Posted June 26, 2020 Hi Larry, Thank you very much for your response. I changed the innodb_log_file_size and innodb_log_file_size in the my.ini text file as recommended in the StackOverflow article without any success. Changing the storage engine from InnoDB to MyISAM seems to have solve the issue so should I just continue with MyISAM? If I run into issues with MyISAm I will have to switch the columns and the rows as you suggested. Regards. Link to comment Share on other sites More sharing options...
Larry Posted June 27, 2020 Share Posted June 27, 2020 Using MyISAM should be fine! Link to comment Share on other sites More sharing options...
Jacques Posted June 28, 2020 Author Share Posted June 28, 2020 Thank you Larry. Link to comment Share on other sites More sharing options...
Recommended Posts