]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17969 mssql native driver: improve temp tables detection. Now they can be concurr...
authorstronk7 <stronk7>
Fri, 9 Oct 2009 18:39:16 +0000 (18:39 +0000)
committerstronk7 <stronk7>
Fri, 9 Oct 2009 18:39:16 +0000 (18:39 +0000)
lib/dml/mssql_native_moodle_database.php

index 1b58238c9274627c14119dc505c8e5ee407ae896..69ab678cebb757e2bbe6b2b646b73288291a09ae 100644 (file)
@@ -453,7 +453,8 @@ class mssql_native_moodle_database extends moodle_database {
                                quotename(table_name)), column_name, 'IsIdentity') AS auto_increment,
                            column_default AS default_value
                       FROM tempdb.information_schema.columns
-                     WHERE table_name like '{" . $table . "}__________%'
+                      JOIN tempdb..sysobjects ON name = table_name
+                     WHERE id = object_id('tempdb..{" . $table . "}')
                   ORDER BY ordinal_position";
         }