MDL-17969 mssql native driver: improve temp tables detection. Now they can be concurrently created in different sessions.

This commit is contained in:
stronk7 2009-10-09 18:39:16 +00:00
parent caf2d133c2
commit 3c41bba0f2

View 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";
}