Upgrading from version 6.x-2.9 to 6.x-3.2 caused an error:
BLOB/TEXT column 'excluded_components' can't have a default value query: ALTER TABLE webform_emails ADD `excluded_components` TEXT NOT NULL DEFAULT '' in X:\xxxxx\includes\database.mysql-common.inc on line 298.
Followed by two more errors caused by the missing "excluded_components" field.

This error arises from update #6308, where the "excluded_components" field is supposed to get added to the "webform_emails" table, and there is some other processing to create some kind of exclusion lists that probably go in that field.

I spent a bit of time searching through the webform issue queue, and my guess is that the error is related either to an issue with setting defaults in MySQL under Windows IIS or with some kind of "strict" mode setting that Windows enables by default in MySQL, but I don't have the skillz to unentangle it all.

Regardless, the issue seems to have been introduced through a patch that was added to fix a PostGres error, detailed here:
Upgrade failed from 2.x to 3.1 under PostGres

Before updating my second database (using the same Drupal codebase in a multi-site install), I modified the webform.install file by removing the 'default' => '' part of the array at line 809, and that allowed the "excluded_components" field to be added, but I then had another error:
user warning: Data truncated for column 'excluded_components' at row 1 query: ALTER TABLE webform_emails CHANGE `excluded_components` `excluded_components` TEXT NOT NULL in X:\xxxxx\includes\database.mysql-common.inc on line 520.
I'm guessing that if I had entirely reversed the patch that fixed the PostGres issue above, then this error wouldn't have appeared and the update would have gone through cleanly, but that's just a guess.

Additional clues might be available in the following?:
MySQL error when operating in strict mode when running webform_update_6308()
Cannot create a text field with a default value in MySQL 5.0.27 for windows [mysql.com]

Lastly, can someone give me some pointers on how to get the webform_emails table fixed so that it shows up the way it should in both my databases? I know I need to add the "excluded_components" field, but then should these be left blank, should they hold a NULL value, or "default", or something else?

Thanks,

Phil.

Comments

pkiff’s picture

[deleted by author]

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.