Deadlock error on Duplicate entry
-
I found this in our log (we use W3TC with Memcache):
[19-Mar-2021 12:58:49 UTC] WordPress errore sul database Duplicate entry '[email protected]' for key 'PRIMARY' per la query INSERT INTO <code>wp_mailchimp_carts</code> (<code>id</code>, <code>email</code>, <code>user_id</code>, <code>cart</code>, <code>created_at</code>) VALUES ('CENSORED', '[email protected]', 481, 'a:1:{s:32:\"CENSORED\";a:11:{s:3:\"key\";s:32:\"CENSORED\";s:10:\"product_id\";i:11784;s:12:\"variation_id\";i:11790;s:9:\"variation\";a:1:{s:26:\"attribute_pa_CENSORED\";s:14:\"personalizzata\";}s:8:\"quantity\";i:1;s:9:\"data_hash\";s:32:\"CENSORED\";s:13:\"line_tax_data\";a:2:{s:8:\"subtotal\";a:0:{}s:5:\"total\";a:0:{}}s:13:\"line_subtotal\";d:110;s:17:\"line_subtotal_tax\";i:0;s:10:\"line_total\";d:110;s:8:\"line_tax\";i:0;}}', '2021-03-19 12:58:49') fatta da do_action('wp_ajax_mailchimp_set_user_by_email'), WP_Hook->do_action, WP_Hook->apply_filters, MailChimp_Service->set_user_by_email, MailChimp_Service->handleCartUpdated, MailChimp_Service->trackCart, W3TC\DbCache_WpdbNew->insert, W3TC\DbCache_WpdbInjection_QueryCaching->insert, W3TC\_CallUnderlying->insert, W3TC\DbCache_WpdbNew->insert, W3TC\DbCache_WpdbInjection->insert, W3TC\DbCache_WpdbNew->default_insert, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_WpdbNew->default_query
Looking at the code indeed there is an insert in that table but there is also a check.
PS: suggestion on file class-mailchimp-woocommerce-service.php line 878 can be changed as
$wpdb->insert("{$table}", array(
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Deadlock error on Duplicate entry’ is closed to new replies.