From 12e09c6b8b99dfed11d6b8b86cecea8d59be0125 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 25 Oct 2008 18:01:54 +0000 Subject: [PATCH] MDL-14679 dml/native_mysqli fixed column cache --- lib/dml/mysqli_native_moodle_database.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/dml/mysqli_native_moodle_database.php b/lib/dml/mysqli_native_moodle_database.php index 3c0cbd2dff..29880796cd 100644 --- a/lib/dml/mysqli_native_moodle_database.php +++ b/lib/dml/mysqli_native_moodle_database.php @@ -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; } /** -- 2.39.5