mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
MDL-14974 improved columns caching implementation
This commit is contained in:
parent
aa07a81368
commit
a7544e377a
11 changed files with 36 additions and 44 deletions
|
@ -255,14 +255,10 @@ class mysql_sql_generator extends sql_generator {
|
|||
*/
|
||||
public function getCheckConstraintsFromDB($xmldb_table, $xmldb_field = null) {
|
||||
|
||||
global $db;
|
||||
|
||||
$tablename = $xmldb_table->getName($xmldb_table);
|
||||
|
||||
$this->mdb->reset_columns($tablename);
|
||||
|
||||
/// Fetch all the columns in the table
|
||||
if (!$columns = $this->mdb->get_columns($tablename)) {
|
||||
if (!$columns = $this->mdb->get_columns($tablename, false)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue