Issue Bug Closed

#23973Compare produces wrong SQL in DB Analyser: MySQL Error 1170: BLOB/TEXT Column used in Key Specification without a key length

Johanna 11/06/10, 21:45 updated 02/11/11, 11:04

Description

I tried to use utf8 and set
[SYS][multiplyDBfieldSize]=2
running Compare leads to

ALTER TABLE sys_registry ADD UNIQUE entry_identifier (entry_namespace,entry_key(256));

Applying this directly to phpMyAdmin SQL interface results in
#14798 – BLOB/TEXT column ‘entry_namespace’ used in key specification without a key length

ALTER TABLE cachingframework_cache_hash_tags CHANGE identifier identifier text;

ALTER TABLE sys_refindex CHANGE tablename tablename text;

ALTER TABLE cachingframework_cache_pages_tags CHANGE identifier identifier text;

ALTER TABLE cachingframework_cache_pagesection_tags CHANGE identifier identifier text;

and so on, changing varchar to text leads to trouble with associated key spec.

Compare x times

XAMPP (Basis Package) version 1.7.3
Windows7

I tried
ALTER TABLE sys_registry ADD UNIQUE entry_identifier (entry_namespace(256),entry_key(256))

ALTER TABLE `typo344`.`cachingframework_cache_hash_tags` DROP INDEX `cache_id`;
ALTER TABLE cachingframework_cache_hash_tags CHANGE identifier identifier text
ALTER TABLE `typo344`.`cachingframework_cache_hash_tags` ADD INDEX `cache_id` ( `identifier` ( 256 ) );

ALTER TABLE sys_refindex CHANGE tablename tablename varchar510;

… ???
(issue imported from #M16286)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.