[wp-trac] [WordPress Trac] #58584: Telemetry / Stats: Send the raw DB version identifier, and/or server type.

WordPress Trac noreply at wordpress.org
Wed Jun 21 02:34:11 UTC 2023


#58584: Telemetry / Stats: Send the raw DB version identifier, and/or server type.
-----------------------------+-----------------------------
 Reporter:  dd32             |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Currently wordpress.org/about/stats lists MySQL version stats based on
 what WordPress sends with it's update calls.

 This is what is sent to WordPress.org:
 https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
 includes/update.php#L76-L82
 which is generated from this:
 https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes
 /class-wpdb.php#L4101-L4111

 However, `$wpdb->db_version()` is not always 100% accurate, and can return
 the "incorrect" data for some servers.
 For example:
 {{{
 $wpdb->db_server_info();
 string(25) "5.5.5-10.2.44-MariaDB-log"

 wp> $wpdb->db_version();
 string(5) "5.5.5"
 }}}

 It would be ideal if we could either/and/or:
 a) Parse the proper version number out core side
 b) Report the full version string ( `5.5.5-10.2.44-MariaDB-log` )
 c) Report the full identifier (`[ 'MariaDB', '10.2.44' ]` )
 d) Report the value of `$wpdb->is_mysql`
 e) All of the above

 For cases where a DB drop-in is used, is it possible to determine the
 "type" from that possibly? I guess the final classname of `$wpdb` might
 specify it?

 We can do some parsing on the WordPress API side to trim the data back to
 a single valid identifier, such as `MariaDB 10.2.44` or `MySQL 5.5.5` but
 not with what's currently being reported.

 For some background, see https://meta.trac.wordpress.org/ticket/7080

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58584>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list