[wp-trac] [WordPress Trac] #31644: mysqli_get_client_version in wp-db

WordPress Trac noreply at wordpress.org
Sun Mar 15 04:14:59 UTC 2015


#31644: mysqli_get_client_version in wp-db
--------------------------+--------------------
 Reporter:  filipac       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.2
Component:  Database      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by SergeyBiryukov):

 Replying to [comment:2 pento]:
 > Could you link to where on the internet that solution was suggested (as
 opposed to fixing HHVM's buggy implementation)?

 The [http://php.net/manual/en/mysqli.get-client-version.php php.net
 example] suggests that connection is not required to determine the version
 of MySQL client library:
 {{{

 <?php

 /* We don't need a connection to determine
    the version of mysql client library */

 printf("Client library version: %d\n", mysqli_get_client_version());
 ?>
 }}}

 It also looks like `mysql_get_client_version()` (non-MySQLi) does not
 exist. `$wpdb->has_cap( 'utf8mb4' )` produces a fatal error with
 `WP_USE_EXT_MYSQL` set to true:
 {{{
 Fatal error: Call to undefined function mysql_get_client_version() in wp-
 includes/wp-db.php on line 2810
 }}}

 [http://php.net/manual/en/function.mysql-get-client-info.php
 mysql_get_client_info()] does exist though. See [attachment:31644.patch].

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


More information about the wp-trac mailing list