From: stronk7 Date: Sun, 28 Jan 2007 01:07:52 +0000 (+0000) Subject: And finally I've found the annoying bug that was causing Oracle to X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3e7dab97e7514852f438613de4338cb4ec8f86dc;p=moodle.git And finally I've found the annoying bug that was causing Oracle to execute strange SQL statements! Argh! Now I can go to sleep... --- diff --git a/lib/dmllib.php b/lib/dmllib.php index b850a15b63..ac57d7e0c6 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -1297,6 +1297,8 @@ function insert_record($table, $dataobject, $returnid=true, $primarykey='id') { } if ($nextval = (int)$db->GenID($seqname)) { $dataobject->{$primarykey} = $nextval; + } else { + debugging('Not able to get value from sequence ' . $seqname, DEBUG_DEVELOPER); } } @@ -2003,7 +2005,7 @@ function db_detect_lobs ($table, &$dataobject, &$clobs, &$blobs, $unset = false, /// If the field is CLOB, update its value to '@#CLOB#@' and store it in the $clobs array if (strtoupper($columns[strtolower($fieldname)]->type) == $clobdbtype) { /// Oracle optimization. CLOBs under 4000cc can be directly inserted (no need to apply 2-phases to them) - if ($CFG->dbfamily = 'oracle' && strlen($dataobject->$fieldname) < 4000) { + if ($CFG->dbfamily == 'oracle' && strlen($dataobject->$fieldname) < 4000) { continue; } $clobs[$fieldname] = $dataobject->$fieldname;