Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 306066

SQLite Drive Should Use COLLATE NOCASE

$
0
0

SQLite does case-sensitive searching unless you specify COLLATE NOCASE when creating the database schema, or include COLLATE NOCASE in the select clause. MySQL and Postgres are case-insensitive by default. In the interest of uniformity, I propose that the SQLite driver include COLLATE NOCASE in all column creations by default, unless a local override is provided via the schema API. Here's a (very lightly tested) diff:

--- schema.inc  (revision 1568)
+++ schema.inc  (working copy)
@@ -181,6 +181,8 @@
       if (empty($spec['not null']) && !isset($spec['default'])) {
         $sql .= ' DEFAULT NULL';
       }
+
+      $sql .= ' COLLATE NOCASE';
     }
     return $sql;
   }

Viewing all articles
Browse latest Browse all 306066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>