Hi!
On Nov 22, kpettersson@stripped wrote:
> ChangeSet@stripped, 2007-11-22 15:14:47+01:00, thek@adventure.(none) +4 -0
> Bug#16470 crash on grant if old grant tables
>
> Loading 4.1 into 5.0 or 5.1 failed silently because procs_priv table missing.
> This caused the server to crash on any attempt to store new grants because
> of uninitialized structures.
>
> This patch breaks up the grant loading function into two phases to allow
> for procs_priv table to fail with an warning instead of crashing the server.
Very, good!
Ok to push
consider clarifying the comment, as below
> diff -Nrup a/sql/sql_acl.cc b/sql/sql_acl.cc
> --- a/sql/sql_acl.cc 2007-08-13 15:11:13 +02:00
> +++ b/sql/sql_acl.cc 2007-11-22 15:14:45 +01:00
> }
> else
> {
> hash_free(&old_column_priv_hash);
> - hash_free(&old_proc_priv_hash);
> - hash_free(&old_func_priv_hash);
> free_root(&old_mem,MYF(0));
> }
> rw_unlock(&LOCK_grant);
> -end:
> close_thread_tables(thd);
> +
> + /* It is ok failing to load procs_priv table */
please explain why it's ok. "because we may be working with
4.1 privilege tables"
> + if (grant_reload_procs_priv(thd))
> + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "mysql.procs_priv");
> +
> + rw_wrlock(&LOCK_grant);
> + grant_version++;
> + rw_unlock(&LOCK_grant);
> +
> +end:
> DBUG_RETURN(return_val);
> }
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140