[wp-trac] [WordPress Trac] #55942: Add a "type" field to the meta and options tables

WordPress Trac noreply at wordpress.org
Fri Apr 14 00:37:25 UTC 2023


#55942: Add a "type" field to the meta and options tables
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.3
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:37 rjasdfiii]:
 > Does `wp_decode_value_from_db()` fetch all the meta data for a single
 post_id and store it somewhere

 No, sorry, should have explained better. [https://github.com/WordPress
 /wordpress-develop/pull/4324 The second PR] drops the changes to the DB
 completely as it seems there's no good way to ensure full backwards
 compatibility in `get_option()` and `get_metadata()`. There are no changes
 to any DB queries, etc.

 `wp_decode_value_from_db()` is a simple function intended for use instead
 of `maybe_unserialize()` on option and meta values retrieved from the
 database. It takes into account the `$value_type` parameter (if set).

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


More information about the wp-trac mailing list