Hmm, I haven't seen the mail from Singer, yet.

On Thu, Feb 10, 2011 at 9:33 AM, Ananda Kumar <anan...@gmail.com> wrote:

> On Thu, Feb 10, 2011 at 1:58 PM, Singer X.J. Wang <w...@singerwang.com>wrote:
>
>> mysqldump -u[user] -p[pass] --where="db=`whatyouwant` and
>> name=`whatyouwant`" mysql proc
>>
>
Yes, I thought of that, too; but the manual explicitly states that manual
manipulation of the proc procedure isn't supported (which i presume to mean
there is no equivalent to *flush privileges*), so that's gonna take manual
reassembly to restore. The privileges to the procedure (creator/invoker and
so) are also in a separate table, procs_priv.

*Show create procedure* should yield a complete, executable statement that
recreates the procedure as-is.

Something to keep in mind, incidentally, is that security is *creator* by
default - the proc runs with the creator's privileges. If you migrate the
procedure to a host where that same user does not exist or has different
permissions, it might "mysteriously" not work. IMO, security should be set
to *invoker* by default, as that is also the more secure option - if you
don't have permission on the tables, I don't want you running stored procs
on them. That's for MySQL to change, though :-)


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Reply via email to