MySQL Forums
Forum List  »  InnoDB

Re: SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed
Posted by: Lucas van Staden
Date: November 27, 2019 07:14AM

This is not a core magento bug.

You are getting this issue due to 3rd party module extending core tables, and inserting additional indexes into tables.

This is likely why your colleagues don't get the issue (different set of modules)

Example SQL that breaks this convention:

SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed, 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' ,
`member_number` varchar(255) NULL COMMENT 'Member_number' ,
`lec_mem_num` varchar(255) NULL COMMENT 'Lec_mem_num' ,
`lucas_test` varchar(255) NULL COMMENT 'Lucas_test' ,
`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` varchar(255) 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_DOB` (`dob`),
INDEX `CUSTOMER_GRID_FLAT_GENDER` (`gender`),
INDEX `CUSTOMER_GRID_FLAT_LUCAS_TEST` (`lucas_test`),
INDEX `CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID` (`billing_country_id`),
FULLTEXT `FTI_6F5F4598D6C9A7680BD2D42F15CCB449` (`name`, `email`, `created_in`, `taxvat`, `member_number`, `lec_mem_num`, `shipping_full`, `billing_full`, `billing_firstname`, `billing_lastname`, `billing_telephone`, `billing_postcode`, `billing_region`, `billing_city`, `billing_fax`, `billing_vat_id`, `billing_company`)

in that query `member_number`, `lec_mem_num` are not core indexes, and added by 3rd party modules, pushing the limit over.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed
21
November 27, 2019 07:14AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.