0

Customer Grid indexer process unknown error:

SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'created_in' used in key specification without a key length, query was: CREATE TABLE IF NOT EXISTS customer_grid_flat ( entity_id int UNSIGNED NOT NULL COMMENT 'Entity ID' , name text NULL COMMENT 'Name' , email varchar(255) NULL COMMENT 'Email' , group_id int NULL COMMENT 'Group_id' , created_at timestamp NULL default NULL COMMENT 'Created_at' , website_id int NULL COMMENT 'Website_id' , confirmation varchar(255) NULL COMMENT 'Confirmation' , created_in text NULL COMMENT 'Created_in' , dob date NULL COMMENT 'Dob' , gender int NULL COMMENT 'Gender' , taxvat varchar(255) NULL COMMENT 'Taxvat' , lock_expires timestamp NULL default NULL COMMENT 'Lock_expires' , shipping_full text NULL COMMENT 'Shipping_full' , billing_full text NULL COMMENT 'Billing_full' , billing_firstname varchar(255) NULL COMMENT 'Billing_firstname' , billing_lastname varchar(255) NULL COMMENT 'Billing_lastname' , billing_telephone varchar(255) NULL COMMENT 'Billing_telephone' , billing_postcode varchar(255) NULL COMMENT 'Billing_postcode' , billing_country_id varchar(255) NULL COMMENT 'Billing_country_id' , billing_region varchar(255) NULL COMMENT 'Billing_region' , billing_street text NULL COMMENT 'Billing_street' , billing_city varchar(255) NULL COMMENT 'Billing_city' , billing_fax varchar(255) NULL COMMENT 'Billing_fax' , billing_vat_id varchar(255) NULL COMMENT 'Billing_vat_id' , billing_company varchar(255) NULL COMMENT 'Billing_company' , PRIMARY KEY (entity_id), INDEX CUSTOMER_GRID_FLAT_GROUP_ID (group_id), INDEX CUSTOMER_GRID_FLAT_CREATED_AT (created_at), INDEX CUSTOMER_GRID_FLAT_WEBSITE_ID (website_id), INDEX CUSTOMER_GRID_FLAT_CONFIRMATION (confirmation), INDEX CUSTOMER_GRID_FLAT_CREATED_IN (created_in), INDEX CUSTOMER_GRID_FLAT_DOB (dob), INDEX CUSTOMER_GRID_FLAT_GENDER (gender), INDEX CUSTOMER_GRID_FLAT_LOCK_EXPIRES (lock_expires), INDEX CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID (billing_country_id), FULLTEXT FTI_76EE125693165A11F2D49A0116049156 (name, email, taxvat, shipping_full, billing_full, billing_firstname, billing_lastname, billing_telephone, billing_postcode, billing_region, billing_city, billing_fax, billing_vat_id, billing_company) ) COMMENT='customer_grid_flat' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

1 Answer 1

0

Please see OMG Ponies' answer for the reason of this error: https://stackoverflow.com/questions/1827063/mysql-error-key-specification-without-a-key-length

To solve it, run this query before the first reindexing:

CREATE TABLE IF NOT EXISTS `customer_grid_flat` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `name` text COMMENT 'Name',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `group_id` int(11) DEFAULT NULL COMMENT 'Group_id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created_at',
  `website_id` int(11) DEFAULT NULL COMMENT 'Website_id',
  `confirmation` varchar(255) DEFAULT NULL COMMENT 'Confirmation',
  `created_in` text COMMENT 'Created_in',
  `dob` date DEFAULT NULL COMMENT 'Dob',
  `gender` int(11) DEFAULT NULL COMMENT 'Gender',
  `taxvat` varchar(255) DEFAULT NULL COMMENT 'Taxvat',
  `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Lock_expires',
  `shipping_full` text COMMENT 'Shipping_full',
  `billing_full` text COMMENT 'Billing_full',
  `billing_firstname` varchar(255) DEFAULT NULL COMMENT 'Billing_firstname',
  `billing_lastname` varchar(255) DEFAULT NULL COMMENT 'Billing_lastname',
  `billing_telephone` varchar(255) DEFAULT NULL COMMENT 'Billing_telephone',
  `billing_postcode` varchar(255) DEFAULT NULL COMMENT 'Billing_postcode',
  `billing_country_id` varchar(255) DEFAULT NULL COMMENT 'Billing_country_id',
  `billing_region` varchar(255) DEFAULT NULL COMMENT 'Billing_region',
  `billing_street` varchar(255) DEFAULT NULL COMMENT 'Billing_street',
  `billing_city` varchar(255) DEFAULT NULL COMMENT 'Billing_city',
  `billing_fax` varchar(255) DEFAULT NULL COMMENT 'Billing_fax',
  `billing_vat_id` varchar(255) DEFAULT NULL COMMENT 'Billing_vat_id',
  `billing_company` varchar(255) DEFAULT NULL COMMENT 'Billing_company',
  PRIMARY KEY (`entity_id`),
  KEY `CUSTOMER_GRID_FLAT_GROUP_ID` (`group_id`),
  KEY `CUSTOMER_GRID_FLAT_CREATED_AT` (`created_at`),
  KEY `CUSTOMER_GRID_FLAT_WEBSITE_ID` (`website_id`),
  KEY `CUSTOMER_GRID_FLAT_CONFIRMATION` (`confirmation`),
  KEY `CUSTOMER_GRID_FLAT_DOB` (`dob`),
  KEY `CUSTOMER_GRID_FLAT_GENDER` (`gender`),
  KEY `CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID` (`billing_country_id`),
  FULLTEXT KEY `FTI_8746F705702DD5F6D45B8C7CE7FE9F2F` (`name`,`email`,`created_in`,`taxvat`,`shipping_full`,`billing_full`,`billing_firstname`,`billing_lastname`,`billing_telephone`,`billing_postcode`,`billing_region`,`billing_city`,`billing_fax`,`billing_company`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='customer_grid_flat';

Let me know if this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.