Merge branch 'w14_MDL-39024_m25_mssqlseek' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-04-09 01:58:20 +02:00
commit a035bc9b6d

View file

@ -713,7 +713,11 @@ class mssql_native_moodle_database extends moodle_database {
$this->query_end($result);
if ($limitfrom) { // Skip $limitfrom records
mssql_data_seek($result, $limitfrom);
if (!@mssql_data_seek($result, $limitfrom)) {
// Nothing, most probably seek past the end.
mssql_free_result($result);
$result = null;
}
}
return $this->create_recordset($result);