--- C:\Users\Edward\Webs\drupal\includes\database.mysql.inc 2008-01-15 23:26:00.461000000 -0500
+++ C:\Users\Edward\Webs\drupal\includes\database.mysql.inc.formatted 2008-01-16 17:45:18.724557100 -0500
@@ -1,6 +1,7 @@
$t('MySQL database'),
'value' => ($phase == 'runtime') ? l($version, 'admin/reports/status/sql') : $version,
);
-
+
if (version_compare($version, DRUPAL_MINIMUM_MYSQL) < 0) {
$form['mysql']['severity'] = REQUIREMENT_ERROR;
$form['mysql']['description'] = $t('Your MySQL Server is too old. Drupal requires at least MySQL %version.', array('%version' => DRUPAL_MINIMUM_MYSQL));
}
-
+
return $form;
}
@@ -50,12 +51,12 @@
*/
function db_connect($url) {
$url = parse_url($url);
-
+
// Check if MySQL support is present in PHP
if (!function_exists('mysql_connect')) {
_db_error_page('Unable to use the MySQL database because the MySQL extension for PHP is not installed. Check your php.ini to see how you can enable it.');
}
-
+
// Decode url-encoded information in the db connection string
$url['user'] = urldecode($url['user']);
// Test if database url has a password.
@@ -67,12 +68,12 @@
}
$url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']);
-
+
// Allow for non-standard MySQL port.
if (isset($url['port'])) {
$url['host'] = $url['host'] .':'. $url['port'];
}
-
+
// - TRUE makes mysql_connect() always open a new link, even if
// mysql_connect() was called before with the same parameters.
// This is important if you are using two databases on the same
@@ -84,7 +85,7 @@
// Show error screen otherwise
_db_error_page(mysql_error());
}
-
+
// On MySQL 4.1 and later, force UTF-8.
if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
mysql_query('SET NAMES "utf8"', $connection);
@@ -97,7 +98,7 @@
*/
function _db_query($query, $debug = 0) {
global $active_db, $queries, $user;
-
+
if (variable_get('dev_query', 0)) {
list($usec, $sec) = explode(' ', microtime());
$timer = (float)$usec + (float)$sec;
@@ -111,21 +112,21 @@
$name = str_replace(array('*', '/'), '', $name);
$query = '/* '. $name .' : '. $bt[2]['function'] .' */ '. $query;
}
-
+
$result = mysql_query($query, $active_db);
-
+
if (variable_get('dev_query', 0)) {
$query = $bt[2]['function'] ."\n". $query;
list($usec, $sec) = explode(' ', microtime());
- $stop = (float)$usec + (float)$sec;
- $diff = $stop - $timer;
+ $stop = (float)$usec + (float)$sec;
+ $diff = $stop - $timer;
$queries[] = array($query, $diff);
}
-
+
if ($debug) {
print '
query: '. $query .'
error:'. mysql_error($active_db) .'