Bug #11098 Missing length on creating indexes (UNIQUE INDEX or PK) with MEDIUMTEXT
Submitted: 4 Jun 2005 17:37 Modified: 12 Aug 2005 17:38
Reporter: Peter Fassev Email Updates:
Status: Closed Impact on me:
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version: OS:
Assigned to: Michael G. Zinner CPU Architecture:Any

[4 Jun 2005 17:37] Peter Fassev

there is a problem with the table creation, when a TEXT or MEDIUMTEXT, or LONGTEXT is used, see the script and the log:

CHARACTER SET utf8 COLLATE utf8_general_ci;
Creating table registry ...
CREATE TABLE `dbo`.`registry` (
  `id` BIGINT(19) NOT NULL,
  `entryTime` DATETIME NULL,
  `beanId` BIGINT(19) NULL,
  `beanName` VARCHAR(100) NULL,
  `description` TEXT NULL,
  `booleanValue` TINYINT(1) NOT NULL,
  `intValue` INTEGER(10) NOT NULL,
  `stringValue` TEXT NULL,
  `floatValue` FLOAT(24, 16) NULL,
  `persistentVersion` INTEGER(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `IX_registry` (`name`)
CHARACTER SET utf8 COLLATE utf8_general_ci;
An error occured while executing the SQL statement.
BLOB/TEXT column 'name' used in key specification without a key length

The problem ist within the creation of the INDEX, where a length shoud have been specified, like:

  UNIQUE INDEX `IX_registry` (`name`(300))

Please note, the index lenght should be limited to up to 1024 (wich schold be transladed to character length)...

NOTES: I am transferring a data between SQL Server 2000 and MySQL (4.1 or 5.0 Beta).


How to repeat:
See supplied transformation log.

Suggested fix:
Calculate the length of indexes and primery keys, when TEXT, MEDIUMTEXT, LARGTEXT is used.
[5 Jun 2005 1:14] Jorge del Conde
Thanks for your bug report.  I was able to reproduce this behaviour using 1.0.7
[12 Aug 2005 17:37] Jorge del Conde
I was unable to reproduce this bug using MT 1.0.12 under WinXP
[12 Aug 2005 17:38] Jorge del Conde
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at