]> git.mjollnir.org Git - moodle.git/commitdiff
Force ANSI NULLs under mssql. It's not critical to work
authorstronk7 <stronk7>
Thu, 21 Sep 2006 07:44:56 +0000 (07:44 +0000)
committerstronk7 <stronk7>
Thu, 21 Sep 2006 07:44:56 +0000 (07:44 +0000)
but it avoids some problems when changing nullability
of fields in the future.

lib/dmllib.php

index 1e84bf062df80c9462fd8940869be1228a35af26..82509e5603999464711e8a66b37a6d4bcfb5f568 100644 (file)
@@ -1447,6 +1447,9 @@ function configure_dbconnection() {
         /// No need to set charset. It must be specified in the driver conf
         /// Allow quoted identifiers
             $db->Execute('SET QUOTED_IDENTIFIER ON');
+        /// Force ANSI nulls so the NULL check was done by IS NULL and NOT IS NULL
+        /// instead of equal(=) and distinct(<>) simbols
+            $db->Execute('SET ANSI_NULLS ON');
         /// Enable sybase quotes, so addslashes and stripslashes will use "'"
             ini_set('magic_quotes_sybase', '1');
         /// NOTE: Not 100% useful because GPC has been addslashed with the setting off