Bug #22761 mysqldump reports no errors when using --routines without mysql.proc privileges
Submitted: 27 Sep 2006 19:43 Modified: 23 Apr 2007 14:22
Reporter: Mark Leith Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:5.0.24 OS:Any (Any)
Assigned to: Assigned Account CPU Architecture:Any
Tags: mysqldump, privileges, routines

[27 Sep 2006 19:43] Mark Leith
Description:
mysqldump returns no errors, and silently ignores CREATE PROCEDURE statements, when running the dump using a user that does not have SELECT privileges for the mysql.proc table.

This is silently allowing inconsistent backups.

How to repeat:
use test;
drop table t1;
create table t1 (i int);
drop procedure p1;
delimiter //
create procedure p1() begin select 1; end//
delimiter ;
grant all on test.* to test@localhost;
exit
mysqldump -u test --routines --databases test > test.sql
grep p1 test.sql

Suggested fix:
Raise an error with mysqldump when privileges are lacking, or drop the requirement for privileges on mysql.proc to be able to use the --routines option.
[23 Apr 2007 14:22] Tatiana Azundris Nuernberg
fixed in patch for Bug#27293
[1 May 2007 20:58] Bugs System
Pushed into 5.1.18-beta
[1 May 2007 20:59] Bugs System
Pushed into 5.0.42