diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index e3517d70292809a8d5e83c1472cebe3fe04d2eb7..51603ffe3c8dbf0dd75acb04438b09c94efd9cc3 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -862,6 +862,7 @@ function system_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'binary' => TRUE,
       ),
       'uri' => array(
         'description' => 'The URI to access the file (either local or remote).',
@@ -869,6 +870,7 @@ function system_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'binary' => TRUE,
       ),
       'langcode' => array(
         'description' => 'The {language}.langcode of this file.',
diff --git a/core/modules/system/tests/file.test b/core/modules/system/tests/file.test
index c5eced152c1f3863ea28ca8a0692affd22e27faa..173d05abb74315b34efe91170f4299ecc32ede9f 100644
--- a/core/modules/system/tests/file.test
+++ b/core/modules/system/tests/file.test
@@ -2042,6 +2042,19 @@ class FileSaveTest extends FileHookTestCase {
     $this->assertNotNull($loaded_file, t("Record still exists in the database."), 'File');
     $this->assertEqual($loaded_file->status, $saved_file->status, t("Status was saved correctly."));
     $this->assertEqual($loaded_file->langcode, 'en', t("Langcode was saved correctly."));
+
+    // Try to insert a second file with the same name apart from case insensitivity
+    // to ensure the 'uri' index allows for filenames with different cases.
+    $file = (object) array(
+      'uid' => 1,
+      'filename' => 'DRUPLICON.txt',
+      'uri' => 'public://DRUPLICON.txt',
+      'filemime' => 'text/plain',
+      'timestamp' => 1,
+      'status' => FILE_STATUS_PERMANENT,
+    );
+    file_put_contents($file->uri, 'hello world');
+    file_save($file);
   }
 }