Filters the maximum index length in the database. Indexes have a maximum size of 767 bytes. Historically, we haven't need to be concerned about that. As of WP 4.2, however, they moved to utf8mb4, which uses 4 bytes per character. This means that an index which used to have room for floor(767/3) = 255 characters, now only has room for floor(767/4) = 191 characters. Additionally, MyISAM engine also limits the index size to 1000 bytes. We add this filter so that interested folks on InnoDB engine can increase the size till allowed 3071 bytes.
191
Sortie :
@param int $max_index_length Maximum index length. Default 191.
// Modifier la valeur avec le filtre 'woocommerce_database_max_index_length'
add_filter('woocommerce_database_max_index_length', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(191) {
// Modifier la valeur
return 191;
}
Chargement des actualités...