$ kea-admin db-upgrade mysql -u database-user -p database-password -n database-name
+.. note::
+
+ To search host reservations by hostname it is critical the collation of
+ the hostname column in the host table to be case-insensitive. Fortunately
+ the default collation in MySQL is case-insensitive. You can verify this
+ on your MySQL installation by:
+
+ .. code-block:: mysql
+
+ mysql> SELECT COLLATION('');
+ +-----------------+
+ | COLLATION('') |
+ +-----------------+
+ | utf8_general_ci |
+ +-----------------+
+
+ According to the naming of collations when the name finishes by ``_ci``
+ the collation is case-insensitive.
+
.. _pgsql-database:
PostgreSQL
/// This method returns all @c Host objects which represent reservations
/// using a specified hostname.
///
+ /// @note: as hostnames are case-insensitive the search key is given
+ /// in lower cases, search indexes should either be case-insensitive
+ /// or be case-sensitive using the lower case version of hostnames.
+ ///
/// @param hostname The lower case hostname.
///
/// @return Collection of const @c Host objects.
/// This method returns all @c Host objects which represent reservations
/// using a specified hostname.
///
+ /// Cassandra uses the new indexed lower_case_hostname column.
+ ///
/// @param hostname The lower case hostname.
///
/// @return Collection of const @c Host objects.
>,
// Sixth index is used to search for the host using hostname
+ // (case-sensitive compare so the key is in lower case).
boost::multi_index::ordered_non_unique<
// Index using values returned by the @c Host::getLowerHostname
boost::multi_index::const_mem_fun<Host, std::string,
/// This method returns all @c Host objects which represent reservations
/// using a specified hostname.
///
+ /// MySQL uses the case-insensitive hosts_by_hostname index on hostname.
+ ///
/// @param hostname The lower case hostname.
///
/// @return Collection of const @c Host objects.
/// This method returns all @c Host objects which represent reservations
/// using a specified hostname.
///
+ /// PostgreSQL uses the hosts_by_hostname index on LOWER(hostname).
+ ///
/// @param hostname The lower case hostname.
///
/// @return Collection of const @c Host objects.