Chuck,
I have one request and one question for this patch - see below.
cbell@stripped wrote:
> Below is the list of changes that have just been committed into a local
> 6.0 repository of cbell. When cbell does a push these changes
> will be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2008-05-05 18:01:27-04:00, cbell@mysql_cab_desk. +1 -0
> BUG#33355 : Backup: hang if database is mysql
>
> Corrects issue found concerning case sensitive platforms. This patch
> allows the use of 'MYSQL' as a database for systems that have case
> sensitive identifiers.
> ---
> BUG#33355 : Backup: hang if database is mysql
>
> Patch remove case insensitive check for database named 'mysql'.
>
> sql/si_objects.cc@stripped, 2008-05-05 18:01:24-04:00, cbell@mysql_cab_desk. +3 -5
> BUG#33355 : Backup: hang if database is mysql
>
> Changes string compare to allow for case distinction.
>
> diff -Nrup a/sql/si_objects.cc b/sql/si_objects.cc
> --- a/sql/si_objects.cc 2008-04-29 10:22:40 -04:00
> +++ b/sql/si_objects.cc 2008-05-05 18:01:24 -04:00
> @@ -1573,8 +1573,7 @@ bool DatabaseObj::do_serialize(THD *thd,
> DBUG_PRINT("DatabaseObj::serialize", ("name: %s", m_db_name.c_ptr()));
>
> if ((m_db_name == String (INFORMATION_SCHEMA_NAME.str, system_charset_info))
> - ||
> - (my_strcasecmp(system_charset_info, m_db_name.c_ptr(), "mysql") == 0))
> + || (strcmp(m_db_name.c_ptr(), "mysql") == 0))
Since we have is_internal_db_name() function, please use it here. This way we
avoid code repetition and a need to fix things in 2 places.
> {
> DBUG_PRINT("backup",(" Skipping internal database %s", m_db_name.c_ptr()));
> DBUG_RETURN(TRUE);
> @@ -2674,9 +2673,8 @@ Obj *materialize_tablespace(const String
> bool is_internal_db_name(const String *db_name)
> {
> return
> - my_strcasecmp(system_charset_info,
> - ((String *) db_name)->c_ptr_safe(),
> - "mysql") == 0 ||
> + strcmp(((String *) db_name)->c_ptr_safe(),
> + "mysql") == 0 ||
> my_strcasecmp(system_charset_info,
> ((String *) db_name)->c_ptr_safe(),
> "information_schema") == 0 ||
>
Why you allow `MYSQL` but not `INFORMATION_SCHEMA` as a user database name. Is
it intentional?
Rafal