Index: includes/database/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/schema.inc,v
retrieving revision 1.39
diff -u -p -r1.39 schema.inc
--- includes/database/schema.inc	22 Aug 2010 13:55:53 -0000	1.39
+++ includes/database/schema.inc	13 Nov 2010 17:52:17 -0000
@@ -68,6 +68,9 @@
  *       the precision (total number of significant digits) and scale
  *       (decimal digits right of the decimal point). Both values are
  *       mandatory. Ignored for other field types.
+ *     - 'binary': For type 'char', 'varchar' or 'text' fields on MySQL, forces
+ *       a case-sensitive binary collation. This has no effect on other database
+ *       types for which case sensitivity is already the default behavior.
  *     All parameters apart from 'type' are optional except that type
  *     'numeric' columns must specify 'precision' and 'scale'.
  *  - 'primary key': An array of one or more key column specifiers (see below)
Index: includes/database/mysql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v
retrieving revision 1.43
diff -u -p -r1.43 schema.inc
--- includes/database/mysql/schema.inc	22 Oct 2010 15:18:56 -0000	1.43
+++ includes/database/mysql/schema.inc	13 Nov 2010 17:52:17 -0000
@@ -134,6 +134,9 @@ class DatabaseSchema_mysql extends Datab
 
     if (in_array($spec['mysql_type'], array('VARCHAR', 'CHAR', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'TEXT')) && isset($spec['length'])) {
       $sql .= '(' . $spec['length'] . ')';
+      if (!empty($spec['binary'])) {
+        $sql .= ' BINARY';
+      }
     }
     elseif (isset($spec['precision']) && isset($spec['scale'])) {
       $sql .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.524
diff -u -p -r1.524 system.install
--- modules/system/system.install	13 Nov 2010 17:40:09 -0000	1.524
+++ modules/system/system.install	13 Nov 2010 17:52:17 -0000
@@ -805,6 +805,7 @@ function system_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'binary' => TRUE,
       ),
       'filemime' => array(
         'description' => "The file's MIME type.",
@@ -2204,6 +2205,7 @@ function system_update_7034() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'binary' => TRUE,
       ),
       'filemime' => array(
         'description' => "The file's MIME type.",
@@ -2918,6 +2920,23 @@ function system_update_7065() {
 }
 
 /**
+ * Apply binary collation to the file_managed.uri column.
+ */
+function system_update_7066() {
+  $spec = array(
+    'description' => 'The URI to access the file (either local or remote).',
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => TRUE,
+    'default' => '',
+    'binary' => TRUE,
+  );
+  db_drop_unique_key('file_managed', 'uri');
+  db_change_field('file_managed', 'uri', 'uri', $spec,
+    array('unique keys' => array('uri' => array('uri'))));
+}
+
+/**
  * @} End of "defgroup updates-6.x-to-7.x"
  * The next series of updates should start at 8000.
  */
