Index: includes/database/mysql/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/mysql/schema.inc,v
retrieving revision 1.12
diff -u -9 -p -r1.12 schema.inc
--- includes/database/mysql/schema.inc	14 Mar 2009 20:34:17 -0000	1.12
+++ includes/database/mysql/schema.inc	26 Mar 2009 23:44:22 -0000
@@ -54,19 +54,19 @@ class DatabaseSchema_mysql extends Datab
    * @param $name
    *   The name of the table to create.
    * @param $table
    *   A Schema API table definition array.
    * @return
    *   An array of SQL statements to create the table.
    */
   protected function createTableSql($name, $table) {
     if (empty($table['mysql_suffix'])) {
-      $table['mysql_suffix'] = 'DEFAULT CHARACTER SET UTF8';
+      $table['mysql_suffix'] = 'DEFAULT CHARACTER SET UTF8 COLLATE utf8_bin';
     }
 
     $sql = "CREATE TABLE {" . $name . "} (\n";
 
     // Add the SQL statement for each field.
     foreach ($table['fields'] as $field_name => $field) {
       $sql .= $this->createFieldSql($field_name, $this->processField($field)) . ", \n";
     }
 
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.312
diff -u -9 -p -r1.312 system.install
--- modules/system/system.install	17 Mar 2009 15:26:29 -0000	1.312
+++ modules/system/system.install	26 Mar 2009 23:44:22 -0000
@@ -3062,33 +3062,52 @@ function system_update_7011() {
     'rid' => $rid,
     'permission' => 'bypass node access',
     ));
   }
   $insert->execute();
   return $ret;
 }
 
 /**
+ * Make tables case-sensitive on MySQL.
+ */
+function system_update_7012() {
+  $ret = array();
+  if (db_driver() == 'mysql') {
+    // Table names as used in D6. Some have changed and are no longer reported
+    // by hook_schema(). The list is generated using the following command:
+    // grep -r "^ \+\$schema\['[a-z_]\+'\] =" modules | cut -d\' -f2 | sort -u | xargs -I '*' echo -n "'*', "
+    $tables = array('access', 'accesslog', 'actions', 'actions_aid', 'aggregator_category', 'aggregator_category_feed', 'aggregator_category_item', 'aggregator_feed', 'aggregator_item', 'authmap', 'batch', 'blocks', 'blocks_roles', 'blogapi_files', 'book', 'book_temp', 'boxes', 'cache', 'cache_block', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page', 'cache_update', 'comments', 'contact', 'files', 'filter_formats', 'filters', 'flood', 'forum', 'history', 'languages', 'locales_source', 'locales_target', 'menu_custom', 'menu_links', 'menu_router', 'node', 'node_access', 'node_comment_statistics', 'node_counter', 'node_revisions', 'node_type', 'openid_association', 'permission', 'poll', 'poll_choices', 'poll_votes', 'profile_fields', 'profile_values', 'role', 'search_dataset', 'search_index', 'search_node_links', 'search_total', 'sessions', 'system', 'term_data', 'term_hierarchy', 'term_node', 'term_relation', 'term_synonym', 'trigger_assignments', 'upload', 'url_alias', 'users', 'users_roles', 'variable', 'vocabulary', 'vocabulary_node_types', 'watchdog');
+    foreach ($tables as $table) {
+      if (db_table_exists($table)) {
+        $ret[] = update_sql('ALTER TABLE {' . $table . '} CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin');
+      }
+    }
+  }
+  return $ret;
+}
+
+/**
  * Rename {blocks} table to {block}, {blocks_roles} to {block_role} and
  * {boxes} to {box}.
  */
-function system_update_7012() {
+function system_update_7013() {
   $ret = array();
   db_rename_table($ret, 'blocks', 'block');
   db_rename_table($ret, 'blocks_roles', 'block_role');
   db_rename_table($ret, 'boxes', 'box');
   return $ret;
 }
 
 /**
  * Convert default time zone offset to default time zone name.
  */
-function system_update_7013() {
+function system_update_7014() {
   $ret = array();
   $timezone = NULL;
   $timezones = system_time_zones();
   // If the contributed Date module set a default time zone name, use this
   // setting as the default time zone.
   if (($timezone_name = variable_get('date_default_timezone_name')) && isset($timezones[$timezone_name])) {
     $timezone = $timezone_name;
   }
   // If the contributed Event module has set a default site time zone, look up
@@ -3117,38 +3136,38 @@ function system_update_7013() {
   }
   variable_set('date_default_timezone', $timezone);
   drupal_set_message('The default time zone has been set to <em>' . check_plain($timezone) . '</em>. Please check the ' . l('date and time configuration page', 'admin/settings/regional-settings') . ' to configure it correctly.', 'warning');
   return $ret;
 }
 
 /**
  * Drop the bootstrap column from the {system} table.
  */
-function system_update_7014() {
+function system_update_7015() {
   $ret = array();
   db_drop_field($ret, 'system', 'bootstrap');
   return $ret;
 }
 
 /**
  * Change the user logout path.
  */
-function system_update_7015() {
+function system_update_7016() {
   $ret = array();
   $ret[] = update_sql("UPDATE {menu_links} SET link_path = 'user/logout' WHERE link_path = 'logout'");
   $ret[] = update_sql("UPDATE {menu_links} SET router_path = 'user/logout' WHERE router_path = 'logout'");
   return $ret;
 }
 
 /**
  * Remove custom datatype *_unsigned in PostgreSQL.
  */
-function system_update_7016() {
+function system_update_7017() {
   $ret = array();
   // Only run these queries if the driver used is pgsql.
   if (db_driver() == 'pgsql') {
     $result = db_query("SELECT c.relname AS table, a.attname AS field,
                         pg_catalog.format_type(a.atttypid, a.atttypmod) AS type
                         FROM pg_catalog.pg_attribute a
                         LEFT JOIN pg_class c ON (c.oid =  a.attrelid)
                         WHERE pg_catalog.pg_table_is_visible(c.oid) AND c.relkind = 'r'
                         AND pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE '%unsigned%'");
@@ -3170,19 +3189,19 @@ function system_update_7016() {
     $ret[] = update_sql('DROP DOMAIN int_unsigned');
     $ret[] = update_sql('DROP DOMAIN bigint_unsigned');
   }
   return $ret;
 }
 
 /**
  * Change the theme setting 'toggle_node_info' into a per content type variable.
  */
-function system_update_7017() {
+function system_update_7018() {
   $ret = array();
   $types = node_get_types();
   if (count($types)) {
     foreach ($types as $type) {
       $node_info = theme_get_setting('toggle_node_info_' . $type->type);
       if ($node_info !== NULL) {
         variable_set('node_submitted_' . $type->type, $node_info);
         $ret[] = array('success' => TRUE, 'query' => "variable_set('node_submitted_$type->type')");
       }
@@ -3199,42 +3218,42 @@ function system_update_7017() {
   variable_set('theme_settings', $theme_settings);
   $ret[] = array('success' => TRUE, 'query' => "variable_set('theme_settings')");
 
   return $ret;
 }
 
 /**
  * Replace src index on the {url_alias} table with src, language.
  */
-function system_update_7018() {
+function system_update_7019() {
   $ret = array();
   db_add_index($ret, 'url_alias', 'src_language', array('src', 'language'));
   db_drop_index($ret, 'url_alias', 'src');
 
   return $ret;
 }
 
 /**
  * Shorten the {system}.type column and add an index on type and name.
  */
-function system_update_7019() {
+function system_update_7020() {
   $ret = array();
   db_drop_index($ret, 'system', 'modules');
   db_change_field($ret, 'system', 'type', 'type', array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''));
   db_add_index($ret, 'system', 'modules', array('type', 'status', 'weight', 'filename'));
   db_add_index($ret, 'system', 'type_name', array('type', 'name'));
   return $ret;
 }
 
 /**
  * Enable field module.
  */
-function system_update_7020() {
+function system_update_7021() {
   $ret = array();
   $module_list = array('field_sql_storage', 'field');
   drupal_install_modules($module_list);
   module_enable($module_list);
   return $ret;
 }
 
 /**
  * @} End of "defgroup updates-6.x-to-7.x"
