Passaggi per verificare la causa
Controllare il valore massimo della chiave primaria eseguendo il comando seguente nel terminale: SELECT MAX(value_id) FROM catalog_product_entity_int;
Se max(value_id)
è inferiore a max int(11) [ 4294967296 ]
e [ AUTO_INCREMENT ]
ha un valore maggiore o uguale a max int(11) [ 4294967296 ]
, provare ad aggiornare il valore [ AUTO_INCREMENT ]
al valore successivo dalla tabella. In caso contrario, considerare un aggiornamento dello schema da INT
a BIGINT
.
Aggiorna AUTO_INCREMENT
al valore successivo dalla tabella
Se il valore mostrato è inferiore a max int(11) [ 4294967296 ]
come mostrato nell'output del terminale di esempio seguente, una tabella [ AUTO_INCREMENT ]
è stata modificata in un numero maggiore o uguale al valore max [ int(11) ]
.
MariaDB [xxx]> SELECT MAX(value_id) FROM catalog_product_entity_int;
+---------------------+
| MAX(source_item_id) |
+---------------------+
| 4283174130 |
+---------------------+
Per verificare se ciò si è verificato, esegui il seguente comando nel terminale:
MariaDB [xxx]> show create table catalog_product_entity_int;
...
) ENGINE=InnoDB AUTO_INCREMENT=4294967297 DEFAULT CHARSET=utf8 COMMENT='Catalog Product Integer Attribute Backend Table';
Come è possibile vedere nell'output dell'esempio precedente, la tabella [ AUTO_INCREMENT ]
è stata modificata in un numero maggiore di max int(11) [ 4294967296 ]
. La soluzione consiste nell'aggiornare [ AUTO_INCREMENT]
al valore successivo dalla tabella:
ALTER TABLE catalog_product_entity_int AUTO_INCREMENT = 4283174131;