Large info files of more than around 1500 items causes Drupal to throw an exception.

Issue Details

Features itemizes it's exportables in a feature module's mymodule.info file. Drupal core caches the info file as a serialized array. When there get to be about 1000 - 2000 items exported (strongarm variables for instance) , the size of the serialized array exceeds the size of the MySQL column (system.info) which is currently 64K.

I was going to try and just alter the table, but I need this work during site-install and even when a module isn't enabled, the info file still gets cached resulting in a SQL Exception. I tried some hacks to hook in right after system table gets created in drupal_install_system() , but before system_rebuild_module_data(). The only thing that could possibly work is a function declaring system_system_info_alter() in settings.php, but that function already exists so it can't work either.

Proposed Solution

I propose a hook_update_N and schema update to change the value of system.info from blob (normal), to size 'big', which will support larger info files.

Comments

frankcarey’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

This patch ups the blob to 'big' and provides a hook_update_N() to alter existing schema if it exists.

fernando iglesias’s picture

StatusFileSize
new1.13 KB

Here's the patch updated for 7.60 - Just had to update the hook_update_N since 7080 is now already taken by core.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.