Introduce ->mysql to allow drop-ins to declare themselves as MySQL and therefore allow minimum version checks to still apply. fixes #18176.

git-svn-id: https://develop.svn.wordpress.org/trunk@19060 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2011-10-25 05:29:28 +00:00
parent 01f19e3cff
commit fcf1696de4
4 changed files with 31 additions and 4 deletions
+17
View File
@@ -460,6 +460,20 @@ class wpdb {
*/
var $func_call;
/**
* Whether MySQL is used as the database engine.
*
* Set in WPDB::db_connect() to true, by default. This is used when checking
* against the required MySQL version for WordPress. Normally, a replacement
* database drop-in (db.php) will skip these checks, but setting this to true
* will force the checks to occur.
*
* @since 3.3.0
* @access public
* @var bool
*/
public $is_mysql = null;
/**
* Connects to the database server and selects a database
*
@@ -1015,6 +1029,9 @@ class wpdb {
* @since 3.0.0
*/
function db_connect() {
$this->is_mysql = true;
if ( WP_DEBUG ) {
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
} else {