وردپرس

MySQL warnings from helper-function.php code


Replies: 0

We’ve been seeing so many warnings, like thousands per second, being generated in our mySQL error logs, all based off of this code:

https://prnt.sc/PyQWtBs0rJ8T

and they end up filling up our logs constantly with errors like this (like millions of these per hour):

2024-10-20 20:52:13 user @ localhost [] WARNING 1292: Truncated incorrect INTEGER value: '9320.98' : SELECT MAX( CAST( meta_value as UNSIGNED ) ) FROM wp_postmeta WHERE meta_key = '_price'

as well as these ones:

2024-10-20 20:52:12 user @ localhost [] WARNING 1292: Truncated incorrect INTEGER value: '7999.99' : SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) LEFT JOIN wp_term_relationships AS tt2 ON (wp_posts.ID = tt2.object_id) INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_wc_product_meta_lookup wc_product_meta_lookup ON wp_posts.ID = wc_product_meta_lookup.product_id
WHERE 1=1 AND (
wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (5530,5535)
)
AND
wp_term_relationships.term_taxonomy_id IN (3759,9380,13420,13421,13422,13423,13424)
AND
wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (5530,5535)
)

The moment we turn that plugin off, these issues go away and the server load eases up a bit.

The minute we turn the plugin back on, the server load spikes up and the error log ends up being overfilled with these warnings in no time.

Might wanna look into this code and fix things up a bit.

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا