wordpress-develop icon indicating copy to clipboard operation
wordpress-develop copied to clipboard

Fix get_col_charset and get_col_length when using pre_get_table_charset filter

Open matt-h opened this issue 1 month ago • 3 comments

Change how column meta is pulled so it uses a get_cols_meta and get_col_meta function.

This is to consolidate the database request so it has a single source of truth. It previously used a cached values array throughout the code which relied on get_table_charset being run to prime the cache. The priming of the cache was a side effect of that function. If the pre_get_table_charset was set then the cache would never be primed and cache checks would throw errors. We now always get the values from the functions which can be cached but not rely on the cache being primed.

Trac ticket: https://core.trac.wordpress.org/ticket/38921 Trac ticket: https://core.trac.wordpress.org/ticket/59836


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

matt-h avatar Dec 18 '25 14:12 matt-h