Updating drupal 6.38 to 7.50 I got the following error:

taxonomy module

Update #7005
Failed: PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'sticky' at row 1: INSERT INTO {taxonomy_index} (nid, tid, sticky, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 5643 [:db_insert_placeholder_1] => 260 [:db_insert_placeholder_2] => 180 [:db_insert_placeholder_3] => 1455180974 ) in taxonomy_update_7005() (line 779 of /.../public_html/modules/taxonomy/taxonomy.install

Presumably cause of the issue is third party weight module, which uses node sticky column to store weights. Node sticky column is int(11), taxonomy_index sticky is tinyint(4) so if weight put values exceeding 127 in there update fails resulting in stuck taxonomy updates, on second try it complains about Integrity constraint violation on taxonomy field tables, because data has been partially migrated.

My solution was to restore database, and run
> UPDATE node n SET sticky = 127 WHERE sticky > 127;
since I almost don't use weight and I know exactly where I do.

Proposed solution is either check and convert sticky values before putting it into taxonomy_index or change taxonomy_index sticky field to INT(11) although there may be another solution I don't see. Weight module could probably update node sticky values after migrating it's own data to fields, since it's not using node sticky column in Drupal 7 anymore.

Comments

curlymike created an issue. See original summary.

Version: 7.50 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.