MDL-23925 reverting changes, we need to fix uniqueness and collation issues first
authorPetr Skoda <skodak@moodle.org>
Wed, 25 Aug 2010 09:35:18 +0000 (09:35 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 25 Aug 2010 09:35:18 +0000 (09:35 +0000)
lib/dml/mssql_native_moodle_database.php
lib/dml/mysqli_native_moodle_database.php
lib/dml/sqlsrv_native_moodle_database.php

index 46a4eec..42bd2c1 100644 (file)
@@ -1098,7 +1098,9 @@ class mssql_native_moodle_database extends moodle_database {
      * @return string SQL fragment
      */
     public function sql_binary_equal($string1, $string2) {
-        return "$string1 COLLATE Latin1_General_CS_AS = $string2";
+        //TODO: we need to make sure this does not break unique indexes
+        //return "$string1 COLLATE Latin1_General_CS_AS = $string2";
+        return "$string1 = $string2";
     }
 
     /**
index c07793e..fdd3918 100644 (file)
@@ -1033,7 +1033,9 @@ class mysqli_native_moodle_database extends moodle_database {
      * @return string SQL fragment
      */
     public function sql_binary_equal($string1, $string2) {
-        return "BINARY $string1 = $string2";
+        //TODO: we need to make sure this does not break unique indexes
+        //return "BINARY $string1 = $string2";
+        return "$string1 = $string2";
     }
 
     /**
index c73e585..a64770b 100644 (file)
@@ -1192,7 +1192,9 @@ class sqlsrv_native_moodle_database extends moodle_database {
      * @return string SQL fragment
      */
     public function sql_binary_equal($string1, $string2) {
-        return "$string1 COLLATE Latin1_General_CS_AS = $string2";
+        //TODO: we need to make sure this does not break unique indexes
+        //return "$string1 COLLATE Latin1_General_CS_AS = $string2";
+        return "$string1 = $string2";
     }
 
     /**