1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-23 17:34:56 +02:00

And finally I've found the annoying bug that was causing Oracle to

execute strange SQL statements! Argh! Now I can go to sleep...
This commit is contained in:
stronk7 2007-01-28 01:07:52 +00:00
parent 2a82cacf0b
commit 3e7dab97e7

@ -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;