Index
2011-07-04 04:27 – James McCluskey : [dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length
2011-07-04 07:13 – Ed Leafe : Re: [dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length
2011-08-30 14:50 – Paul McNett : Re: [dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length
Back to top
[dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length

Author: James McCluskey

Posted: 2011-07-04 04:27:56   Link

I'm just getting started with "Dabo" and I thought it would be

convenient to have a copy of the pycon 2010 database on my localhost

(hope this is not an issue).

When setting up the recipes table I got the following MySql error.

#

CREATE TABLE `recipes` (

`id` int(11) not null auto_increment,

`title` varchar(240) not null,

`subtitle` longtext not null,

`ingred` longtext not null,

`proced` longtext not null,

`date` date not null default '0000-00-00',

`image` varchar(240) not null,

PRIMARY KEY (`id`),

KEY `ctitle` (`title`),

KEY `ddate` (`date`),

KEY `ft` (`title`,`subtitle`,`ingred`,`proced`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2685;

The following errors were reported:BLOB/TEXT column 'subtitle' used in

key specification without a key length

#

Can anybody suggest a solution?

Regards

James McCluskey

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/1309768076.3260.9.camel@localhost.localdomain

©2011 James McCluskey
Back to top
Re: [dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length

Author: Ed Leafe

Posted: 2011-07-04 07:13:24   Link

On Jul 4, 2011, at 4:27 AM, James McCluskey wrote:

> When setting up the recipes table I got the following MySql error.

>

> #

>

> CREATE TABLE `recipes` (

> `id` int(11) not null auto_increment,

> `title` varchar(240) not null,

> `subtitle` longtext not null,

> `ingred` longtext not null,

> `proced` longtext not null,

> `date` date not null default '0000-00-00',

> `image` varchar(240) not null,

> PRIMARY KEY (`id`),

> KEY `ctitle` (`title`),

> KEY `ddate` (`date`),

> KEY `ft` (`title`,`subtitle`,`ingred`,`proced`)

> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2685;

>

> The following errors were reported:BLOB/TEXT column 'subtitle' used in

> key specification without a key length

>

> #

>

> Can anybody suggest a solution?

I'm not sure why the `ft` key is defined that way; I can't see any benefit to indexing on ingredients or procedure text. I would change subtitle to varchar(240) to match title, and drop the last two columns from the `ft` index.

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/2DD56B52-F44F-48CF-87B5-133AC59A721F@leafe.com

©2011 Ed Leafe
Back to top
Re: [dabo-users] BLOB/TEXT column 'subtitle' used in key specification without a key length

Author: Paul McNett

Posted: 2011-08-30 14:50:16   Link

On 7/4/11 4:13 AM, Ed Leafe wrote:

> On Jul 4, 2011, at 4:27 AM, James McCluskey wrote:

>

>> When setting up the recipes table I got the following MySql error.

>>

>> #

>>

>> CREATE TABLE `recipes` (

>> `id` int(11) not null auto_increment,

>> `title` varchar(240) not null,

>> `subtitle` longtext not null,

>> `ingred` longtext not null,

>> `proced` longtext not null,

>> `date` date not null default '0000-00-00',

>> `image` varchar(240) not null,

>> PRIMARY KEY (`id`),

>> KEY `ctitle` (`title`),

>> KEY `ddate` (`date`),

>> KEY `ft` (`title`,`subtitle`,`ingred`,`proced`)

>> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2685;

>>

>> The following errors were reported:BLOB/TEXT column 'subtitle' used in

>> key specification without a key length

>>

>> #

>>

>> Can anybody suggest a solution?

>

> I'm not sure why the `ft` key is defined that way; I can't see any benefit to indexing on ingredients or procedure text. I would change subtitle to varchar(240) to match title, and drop the last two columns from the `ft` index.

It was a fulltext index that was in use on the live site in the 1990's. No need for

it now, so just drop that key.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4E5D30E8.7070004@ulmcnett.com

©2011 Paul McNett