@@ -498,7 +498,7 @@ class WP_MySQL_On_SQLite extends PDO {
498498 private $ mysql_version ;
499499
500500 /**
501- * The SQLite engine version.
501+ * The emulated MySQL client library version.
502502 *
503503 * This is a mysqli-like property that is needed to avoid a PHP warning in
504504 * the WordPress health info. The "WP_Debug_Data::get_wp_database()" method
@@ -930,8 +930,8 @@ function ( $key ) {
930930 }
931931 }
932932
933- // Load SQLite version to a property used by WordPress health info.
934- $ this ->client_info = $ sqlite_version ;
933+ // Load MySQL client information to a property used by WordPress health info.
934+ $ this ->client_info = $ this -> getAttribute ( PDO :: ATTR_CLIENT_VERSION ) ;
935935
936936 // Enable foreign keys. By default, they are off.
937937 $ this ->connection ->query ( 'PRAGMA foreign_keys = ON ' );
@@ -1444,7 +1444,9 @@ public function setAttribute( $attribute, $value ): bool {
14441444 */
14451445 #[ReturnTypeWillChange]
14461446 public function getAttribute ( $ attribute ) {
1447- if ( PDO ::ATTR_CLIENT_VERSION === $ attribute ) {
1447+ if ( PDO ::ATTR_DRIVER_NAME === $ attribute ) {
1448+ return 'mysql ' ;
1449+ } elseif ( PDO ::ATTR_CLIENT_VERSION === $ attribute ) {
14481450 return 'mysqlnd ' . $ this ->get_mysql_server_version_string ();
14491451 } elseif ( PDO ::ATTR_SERVER_VERSION === $ attribute ) {
14501452 return $ this ->get_mysql_server_version_string ();
@@ -4320,7 +4322,7 @@ private function translate( $node ): ?string {
43204322 } elseif ( 'version ' === $ name ) {
43214323 $ value = $ this ->get_mysql_server_version_string ();
43224324 } elseif ( 'version_comment ' === $ name ) {
4323- $ value = ' MySQL Community Server - GPL ' ;
4325+ $ value = $ this -> get_mysql_server_version_comment () ;
43244326 } elseif ( WP_MySQL_Lexer::SESSION_SYMBOL === $ type ) {
43254327 $ value = $ this ->session_system_variables [ $ name ] ?? null ;
43264328 } else {
@@ -5128,6 +5130,15 @@ private function get_mysql_server_version_string(): string {
51285130 );
51295131 }
51305132
5133+ /**
5134+ * Get the comment identifying the emulated MySQL server implementation.
5135+ *
5136+ * @return string The MySQL server version comment.
5137+ */
5138+ private function get_mysql_server_version_comment (): string {
5139+ return 'MySQL on SQLite ' ;
5140+ }
5141+
51315142 /**
51325143 * Translate a MySQL datetime literal to SQLite.
51335144 *
0 commit comments