]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14679 dml/native_mysqli fixed column cache
authorskodak <skodak>
Sat, 25 Oct 2008 18:01:54 +0000 (18:01 +0000)
committerskodak <skodak>
Sat, 25 Oct 2008 18:01:54 +0000 (18:01 +0000)
lib/dml/mysqli_native_moodle_database.php

index 3c0cbd2dffe8a60ad5a74a4cbf86e0be6d5cce2f..29880796cd336319d9670314e339b5a2911dd259 100644 (file)
@@ -355,7 +355,13 @@ class mysqli_native_moodle_database extends moodle_database {
     public function change_database_structure($sql) {
         $this->writes++;
         $this->print_debug($sql);
-        return ($this->mysqli->query($sql) === TRUE);
+        $result = $this->mysqli->query($sql);
+        $this->reset_columns();
+        if ($result === false) {
+            $this->report_error($sql);
+            return false;
+        }
+        return true;
     }
 
     /**