-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.3: prevent DB_Driver_WPDB::insert_record()
from inserting empty meta values
#1080
Comments
I have disabled cleanup - this platform's usage history is to be stamped for eternity. |
I wonder if |
https://wordpress.stackexchange.com/questions/136613/wpdb-insert-multiple-record-at-once this seems relevant for batching INSERTs. It looks like
|
Added example key list with empty values in opening comment. |
I monkey-patched my live Stream copy to avoid inserting empty meta values something like 1 week ago. Zero ill effects, everything still works. I think it's probably safe to do. |
I think these are 2 separate issues. #1038 doesn't alleviate massively bloating the database with empty values in any way, but does seem to have located another bug that also needs fixing. |
Prevent inserting empty meta values, fix #1080
My platform Stream database is growing large,
wp_stream_meta
contains 63M rows.Bug Report
Analysis with
shows about 20-25% are rows with empty
meta_value
, which to me looks like pure database bloat.Expected Behavior
wp_stream_meta
should only contain rows with non-emptymeta_value
.On read, any such parameters can simply be displayed empty in code.
Actual Behavior
Noticeable amount of
wp_stream_meta
table is rows with emptymeta_value
.Example data log:
Empty meta value connector analysis:
Steps to Reproduce the Problem
System Information
Solution proposal
Perhaps this code block
stream/classes/class-db-driver-wpdb.php
Lines 69 to 74 in 33dcfa8
could have a simple
if ( $val )
check beforeinsert_meta()
call?The text was updated successfully, but these errors were encountered: