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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 23:06:14
Script start
Timing: Jan 18 2025 23:06:14
Module start 'layout'
Timing: Jan 18 2025 23:06:14
Module start 'content'
Timing: Jan 18 2025 23:06:14
Module end 'content'
Timing: Jan 18 2025 23:06:14
Script end

Main resources:

Total runtime0.0176 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.9141152.6250
Module start 'layout' 0.00570.0027 740.539139.4453
Module start 'content' 0.00840.0072 779.984493.4609
Module end 'content' 0.01560.0019 873.445334.3047
Script end 0.0175  907.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002715.5413140.0002
Check MTime0.00126.8795140.0001
Mysql Total
Database connection0.00073.860610.0007
Mysqli_queries0.002715.264430.0009
Looping result0.00000.074710.0000
Template Total0.00158.410.0015
Template load0.00094.890910.0009
Template processing0.00063.484610.0006
Override
Cache load0.00063.472310.0006
General
dbfile0.002313.156380.0003
String conversion0.00000.043440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs