Forums / Install & configuration / sql upgrade error

sql upgrade error

Author Message

James Ward

Wednesday 27 September 2006 5:15:12 pm

Hi All,
I just wanted to check with some folks here before I reach for the bug report button.

We are doing a large upgrade from a 3.0-1 site to a 3.8.4 site and are in the process of running all the sql upgrade scripts. There have been a few errors but most of them were easily corrected with a little editing.

I am currently stumped running dbupdate-3.4.4-to-3.5.0.sql. It gives me the following error:

ERROR 1170 (42000) at line 63: BLOB/TEXT column 'word' used in key specification without a key length

The error is occuring while runing the following sql:

ALTER TABLE ezsearch_word ADD INDEX ezsearch_word_word_i ( word );

I'm having no luck tracking this error down. I am runing mysql server 5.0.22 on a debian box.

Thanks for any advice.

working at www.wardnet.com
blogging at www.jamesward.ca

Kristof Coomans

Thursday 28 September 2006 2:59:23 am

Hello James

Take a look at http://dev.mysql.com/doc/refman/5.0/en/indexes.html

I checked our db (eZ 3.7) and the word field is VARCHAR(150) instead of TEXT or BLOB. Did you alter this manually? Or maybe you accidentily skipped a mysql upgrade script.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Tuesday 06 May 2008 5:17:53 am

Apparently Cupdate/database/mysql/3.3/dbupdate-3.3-6-to-3.3-7.sql contains

ALTER TABLE ezsearch_word CHANGE word word blob;

This is AFAIK not intended. This eventually leads to the error James described when doing an upgrade to 3.5 later on.

You can simply use this SQL:

ALTER TABLE ezsearch_word CHANGE word word varchar(150);

to fix the problem, before running dbupdate-3.4.4-to-3.5.0.sql

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org