The problem appears to be occurring when the total number of asset sub-type fields for a given asset type (e.g., Device) exceeds 64. This is because each sub-type field adds an index to the ASSET_DATA_* tables which have a limit of 64 indexes. It doesn't seem to matter how you spread out the fields. You can create 4 sub-types with 16 fields each or 16 sub-types with 4 fields each. As soon as the 65th field is created in a new or existing sub-type, the following error occurs when trying to save the sub-type:
PHP Error: Uncaught ADODB_Exception in /kbox/kboxwww/include/AssetType.class.php on line 698: mysqli error: [1069: Too many keys specified; max 64 keys allowed] in EXECUTE("ALTER TABLE ASSET_DATA_5 ADD COLUMN FIELD_10152 varchar(255), ADD COLUMN FIELD_10153 varchar(255), ADD COLUMN FIELD_10154 varchar(255), ADD COLUMN FIELD_10155 varchar(255), ADD COLUMN FIELD_10156 varchar(255), ADD COLUMN FIELD_10157 varchar(255), ADD INDEX INDEX_10152 (FIELD_10152), ADD INDEX INDEX_10153 (FIELD_10153), ADD INDEX INDEX_10154 (FIELD_10154), ADD INDEX INDEX_10155 (FIELD_10155), ADD INDEX INDEX_10156 (FIELD_10156), ADD INDEX INDEX_10157 (FIELD_10157)")
Steps to reproduce:
1. On a 6.4.119398, go to Assets | Asset Types.
2. Click Device.
3. Click Add Subtype.
4. Specify any name.
5. Add 16 Subtype fields.
6. Repeat steps 3-5 three more times.
7. Pick any previously created sub-type and add one more field.
8. Click save.
Expected results: Asset Subtype saves without errors.
Actual results: Aforementioned error occur.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center