Skip to content

Commit

Permalink
MDL-34081 dml: mssql driver was using case insensitve sql
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski authored and stronk7 committed Jul 2, 2012
1 parent d3c8f93 commit 44181e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/dml/mssql_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public function get_tables($usecache=true) {
}
$this->tables = array();
$sql = "SELECT table_name
FROM information_schema.tables
FROM INFORMATION_SCHEMA.TABLES
WHERE table_name LIKE '$this->prefix%'
AND table_type = 'BASE TABLE'";
$this->query_start($sql, null, SQL_QUERY_AUX);
Expand Down Expand Up @@ -427,7 +427,7 @@ public function get_columns($table, $usecache=true) {
columnproperty(object_id(quotename(table_schema) + '.' +
quotename(table_name)), column_name, 'IsIdentity') AS auto_increment,
column_default AS default_value
FROM information_schema.columns
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = '{" . $table . "}'
ORDER BY ordinal_position";
} else { // temp table, get metadata from tempdb schema
Expand All @@ -440,7 +440,7 @@ public function get_columns($table, $usecache=true) {
columnproperty(object_id(quotename(table_schema) + '.' +
quotename(table_name)), column_name, 'IsIdentity') AS auto_increment,
column_default AS default_value
FROM tempdb.information_schema.columns
FROM tempdb.INFORMATION_SCHEMA.COLUMNS
JOIN tempdb..sysobjects ON name = table_name
WHERE id = object_id('tempdb..{" . $table . "}')
ORDER BY ordinal_position";
Expand Down

0 comments on commit 44181e8

Please sign in to comment.