Permalink
Browse files

Counting extra updates performed by Oracle & MSSQL in PERF

  • Loading branch information...
1 parent 4d4ef0e commit df313f0e9402952dfc5da78d90cf1395e0a6daec stronk7 committed Oct 27, 2006
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/dmllib.php
View
@@ -1966,6 +1966,9 @@ function db_update_lobs ($table, $sqlcondition, &$clobs, &$blobs) {
/// Update all the clobs
if ($clobs) {
foreach ($clobs as $key => $value) {
+
+ if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; }; /// Count the extra updates in PERF
+
if (!$db->UpdateClob($CFG->prefix.$table, $key, $value, $sqlcondition)) {
$status = false;
$statement = "UpdateClob('$CFG->prefix$table', '$key', '" . substr($value, 0, 100) . "...', '$sqlcondition')";
@@ -1980,6 +1983,9 @@ function db_update_lobs ($table, $sqlcondition, &$clobs, &$blobs) {
/// Update all the blobs
if ($blobs) {
foreach ($blobs as $key => $value) {
+
+ if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; }; /// Count the extra updates in PERF
+
if(!$db->UpdateBlob($CFG->prefix.$table, $key, $value, $sqlcondition)) {
$status = false;
$statement = "UpdateBlob('$CFG->prefix$table', '$key', '" . substr($value, 0, 100) . "...', '$sqlcondition')";

0 comments on commit df313f0

Please sign in to comment.