Closed hostep closed 2 weeks ago
Small update: just tested this on a staging environment with MySQL 8.0.36 (Percona) where MyISAM is disabled, and it works good without problems. So that's a good sign!
Thx a lot for the nice patch Pieter! 😄
The ideal solution would be to change the design of the table so the error is not there in the first place all together probably?
It's just a limitation of MySQL innodb and it will bite back sooner or later :)
Yes, that was already mentioned on https://github.com/akeneo/magento2-connector-community/issues/177#issuecomment-805318039
But that will require a lot more work, possibly multiple days of refactoring, so I chose the quick solution for now.
thanks!
…mysql connections used by this module. Can help prevent 'Row size too large.' errors. Also explicitly setting table type to InnoDB when asked for when creating temporary tables.
This has to do with the error
Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
were we can run into when importing product data with a lot of attributes.This complements https://github.com/akeneo/magento2-connector-community/commit/6311c774c622bb5cdbc2a97da27b3c7247a8274d added by @magentix
Things done here:
The use case for number 2 is because we have a certain hosting company which uses MySQL 8 where they've chosen to explicitly disable MyISAM storage. We can't convince them to re-enable MyISAM storage, their reasoning is twofold:
Disabling
innodb_strict_mode
in the session of the current mysql connection is another way to resolve the error mentioned above in case MyISAM storage engine isn't an option. This was already suggested a while ago over here: https://github.com/akeneo/magento2-connector-community/issues/177#issuecomment-805318039Questions:
innodb_strict_mode
flag in thegetConnection
method ofAkeneo\Connector\Helper\Import\Entities
, every other class in this module seems to use this method to get a mysql connection, so that made the most sense, is that okay?I've quickly tested this solution locally and it works in our case, haven't yet had the chance to test it in a production environment, but will try to do this soon-ish.