From: stronk7 Date: Fri, 9 Oct 2009 18:39:16 +0000 (+0000) Subject: MDL-17969 mssql native driver: improve temp tables detection. Now they can be concurr... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3c41bba0f237fa5fed360d274ea4a68907cc3155;p=moodle.git MDL-17969 mssql native driver: improve temp tables detection. Now they can be concurrently created in different sessions. --- diff --git a/lib/dml/mssql_native_moodle_database.php b/lib/dml/mssql_native_moodle_database.php index 1b58238c92..69ab678ceb 100644 --- a/lib/dml/mssql_native_moodle_database.php +++ b/lib/dml/mssql_native_moodle_database.php @@ -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"; }