[wp-trac] [WordPress Trac] #59836: Using the pre_get_table_charset filter ensures wpdb->col_meta never gets populated

WordPress Trac noreply at wordpress.org
Thu Dec 18 14:53:50 UTC 2025


#59836: Using the pre_get_table_charset filter ensures wpdb->col_meta never gets
populated
--------------------------+------------------------------
 Reporter:  c0ntax        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  6.3.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by matt-h):

 I've created a patch for this https://github.com/WordPress/wordpress-
 develop/pull/10646

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59836#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list