Upgrade to 4.7 RC1 fails with the following error:

user warning: Column 'title' cannot be part of FULLTEXT index query: ALTER TABLE node CHANGE `type` `type` varbinary(32) DEFAULT '' NOT NULL, CHANGE `title` `title` varbinary(128) DEFAULT '' NOT NULL in /var/www/vhosts/mysite.com/httpdocs/drupal/includes/database.mysql.inc on line 120.

Possible solution is to drop the fulltext index on "node" before upgrading to 4.7.

Comments

deekayen’s picture

Other than documenting this more, any other suggestions?

deekayen’s picture

It would be great if someone would submit a 4.7 similar_entries.install file to use the new contrib update hook. Then we could see if the the system hook is fired before contrib. It might fire in alphabetical order, in which case similar_entries would update before system and we could properly close this issue.

deekayen’s picture

killes said the install/update hooks have a weighting option to order the firing of functions, but it's not available until after the 4.7 upgrades complete. The weight column is added to the system table, but he thought specific weights couldn't be added early enough to make them work. This was the sample query he provided:

update system set weight = 2 where name = 'mymodule'

deekayen’s picture

Status: Active » Closed (won't fix)

I added a similar.install file to CVS, but update.php doesn't execute the similar.install file until after the Drupal 4.7 upgrade is done, so I can't even hack a function up at the top out of the normal hook order. I updated the docs, but I'm not going to work on a scripted solution anymore.

NukeHavoc’s picture

So what's the manual fix for this? The original poster mentioned "Possible solution is to drop the fulltext index on "node" before upgrading to 4.7.", but does that work?

And what are the implications of this failing, but everything else succeeding?

deekayen’s picture

Executing ALTER TABLE node DROP INDEX title on a Drupal 4.6 site before upgrading to 4.7 should work every time. If you disable the similar module before doing the upgrade, the re-activation under Drupal 4.7 will use the new similar.install file to add the new index for you on node_revisions.

deekayen’s picture

...and to answer the other question, the failure will cause the indexed columns not to convert from varchar to varbinary. I don't know if that really matters for data, but it will if nothing else, make your DB out of sync with what the Drupal scripts expect to be inserting into.

ooburai’s picture

Other than the warning message what is the symptom of this bug? I have successfully upgraded from 4.6.6 to 4.7.0 but despite running 'ALTER TABLE node DROP INDEX title' prior to starting my upgrade I still got:

Column 'title' cannot be part of FULLTEXT index query: ALTER TABLE node CHANGE `type` `type` varbinary(32) DEFAULT '' NOT NULL, CHANGE `title` `title` varbinary(128) DEFAULT '' NOT NULL in /srv/www/drupal-4.7.0/includes/database.mysql.inc on line 120.

This was at the top of the page and did not appear inline with the output from the database updates. I look in my DB and I see that title is still varchar(128). Any thoughts on what I'm seeing here? Is there a manual step I can/should take at this point because as I understand things the title column should now be varbinary(128) and I don't understand why this didn't work.

deekayen’s picture

From what I can tell, the index didn't drop. If I were in your predicament, I would make sure the user you're using has ALTER permission on the node table and:

ALTER TABLE node DROP INDEX title;
CHANGE `title` `title` varbinary(128) DEFAULT '' NOT NULL;
ooburai’s picture

I got sidetracked and since my 4.6 install still works I never really got back to looking at this problem... Anyhow, I'd like to get on with it again and see if I can't pull off a 4.7 upgrade. Unfortunately the workaround suggested above (#9) didn't work. :(

However on closer examination I see that the node table has two fulltext indexes on the title and body fields called "title" and "title_2", I'm not sure how they got there, but I'm going to remove them both and see what happens.