Performance issue: so in our case, we have rows with too large contents and when dealing with such large content we need only to update just the fields we need to update like when trying to update the small column last accessed time we don't need to grab the other big columns from DB and save them again, this will for sure consume resources and time.
Data issue: In relation with this issue when tried to send the content after applying addslashes function on it, this solved the issue but if we tried to update any other column, this content column will have stripslashes applied on it and we never sent it to be updated!
Proposed solution
We need to only update the sent columns without grabbing the full row again from the DB, we may just making sure that the item exists only but without using its contents.
Introduction
Here: https://github.com/berlindb/core/blob/ac238c28b18bc2cfdf063f551e4900e14b0eec17/query.php#L1892 You are merging the DB item with the data being sent to be updated so if you want to update just one column in a row, you are actually updating the full row.
The problem
We have two problems here:-
last accessed time
we don't need to grab the other big columns from DB and save them again, this will for sure consume resources and time.addslashes
function on it, this solved the issue but if we tried to update any other column, this content column will havestripslashes
applied on it and we never sent it to be updated!Proposed solution
We need to only update the sent columns without grabbing the full row again from the DB, we may just making sure that the item exists only but without using its contents.