0
Welcome Guest! Login
0 items Join Now

MySQL BLOB column 'text' can't be used in key specification

  • MySQL BLOB column 'text' can't be used in key specification

    Posted 15 years 8 months ago
    • Hello,
      I try to copy the local site to the internet. I copyed the files and made a dump of the database.
      When I import the dump file, I get two errors shown below. The MySql versions are as follow:

      Local Mysql: MySQL 5.1.30
      Hosting company: MySQL 3.23.58

      The errors are listed below:

      SQL-query:

      --
      -- Tabel structuur voor tabel `jos_poll_data`
      --
      CREATE TABLE IF NOT EXISTS `jos_poll_data` (

      `id` int( 11 ) NOT NULL AUTO_INCREMENT ,
      `pollid` int( 11 ) NOT NULL DEFAULT '0',
      `text` text NOT NULL ,
      `hits` int( 11 ) NOT NULL DEFAULT '0',
      PRIMARY KEY ( `id` ) ,
      KEY `pollid` ( `pollid` , `text` ( 1 ) ) ) TYPE = InnoDB AUTO_INCREMENT =25
      MySQL retourneerde:

      #1073 - BLOB column 'text' can't be used in key specification with the used table type

      And the next one ...

      SQL-query:

      --
      -- Tabel structuur voor tabel `jos_session`
      --
      CREATE TABLE IF NOT EXISTS `jos_session` (

      `username` varchar( 150 ) DEFAULT '',
      `time` varchar( 14 ) DEFAULT '',
      `session_id` varchar( 200 ) NOT NULL DEFAULT '0',
      `guest` tinyint( 4 ) DEFAULT '1',
      `userid` int( 11 ) DEFAULT '0',
      `usertype` varchar( 50 ) DEFAULT '',
      `gid` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
      `client_id` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
      `data` longtext,
      PRIMARY KEY ( `session_id` ( 64 ) ) ,
      KEY `whosonline` ( `guest` , `usertype` ) ,
      KEY `userid` ( `userid` ) ,
      KEY `time` ( `time` ) ) TYPE = InnoDB
      MySQL retourneerde:

      #1089 - Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
      Best Regards,

      Perry van Erning

Time to create page: 0.058 seconds